diff -Nru dcmtk-3.6.6/ANNOUNCE dcmtk-3.6.7/ANNOUNCE --- dcmtk-3.6.6/ANNOUNCE 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/ANNOUNCE 2022-04-28 13:47:25.000000000 +0000 @@ -1,12 +1,12 @@ ANNOUNCEMENT -Version 3.6.6 of the OFFIS DCMTK (DICOM ToolKit) software is now available for +Version 3.6.7 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.5: +previous version 3.6.6: -- DCMTK 3.6.6 builds correctly on older and up-to-date versions of GNU gcc - (4.2.1 to 10.2.0) Clang (3.4.2 to 11.0.0), Apple Clang 11.0.0, - Microsoft Visual Studio (2008 to 2019) and SunPro CC (5.14 and 5.15). +- DCMTK 3.6.7 builds correctly on older and up-to-date versions of GNU gcc + (4.8.5 to 10.2.0) Clang (3.4.2 to 13.0.0), Apple Clang 11.0.0, and Microsoft + Visual Studio (2010 to 2022). - Tested with the following operating systems/environments: - Android on arm64 @@ -17,104 +17,154 @@ - NetBSD on x86_64 - OpenBSD on x86_64 - OpenIndiana on x86 - - Solaris on x86 - Windows (including MinGW and Cygwin) on x86_64 and x86 For a complete list of tested systems and compilers, see the INSTALL file. - Updated data dictionary, SOP classes, well-known frame of references, - transfer syntaxes, code definitions and supported context group classes for - DICOM standard release 2020e. + transfer syntaxes [*], code definitions, supported context group classes, + and directory record types for DICOM standard release 2022b. -- Added new DCMTK module dcmect, which facilitates creation, loading, (partly) - modification and storing Enhanced CT objects: + [*] Support for the Encapsulated Uncompressed Explicit VR Little Endian + Transfer Syntax (introduced with CP-2083) is still missing. - - Also included is a general Concatenation API that allows for creating and - re-assembling Concatenations from given DICOM datasets. Right now, only - uncompressed ("unencapsulated") pixel data is supported. +- Added support for creating multi-frame images and instances of the Ophthalmic + Photography SOP Classes to img2dcm. This tool now also allows for importing + a DICOM dataset from XML file. - - The existing Segmentation API (dcmseg) as well as the new Enhanced CT API - (dcmect) both support writing and reading Concatenations via dedicated - methods. +- Added typical error handling options to xml2dcm, i.e. as known from other + tools such as dump2dcm. - - Thanks to GE Aviation for sponsoring this feature. +- All command line tools that read or write DICOM files now support reading + DICOM files/datasets from stdin and writing DICOM files/datasets to stdout. + Support of stdin and stdout is also available for the underlying classes. -- Major revision of JSON export tool (dcm2json), which should now be fully - standard compliant. +- All command line tools now output more build options with --version. -- Major revision of the dcmsign module, which now supports Elliptic Curve - (ECDSA) signatures, the DICOM SR RSA Digital Signature Profile, and CRLs in - hashed certificate directories. During signature verification the chain of - trust for the signer certificates are now fully checked and there is limited - support for the creation and verification of trusted timestamps. +- Further enhanced DICOM Structured Reporting (SR) module "dcmsr": -- Added support for the Rendition Selection Document IOD, which has been - introduced with Supplement 202 (Real-Time Video), to the dcmsr module. + - Added the Enhanced X-Ray Radiation Dose SR IOD / SOP Class introduced with + Supplement 214 to the list of known (but not yet supported) document types + in the dcmsr module. Full support for this IOD and SOP Class will follow + in a future release, as this requires the new Value Type "TABLE". -- Added support for the new Waveform Storage SOP Classes that have been - introduced with Supplement 217 (Neurophysiology Waveforms) to the DICOMDIR - generation code and to the dcmsr module. + - Added support for the optional attributes Patient's Size and Patient's + Weight from the Patient Study Module. -- Added support for the new 2nd generation RT Storage SOP Classes that have - been introduced with Supplement 175, 176 and 199, as well as for the new - Encapsulated OBJ and MTL Storage SOP Classes (Supplement 208) to the - DICOMDIR generation code. + - Added support for Context Group CID 247 "Laterality Left-Right Only". -- Added TLS support to the DcmSCP and DcmSCPPool classes and to the dcmrecv - command line tool. + - Implemented support for CP-2023, CP-2053 and CP-2084, i.e. changes to the + IOD-specific Relationship Content Constraints and regarding missing numeric + measurement value. -- Updated and completely revised DIMSE Status Code definitions. Now, the - definitions and also the log output are consistent with the current edition - of the DICOM standard. + - Also implemented support for CP-1789 and CP-1998 to the submodule "cmr". + Both CPs relax requirements for the presence of content items or included + templates in TID 1500 "Measurement Report". -- Significant performance enhancements for code that gets an item from or - inserts an item into a sequence with a large number of items. +- Moved xml2dcm functionality into a class to facilitate its use in programs. + This also means that dcmdata now depends on libxml2 (if support enabled). -- DCMTK now successfully compiles when UNICODE/_UNICODE is defined on Windows. +- Modified DicomImage's rendering of overlay planes for multi-frame images + by implementing support for CP-1974 "Overlay usage with Multi-frame Image + unclear". -- When compiling on Windows, new CMake options can now be used to control the - Win32 build model (multi-threaded or multi-threaded DLL). +- Fixed issue in module "dcmseg" that caused the maximum number of frames in + segmentation objects to be limited to 65,535. -- Fixed various issues that occurred after the official 3.6.5 release. +- Implemented various changes to the module "dcmtls": + + - Added functions for offline certificate verification. + + - Added support for intermediate CAs and CRLs. + + - Explicitly set a 32-bit random number as TLS session ID and disable TLS + session caching in OpenSSL. + + - Changed the default security profile from the BCP 195 TLS profile to the + Non-downgrading BCP 195 TLS Profile. + + - Revised error handling: Replaced the DcmTransportLayerStatus enumeration + by proper OFCondition error codes. + +- Improved support of the OpenSSL library: + + - Added support for OpenSSL 3.0.x. + + - Introduced a set of new configure tests for the various functions, header + files and macros that have changed between different OpenSSL versions and + require special handling in DCMTK. This approach replaces the conditional + compilation based on version numbers. + + - Introduced a new advanced CMake variable that allows for adding a custom + postfix to all file names of all libraries that change their ABI when + linking against OpenSSL. + +- Harmonized the configure options for using DICOM data dictionaries, both + the built-in and external ones. + +- CMake-related enhancements and other changes: + + - Added CMake option that helps with the generation of binary executables + that run on different distributions. + + - Introduced a CMake option for static linking. + + - Added support for the PkgConfig package. + + - Enhanced support for cross-compiling. + + - Changed minimum required CMake version to 3.0.0. + + - Enabled various compiler warnings by default. + +- Removed macro USE_STD_CXX_INCLUDES which allowed to include old C headers + instead of using their respective counterpart coming with C++. + +- Fixed various issues that occurred after the official 3.6.6 release. See CHANGES file for details. Many people have contributed to this new release of DCMTK, appearing here in alphabetical order. Thank you very much for your support! - Michel Amat (GitHub user "amatm") - Bartosz Bialoskorski - Jesper Bojesen - Marcel Claus - Jake Cobb - Martin Czarnowski + Jinsheng Ba + Sharon Brizinov and Noam Moshe + Daniel Calvo + Tai Chi Minh Ralph Eastwood Matthias Gierlings - Niklas Johansson (GitHub user "Raphexion") - Andreas Keizers - Peter Klotz - Damien Lerat - Mathieu Malaterre - Robert Mulcahey - Maria Nedyak - Steve Pieper - Sergey Razuvaev - Markus Sabin - Maria Samoylova - Adrian Schmidt-Foehre - Waldo Valenzuela + Daniel Grieger + Helmut Grohne + Igor Kostyukov + W. Adam Koszek + Jason Lambert + Par Lidberg + Mathieu Malaterre + Abdallah Maouche + Gilles Mevel + Jasper den Otter + Alex Reinking + Claus Stovgaard + Waldo Valenzuela + Christian Wetzel + + DCMTK forum users "alciregi", "alciregi", "Shaeto", "st80rules", + "upnorth173", "wrenashe" - DCMTK forum users "CStarkey", "JustSomeGuy", "Shaeto", and "ruben.cruz" - GitHub user "iboB" + GitHub users "gsmethells", "kayarre", "malaterre", "Staars" Members of the DCMTK Team who have worked on this release are: - Pedro Arizpe Gomez Marco Eichelberg Michael Onken Joerg Riesmeier Jan Schlamelcher +Student associates: + + Marcel Baumann + Nikolas Goldhammer + The DCMTK software can be downloaded via: https://dicom.offis.de/dcmtk or https://www.dcmtk.org/ -OFFIS e.V., Oldenburg, Germany, 2021-01-14 +OFFIS e.V., Oldenburg, Germany, 2022-04-22 diff -Nru dcmtk-3.6.6/CMake/3rdparty.cmake dcmtk-3.6.7/CMake/3rdparty.cmake --- dcmtk-3.6.6/CMake/3rdparty.cmake 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/CMake/3rdparty.cmake 2022-04-28 13:47:25.000000000 +0000 @@ -38,7 +38,7 @@ message(STATUS "Info: DCMTK TIFF support will be enabled") include_directories(${TIFF_INCLUDE_DIR} ${JPEG_INCLUDE_DIR}) endif() - set(LIBTIFF_LIBS ${TIFF_LIBRARY} ${JPEG_LIBRARY}) + set(LIBTIFF_LIBS ${TIFF_LIBRARY} ${TIFF_EXTRA_LIBS_STATIC} ${JPEG_LIBRARY}) endif() endif() @@ -75,7 +75,7 @@ message(STATUS "Info: DCMTK OPENSSL support will be enabled") set(WITH_OPENSSL 1) include_directories(${OPENSSL_INCLUDE_DIR}) - set(OPENSSL_LIBS ${OPENSSL_LIBRARIES}) + set(OPENSSL_LIBS ${OPENSSL_LIBRARIES} ${OPENSSL_EXTRA_LIBS_STATIC}) CHECK_LIBRARY_EXISTS(dl dlopen "" HAVE_LIBDL) if(HAVE_LIBDL) set(OPENSSL_LIBS ${OPENSSL_LIBS} dl) @@ -99,7 +99,7 @@ message(STATUS "Info: DCMTK XML support will be enabled") set(WITH_LIBXML 1) include_directories(${LIBXML2_INCLUDE_DIR}) - set(LIBXML_LIBS ${LIBXML2_LIBRARIES}) + set(LIBXML_LIBS ${LIBXML2_LIBRARIES} ${LIBXML2_EXTRA_LIBS_STATIC}) endif() endif() @@ -120,7 +120,7 @@ # Find libsndfile if(DCMTK_WITH_SNDFILE) - find_package(Sndfile QUIET) + find_package(SNDFILE QUIET) if(NOT SNDFILE_LIBS) message(STATUS "Warning: SNDFILE support will be disabled because libsndfile was not found.") set(WITH_SNDFILE "") @@ -129,14 +129,14 @@ message(STATUS "Info: DCMTK SNDFILE support will be enabled") set(WITH_SNDFILE 1) include_directories(${SNDFILE_INCLUDE_DIRS}) - set(SNDFILE_LIBS ${SNDFILE_LIBRARIES}) + set(SNDFILE_LIBS ${SNDFILE_LIBRARIES} ${SNDFILE_EXTRA_LIBS_STATIC}) endif() endif() # Find libiconv if(DCMTK_WITH_ICONV) find_package(Iconv QUIET) - find_package(Charset QUIET) + find_package(LIBCHARSET QUIET) if(ICONV_FOUND) if(NOT Iconv_IS_BUILT_IN) set(LIBICONV_FOUND ${ICONV_FOUND}) @@ -165,7 +165,7 @@ # Find libwrap if(DCMTK_WITH_WRAP) - find_package(Wrap QUIET) + find_package(WRAP QUIET) if(NOT WRAP_FOUND) message(STATUS "Warning: WRAP support will be disabled because libwrap was not found.") set(WITH_TCPWRAPPER "") @@ -174,13 +174,20 @@ message(STATUS "Info: DCMTK WRAP support will be enabled") set(WITH_TCPWRAPPER 1) include_directories(${WRAP_INCLUDE_DIRS}) - set(WRAP_LIBS ${WRAP_LIBRARIES}) + set(WRAP_LIBS ${WRAP_LIBRARIES} ${WRAP_EXTRA_LIBS_STATIC}) endif() endif() # Find OpenJPEG if(DCMTK_WITH_OPENJPEG) - find_package(OpenJPEG QUIET) + if(DCMTK_USE_OWN_FINDOPENJPEG_MODULE) + # PREPEND and POP_FRONT can only be used since version 3.15.so we use more compatible commands. + list(INSERT CMAKE_MODULE_PATH 0 "${CMAKE_CURRENT_SOURCE_DIR}/${DCMTK_CMAKE_INCLUDE}/CMake/") + find_package(OpenJPEG QUIET MODULE) + list(REMOVE_AT CMAKE_MODULE_PATH 0) + else() + find_package(OpenJPEG QUIET PATH_SUFFIXES "openjpeg-2.4.0" "openjpeg-2.3.1" "openjpeg-2.3.0") + endif() if(NOT OPENJPEG_FOUND) message(STATUS "Warning: OpenJPEG support will be disabled because the OpenJPEG library was not found.") set(WITH_OPENJPEG "") @@ -188,8 +195,8 @@ else() message(STATUS "Info: DCMTK OpenJPEG support will be enabled") set(WITH_OPENJPEG 1) - include_directories(${OPENJPEG_INCLUDE_DIRS}) - set(OPENJPEG_LIBS ${OPENJPEG_LIBRARIES}) + include_directories(BEFORE ${OPENJPEG_INCLUDE_DIRS}) + set(OPENJPEG_LIBS ${OPENJPEG_LIBRARIES} ${OPENJPEG_EXTRA_LIBS_STATIC}) endif() endif() else() @@ -397,7 +404,7 @@ message(STATUS "Info: DCMTK ICU support will be enabled") set(WITH_ICU 1) set(ICU_INCDIR ${ICU_INCLUDE_DIR}) - set(ICU_LIBS ${ICU_LIBRARIES}) + set(ICU_LIBS ${ICU_LIBRARIES} ${ICU_EXTRA_LIBS_STATIC}) include_directories(${ICU_INCLUDE_DIR}) endif() endif() diff -Nru dcmtk-3.6.6/CMake/dcmtkAfterModules.cmake dcmtk-3.6.7/CMake/dcmtkAfterModules.cmake --- dcmtk-3.6.6/CMake/dcmtkAfterModules.cmake 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/CMake/dcmtkAfterModules.cmake 2022-04-28 13:47:25.000000000 +0000 @@ -16,6 +16,7 @@ # Export target for build tree set_property(GLOBAL APPEND PROPERTY DCMTK_LIBRARY_TARGETS dcmtk) + target_link_libraries(DCMTK INTERFACE dcmtk) # Declare installation files. Also export libs and executables to DCMTKTargets.cmake. install(TARGETS dcmtk diff -Nru dcmtk-3.6.6/CMake/DCMTKConfig.cmake.in dcmtk-3.6.7/CMake/DCMTKConfig.cmake.in --- dcmtk-3.6.6/CMake/DCMTKConfig.cmake.in 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/CMake/DCMTKConfig.cmake.in 2022-04-28 13:47:25.000000000 +0000 @@ -28,8 +28,13 @@ 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@) + +# Define the type of standard dictionary that we want to use: +# 0 - Do not load any default dictionary on startup +# 1 - Load builtin dictionary on startup +# 2 - Load external (i.e. file-based) dictionary on startup +set(DCM_DICT_DEFAULT @DCM_DICT_DEFAULT@) +set(DCM_DICT_USE_DCMDICTPATH @DCM_DICT_USE_DCMDICTPATH@) set(DCMTK_ENABLE_PRIVATE_TAGS @DCMTK_ENABLE_PRIVATE_TAGS@) # Compiler / standard library features diff -Nru dcmtk-3.6.6/CMake/DCMTKConfig.old_cmake.in dcmtk-3.6.7/CMake/DCMTKConfig.old_cmake.in --- dcmtk-3.6.6/CMake/DCMTKConfig.old_cmake.in 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/CMake/DCMTKConfig.old_cmake.in 2022-04-28 13:47:25.000000000 +0000 @@ -31,8 +31,13 @@ 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@) + +# Define the type of standard dictionary that we want to use: +# 0 - Do not load any default dictionary on startup +# 1 - Load builtin dictionary on startup +# 2 - Load external (i.e. file-based) dictionary on startup +SET(DCM_DICT_DEFAULT @DCM_DICT_DEFAULT@) +SET(DCM_DICT_USE_DCMDICTPATH @DCM_DICT_USE_DCMDICTPATH@) SET(DCMTK_ENABLE_PRIVATE_TAGS @DCMTK_ENABLE_PRIVATE_TAGS@) # Compiler / standard library features diff -Nru dcmtk-3.6.6/CMake/dcmtkMacros.cmake dcmtk-3.6.7/CMake/dcmtkMacros.cmake --- dcmtk-3.6.6/CMake/dcmtkMacros.cmake 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/CMake/dcmtkMacros.cmake 2022-04-28 13:47:25.000000000 +0000 @@ -90,16 +90,24 @@ set_target_properties(${LIBRARY}${DCMTK_LIBRARY_SUFFIX} PROPERTIES COMPILE_DEFINITIONS "${LIBRARY}_EXPORTS") endif() + get_filename_component(DCMTK_ADD_LIBRARY_PARENT_DIR "${CMAKE_CURRENT_SOURCE_DIR}" PATH) + target_include_directories(${LIBRARY}${DCMTK_LIBRARY_SUFFIX} PUBLIC + $ + $ + ) + if(NOT BUILD_SINGLE_SHARED_LIBRARY) # Remember export target for writing it to build tree later set_property(GLOBAL APPEND PROPERTY DCMTK_LIBRARY_TARGETS ${LIBRARY}${DCMTK_LIBRARY_SUFFIX}) + target_link_libraries(DCMTK INTERFACE ${LIBRARY}${DCMTK_LIBRARY_SUFFIX}) # Declare installation files install(TARGETS ${LIBRARY}${DCMTK_LIBRARY_SUFFIX} EXPORT DCMTKTargets RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT bin LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT shlib - ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT lib) + ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT lib + ) endif() endmacro() @@ -186,3 +194,52 @@ endforeach() set("${VAR}" ${N} PARENT_SCOPE) endfunction() + +function(DCMTK_CREATE_INSTALL_EXPORTS) + # DCMTKTargets.cmake will contain list of executables and libraries produced + # DCMTKConfigVersion.cmake will contain DCMTK version information + # DCMTKConfig.cmake will contain options used to build DCMTK + # + # All three files are created within the build tree's main directory (handled in + # CMake/GenerateCMakeExports.cmake, and are installed to locations (OS-specific + # under the main install dir (handled directly below). + + # Only create fully-fledged CMake export files if we have the related commands + include("${DCMTK_MACROS_DIR}/CheckCMakeCommandExists.cmake") + include(CMakePackageConfigHelpers OPTIONAL) + CHECK_CMAKE_COMMAND_EXISTS("CONFIGURE_PACKAGE_CONFIG_FILE") + CHECK_CMAKE_COMMAND_EXISTS("WRITE_BASIC_PACKAGE_VERSION_FILE") + + if(HAVE_CONFIGURE_PACKAGE_CONFIG_FILE AND HAVE_WRITE_BASIC_PACKAGE_VERSION_FILE) + + # Create and configure CMake export files + include("${DCMTK_MACROS_DIR}/GenerateCMakeExports.cmake") + + # ${DCMTK_INSTALL_CONFIG} and ${DCMTK_CONFIG_VERSION} are + # defined within CMake/GenerateCMakeExports.cmake. + # Install DCMTKTargets.cmake to install tree + install(EXPORT DCMTKTargets FILE DCMTKTargets.cmake NAMESPACE DCMTK:: + 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) + + else() + + # Warning that we use old "configure_file" command + message(STATUS "Warning: Using old configure_file() mechanism to produce DCMTKConfig.cmake") + + # Actually configure file + configure_file("${DCMTK_MACROS_DIR}/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}" + COMPONENT cmake) + + endif() +endfunction() + +set(DCMTK_MACROS_DIR "${CMAKE_CURRENT_LIST_DIR}" CACHE INTERNAL "") diff -Nru dcmtk-3.6.6/CMake/dcmtk.pc.in dcmtk-3.6.7/CMake/dcmtk.pc.in --- dcmtk-3.6.6/CMake/dcmtk.pc.in 1970-01-01 00:00:00.000000000 +0000 +++ dcmtk-3.6.7/CMake/dcmtk.pc.in 2022-04-28 13:47:25.000000000 +0000 @@ -0,0 +1,14 @@ + prefix="@CMAKE_INSTALL_PREFIX@" + exec_prefix="${prefix}" + libdir="${prefix}/@CMAKE_INSTALL_LIBDIR@" + includedir="${prefix}/include/" + + Name: DCMTK + Description: DICOM Toolkit (DCMTK) + URL: https://dcmtk.org + Version: @DCMTK_MAJOR_VERSION@.@DCMTK_MINOR_VERSION@.@DCMTK_BUILD_VERSION@ + Requires: @PKGCONF_REQ_PUB@ + Requires.private: @PKGCONF_REQ_PRIV@ + Cflags: -I"${includedir}" + Libs: -L"${libdir}" @PKGCONF_LIBS@ + Libs.private: -L"${libdir}" @PKGCONF_LIBS_PRIV@ diff -Nru dcmtk-3.6.6/CMake/dcmtkPrepare.cmake dcmtk-3.6.7/CMake/dcmtkPrepare.cmake --- dcmtk-3.6.6/CMake/dcmtkPrepare.cmake 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/CMake/dcmtkPrepare.cmake 2022-04-28 13:47:25.000000000 +0000 @@ -7,11 +7,6 @@ endif() set(DCMTK_CONFIGURATION_DONE true) -# Latest CMake version tested -if(CMAKE_BACKWARDS_COMPATIBILITY GREATER 3.18.4) - set(CMAKE_BACKWARDS_COMPATIBILITY 3.18.4 CACHE STRING "Latest version of CMake when this project was released." FORCE) -endif() - # 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 @@ -38,14 +33,14 @@ # 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 6) +set(DCMTK_BUILD_VERSION 7) # 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 16) +set(DCMTK_ABI_VERSION 17) # Package "release" settings (some are currently unused and, therefore, disabled) set(DCMTK_PACKAGE_NAME "dcmtk") -set(DCMTK_PACKAGE_DATE "2021-01-14") +set(DCMTK_PACKAGE_DATE "2022-04-22") 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 "") @@ -54,8 +49,95 @@ #set(DCMTK_PACKAGE_BUGREPORT "bugs@dcmtk.org") #set(DCMTK_PACKAGE_URL "http://www.dcmtk.org/") -# Shared library version information -SET(DCMTK_LIBRARY_PROPERTIES VERSION "${DCMTK_ABI_VERSION}.${DCMTK_PACKAGE_VERSION}" SOVERSION "${DCMTK_ABI_VERSION}") +option(DCMTK_LINK_STATIC "Statically link all libraries and tools with the runtime and third party libraries." OFF) +# Modify linker flags and libraries for static builds if enabled by the user +if(DCMTK_LINK_STATIC) + set(CMAKE_EXE_LINKER_FLAGS "-static") + set(CMAKE_FIND_LIBRARY_SUFFIXES ".a") + # remove "-Wl,-Bdynamic" + list(REMOVE_ITEM CMAKE_EXE_LINK_DYNAMIC_C_FLAGS "-Wl,-Bdynamic") + list(REMOVE_ITEM CMAKE_EXE_LINK_DYNAMIC_CXX_FLAGS "-Wl,-Bdynamic") + # remove -fPIC + list(REMOVE_ITEM CMAKE_SHARED_LIBRARY_C_FLAGS "-fPIC") + list(REMOVE_ITEM CMAKE_SHARED_LIBRARY_CXX_FLAGS "-fPIC") + # remove -rdynamic + list(REMOVE_ITEM CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "-rdynamic") + list(REMOVE_ITEM CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS "-rdynamic") + # not sure about this one, maybe static libraries don't need it: + set(DCMTK_LIBRARY_PROPERTIES VERSION "${DCMTK_ABI_VERSION}.${DCMTK_PACKAGE_VERSION}") +else() + # Shared library version information + set(DCMTK_LIBRARY_PROPERTIES VERSION "${DCMTK_ABI_VERSION}.${DCMTK_PACKAGE_VERSION}" SOVERSION "${DCMTK_ABI_VERSION}") +endif() + +option(DCMTK_PORTABLE_LINUX_BINARIES "Create ELF binaries while statically linking all third party libraries and libstdc++." OFF) +if(DCMTK_PORTABLE_LINUX_BINARIES) + if (DCMTK_LINK_STATIC) + message(FATAL_ERROR "Options DCMTK_LINK_STATIC and DCMTK_PORTABLE_LINUX_BINARIES are mutually exclusive.") + endif() + # only use static versions of third party libraries + set(CMAKE_FIND_LIBRARY_SUFFIXES ".a") + + # When using gcc and clang, use the static version of libgcc/libstdc++. + if ((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") OR + (CMAKE_CXX_COMPILER_ID STREQUAL "Clang") OR + (CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang") OR + (CMAKE_CXX_COMPILER_ID STREQUAL "ARMClang") OR + (CMAKE_CXX_COMPILER_ID STREQUAL "XLClang")) + set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static-libgcc -static-libstdc++") + endif() +endif() + +function(get_static_library STATIC_NAME LIBRARYNAME) + find_library("${STATIC_NAME}" "${LIBRARYNAME}") + if("${${STATIC_NAME}}" STREQUAL "${STATIC_NAME}-NOTFOUND") + # If the library is not found we probably do not need is as dependency. In the worst case it + # needs to be installed, but then it should also be found. + set("${STATIC_NAME}" "" PARENT_SCOPE) + else() + set("${STATIC_NAME}" "${${STATIC_NAME}}" PARENT_SCOPE) + endif() +endfunction() + +# Define additional library dependencies for statically linking the third-party libraries. +# This is difficult and error-prone, because we cannot know which extra libraries were used +# during compilation on a specific operating system. +# This should possibly be enhanced by using find_package() at some point. The best solution +# would probably be to compile all third-party libraries ourself. +if(DCMTK_LINK_STATIC OR DCMTK_PORTABLE_LINUX_BINARIES) + get_static_library("STATIC_DL" "libdl.a") + set(ICU_EXTRA_LIBS_STATIC "${STATIC_DL}") + get_static_library("STATIC_LZMA" "liblzma.a") + get_static_library("STATIC_ZLIB" "libz.a") + get_static_library("STATIC_ICUUC" "libicuuc.a") + get_static_library("STATIC_ICUDATA" "libicudata.a") + set(LIBXML2_EXTRA_LIBS_STATIC "${STATIC_LZMA}" "${STATIC_ZLIB}" "${STATIC_ICUUC}" "${STATIC_ICUDATA}" "${STATIC_DL}") + get_static_library("STATIC_PTHREAD" "libpthread.a") + set(OPENJPEG_EXTRA_LIBS_STATIC "${STATIC_PTHREAD}") + set(OPENSSL_EXTRA_LIBS_STATIC "${STATIC_DL}") + get_static_library("STATIC_OGG" "libogg.a") + get_static_library("STATIC_VORBIS" "libvorbis.a") + get_static_library("STATIC_VORBISENC" "libvorbisenc.a") + get_static_library("STATIC_OPUS" "libopus.a") + get_static_library("STATIC_FLAC" "libFLAC.a") + set(SNDFILE_EXTRA_LIBS_STATIC "${STATIC_VORBIS}" "${STATIC_OGG}" "${STATIC_VORBISENC}" "${STATIC_OPUS}" "${STATIC_FLAC}") + get_static_library("STATIC_WEBP" "libwebp.a") + get_static_library("STATIC_ZSTD" "libzstd.a") + get_static_library("STATIC_JBIG" "libjbig.a") + get_static_library("STATIC_JPEG" "libjpeg.a") + get_static_library("STATIC_DEFLATE" "libdeflate.a") + set(TIFF_EXTRA_LIBS_STATIC "${STATIC_WEBP}" "${STATIC_ZSTD}" "${STATIC_LZMA}" "${STATIC_JBIG}" "${STATIC_JBIG}" "${STATIC_DEFLATE}" "${STATIC_ZLIB}") + get_static_library("STATIC_NSL" "libnsl.a") + set(WRAP_EXTRA_LIBS_STATIC "${STATIC_NSL}") +else() + set(ICU_EXTRA_LIBS_STATIC) + set(LIBXML2_EXTRA_LIBS_STATIC) + set(OPENJPEG_EXTRA_LIBS_STATIC) + set(OPENSSL_EXTRA_LIBS_STATIC) + set(SNDFILE_EXTRA_LIBS_STATIC) + set(TIFF_EXTRA_LIBS_STATIC) + set(WRAP_EXTRA_LIBS_STATIC) +endif() # Gather information about the employed CMake version's behavior set(DCMTK_CMAKE_HAS_CXX_STANDARD FALSE) @@ -76,6 +158,7 @@ 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(DCMTK_TLS_LIBRARY_POSTFIX "" CACHE STRING "Postfix for libraries that change their ABI when using OpenSSL.") # 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/") if(BUILD_SINGLE_SHARED_LIBRARY) @@ -124,27 +207,31 @@ DCMTK_INFERABLE_OPTION(DCMTK_ENABLE_STL_SYSTEM_ERROR "Enable use of STL system_error.") DCMTK_INFERABLE_OPTION(DCMTK_ENABLE_CXX11 "Enable use of native C++11 features (eg. move semantics).") -# Built-in (compiled-in) dictionary enabled on Windows per default, otherwise -# disabled. Loading of external dictionary via run-time is, per default, -# configured the the opposite way since most users won't be interested in using -# the external default dictionary if it is already compiled in. +# On Windows, the built-in dictionary is default, on Unix the external one. +# It is not possible to use both, built-in plus external default dictionary. if(WIN32 OR MINGW) - option(DCMTK_ENABLE_BUILTIN_DICTIONARY "Configure DCMTK with compiled-in data dictionary." ON) - option(DCMTK_ENABLE_EXTERNAL_DICTIONARY "Configure DCMTK to load external dictionary from default path on startup." ON) + set(DCMTK_DEFAULT_DICT "builtin" CACHE STRING "Denotes whether DCMTK will use built-in (compiled-in), external (file), or no default dictionary on startup") else() # built-in dictionary turned off on Unix per default - option(DCMTK_ENABLE_BUILTIN_DICTIONARY "Configure DCMTK with compiled-in data dictionary." OFF) - option(DCMTK_ENABLE_EXTERNAL_DICTIONARY "Configure DCMTK to load external dictionary from default path on startup." ON) + set(DCMTK_DEFAULT_DICT "external" CACHE STRING "Denotes whether DCMTK will use built-in (compiled-in), external (file), or no default dictionary on startup") endif() -if (NOT DCMTK_ENABLE_EXTERNAL_DICTIONARY AND NOT DCMTK_ENABLE_BUILTIN_DICTIONARY) - message(WARNING "Either external or built-in dictionary should be enabled, otherwise dictionary must be loaded manually on startup!") +set_property(CACHE DCMTK_DEFAULT_DICT PROPERTY STRINGS builtin external none) +if (DCMTK_DEFAULT_DICT EQUAL "none") + message(WARNING "Denotes whether DCMTK will use built-in (compiled-in), external (file), or no default dictionary on startup") endif() +# Per default, we allow users to load user-defined dictionaries pointed to via +# environment variable DCMDICTPATH. +option(DCMTK_USE_DCMDICTPATH "Enable reading dictionary that is defined through DCMDICTPATH environment variable." ON) + + # Mark various settings as "advanced" +mark_as_advanced(DCMTK_USE_DCMDICTPATH) mark_as_advanced(CMAKE_DEBUG_POSTFIX) mark_as_advanced(FORCE EXECUTABLE_OUTPUT_PATH LIBRARY_OUTPUT_PATH) mark_as_advanced(SNDFILE_DIR DCMTK_WITH_SNDFILE) # not yet needed in public DCMTK mark_as_advanced(DCMTK_GENERATE_DOXYGEN_TAGFILE) mark_as_advanced(DCMTK_WITH_OPENJPEG) # only needed by DCMJP2K module +mark_as_advanced(DCMTK_TLS_LIBRARY_POSTFIX) if(NOT WIN32) # support for wide char file I/O functions is currently Windows-specific @@ -216,14 +303,11 @@ endif() #----------------------------------------------------------------------------- -# Build directories +# Interface target to collect all DCMTK libraries #----------------------------------------------------------------------------- -set(DCMTK_BUILD_CMKDIR "${CMAKE_BINARY_DIR}") - -#----------------------------------------------------------------------------- -# Start with clean DCMTKTargets.cmake, filled in GenerateCMakeExports.cmake -#----------------------------------------------------------------------------- -file(WRITE "${DCMTK_BUILD_CMKDIR}/DCMTKTargets.cmake" "") +add_library(DCMTK INTERFACE) +install(TARGETS DCMTK EXPORT DCMTKTargets) +target_link_libraries(DCMTK INTERFACE config) #----------------------------------------------------------------------------- # Platform-independent settings @@ -370,7 +454,11 @@ -D_CRT_VCCLRIT_NO_DEPRECATE -D_SCL_SECURE_NO_DEPRECATE ) + # suppress linker warning LNK4099 about missing .pdb files when compiling in debug mode + set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /ignore:4099") + set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /ignore:4099") endif() + # Enable various warnings endif() endif() endif() @@ -385,7 +473,13 @@ 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") + # Compiler flags for DragonFly BSD + elseif(CMAKE_SYSTEM_NAME MATCHES "DragonFly") + # On DragonFly BSD, we don't set any of the feature macros because they are not needed and + # actually cause problems such as strlcpy() not being declared in . # Solaris, FreeBSD and newer versions of OpenBSD fail with these flags + elseif(CMAKE_SYSTEM_NAME MATCHES "Android") + # On Android, we don't set any of the feature macros 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") @@ -469,16 +563,48 @@ set_property(GLOBAL PROPERTY DCMTK_MODERN_CXX_STANDARDS 11 14 17) #----------------------------------------------------------------------------- -# Third party libraries +# Enable various warnings by default #----------------------------------------------------------------------------- -include(${DCMTK_CMAKE_INCLUDE}CMake/3rdparty.cmake) +# fallback implementation of add_compile_options() +if(CMAKE_MAJOR_VERSION LESS 3 AND NOT CMAKE_VERSION VERSION_EQUAL 2.8.12) + function(add_compile_options) + foreach(OPTION ${ARGN}) + foreach(FLAG C CXX) + string(FIND "${CMAKE_${FLAG}_FLAGS}" "${OPTION}" IDX) + if(IDX EQUAL -1) + set("CMAKE_${FLAG}_FLAGS" "${CMAKE_${FLAG}_FLAGS} ${OPTION}" PARENT_SCOPE) + endif() + endforeach() + endforeach() + endfunction() +endif() + +if(MSVC) + # This code removes existing warning flags to prevent MSVC warning D9025. + # Remove it once our minimum CMake version is >= 3.15, since those newer + # CMake versions no longer add those flags by default. + foreach(FLAG C CXX) + string(REGEX REPLACE "[ \t\r\n]+/[wW][0-9]" "" "CMAKE_${FLAG}_FLAGS" "${CMAKE_${FLAG}_FLAGS}") + string(REGEX REPLACE "/[wW][0-9][ \t\r\n]*" "" "CMAKE_${FLAG}_FLAGS" "${CMAKE_${FLAG}_FLAGS}") + endforeach() + add_compile_options("/W4") +else() + # Add -Wall to the compiler flags if we are compiling with gcc or Clang. + if ((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") OR + (CMAKE_CXX_COMPILER_ID STREQUAL "Clang") OR + (CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang") OR + (CMAKE_CXX_COMPILER_ID STREQUAL "ARMClang") OR + (CMAKE_CXX_COMPILER_ID STREQUAL "XLClang")) + add_compile_options("-Wall") + endif() +endif() #----------------------------------------------------------------------------- -# DCMTK libraries +# Third party libraries #----------------------------------------------------------------------------- -include(${DCMTK_CMAKE_INCLUDE}CMake/GenerateDCMTKConfigure.cmake) +include(${DCMTK_CMAKE_INCLUDE}CMake/3rdparty.cmake) #----------------------------------------------------------------------------- # Dart configuration (disabled per default) @@ -493,6 +619,12 @@ # endif() #----------------------------------------------------------------------------- +# DCMTK libraries +#----------------------------------------------------------------------------- + +include(${DCMTK_CMAKE_INCLUDE}CMake/GenerateDCMTKConfigure.cmake) + +#----------------------------------------------------------------------------- # Thread support #----------------------------------------------------------------------------- @@ -521,6 +653,70 @@ endif() #----------------------------------------------------------------------------- +# OpenSSL functions (these tests must be run after THREAD_LIBS is set) +#----------------------------------------------------------------------------- + +# Run the OpenSSL feature tests only if OpenSSL was detected and is enabled +if(DCMTK_WITH_OPENSSL) + # save previous value of CMAKE_REQUIRED_LIBRARIES + set(CMAKE_REQUIRED_LIBRARIES_TEMP ${CMAKE_REQUIRED_LIBRARIES}) + + # add OpenSSL libraries + set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${OPENSSL_LIBS} ${THREAD_LIBS}) + + # check whether we have + CHECK_INCLUDE_FILE_CXX("openssl/provider.h" HAVE_OPENSSL_PROVIDER_H) + + # test presence of functions, constants and macros needed for the dcmtls module + CHECK_FUNCTIONWITHHEADER_EXISTS("SSL_CTX_get0_param" "openssl/ssl.h" HAVE_OPENSSL_PROTOTYPE_SSL_CTX_GET0_PARAM) + CHECK_FUNCTIONWITHHEADER_EXISTS("RAND_egd" "openssl/rand.h" HAVE_OPENSSL_PROTOTYPE_RAND_EGD) + CHECK_FUNCTIONWITHHEADER_EXISTS("DH_bits" "openssl/dh.h" HAVE_OPENSSL_PROTOTYPE_DH_BITS) + CHECK_FUNCTIONWITHHEADER_EXISTS("EVP_PKEY_RSA_PSS" "openssl/evp.h" HAVE_OPENSSL_PROTOTYPE_EVP_PKEY_RSA_PSS) + CHECK_FUNCTIONWITHHEADER_EXISTS("EVP_PKEY_base_id" "openssl/evp.h" HAVE_OPENSSL_PROTOTYPE_EVP_PKEY_BASE_ID) + CHECK_FUNCTIONWITHHEADER_EXISTS("SSL_CTX_get_cert_store" "openssl/ssl.h" HAVE_OPENSSL_PROTOTYPE_SSL_CTX_GET_CERT_STORE) + CHECK_FUNCTIONWITHHEADER_EXISTS("SSL_CTX_get_ciphers" "openssl/ssl.h" HAVE_OPENSSL_PROTOTYPE_SSL_CTX_GET_CIPHERS) + CHECK_FUNCTIONWITHHEADER_EXISTS("SSL_CTX_set0_tmp_dh_pkey" "openssl/ssl.h" HAVE_OPENSSL_PROTOTYPE_SSL_CTX_SET0_TMP_DH_PKEY) + CHECK_FUNCTIONWITHHEADER_EXISTS("SSL_CTX_set1_curves(0,0,0)" "openssl/ssl.h" HAVE_OPENSSL_PROTOTYPE_SSL_CTX_SET1_CURVES) + CHECK_FUNCTIONWITHHEADER_EXISTS("SSL_CTX_set1_sigalgs" "openssl/ssl.h" HAVE_OPENSSL_PROTOTYPE_SSL_CTX_SET1_SIGALGS) + CHECK_FUNCTIONWITHHEADER_EXISTS("SSL_CTX_set_ecdh_auto(0,0)" "openssl/ssl.h" HAVE_OPENSSL_PROTOTYPE_SSL_CTX_SET_ECDH_AUTO) + CHECK_FUNCTIONWITHHEADER_EXISTS("SSL_CTX_set_max_proto_version(0,0)" "openssl/ssl.h" HAVE_OPENSSL_PROTOTYPE_SSL_CTX_SET_MAX_PROTO_VERSION) + CHECK_FUNCTIONWITHHEADER_EXISTS("SSL_CTX_set_security_level" "openssl/ssl.h" HAVE_OPENSSL_PROTOTYPE_SSL_CTX_SET_SECURITY_LEVEL) + CHECK_FUNCTIONWITHHEADER_EXISTS("SSL_ERROR_WANT_ASYNC" "openssl/ssl.h" HAVE_OPENSSL_PROTOTYPE_SSL_ERROR_WANT_ASYNC) + CHECK_FUNCTIONWITHHEADER_EXISTS("SSL_ERROR_WANT_ASYNC_JOB" "openssl/ssl.h" HAVE_OPENSSL_PROTOTYPE_SSL_ERROR_WANT_ASYNC_JOB) + CHECK_FUNCTIONWITHHEADER_EXISTS("SSL_ERROR_WANT_CLIENT_HELLO_CB" "openssl/ssl.h" HAVE_OPENSSL_PROTOTYPE_SSL_ERROR_WANT_CLIENT_HELLO_CB) + CHECK_FUNCTIONWITHHEADER_EXISTS("TLS1_TXT_ECDHE_RSA_WITH_CHACHA20_POLY1305" "openssl/ssl.h" HAVE_OPENSSL_PROTOTYPE_TLS1_TXT_ECDHE_RSA_WITH_CHACHA20_POLY1305) + CHECK_FUNCTIONWITHHEADER_EXISTS("TLS_method" "openssl/ssl.h" HAVE_OPENSSL_PROTOTYPE_TLS_METHOD) + CHECK_FUNCTIONWITHHEADER_EXISTS("X509_STORE_get0_param" "openssl/x509.h" HAVE_OPENSSL_PROTOTYPE_X509_STORE_GET0_PARAM) + CHECK_FUNCTIONWITHHEADER_EXISTS("X509_get_signature_nid" "openssl/x509.h" HAVE_OPENSSL_PROTOTYPE_X509_GET_SIGNATURE_NID) + + # test presence of functions, constants and macros needed for the dcmsign module + CHECK_FUNCTIONWITHHEADER_EXISTS("ASN1_STRING_get0_data" "openssl/asn1.h" HAVE_OPENSSL_PROTOTYPE_ASN1_STRING_GET0_DATA) + CHECK_FUNCTIONWITHHEADER_EXISTS("EVP_PKEY_get0_EC_KEY" "openssl/evp.h" HAVE_OPENSSL_PROTOTYPE_EVP_PKEY_GET0_EC_KEY) + CHECK_FUNCTIONWITHHEADER_EXISTS("EVP_PKEY_get_group_name" "openssl/evp.h" HAVE_OPENSSL_PROTOTYPE_EVP_PKEY_GET_GROUP_NAME) + CHECK_FUNCTIONWITHHEADER_EXISTS("EVP_PKEY_id" "openssl/evp.h" HAVE_OPENSSL_PROTOTYPE_EVP_PKEY_ID) + CHECK_FUNCTIONWITHHEADER_EXISTS("OSSL_PROVIDER_load" "openssl/provider.h" HAVE_OPENSSL_PROTOTYPE_OSSL_PROVIDER_LOAD) + CHECK_FUNCTIONWITHHEADER_EXISTS("TS_STATUS_INFO_get0_failure_info" "openssl/ts.h" HAVE_OPENSSL_PROTOTYPE_TS_STATUS_INFO_GET0_FAILURE_INFO) + CHECK_FUNCTIONWITHHEADER_EXISTS("TS_STATUS_INFO_get0_status" "openssl/ts.h" HAVE_OPENSSL_PROTOTYPE_TS_STATUS_INFO_GET0_STATUS) + CHECK_FUNCTIONWITHHEADER_EXISTS("TS_STATUS_INFO_get0_text" "openssl/ts.h" HAVE_OPENSSL_PROTOTYPE_TS_STATUS_INFO_GET0_TEXT) + CHECK_FUNCTIONWITHHEADER_EXISTS("TS_VERIFY_CTS_set_certs(0,0)" "openssl/ts.h" HAVE_OPENSSL_PROTOTYPE_TS_VERIFY_CTS_SET_CERTS) + CHECK_FUNCTIONWITHHEADER_EXISTS("TS_VERIFY_CTX_set_data" "openssl/ts.h" HAVE_OPENSSL_PROTOTYPE_TS_VERIFY_CTX_SET_DATA) + CHECK_FUNCTIONWITHHEADER_EXISTS("TS_VERIFY_CTX_set_flags" "openssl/ts.h" HAVE_OPENSSL_PROTOTYPE_TS_VERIFY_CTX_SET_FLAGS) + CHECK_FUNCTIONWITHHEADER_EXISTS("TS_VERIFY_CTX_set_store" "openssl/ts.h" HAVE_OPENSSL_PROTOTYPE_TS_VERIFY_CTX_SET_STORE) + CHECK_FUNCTIONWITHHEADER_EXISTS("X509_get0_notAfter" "openssl/x509.h" HAVE_OPENSSL_PROTOTYPE_X509_GET0_NOTAFTER) + CHECK_FUNCTIONWITHHEADER_EXISTS("X509_get0_notBefore" "openssl/x509.h" HAVE_OPENSSL_PROTOTYPE_X509_GET0_NOTBEFORE) + + # check if type EVP_MD_CTX is defined as typedef for "struct evp_md_ctx_st" (new) or "struct env_md_ctx_st" (old) + CHECK_FUNCTIONWITHHEADER_EXISTS("struct evp_md_ctx_st *a; EVP_MD_CTX *b=a" "openssl/evp.h" HAVE_OPENSSL_DECLARATION_NEW_EVP_MD_CTX) + + # check if the first parameter passed to X509_ALGOR_get0() should be "const ASN1_OBJECT **" (new) or "ASN1_OBJECT **" (old) + CHECK_FUNCTIONWITHHEADER_EXISTS("const ASN1_OBJECT *a; X509_ALGOR_get0(&a,0,0,0)" "openssl/x509.h" HAVE_OPENSSL_X509_ALGOR_GET0_CONST_PARAM) + + # restore previous value of CMAKE_REQUIRED_LIBRARIES + set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES_TEMP}) +endif() + + +#----------------------------------------------------------------------------- # Test for socket libraries if needed (Solaris) #----------------------------------------------------------------------------- diff -Nru dcmtk-3.6.6/CMake/dcmtkTestCharSignedness.cc dcmtk-3.6.7/CMake/dcmtkTestCharSignedness.cc --- dcmtk-3.6.6/CMake/dcmtkTestCharSignedness.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/CMake/dcmtkTestCharSignedness.cc 1970-01-01 00:00:00.000000000 +0000 @@ -1,6 +0,0 @@ -/* Return 1 for char signed and 0 for char unsigned. */ -int main() -{ - unsigned char uc = 255; - return (*reinterpret_cast(&uc) < 0)?1:0; -} diff -Nru dcmtk-3.6.6/CMake/FindCharset.cmake dcmtk-3.6.7/CMake/FindCharset.cmake --- dcmtk-3.6.6/CMake/FindCharset.cmake 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/CMake/FindCharset.cmake 1970-01-01 00:00:00.000000000 +0000 @@ -1,22 +0,0 @@ -# Find charset library -# -# LIBCHARSET_INCLUDE_DIRS - where to find localcharset.h, etc -# LIBCHARSET_LIBRARIES - Lists of libraries when using charset -# LIBCHARSET_FOUND - True if charset found - -include(FindPackageHandleStandardArgs) - -# Look for the header file -find_path(LIBCHARSET_INCLUDE_DIR NAMES localcharset.h) -mark_as_advanced(LIBCHARSET_INCLUDE_DIR) - -set(LIBCHARSET_LIBS charset) -find_library(LIBCHARSET_LIBRARY NAMES ${LIBCHARSET_LIBS}) -mark_as_advanced(LIBCHARSET_LIBRARY) - -FIND_PACKAGE_HANDLE_STANDARD_ARGS(LIBCHARSET REQUIRED_VARS LIBCHARSET_LIBRARY LIBCHARSET_INCLUDE_DIR) - -if(LIBCHARSET_FOUND) - set(LIBCHARSET_INCLUDE_DIRS ${LIBCHARSET_INCLUDE_DIR}) - set(LIBCHARSET_LIBRARIES ${LIBCHARSET_LIBRARY}) -endif() diff -Nru dcmtk-3.6.6/CMake/FindLIBCHARSET.cmake dcmtk-3.6.7/CMake/FindLIBCHARSET.cmake --- dcmtk-3.6.6/CMake/FindLIBCHARSET.cmake 1970-01-01 00:00:00.000000000 +0000 +++ dcmtk-3.6.7/CMake/FindLIBCHARSET.cmake 2022-04-28 13:47:25.000000000 +0000 @@ -0,0 +1,22 @@ +# Find charset library +# +# LIBCHARSET_INCLUDE_DIRS - where to find localcharset.h, etc +# LIBCHARSET_LIBRARIES - Lists of libraries when using charset +# LIBCHARSET_FOUND - True if charset found + +include(FindPackageHandleStandardArgs) + +# Look for the header file +find_path(LIBCHARSET_INCLUDE_DIR NAMES localcharset.h) +mark_as_advanced(LIBCHARSET_INCLUDE_DIR) + +set(LIBCHARSET_LIBS charset) +find_library(LIBCHARSET_LIBRARY NAMES ${LIBCHARSET_LIBS}) +mark_as_advanced(LIBCHARSET_LIBRARY) + +FIND_PACKAGE_HANDLE_STANDARD_ARGS(LIBCHARSET REQUIRED_VARS LIBCHARSET_LIBRARY LIBCHARSET_INCLUDE_DIR) + +if(LIBCHARSET_FOUND) + set(LIBCHARSET_INCLUDE_DIRS ${LIBCHARSET_INCLUDE_DIR}) + set(LIBCHARSET_LIBRARIES ${LIBCHARSET_LIBRARY}) +endif() diff -Nru dcmtk-3.6.6/CMake/FindOpenJPEG.cmake dcmtk-3.6.7/CMake/FindOpenJPEG.cmake --- dcmtk-3.6.6/CMake/FindOpenJPEG.cmake 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/CMake/FindOpenJPEG.cmake 2022-04-28 13:47:25.000000000 +0000 @@ -21,7 +21,7 @@ find_library(OPENJPEG_LIBRARY NAMES ${OPENJPEG_LIBS} HINTS ${OPENJPEG_PKGCONF_LIBRARY_DIRS}) mark_as_advanced(OPENJPEG_LIBRARY) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(OPENJPEG REQUIRED_VARS OPENJPEG_LIBRARY OPENJPEG_INCLUDE_DIR) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(OpenJPEG REQUIRED_VARS OPENJPEG_LIBRARY OPENJPEG_INCLUDE_DIR) # Copy the result to output variables if(OPENJPEG_FOUND) diff -Nru dcmtk-3.6.6/CMake/FindSndfile.cmake dcmtk-3.6.7/CMake/FindSndfile.cmake --- dcmtk-3.6.6/CMake/FindSndfile.cmake 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/CMake/FindSndfile.cmake 1970-01-01 00:00:00.000000000 +0000 @@ -1,32 +0,0 @@ -# Find sndfile library -# -# Released under BSD license -# -# SNDFILE_INCLUDE_DIRS - where to find sndfile.h, etc -# SNDFILE_LIBRARIES - Lists of libraries when using sndfile -# SNDFILE_FOUND - True if sndfile found - -include(FindPackageHandleStandardArgs) - -# Look for the header file -find_path(SNDFILE_INCLUDE_DIR NAMES sndfile.h) -mark_as_advanced(SNDFILE_INCLUDE_DIR) - -# Look for the library -set(SNDFILE_LIBS sndfile) -find_library(SNDFILE_LIBRARY NAMES ${SNDFILE_LIBS}) -mark_as_advanced(SNDFILE_LIBRARY) - -FIND_PACKAGE_HANDLE_STANDARD_ARGS(SNDFILE REQUIRED_VARS SNDFILE_LIBRARY SNDFILE_INCLUDE_DIR) - -# Copy the result to output variables -if(SNDFILE_FOUND) - set(SNDFILE_LIBRARIES ${SNDFILE_LIBRARY}) - set(SNDFILE_INCLUDE_DIRS ${SNDFILE_INCLUDE_DIR}) -else() - set(SNDFILE_LIBS) - set(SNDFILE_LIBRARY) - set(SNDFILE_LIBRARIES) - set(SNDFILE_INCLUDE_DIR) - set(SNDFILE_INCLUDE_DIRS) -endif() diff -Nru dcmtk-3.6.6/CMake/FindSNDFILE.cmake dcmtk-3.6.7/CMake/FindSNDFILE.cmake --- dcmtk-3.6.6/CMake/FindSNDFILE.cmake 1970-01-01 00:00:00.000000000 +0000 +++ dcmtk-3.6.7/CMake/FindSNDFILE.cmake 2022-04-28 13:47:25.000000000 +0000 @@ -0,0 +1,32 @@ +# Find sndfile library +# +# Released under BSD license +# +# SNDFILE_INCLUDE_DIRS - where to find sndfile.h, etc +# SNDFILE_LIBRARIES - Lists of libraries when using sndfile +# SNDFILE_FOUND - True if sndfile found + +include(FindPackageHandleStandardArgs) + +# Look for the header file +find_path(SNDFILE_INCLUDE_DIR NAMES sndfile.h) +mark_as_advanced(SNDFILE_INCLUDE_DIR) + +# Look for the library +set(SNDFILE_LIBS sndfile) +find_library(SNDFILE_LIBRARY NAMES ${SNDFILE_LIBS}) +mark_as_advanced(SNDFILE_LIBRARY) + +FIND_PACKAGE_HANDLE_STANDARD_ARGS(SNDFILE REQUIRED_VARS SNDFILE_LIBRARY SNDFILE_INCLUDE_DIR) + +# Copy the result to output variables +if(SNDFILE_FOUND) + set(SNDFILE_LIBRARIES ${SNDFILE_LIBRARY}) + set(SNDFILE_INCLUDE_DIRS ${SNDFILE_INCLUDE_DIR}) +else() + set(SNDFILE_LIBS) + set(SNDFILE_LIBRARY) + set(SNDFILE_LIBRARIES) + set(SNDFILE_INCLUDE_DIR) + set(SNDFILE_INCLUDE_DIRS) +endif() diff -Nru dcmtk-3.6.6/CMake/FindWrap.cmake dcmtk-3.6.7/CMake/FindWrap.cmake --- dcmtk-3.6.6/CMake/FindWrap.cmake 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/CMake/FindWrap.cmake 1970-01-01 00:00:00.000000000 +0000 @@ -1,32 +0,0 @@ -# Find wrap library -# -# Released under BSD license -# -# WRAP_INCLUDE_DIRS - where to find tcpd.h, etc -# WRAP_LIBRARIES - Lists of libraries when using libwrap -# WRAP_FOUND - True if wrap found - -include(FindPackageHandleStandardArgs) - -# Look for the header file -find_path(WRAP_INCLUDE_DIR NAMES tcpd.h) -mark_as_advanced(WRAP_INCLUDE_DIR) - -# Look for the library -set(WRAP_LIBS wrap) -find_library(WRAP_LIBRARY NAMES ${WRAP_LIBS}) -mark_as_advanced(WRAP_LIBRARY) - -FIND_PACKAGE_HANDLE_STANDARD_ARGS(WRAP REQUIRED_VARS WRAP_LIBRARY WRAP_INCLUDE_DIR) - -# Copy the result to output variables -if(WRAP_FOUND) - set(WRAP_LIBRARIES ${WRAP_LIBRARY}) - set(WRAP_INCLUDE_DIRS ${WRAP_INCLUDE_DIR}) -else() - set(WRAP_LIBS) - set(WRAP_LIBRARY) - set(WRAP_LIBRARIES) - set(WRAP_INCLUDE_DIR) - set(WRAP_INCLUDE_DIRS) -endif() diff -Nru dcmtk-3.6.6/CMake/FindWRAP.cmake dcmtk-3.6.7/CMake/FindWRAP.cmake --- dcmtk-3.6.6/CMake/FindWRAP.cmake 1970-01-01 00:00:00.000000000 +0000 +++ dcmtk-3.6.7/CMake/FindWRAP.cmake 2022-04-28 13:47:25.000000000 +0000 @@ -0,0 +1,32 @@ +# Find wrap library +# +# Released under BSD license +# +# WRAP_INCLUDE_DIRS - where to find tcpd.h, etc +# WRAP_LIBRARIES - Lists of libraries when using libwrap +# WRAP_FOUND - True if wrap found + +include(FindPackageHandleStandardArgs) + +# Look for the header file +find_path(WRAP_INCLUDE_DIR NAMES tcpd.h) +mark_as_advanced(WRAP_INCLUDE_DIR) + +# Look for the library +set(WRAP_LIBS wrap) +find_library(WRAP_LIBRARY NAMES ${WRAP_LIBS}) +mark_as_advanced(WRAP_LIBRARY) + +FIND_PACKAGE_HANDLE_STANDARD_ARGS(WRAP REQUIRED_VARS WRAP_LIBRARY WRAP_INCLUDE_DIR) + +# Copy the result to output variables +if(WRAP_FOUND) + set(WRAP_LIBRARIES ${WRAP_LIBRARY}) + set(WRAP_INCLUDE_DIRS ${WRAP_INCLUDE_DIR}) +else() + set(WRAP_LIBS) + set(WRAP_LIBRARY) + set(WRAP_LIBRARIES) + set(WRAP_INCLUDE_DIR) + set(WRAP_INCLUDE_DIRS) +endif() diff -Nru dcmtk-3.6.6/CMake/GenerateCMakeExports.cmake dcmtk-3.6.7/CMake/GenerateCMakeExports.cmake --- dcmtk-3.6.6/CMake/GenerateCMakeExports.cmake 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/CMake/GenerateCMakeExports.cmake 2022-04-28 13:47:25.000000000 +0000 @@ -14,16 +14,22 @@ # DCMTKConfigVersion.cmake provides checking of DCMTK version compatibility # DCMTKConfig.cmake will contain options used to build this DCMTK package +# Start with clean DCMTKTargets.cmake and fill it by appending +file(WRITE "${CMAKE_BINARY_DIR}/DCMTKTargets.cmake" "") + # 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} FILE "${DCMTK_BUILD_CMKDIR}/DCMTKTargets.cmake") +export(TARGETS ${DCMTK_EXECUTABLE_TARGETS} APPEND FILE "${CMAKE_BINARY_DIR}/DCMTKTargets.cmake" NAMESPACE DCMTK::) # 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 config ${DCMTK_LIBRARY_TARGETS} APPEND FILE "${CMAKE_BINARY_DIR}/DCMTKTargets.cmake" NAMESPACE DCMTK::) + +# Add interface library for conveniently linking to all libraries via DCMTK::DCMTK +export(TARGETS DCMTK APPEND FILE "${CMAKE_BINARY_DIR}/DCMTKTargets.cmake" NAMESPACE DCMTK::) # Create DCMTConfigVersion.cmake with basic DCMTK version information (build tree) -set(DCMTK_CONFIG_VERSION "${DCMTK_BUILD_CMKDIR}/DCMTKConfigVersion.cmake") +set(DCMTK_CONFIG_VERSION "${CMAKE_BINARY_DIR}/DCMTKConfigVersion.cmake") WRITE_BASIC_PACKAGE_VERSION_FILE( ${DCMTK_CONFIG_VERSION} VERSION ${DCMTK_MAJOR_VERSION}.${DCMTK_MINOR_VERSION}.${DCMTK_BUILD_VERSION} @@ -36,7 +42,7 @@ # 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 "${CMAKE_BINARY_DIR}") # Collect include paths set(DCMTK_INCLUDE_DIR_CONFIGS "SET_AND_CHECK(DCMTK_config_INCLUDE_DIR \"${DCMTK_BINARY_DIR}/config/include/dcmtk/config\")") @@ -50,7 +56,7 @@ set(DCMTK_CONFIG_CODE "${DCMTK_CONFIG_CODE}list(APPEND DCMTK_INCLUDE_DIRS \"${DCMTK_SOURCE_DIR}/${module}/include\")\n") endforeach() set(DCMTK_CONFIG_CODE "${DCMTK_CONFIG_CODE}##################################################") -set(dcmtk_config "${DCMTK_BUILD_CMKDIR}/DCMTKConfig.cmake") +set(dcmtk_config "${CMAKE_BINARY_DIR}/DCMTKConfig.cmake") # Actually configure file and write it to build's main directory CONFIGURE_PACKAGE_CONFIG_FILE( ${DCMTK_SOURCE_DIR}/CMake/DCMTKConfig.cmake.in diff -Nru dcmtk-3.6.6/CMake/GenerateDCMTKConfigure.cmake dcmtk-3.6.7/CMake/GenerateDCMTKConfigure.cmake --- dcmtk-3.6.6/CMake/GenerateDCMTKConfigure.cmake 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/CMake/GenerateDCMTKConfigure.cmake 2022-04-28 13:47:25.000000000 +0000 @@ -5,26 +5,36 @@ set(CMAKE_TRY_COMPILE_CONFIGURATION "Release") endif() -# Compiled-in dictionary support -if(DCMTK_ENABLE_BUILTIN_DICTIONARY) - set(ENABLE_BUILTIN_DICTIONARY 1) - message(STATUS "Info: DCMTK will compile with built-in (compiled-in) dictionary") +# Select between built-in, external or no default dictionary support +if(DCMTK_DEFAULT_DICT STREQUAL "builtin") + message(STATUS "Info: DCMTK will compile with built-in (compiled-in) default dictionary") + set(DCM_DICT_DEFAULT 1) # No extra variable needed since its only evaluated in CMake files +elseif(DCMTK_DEFAULT_DICT STREQUAL "external") + message(STATUS "Info: DCMTK will compile with external default dictionary") + set(DCM_DICT_DEFAULT 2) else() - set(ENABLE_BUILTIN_DICTIONARY "") - message(STATUS "Info: DCMTK will compile without built-in (compiled-in) dictionary") - # No extra variable needed since its only evaluated in CMake files + message(STATUS "Info: DCMTK will compile without any default dictionary") + set(DCM_DICT_DEFAULT 0) endif() -# External dictionary support -if(DCMTK_ENABLE_EXTERNAL_DICTIONARY) - set(ENABLE_EXTERNAL_DICTIONARY 1) - message(STATUS "Info: DCMTK will try to load external dictionary from default path on startup") -else() - set(ENABLE_EXTERNAL_DICTIONARY "") - message(STATUS "Info: DCMTK will not try to load external dictionary from default path on startup") + +# Evaluation of old DCMDICTPATH environment variable (deprecation warning) +if(DEFINED DCMTK_ENABLE_BUILTIN_DICTIONARY) + message(WARNING "Usage of DCMTK_ENABLE_BUILTIN_DICTIONARY has been deprecated, see DCMTK_DEFAULT_DICT") +endif() +if(DEFINED DCMTK_ENABLE_EXTERNAL_DICTIONARY) + message(WARNING "Usage of DCMTK_ENABLE_EXTERNAL_DICTIONARY has been deprecated, see DCMTK_USE_DCMDICTPATH") endif() +# Evaluation of DCMDICTPATH environment variable +if(DCMTK_USE_DCMDICTPATH) + set(DCM_DICT_USE_DCMDICTPATH 1) + message(STATUS "Info: DCMTK will load dictionaries defined by DCMDICTPATH environment variable") +else() + set(DCM_DICT_USE_DCMDICTPATH "") + message(STATUS "Info: DCMTK will not load dictionaries defined by DCMDICTPATH environment variable") +endif() # Private tags if(DCMTK_ENABLE_PRIVATE_TAGS) @@ -66,7 +76,7 @@ set(DCMTK_ENABLE_CHARSET_CONVERSION_DOCSTRING "Select character set conversion implementation.") if(DCMTK_WITH_ICONV) if(DCMTK_WITH_ICU) - message(WARNING "Warning: Both ICU and the libiconv are available, using libiconv. Modify DCMTK_ENABLE_CHARSET_CONVERSION for switching to ICU") + message(STATUS "Info: Both ICU and the libiconv are available, using libiconv. Modify DCMTK_ENABLE_CHARSET_CONVERSION for switching to ICU") endif() set(DCMTK_ENABLE_CHARSET_CONVERSION "libiconv" CACHE STRING "${DCMTK_ENABLE_CHARSET_CONVERSION_DOCSTRING}") elseif(DCMTK_WITH_ICU) @@ -106,19 +116,22 @@ set(DCMTK_ENABLE_CHARSET_CONVERSION OFF) endif() -# Standard C++ headers (currently hard-coded) -#if(VTK_USE_ANSI_STDLIB) - set(USE_STD_CXX_INCLUDES 1) -#else() -# set(USE_STD_CXX_INCLUDES "") -#endif() - # Configure file # Windows being windows, it lies about its processor type to 32 bit binaries set(SYSTEM_PROCESSOR "$ENV{PROCESSOR_ARCHITEW6432}") if(NOT SYSTEM_PROCESSOR) - set(SYSTEM_PROCESSOR "${CMAKE_SYSTEM_PROCESSOR}") + if(WIN32 AND NOT CYGWIN) + if(CMAKE_GENERATOR_PLATFORM) + set(SYSTEM_PROCESSOR "${CMAKE_GENERATOR_PLATFORM}") + elseif(CMAKE_SIZEOF_VOID_P EQUAL 8) + set(SYSTEM_PROCESSOR "x64") + elseif(CMAKE_SIZEOF_VOID_P EQUAL 4) + set(SYSTEM_PROCESSOR "Win32") + endif() + else() + set(SYSTEM_PROCESSOR "${CMAKE_SYSTEM_PROCESSOR}") + endif() endif() # CMake doesn't provide a configure-style system type string set(CANONICAL_HOST_TYPE "${SYSTEM_PROCESSOR}-${CMAKE_SYSTEM_NAME}") @@ -133,7 +146,7 @@ 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_DEFAULT_DICT STREQUAL "external") set(DCM_DICT_DEFAULT_PATH "${DCMTK_PREFIX}\\\\${CMAKE_INSTALL_DATADIR}\\\\dcmtk\\\\dicom.dic") # If private dictionary should be utilized, add it to default dictionary path. if(ENABLE_PRIVATE_TAGS) @@ -154,7 +167,7 @@ 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_DEFAULT_DICT STREQUAL "external") set(DCM_DICT_DEFAULT_PATH "${DCMTK_PREFIX}/${CMAKE_INSTALL_DATADIR}/dcmtk/dicom.dic") # If private dictionary should be utilized, add it to default dictionary path. if(ENABLE_PRIVATE_TAGS) @@ -377,6 +390,10 @@ set(HEADERS) + if(HAVE_IEEEFP_H) + set(HEADERS ${HEADERS} ieeefp.h) + endif() + if(HAVE_IO_H) set(HEADERS ${HEADERS} io.h) endif() @@ -546,7 +563,6 @@ CHECK_FUNCTION_EXISTS(bcmp HAVE_BCMP) CHECK_FUNCTION_EXISTS(bcopy HAVE_BCOPY) CHECK_FUNCTION_EXISTS(bind HAVE_BIND) - CHECK_FUNCTION_EXISTS(bzero HAVE_BZERO) CHECK_FUNCTION_EXISTS(cuserid HAVE_CUSERID) CHECK_FUNCTION_EXISTS(_doprnt HAVE_DOPRNT) CHECK_FUNCTION_EXISTS(finite HAVE_FINITE) @@ -623,7 +639,6 @@ 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) CHECK_FUNCTIONWITHHEADER_EXISTS(waitpid "${HEADERS}" HAVE_PROTOTYPE_WAITPID) CHECK_FUNCTIONWITHHEADER_EXISTS(wait3 "${HEADERS}" HAVE_PROTOTYPE_WAIT3) @@ -636,6 +651,8 @@ CHECK_FUNCTIONWITHHEADER_EXISTS(setsockopt "${HEADERS}" HAVE_PROTOTYPE_SETSOCKOPT) CHECK_FUNCTIONWITHHEADER_EXISTS(socket "${HEADERS}" HAVE_PROTOTYPE_SOCKET) CHECK_FUNCTIONWITHHEADER_EXISTS(listen "${HEADERS}" HAVE_PROTOTYPE_LISTEN) +# the following functions are partially C99 and partially nonstandard and may +# not be defined in the standard C++ headers. CHECK_FUNCTIONWITHHEADER_EXISTS(_vsnprintf_s "${HEADERS}" HAVE__VSNPRINTF_S) CHECK_FUNCTIONWITHHEADER_EXISTS(vfprintf_s "${HEADERS}" HAVE_VFPRINTF_S) CHECK_FUNCTIONWITHHEADER_EXISTS(vprintf "${HEADERS}" HAVE_VPRINTF) @@ -673,6 +690,7 @@ CHECK_FUNCTIONWITHHEADER_EXISTS(nanosleep "${HEADERS}" HAVE_PROTOTYPE_NANOSLEEP) CHECK_FUNCTIONWITHHEADER_EXISTS("&passwd::pw_gecos" "${HEADERS}" HAVE_PASSWD_GECOS) CHECK_FUNCTIONWITHHEADER_EXISTS("TryAcquireSRWLockShared((PSRWLOCK)0)" "${HEADERS}" HAVE_PROTOTYPE_TRYACQUIRESRWLOCKSHARED) + CHECK_FUNCTIONWITHHEADER_EXISTS("fp_except_t definition" "${HEADERS}" HAVE_DECLARATION_FP_EXCEPT_T) # 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. @@ -692,22 +710,18 @@ CHECK_FUNCTIONWITHHEADER_EXISTS("char16_t definition" "${HEADERS}" HAVE_CHAR16_T) # File access stuff + # fpos64_t and off64_t are not available in the C++ headers CHECK_FUNCTIONWITHHEADER_EXISTS("fpos64_t definition" "${HEADERS}" HAVE_FPOS64_T) CHECK_FUNCTIONWITHHEADER_EXISTS("off64_t definition" "${HEADERS}" HAVE_OFF64_T) # Check if the POSIX functions are available (even on Windows). They are preferred # to the Microsoft specific functions on compilers like MinGW. + # popen and pclose are nonstandard and may not be available in the C++ headers CHECK_FUNCTIONWITHHEADER_EXISTS("popen" "${HEADERS}" HAVE_POPEN) CHECK_FUNCTIONWITHHEADER_EXISTS("pclose" "${HEADERS}" HAVE_PCLOSE) # Signal handling functions CHECK_FUNCTIONWITHHEADER_EXISTS("sigjmp_buf definition" "setjmp.h" HAVE_SIGJMP_BUF) -if(DCMTK_WITH_OPENSSL) - # Check if OpenSSL provides the SSL_CTX_get0_param function - CHECK_FUNCTIONWITHHEADER_EXISTS("SSL_CTX_get0_param" "openssl/ssl.h" HAVE_SSL_CTX_GET0_PARAM ${OPENSSL_LIBS}) - CHECK_FUNCTIONWITHHEADER_EXISTS("RAND_egd" "openssl/rand.h" HAVE_RAND_EGD ${OPENSSL_LIBS}) -endif() - 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 @@ -719,6 +733,13 @@ # Tests that require a try-compile +# We are using DCMTK_NO_TRY_RUN to disable the try_run parts, and only do the compile part. +# To prevent the CMake Warning: Manually-specified variables were not used by the project: +# we need to ignore it else +if(DEFINED DCMTK_NO_TRY_RUN) + set(DCMTK_NO_TRY_RUN DDCMTK_NO_TRY_RUN CACHE INTERNAL "Disable compile try as part of config") +endif() + if(HAVE_MATH_H) if(HAVE_LIBC_H) # checks if and cause a problem if libc.h is included extern "C" @@ -758,24 +779,24 @@ endif() endif() - 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" - COMPILE_OUTPUT_VARIABLE C_CHAR_SIGNED_COMPILE_OUTPUT) - if(C_CHAR_SIGNED_COMPILED) - if(C_CHAR_SIGNED) - message(STATUS "Checking signedness of char -- signed") - set(C_CHAR_UNSIGNED 0 CACHE INTERNAL "Whether char is unsigned.") - else() - message(STATUS "Checking signedness of char -- unsigned") - set(C_CHAR_UNSIGNED 1 CACHE INTERNAL "Whether char is unsigned.") - endif() - else() - message(STATUS "Checking signedness of char -- failed") - endif() -endif() + message(STATUS "Checking signedness of char") + DCMTK_TRY_COMPILE(C_CHAR_SIGNED_COMPILED "char is signed" +"// Fail compile for unsigned char. +int main() +{ + unsigned char uc = 255; + char *unused_array[(*reinterpret_cast(&uc) < 0)?1:-1]; + return 0; +}") + if(C_CHAR_SIGNED_COMPILED) + message(STATUS "Checking signedness of char -- signed") + set(C_CHAR_UNSIGNED 0 CACHE INTERNAL "Whether char is unsigned.") + else() + message(STATUS "Checking signedness of char -- unsigned") + set(C_CHAR_UNSIGNED 1 CACHE INTERNAL "Whether char is unsigned.") + endif() + endif() # Check for thread type if(HAVE_WINDOWS_H) @@ -967,13 +988,7 @@ 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() + set(CMAKE_EXTRA_INCLUDE_FILES "stdio.h") 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) @@ -1258,6 +1273,13 @@ return 0; }") +DCMTK_TRY_COMPILE(HAVE_CXX14_DEPRECATED_ATTRIBUTE "the compiler supports [[deprecated]]" "[[deprecated]] int main(){return 0;}") +DCMTK_TRY_COMPILE(HAVE_CXX14_DEPRECATED_ATTRIBUTE_MSG "the compiler supports [[deprecated(\"message\")]]" "[[deprecated(\"message\")]] int main(){return 0;}") +DCMTK_TRY_COMPILE(HAVE_ATTRIBUTE_DEPRECATED "the compiler supports __attribute__((deprecated))" "__attribute__((deprecated)) int main(){return 0;}") +DCMTK_TRY_COMPILE(HAVE_ATTRIBUTE_DEPRECATED_MSG "the compiler supports __attribute__((deprecated(\"message\")))" "__attribute__((deprecated(\"message\"))) int main(){return 0;}") +DCMTK_TRY_COMPILE(HAVE_DECLSPEC_DEPRECATED "the compiler supports __declspec(deprecated)" "__declspec(deprecated) int main(){return 0;}") +DCMTK_TRY_COMPILE(HAVE_DECLSPEC_DEPRECATED_MSG "the compiler supports __declspec(deprecated(\"message\"))" "__declspec(deprecated(\"message\")) int main(){return 0;}") + function(DCMTK_CHECK_ITERATOR_CATEGORY CATEGORY) if(HAVE_ITERATOR_HEADER) string(TOUPPER "${CATEGORY}" CAT) @@ -1294,23 +1316,32 @@ COMPILE_DEFINITIONS "-DLIBICONV_SECOND_ARGUMENT_CONST=${LIBICONV_SECOND_ARGUMENT_CONST}" ) endif() - DCMTK_TRY_RUN(RUN_RESULT COMPILE_RESULT - "${CMAKE_BINARY_DIR}/CMakeTmp/Iconv" - "${DCMTK_SOURCE_DIR}/config/tests/iconv.cc" - ${EXTRA_ARGS} - COMPILE_OUTPUT_VARIABLE CERR - RUN_OUTPUT_VARIABLE OUTPUT - ) - if(COMPILE_RESULT) - set(DCMTK_ICONV_FLAGS_ANALYZED TRUE CACHE INTERNAL "") - if(RUN_RESULT EQUAL 0) - message(STATUS "${TEXT} - ${OUTPUT}") - set(DCMTK_FIXED_ICONV_CONVERSION_FLAGS "${OUTPUT}" CACHE INTERNAL "") - else() - message(STATUS "${TEXT} - unknown") - endif() + if(NOT DEFINED DCMTK_NO_TRY_RUN) + DCMTK_TRY_RUN(RUN_RESULT COMPILE_RESULT + "${CMAKE_BINARY_DIR}/CMakeTmp/Iconv" + "${DCMTK_SOURCE_DIR}/config/tests/iconv.cc" + ${EXTRA_ARGS} + COMPILE_OUTPUT_VARIABLE CERR + RUN_OUTPUT_VARIABLE OUTPUT + ) + if(COMPILE_RESULT) + set(DCMTK_ICONV_FLAGS_ANALYZED TRUE CACHE INTERNAL "") + if(RUN_RESULT EQUAL 0) + message(STATUS "${TEXT} - ${OUTPUT}") + set(DCMTK_FIXED_ICONV_CONVERSION_FLAGS "${OUTPUT}" CACHE INTERNAL "") + else() + message(STATUS "${TEXT} - unknown") + endif() + else() + message(FATAL_ERROR "${CERR}") + endif() else() - message(FATAL_ERROR "${CERR}") + if(NOT DEFINED DCMTK_ICONV_FLAGS_ANALYZED) + message(FATAL_ERROR "When using DCMTK_NO_TRY_RUN, set DCMTK_ICONV_FLAGS_ANALYZED") + endif() + if(NOT DEFINED DCMTK_FIXED_ICONV_CONVERSION_FLAGS) + message(FATAL_ERROR "When using DCMTK_NO_TRY_RUN, set DCMTK_FIXED_ICONV_CONVERSION_FLAGS") + endif() endif() endif() endfunction() @@ -1324,21 +1355,27 @@ set(TEXT "Checking whether iconv_open() accepts \"\" as an argument") message(STATUS "${TEXT}") set(EXTRA_ARGS) - DCMTK_TRY_RUN(RUN_RESULT COMPILE_RESULT - "${CMAKE_BINARY_DIR}/CMakeTmp/lciconv" - "${DCMTK_SOURCE_DIR}/config/tests/lciconv.cc" - COMPILE_OUTPUT_VARIABLE CERR - ) - if(COMPILE_RESULT) - if(RUN_RESULT EQUAL 0) - message(STATUS "${TEXT} - yes") - set(DCMTK_STDLIBC_ICONV_HAS_DEFAULT_ENCODING 1 CACHE INTERNAL "") - else() - message(STATUS "${TEXT} - no") - set(DCMTK_STDLIBC_ICONV_HAS_DEFAULT_ENCODING CACHE INTERNAL "") - endif() + if(NOT DEFINED DCMTK_NO_TRY_RUN) + DCMTK_TRY_RUN(RUN_RESULT COMPILE_RESULT + "${CMAKE_BINARY_DIR}/CMakeTmp/lciconv" + "${DCMTK_SOURCE_DIR}/config/tests/lciconv.cc" + COMPILE_OUTPUT_VARIABLE CERR + ) + if(COMPILE_RESULT) + if(RUN_RESULT EQUAL 0) + message(STATUS "${TEXT} - yes") + set(DCMTK_STDLIBC_ICONV_HAS_DEFAULT_ENCODING 1 CACHE INTERNAL "") + else() + message(STATUS "${TEXT} - no") + set(DCMTK_STDLIBC_ICONV_HAS_DEFAULT_ENCODING CACHE INTERNAL "") + endif() + else() + message(FATAL_ERROR "${CERR}") + endif() else() - message(FATAL_ERROR "${CERR}") + if(NOT DEFINED DCMTK_STDLIBC_ICONV_HAS_DEFAULT_ENCODING) + message(FATAL_ERROR "When using DCMTK_NO_TRY_RUN, set DCMTK_STDLIBC_ICONV_HAS_DEFAULT_ENCODING") + endif() endif() endif() endfunction() @@ -1374,28 +1411,32 @@ set(ARITH_H_FILE "${ANDROID_TEMPORARY_FILES_LOCATION}/arith.h") endif() endif() - DCMTK_TRY_RUN( - RESULT COMPILED - "${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}\\\"" - ) - 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}") + if(NOT DEFINED DCMTK_NO_TRY_RUN) + DCMTK_TRY_RUN( + RESULT COMPILED + "${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}\\\"" + ) + 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}") + endif() endif() + else() + message(FATAL_ERROR "${OUTPUT}") endif() else() - message(FATAL_ERROR "${OUTPUT}") + message(FATAL_ERROR "${CERR}") endif() else() - message(FATAL_ERROR "${CERR}") + message("Be sure to copy arith.h to ${ARITH_H_FILE} before build") endif() endif() # file needs update endfunction() @@ -1483,15 +1524,19 @@ 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") + if(NOT DEFINED DCMTK_NO_TRY_RUN) + 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}") else() - message(STATUS "${MESSAGE} -- no") + message(FATAL_ERROR "When using DCMTK_NO_TRY_RUN and STL set HAVE_STL_${FEATURE}_TEST_RESULT") 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.") @@ -1514,3 +1559,4 @@ if(CMAKE_CROSSCOMPILING) set(DCMTK_CROSS_COMPILING ${CMAKE_CROSSCOMPILING}) endif() + diff -Nru dcmtk-3.6.6/CMake/osconfig.h.in dcmtk-3.6.7/CMake/osconfig.h.in --- dcmtk-3.6.6/CMake/osconfig.h.in 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/CMake/osconfig.h.in 2022-04-28 13:47:25.000000000 +0000 @@ -53,11 +53,15 @@ /* Define the default data dictionary path for the dcmdata library package */ #define DCM_DICT_DEFAULT_PATH "@DCM_DICT_DEFAULT_PATH@" -/* Define if we want a populated builtin dictionary */ -#cmakedefine ENABLE_BUILTIN_DICTIONARY "@ENABLE_BUILTIN_DICTIONARY@" +/* Define the type of standard dictionary that we want to use: + 0 - Do not load any default dictionary on startup + 1 - Load builtin dictionary on startup + 2 - Load external (i.e. file-based) dictionary on startup +*/ +#define DCM_DICT_DEFAULT @DCM_DICT_DEFAULT@ -/* Define if we want load external dictionaries */ -#cmakedefine ENABLE_EXTERNAL_DICTIONARY "@ENABLE_EXTERNAL_DICTIONARY@" +/* Define whether dictionaries defined through DCMDICTPATH variable should be loaded */ +#cmakedefine DCM_DICT_USE_DCMDICTPATH @DCM_DICT_USE_DCMDICTPATH@ /* Define the environment variable path separator */ #define ENVIRONMENT_PATH_SEPARATOR '@ENVIRONMENT_PATH_SEPARATOR@' @@ -86,9 +90,6 @@ /* Define to 1 if you have the `bind' function. */ #cmakedefine HAVE_BIND @HAVE_BIND@ -/* Define to 1 if you have the `bzero' function. */ -#cmakedefine HAVE_BZERO @HAVE_BZERO@ - /* Define if your C++ compiler can work with class templates */ #define HAVE_CLASS_TEMPLATE 1 @@ -110,6 +111,9 @@ /* Define if "const" is supported by the C compiler */ #define HAVE_C_CONST 1 +/* Define if your system has a declaration for fp_except_t in ieeefp.h */ +#cmakedefine HAVE_DECLARATION_FP_EXCEPT_T @HAVE_DECLARATION_FP_EXCEPT_T@ + /* Define if your system has a declaration for socklen_t in sys/types.h sys/socket.h */ #cmakedefine HAVE_DECLARATION_SOCKLEN_T @HAVE_DECLARATION_SOCKLEN_T@ @@ -414,10 +418,6 @@ /* Define if your system has a prototype for bind in sys/types.h sys/socket.h */ #cmakedefine HAVE_PROTOTYPE_BIND @HAVE_PROTOTYPE_BIND@ -/* Define if your system has a prototype for bzero in string.h strings.h - libc.h unistd.h stdlib.h */ -#cmakedefine HAVE_PROTOTYPE_BZERO @HAVE_PROTOTYPE_BZERO@ - /* Define if your system has a prototype for connect in sys/types.h sys/socket.h */ #cmakedefine HAVE_PROTOTYPE_CONNECT @HAVE_PROTOTYPE_CONNECT@ @@ -909,9 +909,6 @@ /* Define to 1 if your declares `struct tm'. */ /* #undef TM_IN_SYS_TIME */ -/* Define if ANSI standard C++ includes are used */ -#cmakedefine USE_STD_CXX_INCLUDES - /* Define if we are compiling with libiconv support. */ #cmakedefine WITH_LIBICONV @@ -1094,6 +1091,24 @@ /* Define if the compiler supports static_assert */ #cmakedefine HAVE_STATIC_ASSERT @HAVE_STATIC_ASSERT@ +/* Define if the compiler supports [[deprecated]] */ +#cmakedefine HAVE_CXX14_DEPRECATED_ATTRIBUTE @HAVE_CXX14_DEPRECATED_ATTRIBUTE@ + +/* Define if the compiler supports [[deprecated("message")]] */ +#cmakedefine HAVE_CXX14_DEPRECATED_ATTRIBUTE_MSG @HAVE_CXX14_DEPRECATED_ATTRIBUTE_MSG@ + +/* Define if the compiler supports __attribute__((deprecated)) */ +#cmakedefine HAVE_ATTRIBUTE_DEPRECATED @HAVE_ATTRIBUTE_DEPRECATED@ + +/* Define if the compiler supports __attribute__((deprecated("message"))) */ +#cmakedefine HAVE_ATTRIBUTE_DEPRECATED_MSG @HAVE_ATTRIBUTE_DEPRECATED_MSG@ + +/* Define if the compiler supports __declspec(deprecated) */ +#cmakedefine HAVE_DECLSPEC_DEPRECATED @HAVE_DECLSPEC_DEPRECATED@ + +/* Define if the compiler supports __declspec(deprecated("message")) */ +#cmakedefine HAVE_DECLSPEC_DEPRECATED_MSG @HAVE_DECLSPEC_DEPRECATED_MSG@ + /* Define if your system has a prototype for std::vfprintf in stdarg.h */ #cmakedefine HAVE_PROTOTYPE_STD__VFPRINTF @HAVE_PROTOTYPE_STD__VFPRINTF@ @@ -1112,12 +1127,6 @@ /* Define if your system provides sigjmp_buf as conditional jmp_buf alternative */ #cmakedefine HAVE_SIGJMP_BUF @HAVE_SIGJMP_BUF@ -/* Define if your OpenSSL library provides the SSL_CTX_GET0_PARAM function */ -#cmakedefine HAVE_SSL_CTX_GET0_PARAM @HAVE_SSL_CTX_GET0_PARAM@ - -/* Define if your OpenSSL library provides the RAND_egd function */ -#cmakedefine HAVE_RAND_EGD @HAVE_RAND_EGD@ - /* Always define STDIO_NAMESPACE to ::, because MSVC6 gets mad if you don't. */ #define STDIO_NAMESPACE :: @@ -1220,4 +1229,117 @@ /* Define if the input iterator category is supported */ #cmakedefine HAVE_CONTIGUOUS_ITERATOR_CATEGORY @HAVE_CONTIGUOUS_ITERATOR_CATEGORY@ +/* Feature Tests for the OpenSSL Library */ + +/* Define if your OpenSSL library provides the SSL_CTX_GET0_PARAM function */ +#cmakedefine HAVE_OPENSSL_PROTOTYPE_SSL_CTX_GET0_PARAM @HAVE_OPENSSL_PROTOTYPE_SSL_CTX_GET0_PARAM@ + +/* Define if your OpenSSL library provides the RAND_egd function */ +#cmakedefine HAVE_OPENSSL_PROTOTYPE_RAND_EGD @HAVE_OPENSSL_PROTOTYPE_RAND_EGD@ + +/* Define if we have OpenSSL with the DH_bits() function */ +#cmakedefine HAVE_OPENSSL_PROTOTYPE_DH_BITS @HAVE_OPENSSL_PROTOTYPE_DH_BITS@ + +/* Define if we have OpenSSL with the SSL_ERROR_WANT_ASYNC error code */ +#cmakedefine HAVE_OPENSSL_PROTOTYPE_SSL_ERROR_WANT_ASYNC @HAVE_OPENSSL_PROTOTYPE_SSL_ERROR_WANT_ASYNC@ + +/* Define if we have OpenSSL with the SSL_ERROR_WANT_ASYNC_JOB error code */ +#cmakedefine HAVE_OPENSSL_PROTOTYPE_SSL_ERROR_WANT_ASYNC_JOB @HAVE_OPENSSL_PROTOTYPE_SSL_ERROR_WANT_ASYNC_JOB@ + +/* Define if we have OpenSSL with the SSL_ERROR_WANT_CLIENT_HELLO_CB error code */ +#cmakedefine HAVE_OPENSSL_PROTOTYPE_SSL_ERROR_WANT_CLIENT_HELLO_CB @HAVE_OPENSSL_PROTOTYPE_SSL_ERROR_WANT_CLIENT_HELLO_CB@ + +/* Define if we have OpenSSL with the EVP_PKEY_base_id error code */ +#cmakedefine HAVE_OPENSSL_PROTOTYPE_EVP_PKEY_BASE_ID @HAVE_OPENSSL_PROTOTYPE_EVP_PKEY_BASE_ID@ + +/* Define if we have OpenSSL with the EVP_PKEY_RSA_PSS macro */ +#cmakedefine HAVE_OPENSSL_PROTOTYPE_EVP_PKEY_RSA_PSS @HAVE_OPENSSL_PROTOTYPE_EVP_PKEY_RSA_PSS@ + +/* Define if we have OpenSSL with the SSL_CTX_get_cert_store() function */ +#cmakedefine HAVE_OPENSSL_PROTOTYPE_SSL_CTX_GET_CERT_STORE @HAVE_OPENSSL_PROTOTYPE_SSL_CTX_GET_CERT_STORE@ + +/* Define if we have OpenSSL with the SSL_CTX_get_ciphers() function */ +#cmakedefine HAVE_OPENSSL_PROTOTYPE_SSL_CTX_GET_CIPHERS @HAVE_OPENSSL_PROTOTYPE_SSL_CTX_GET_CIPHERS@ + +/* Define if we have OpenSSL with the SSL_CTX_set0_tmp_dh_pkey() function */ +#cmakedefine HAVE_OPENSSL_PROTOTYPE_SSL_CTX_SET0_TMP_DH_PKEY @HAVE_OPENSSL_PROTOTYPE_SSL_CTX_SET0_TMP_DH_PKEY@ + +/* Define if we have OpenSSL with the SSL_CTX_set1_curves() function */ +#cmakedefine HAVE_OPENSSL_PROTOTYPE_SSL_CTX_SET1_CURVES @HAVE_OPENSSL_PROTOTYPE_SSL_CTX_SET1_CURVES@ + +/* Define if we have OpenSSL with the SSL_CTX_set1_sigalgs() function */ +#cmakedefine HAVE_OPENSSL_PROTOTYPE_SSL_CTX_SET1_SIGALGS @HAVE_OPENSSL_PROTOTYPE_SSL_CTX_SET1_SIGALGS@ + +/* Define if we have OpenSSL with the SSL_CTX_set_ecdh_auto() function */ +#cmakedefine HAVE_OPENSSL_PROTOTYPE_SSL_CTX_SET_ECDH_AUTO @HAVE_OPENSSL_PROTOTYPE_SSL_CTX_SET_ECDH_AUTO@ + +/* Define if we have OpenSSL with the SSL_CTX_set_max_proto_version() function */ +#cmakedefine HAVE_OPENSSL_PROTOTYPE_SSL_CTX_SET_MAX_PROTO_VERSION @HAVE_OPENSSL_PROTOTYPE_SSL_CTX_SET_MAX_PROTO_VERSION@ + +/* Define if we have OpenSSL with the SSL_CTX_set_security_level() function */ +#cmakedefine HAVE_OPENSSL_PROTOTYPE_SSL_CTX_SET_SECURITY_LEVEL @HAVE_OPENSSL_PROTOTYPE_SSL_CTX_SET_SECURITY_LEVEL@ + +/* Define if we have OpenSSL with the TLS1_TXT_ECDHE_RSA_WITH_CHACHA20_POLY1305 macro */ +#cmakedefine HAVE_OPENSSL_PROTOTYPE_TLS1_TXT_ECDHE_RSA_WITH_CHACHA20_POLY1305 @HAVE_OPENSSL_PROTOTYPE_TLS1_TXT_ECDHE_RSA_WITH_CHACHA20_POLY1305@ + +/* Define if we have OpenSSL with the TLS_method() function */ +#cmakedefine HAVE_OPENSSL_PROTOTYPE_TLS_METHOD @HAVE_OPENSSL_PROTOTYPE_TLS_METHOD@ + +/* Define if we have OpenSSL with the X509_get_signature_nid() function */ +#cmakedefine HAVE_OPENSSL_PROTOTYPE_X509_GET_SIGNATURE_NID @HAVE_OPENSSL_PROTOTYPE_X509_GET_SIGNATURE_NID@ + +/* Define if we have OpenSSL with the X509_STORE_get0_param() function */ +#cmakedefine HAVE_OPENSSL_PROTOTYPE_X509_STORE_GET0_PARAM @HAVE_OPENSSL_PROTOTYPE_X509_STORE_GET0_PARAM@ + +/* Define if we have OpenSSL with the ASN1_STRING_get0_data() function */ +#cmakedefine HAVE_OPENSSL_PROTOTYPE_ASN1_STRING_GET0_DATA @HAVE_OPENSSL_PROTOTYPE_ASN1_STRING_GET0_DATA@ + +/* Define if we have OpenSSL with the new typedef of EVP_MD_CTX as struct evp_md_ctx_st */ +#cmakedefine HAVE_OPENSSL_DECLARATION_NEW_EVP_MD_CTX @HAVE_OPENSSL_DECLARATION_NEW_EVP_MD_CTX@ + +/* Define if we have OpenSSL with the EVP_PKEY_get0_EC_KEY() function */ +#cmakedefine HAVE_OPENSSL_PROTOTYPE_EVP_PKEY_GET0_EC_KEY @HAVE_OPENSSL_PROTOTYPE_EVP_PKEY_GET0_EC_KEY@ + +/* Define if we have OpenSSL with the EVP_PKEY_get_group_name() function */ +#cmakedefine HAVE_OPENSSL_PROTOTYPE_EVP_PKEY_GET_GROUP_NAME @HAVE_OPENSSL_PROTOTYPE_EVP_PKEY_GET_GROUP_NAME@ + +/* Define if we have OpenSSL with the EVP_PKEY_id() function */ +#cmakedefine HAVE_OPENSSL_PROTOTYPE_EVP_PKEY_ID @HAVE_OPENSSL_PROTOTYPE_EVP_PKEY_ID@ + +/* Define if we have OpenSSL with the OSSL_PROVIDER_load() function */ +#cmakedefine HAVE_OPENSSL_PROTOTYPE_OSSL_PROVIDER_LOAD @HAVE_OPENSSL_PROTOTYPE_OSSL_PROVIDER_LOAD@ + +/* Define if we have the header file*/ +#cmakedefine HAVE_OPENSSL_PROVIDER_H @HAVE_OPENSSL_PROVIDER_H@ + +/* Define if we have OpenSSL with the TS_STATUS_INFO_get0_failure_info() function */ +#cmakedefine HAVE_OPENSSL_PROTOTYPE_TS_STATUS_INFO_GET0_FAILURE_INFO @HAVE_OPENSSL_PROTOTYPE_TS_STATUS_INFO_GET0_FAILURE_INFO@ + +/* Define if we have OpenSSL with the TS_STATUS_INFO_get0_status() function */ +#cmakedefine HAVE_OPENSSL_PROTOTYPE_TS_STATUS_INFO_GET0_STATUS @HAVE_OPENSSL_PROTOTYPE_TS_STATUS_INFO_GET0_STATUS@ + +/* Define if we have OpenSSL with the TS_STATUS_INFO_get0_text() function */ +#cmakedefine HAVE_OPENSSL_PROTOTYPE_TS_STATUS_INFO_GET0_TEXT @HAVE_OPENSSL_PROTOTYPE_TS_STATUS_INFO_GET0_TEXT@ + +/* Define if we have OpenSSL with the TS_VERIFY_CTS_set_certs() function */ +#cmakedefine HAVE_OPENSSL_PROTOTYPE_TS_VERIFY_CTS_SET_CERTS @HAVE_OPENSSL_PROTOTYPE_TS_VERIFY_CTS_SET_CERTS@ + +/* Define if we have OpenSSL with the TS_VERIFY_CTX_set_data() function */ +#cmakedefine HAVE_OPENSSL_PROTOTYPE_TS_VERIFY_CTX_SET_DATA @HAVE_OPENSSL_PROTOTYPE_TS_VERIFY_CTX_SET_DATA@ + +/* Define if we have OpenSSL with the TS_VERIFY_CTX_set_flags() function */ +#cmakedefine HAVE_OPENSSL_PROTOTYPE_TS_VERIFY_CTX_SET_FLAGS @HAVE_OPENSSL_PROTOTYPE_TS_VERIFY_CTX_SET_FLAGS@ + +/* Define if we have OpenSSL with the TS_VERIFY_CTX_set_store() function */ +#cmakedefine HAVE_OPENSSL_PROTOTYPE_TS_VERIFY_CTX_SET_STORE @HAVE_OPENSSL_PROTOTYPE_TS_VERIFY_CTX_SET_STORE@ + +/* Define if we have OpenSSL with the X509_ALGOR_get0() function expecting a const pointer as first parameter */ +#cmakedefine HAVE_OPENSSL_X509_ALGOR_GET0_CONST_PARAM @HAVE_OPENSSL_X509_ALGOR_GET0_CONST_PARAM@ + +/* Define if we have OpenSSL with the X509_get0_notAfter() function */ +#cmakedefine HAVE_OPENSSL_PROTOTYPE_X509_GET0_NOTAFTER @HAVE_OPENSSL_PROTOTYPE_X509_GET0_NOTAFTER@ + +/* Define if we have OpenSSL with the X509_get0_notBefore() function */ +#cmakedefine HAVE_OPENSSL_PROTOTYPE_X509_GET0_NOTBEFORE @HAVE_OPENSSL_PROTOTYPE_X509_GET0_NOTBEFORE@ + #endif /* !OSCONFIG_H*/ diff -Nru dcmtk-3.6.6/CMakeLists.txt dcmtk-3.6.7/CMakeLists.txt --- dcmtk-3.6.6/CMakeLists.txt 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/CMakeLists.txt 2022-04-28 13:47:25.000000000 +0000 @@ -1,19 +1,5 @@ # Minimum CMake version required -cmake_minimum_required(VERSION 2.8.5 FATAL_ERROR) - -# As of 2018-12-26 DCMTK has been validated to build with CMake 3.13.2 policies. -set(DCMTK_MAX_CMAKE_POLICY_VERSION 3.13.2) - -# Set and use the newest CMake policies that are validated to work -# (VERSION_LESS comparison is only defined for CMake 3 and newer) -if(CMAKE_MAJOR_VERSION LESS 3) - set(DCMTK_CMAKE_POLICY_VERSION "${CMAKE_VERSION}") -elseif(CMAKE_VERSION VERSION_LESS DCMTK_MAX_CMAKE_POLICY_VERSION) - set(DCMTK_CMAKE_POLICY_VERSION "${CMAKE_VERSION}") -else() - set(DCMTK_CMAKE_POLICY_VERSION "${DCMTK_MAX_CMAKE_POLICY_VERSION}") -endif() -cmake_policy(VERSION "${DCMTK_CMAKE_POLICY_VERSION}") +cmake_minimum_required(VERSION 3.0.0...3.13.2 FATAL_ERROR) # Declare project project(DCMTK) @@ -29,6 +15,14 @@ dcmseg dcmtract dcmpmap dcmect CACHE STRING "List of modules that should be built.") +# Provide an interface target to elegantly include the config directory +add_library(config INTERFACE) +target_include_directories(config INTERFACE + $ + $ +) +install(TARGETS config EXPORT DCMTKTargets) + # Include directories set(DCMTK_INCLUDE_DIR "${DCMTK_BINARY_DIR}/config/include") foreach(inc ${DCMTK_MODULES}) @@ -109,50 +103,9 @@ #----------------------------------------------------------------------------- # Create an install configuration files for external projects #----------------------------------------------------------------------------- -# -# DCMTKTargets.cmake will contain list of executables and libraries produced -# DCMTKConfigVersion.cmake will contain DCMTK version information -# DCMTKConfig.cmake will contain options used to build DCMTK -# -# All three files are created within the build tree's main directory (handled in -# CMake/GenerateCMakeExports.cmake, and are installed to locations (OS-specific -# under the main install dir (handled directly below). - -# Only create fully-fledged CMake export files if we have the related commands -include(CMake/CheckCMakeCommandExists.cmake) -include(CMakePackageConfigHelpers OPTIONAL) -CHECK_CMAKE_COMMAND_EXISTS("CONFIGURE_PACKAGE_CONFIG_FILE") -CHECK_CMAKE_COMMAND_EXISTS("WRITE_BASIC_PACKAGE_VERSION_FILE") - -if(HAVE_CONFIGURE_PACKAGE_CONFIG_FILE AND HAVE_WRITE_BASIC_PACKAGE_VERSION_FILE) - - # Create and configure CMake export files - include(CMake/GenerateCMakeExports.cmake) - - # ${DCMTK_INSTALL_CONFIG} and ${DCMTK_CONFIG_VERSION} are - # defined within CMake/GenerateCMakeExports.cmake. - # Install DCMTKTargets.cmake to install tree - install(EXPORT DCMTKTargets FILE DCMTKTargets.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) - -else() - - # Warning that we use old "configure_file" command - message(STATUS "Warning: Using old configure_file() mechanism to produce DCMTKConfig.cmake") - - # Actually configure file - 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}" - COMPONENT cmake) +if(NOT DCMTK_NO_EXPORT) + dcmtk_create_install_exports() endif() #----------------------------------------------------------------------------- @@ -195,3 +148,65 @@ "${DCMTK_RUN_CTEST_SCRIPT}" ESCAPE_QUOTES @ONLY ) endif() + +#----------------------------------------------------------------------------- +# Generate pkgconfig +#----------------------------------------------------------------------------- + +if(DCMTK_WITH_ICONV) + # libiconv does not provide a .pc file + set(PKGCONF_LIBS_PRIV "${PKGCONF_LIBS_PRIV} ${Iconv_LIBRARY} ${LIBCHARSET_LIBRARY}") +endif() + +if(DCMTK_WITH_ICU) + set(PKGCONF_REQ_PRIV "${PKGCONF_REQ_PRIV} icu-uc") +endif() + +if(DCMTK_WITH_LIBXML) + set(PKGCONF_REQ_PRIV "${PKGCONF_REQ_PRIV} libxml-2.0") +endif() + +if(DCMTK_WITH_LIBPNG) + set(PKGCONF_REQ_PRIV "${PKGCONF_REQ_PRIV} libpng") +endif() + +if(DCMTK_WITH_OPENJPEG) + set(PKGCONF_REQ_PRIV "${PKGCONF_REQ_PRIV} libopenjp2") +endif() + +if(DCMTK_WITH_OPENSSL) + set(PKGCONF_REQ_PRIV "${PKGCONF_REQ_PRIV} libssl libcrypto") +endif() + +if(DCMTK_WITH_SNDFILE) + set(PKGCONF_REQ_PRIV "${PKGCONF_REQ_PRIV} sndfile") +endif() + +if(DCMTK_WITH_TIFF) + set(PKGCONF_REQ_PRIV "${PKGCONF_REQ_PRIV} libtiff-4") +endif() + +if(DCMTK_WITH_WRAP) + # libwrap does not provide a .pc file + set(PKGCONF_LIBS_PRIV "${PKGCONF_LIBS_PRIV} ${WRAP_LIBRARY}") +endif() + +if(DCMTK_WITH_ZLIB) + set(PKGCONF_REQ_PRIV "${PKGCONF_REQ_PRIV} zlib") +endif() + +get_property(DCMTK_LIBRARY_TARGETS GLOBAL PROPERTY DCMTK_LIBRARY_TARGETS) + +foreach(T ${DCMTK_LIBRARY_TARGETS}) + set(PKGCONF_LIBS "${PKGCONF_LIBS} -l${T}") +endforeach() + +configure_file( + ${DCMTK_SOURCE_DIR}/CMake/dcmtk.pc.in + ${DCMTK_BINARY_DIR}/dcmtk.pc + @ONLY +) + +install(FILES "${DCMTK_BINARY_DIR}/dcmtk.pc" + DESTINATION ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/pkgconfig +) diff -Nru dcmtk-3.6.6/config/aclocal.m4 dcmtk-3.6.7/config/aclocal.m4 --- dcmtk-3.6.6/config/aclocal.m4 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/config/aclocal.m4 2022-04-28 13:47:25.000000000 +0000 @@ -3,7 +3,7 @@ dnl dnl Purpose: additional M4 macros for GNU autoconf dnl -dnl Authors: Andreas Barth, Marco Eichelberg +dnl Authors: Andreas Barth, Marco Eichelberg, Joerg Riesmeier, Jan Schlamelcher dnl @@ -12,7 +12,7 @@ dnl not allow you to define a variable "ac_cv_lib_g++" and dnl thus AC_CHECK_LIB will fail for libg++. dnl All symbols #defined by this macro replace G++ by GXX. - +dnl dnl AC_CHECK_GXXLIB AC_DEFUN(AC_CHECK_GXXLIB, [AC_MSG_CHECKING([for -lg++]) @@ -38,28 +38,25 @@ fi ]) + dnl AC_CHECK_PROTOTYPE checks if there is a prototype declaration dnl for the given function. If header file(s) are given as argument 2, they dnl are #included in the search. Otherwise only predefined functions will -dnl be found. The header files are only included in the search if they -dnl have already been found using the AC_CHECK_HEADERS(header) macro. -dnl Note: -dnl Since GNU autoheader does not support this macro, you must create entries -dnl in your acconfig.h for each function which is tested. +dnl be found. The header files are only included in the search if they have +dnl already been found using the AC_CHECK_HEADERS(header) macro. dnl Examples: dnl in configure.in: dnl AC_CHECK_PROTOTYPE(setsockopt, sys/types.h sys/socket.h) dnl AC_CHECK_PROTOTYPE(gethostid) -dnl in acconfig.h: +dnl in osconfig.h.in: dnl #undef HAVE_PROTOTYPE_SETSOCKOPT dnl #undef HAVE_PROTOTYPE_GETHOSTID - +dnl dnl AC_CHECK_PROTOTYPE(FUNCTION, HEADER-FILE..., ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]) AC_DEFUN(AC_CHECK_PROTOTYPE, [AC_MSG_CHECKING([ifelse([$2], , [predefined prototype for $1], [prototype for $1 (in $2)])]) AH_TEMPLATE(AS_TR_CPP(HAVE_PROTOTYPE_$1), [Define if your system has a prototype for $1 in $2.]) ifelse([$3], , :, [$3]) - ifelse([$2], , [ac_includes="" ], [ac_includes="" @@ -90,10 +87,7 @@ , ,eval "ac_cv_prototype_$tmp_save_1=no", eval "ac_cv_prototype_$tmp_save_1=yes")])dnl if eval "test \"`echo '$''{'ac_cv_prototype_$tmp_save_1'}'`\" = yes"; then AC_MSG_RESULT(yes) -changequote(, )dnl - ac_tr_prototype=HAVE_PROTOTYPE_`echo $tmp_save_1 | tr '[a-z]' '[A-Z]'` -changequote([, ])dnl - AC_DEFINE_UNQUOTED([$ac_tr_prototype]) + AC_DEFINE(AS_TR_CPP(HAVE_PROTOTYPE_$1)) ifelse([$3], , :, [$3]) else AC_MSG_RESULT(no) @@ -102,13 +96,70 @@ fi ]) + +dnl AC_CHECK_EXT_LIB_PROTOTYPE checks if there is a prototype declaration for +dnl the given function in an external library. The name of the library has to +dnl be specified as argument 2, the header file(s) as argument 3. The header +dnl files are only included in the search if they have already been found +dnl using the AC_CHECK_HEADERS(header) macro. +dnl Examples: +dnl in configure.in: +dnl AC_CHECK_EXT_LIB_PROTOTYPE(DH_bits, OpenSSL, openssl/dh.h) +dnl AC_CHECK_EXT_LIB_PROTOTYPE(EVP_PKEY_base_id, OpenSSL, openssl/evp.h) +dnl in osconfig.h.in: +dnl #undef HAVE_OPENSSL_PROTOTYPE_DH_BITS +dnl #undef HAVE_OPENSSL_PROTOTYPE_EVP_PKEY_BASE_ID +dnl +dnl AC_CHECK_EXT_LIB_PROTOTYPE(FUNCTION, LIBRARY, HEADER-FILE..., ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]) +AC_DEFUN(AC_CHECK_EXT_LIB_PROTOTYPE, +[AC_MSG_CHECKING([whether $2 provides a prototype for $1 (in $3)]) +AH_TEMPLATE(AS_TR_CPP(HAVE_$2_PROTOTYPE_$1), [Define if $2 provides a prototype for $1 in <$3>.]) +ifelse([$4], , :, [$4]) +ac_includes="" +for ac_header in $3 +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 $1 | tr ' :' '__'` +AC_CACHE_VAL(ac_cv_prototype_$tmp_save_1, +[AC_TRY_COMPILE( +[#ifdef __cplusplus +extern "C" { +#endif +$ac_includes +#ifdef __cplusplus +} +#endif +typedef union { int member; } dummyStruct; +#ifdef __cplusplus +extern "C" +#endif +dummyStruct $1(dummyStruct); +] +, ,eval "ac_cv_prototype_$tmp_save_1=no", eval "ac_cv_prototype_$tmp_save_1=yes")])dnl +if eval "test \"`echo '$''{'ac_cv_prototype_$tmp_save_1'}'`\" = yes"; then + AC_MSG_RESULT(yes) + AC_DEFINE(AS_TR_CPP(HAVE_$2_PROTOTYPE_$1)) + ifelse([$4], , :, [$4]) +else + AC_MSG_RESULT(no) +ifelse([$5], , , [$5 +])dnl +fi +]) + + dnl AC_CHECK_COMPILES verifies that the given code fragment can be compiled. dnl It is assumed that successfully compiling means that the specified dnl function is available. If header file(s) are given as argument 2, they -dnl #included in the search. Otherwise only predefined functions will be +dnl are included in the search. Otherwise only predefined functions will be dnl available. The header files are only included in the search if they have dnl already been found using the AC_CHECK_HEADERS(header) macro. - +dnl dnl AC_CHECK_COMPILES(FUNCTION, HEADER-FILE..., CODE, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]) AC_DEFUN(AC_CHECK_COMPILES, [AC_MSG_CHECKING([ifelse([$2], , [for $1], [for $1 (in $2)])]) @@ -130,10 +181,7 @@ eval "ac_cv_compiles_$tmp_save_1=yes", eval "ac_cv_compiles_$tmp_save_1=no")])dnl if eval "test \"`echo '$''{'ac_cv_compiles_$tmp_save_1'}'`\" = yes"; then AC_MSG_RESULT(yes) -changequote(, )dnl - ac_tr_prototype=HAVE_PROTOTYPE_`echo $tmp_save_1 | tr '[a-z]' '[A-Z]'` -changequote([, ])dnl - AC_DEFINE_UNQUOTED([$ac_tr_prototype]) + AC_DEFINE(AS_TR_CPP(HAVE_PROTOTYPE_$1)) ifelse([$4], , :, [$4]) else AC_MSG_RESULT(no) @@ -142,12 +190,48 @@ fi ]) -dnl AC_CHECK_DECLARATION checks if a certain type is declared in the include files given as argument 2 or 3. + +dnl AC_CHECK_EXT_LIB_COMPILES verifies that the given code fragment can be +dnl compiled. It is assumed that successfully compiling means that the +dnl specified function is available in the header file(s) given as argument 3. +dnl The name of the external library has to be specified as argument 2 but is +dnl only used to generate the name of the define in osconfig.h.in. The header +dnl files are only included in the search if they have already been found +dnl using the AC_CHECK_HEADERS(header) macro. +dnl +dnl AC_CHECK_EXT_LIB_COMPILES(FUNCTION, LIBRARY, HEADER-FILE..., CODE, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]) +AC_DEFUN(AC_CHECK_EXT_LIB_COMPILES, +[AC_MSG_CHECKING(whether $2 provides a prototype for $1 (in $3)) +AH_TEMPLATE(AS_TR_CPP(HAVE_$2_PROTOTYPE_$1), [Define if $2 provides a prototype for $1 in <$3>.]) +ac_includes="" +for ac_header in $3 +do + ac_includes="$ac_includes +#include<$ac_header>" +done +tmp_save_1=`echo $1 | tr ' :' '__'` +AC_CACHE_VAL(ac_cv_compiles_$tmp_save_1, +[AC_TRY_COMPILE([$ac_includes], [$4], +eval "ac_cv_compiles_$tmp_save_1=yes", eval "ac_cv_compiles_$tmp_save_1=no")])dnl +if eval "test \"`echo '$''{'ac_cv_compiles_$tmp_save_1'}'`\" = yes"; then + AC_MSG_RESULT(yes) + AC_DEFINE(AS_TR_CPP(HAVE_$2_PROTOTYPE_$1)) + ifelse([$5], , :, [$5]) +else + AC_MSG_RESULT(no) +ifelse([$6], , , [$6 +])dnl +fi +]) + + +dnl AC_CHECK_DECLARATION checks if a certain type is declared in the include +dnl files given as argument 2 or 3. dnl Files given as argument 2 are included extern "C" in C++ mode, dnl files given as argument 3 are included "as is". dnl Header files are only included in the search if they dnl have already been found using the AC_CHECK_HEADERS(header) macro. - +dnl dnl AC_CHECK_DECLARATION(FUNCTION, C-HEADER-FILE..., C++-HEADER-FILE..., ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]) AC_DEFUN(AC_CHECK_DECLARATION, [ @@ -194,10 +278,7 @@ , ,eval "$ac_cv_declaration=yes", eval "$ac_cv_declaration=no")])dnl if eval "test \"\$$ac_cv_declaration\" = yes"; then AC_MSG_RESULT(yes) -changequote(, )dnl - ac_tr_declaration=HAVE_DECLARATION_`echo $1 | tr ' :[a-z]' '__[A-Z]'` -changequote([, ])dnl - AC_DEFINE_UNQUOTED([$ac_tr_declaration]) + AC_DEFINE(AS_TR_CPP(HAVE_DECLARATION_$1)) ifelse([$4], , :, [$4]) else AC_MSG_RESULT(no) @@ -211,12 +292,12 @@ dnl AC_CHECK_INTP_SELECT checks if the prototype for select() dnl specifies arguments 2-4 to be int* instead of struct fd_set *. dnl This is true for HP UX 9.x and causes C++ code to break. - +dnl dnl AC_CHECK_INTP_SELECT(HEADER-FILE..., ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]) AC_DEFUN(AC_CHECK_INTP_SELECT, [AC_MSG_CHECKING([ifelse([$1], , [if select() needs int* parameters], [if select() needs int* parameters (in $1)])]) -AH_TEMPLATE([HAVE_INTP_SELECT], [Define if your system declares argument 2-4 of select() +AH_TEMPLATE(HAVE_INTP_SELECT, [Define if your system declares argument 2-4 of select() as int * instead of struct fd_set *.]) ifelse([$1], , [ac_includes="" ], @@ -264,10 +345,7 @@ eval "ac_cv_prototype_intp_select=yes", eval "ac_cv_prototype_intp_select=no")])]) if eval "test \"`echo $ac_cv_prototype_intp_select`\" = yes"; then AC_MSG_RESULT(yes) -changequote(, )dnl - ac_tr_prototype=HAVE_INTP_SELECT -changequote([, ])dnl - AC_DEFINE_UNQUOTED($ac_tr_prototype) + AC_DEFINE(HAVE_INTP_SELECT) ifelse([$2], , :, [$2]) else AC_MSG_RESULT(no) @@ -276,12 +354,11 @@ ]) - dnl AC_TRY_COMPILE_AND_LINK compiles a Source file into an object file dnl and links the object file. This can create a different behaviour dnl than compiling and linking the object file directly (e.g. dnl Sun C++ 3.0.1 with template functions) - +dnl dnl AC_TRY_COMPILE_AND_LINK(SOURCE, MAIN_BODY dnl [, ACTION-IF-FOUND [,ACTION-IF-NOT-FOUND]]) AC_DEFUN(AC_TRY_COMPILE_AND_LINK, @@ -316,13 +393,14 @@ fi rm -f conftest*]) + dnl AC_CHECK_STD_NAMESPACE checks if the C++-Compiler supports the dnl standard name space. - +dnl dnl AC_CHECK_STD_NAMESPACE AC_DEFUN(AC_CHECK_STD_NAMESPACE, [AC_MSG_CHECKING([for C++ standard namespace]) -AH_TEMPLATE([HAVE_STD_NAMESPACE], [Define if ANSI standard C++ includes use std namespace.]) +AH_TEMPLATE(HAVE_STD_NAMESPACE, [Define if ANSI standard C++ includes use std namespace.]) AC_CACHE_VAL(ac_cv_check_std_namespace, [AC_TRY_COMPILE_AND_LINK([ #include @@ -333,25 +411,21 @@ ])dnl if eval "test \"`echo '$ac_cv_check_std_namespace'`\" = yes"; then AC_MSG_RESULT(yes) -changequote(, )dnl - ac_tr_std_namespace=HAVE_STD_NAMESPACE -changequote([, ])dnl - AC_DEFINE_UNQUOTED($ac_tr_std_namespace) + AC_DEFINE(HAVE_STD_NAMESPACE) else AC_MSG_RESULT(no) fi ]) - dnl AC_CHECK_CLASS_TEMPLATE checks if the C++-Compiler is capable of dnl using class templates in the easiest form i. e. all methods are dnl inline, no template methods and no typedefs in the class - +dnl dnl AC_CHECK_CLASS_TEMPLATE AC_DEFUN(AC_CHECK_CLASS_TEMPLATE, [AC_MSG_CHECKING([for C++ class template]) -AH_TEMPLATE([HAVE_CLASS_TEMPLATE], [Define if your C++ compiler can work with class templates.]) +AH_TEMPLATE(HAVE_CLASS_TEMPLATE, [Define if your C++ compiler can work with class templates.]) AC_CACHE_VAL(ac_cv_check_class_template, [AC_TRY_COMPILE_AND_LINK([ template @@ -375,24 +449,20 @@ ])dnl if eval "test \"`echo '$ac_cv_check_class_template'`\" = yes"; then AC_MSG_RESULT(yes) -changequote(, )dnl - ac_tr_class_template=HAVE_CLASS_TEMPLATE -changequote([, ])dnl - AC_DEFINE_UNQUOTED($ac_tr_class_template) + AC_DEFINE(HAVE_CLASS_TEMPLATE) else AC_MSG_RESULT(no) fi ]) - dnl AC_CHECK_FUNCTION_TEMPLATE checks if the C++-Compiler is capable of dnl using function templates. - +dnl dnl AC_CHECK_FUNCTION_TEMPLATE AC_DEFUN(AC_CHECK_FUNCTION_TEMPLATE, [AC_MSG_CHECKING([for C++ function template]) -AH_TEMPLATE([HAVE_FUNCTION_TEMPLATE], [Define if your C++ compiler can work with function templates.]) +AH_TEMPLATE(HAVE_FUNCTION_TEMPLATE, [Define if your C++ compiler can work with function templates.]) AC_CACHE_VAL(ac_cv_check_function_template, [AC_TRY_COMPILE_AND_LINK([ template @@ -408,10 +478,7 @@ ])dnl if eval "test \"`echo '$ac_cv_check_function_template'`\" = yes"; then AC_MSG_RESULT(yes) -changequote(, )dnl - ac_tr_function_template=HAVE_FUNCTION_TEMPLATE -changequote([, ])dnl - AC_DEFINE_UNQUOTED($ac_tr_function_template) + AC_DEFINE(HAVE_FUNCTION_TEMPLATE) else AC_MSG_RESULT(no) fi @@ -420,11 +487,11 @@ dnl AC_CHECK_STATIC_TEMPLATE_METHOD checks if the C++-Compiler is capable of dnl using static methods in template classes - +dnl dnl AC_CHECK_STATIC_TEMPLATE_METHOD AC_DEFUN(AC_CHECK_STATIC_TEMPLATE_METHOD, [AC_MSG_CHECKING([for C++ static methods in class templates]) -AH_TEMPLATE([HAVE_STATIC_TEMPLATE_METHOD], [Define if your C++ compiler can work with static methods in class templates.]) +AH_TEMPLATE(HAVE_STATIC_TEMPLATE_METHOD, [Define if your C++ compiler can work with static methods in class templates.]) AC_CACHE_VAL(ac_cv_check_static_template_method, [AC_TRY_COMPILE_AND_LINK([ void additive(int & i) @@ -448,10 +515,7 @@ ])dnl if eval "test \"`echo '$ac_cv_check_static_template_method'`\" = yes"; then AC_MSG_RESULT(yes) -changequote(, )dnl - ac_tr_static_template_method=HAVE_STATIC_TEMPLATE_METHOD -changequote([, ])dnl - AC_DEFINE_UNQUOTED($ac_tr_static_template_method) + AC_DEFINE(HAVE_STATIC_TEMPLATE_METHOD) else AC_MSG_RESULT(no) fi @@ -461,11 +525,11 @@ dnl AC_CHECK_EXPLICIT_TEMPLATE_SPECIALIZATION checks if the C++-Compiler dnl supports the explicit template specialization syntax, i.e. dnl template<> int classname::functionname() - +dnl dnl AC_CHECK_EXPLICIT_TEMPLATE_SPECIALIZATION AC_DEFUN(AC_CHECK_EXPLICIT_TEMPLATE_SPECIALIZATION, [AC_MSG_CHECKING([for C++ explicit template specialization syntax]) -AH_TEMPLATE([HAVE_EXPLICIT_TEMPLATE_SPECIALIZATION], [Define if your C++ compiler supports the explicit template specialization syntax.]) +AH_TEMPLATE(HAVE_EXPLICIT_TEMPLATE_SPECIALIZATION, [Define if your C++ compiler supports the explicit template specialization syntax.]) AC_CACHE_VAL(ac_cv_check_explicit_template_specialization, [AC_TRY_COMPILE([ template @@ -484,10 +548,7 @@ ])dnl if eval "test \"`echo '$ac_cv_check_explicit_template_specialization'`\" = yes"; then AC_MSG_RESULT(yes) -changequote(, )dnl - ac_tr_explicit_template_specialization=HAVE_EXPLICIT_TEMPLATE_SPECIALIZATION -changequote([, ])dnl - AC_DEFINE_UNQUOTED($ac_tr_explicit_template_specialization) + AC_DEFINE(HAVE_EXPLICIT_TEMPLATE_SPECIALIZATION) else AC_MSG_RESULT(no) fi @@ -498,8 +559,8 @@ dnl This macro requires that 'libtool' exists in the current path, dnl i.e. AC_CHECK_PROGS(LIBTOOL, libtool, :) should be executed and evaluated dnl before performing this test. -dnl If libtool is identified as GNU libtool, the environment variable $ac_cv_check_gnu_libtool -dnl is set to the value "yes", otherwise to "no". +dnl If libtool is identified as GNU libtool, the environment variable +dnl $ac_cv_check_gnu_libtool is set to the value "yes", otherwise to "no". dnl dnl AC_CHECK_GNU_LIBTOOL AC_DEFUN(AC_CHECK_GNU_LIBTOOL, @@ -520,7 +581,6 @@ ]) - dnl AC_CHECK_HEADER_WITH_INCLUDES works like AC_CHECK_HEADER but allows to specify dnl additional code to be put into the test program before the #include statement dnl generated by AC_CHECK_HEADER. @@ -547,6 +607,7 @@ fi ]) + dnl AC_CHECK_HEADERS_WITH_INCLUDES works like AC_CHECK_HEADERS but allows to specify dnl additional code to be put into the test program before the #include statement dnl generated by AC_CHECK_HEADERS. @@ -575,7 +636,7 @@ AC_DEFUN(AC_CHECK_POLL_H, [ AC_MSG_CHECKING([for usable poll.h]) -AH_TEMPLATE(AS_TR_CPP(DCMTK_HAVE_POLL), [Define if your system has a usable .]) +AH_TEMPLATE(DCMTK_HAVE_POLL, [Define if your system has a usable .]) AC_CACHE_VAL(ac_cv_header_poll_h, [ case "${host}" in @@ -589,7 +650,7 @@ ]) if eval "test \"`echo '$ac_cv_header_poll_h'`\" = yes"; then AC_MSG_RESULT(yes) - AC_DEFINE_UNQUOTED(DCMTK_HAVE_POLL) + AC_DEFINE(DCMTK_HAVE_POLL) ifelse([$1], , :, [$1]) else AC_MSG_RESULT(no) @@ -639,14 +700,15 @@ fi ]) + dnl AC_CHECK_INTP_ACCEPT checks if the prototype for accept() dnl specifies arguments 2-4 to be int* instead of size_t *. - +dnl dnl AC_CHECK_INTP_ACCEPT(HEADER-FILE..., ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]) AC_DEFUN(AC_CHECK_INTP_ACCEPT, [AC_MSG_CHECKING([ifelse([$1], , [if accept() needs int* parameters], [if accept() needs int* parameters (in $1)])]) -AH_TEMPLATE([HAVE_INTP_ACCEPT], [Define if your system declares argument 3 of accept() +AH_TEMPLATE(HAVE_INTP_ACCEPT, [Define if your system declares argument 3 of accept() as int * instead of size_t * or socklen_t *.]) ifelse([$1], , [ac_includes="" ], @@ -699,10 +761,7 @@ eval "ac_cv_prototype_intp_accept=yes", eval "ac_cv_prototype_intp_accept=no")])]) if eval "test \"`echo $ac_cv_prototype_intp_accept`\" = yes"; then AC_MSG_RESULT(yes) -changequote(, )dnl - ac_tr_prototype=HAVE_INTP_ACCEPT -changequote([, ])dnl - AC_DEFINE_UNQUOTED($ac_tr_prototype) + AC_DEFINE(HAVE_INTP_ACCEPT) ifelse([$2], , :, [$2]) else AC_MSG_RESULT(no) @@ -711,15 +770,13 @@ ]) - - dnl AC_CHECK_PTHREAD_OPTION checks whether the compiler requires the dnl -pthread option to correctly link code containing posix thread calls. dnl This is true for example on FreeBSD. dnl This test assumes that is available. - +dnl dnl If the test is positive, -pthread is added to CFLAGS and CXXFLAGS. - +dnl dnl AC_CHECK_PTHREAD_OPTION AC_DEFUN(AC_CHECK_PTHREAD_OPTION, [AC_MSG_CHECKING(whether compiler requires -pthread option for posix threads) @@ -772,12 +829,11 @@ ]) - dnl AC_MY_C_INLINE works like the standard script AC_C_INLINE dnl but defines C_INLINE instead of redefining "inline" directly. - +dnl AC_DEFUN(AC_MY_C_INLINE, -[AH_TEMPLATE([C_INLINE], [Define to the inline keyword supported by the C compiler, if any, or to the empty string]) +[AH_TEMPLATE(C_INLINE, [Define to the inline keyword supported by the C compiler, if any, or to the empty string.]) AC_CACHE_CHECK([for inline], ac_cv_my_c_inline, [ac_cv_my_c_inline=no for ac_kw in inline __inline__ __inline; do @@ -794,9 +850,9 @@ dnl AC_MY_C_CONST works like the standard script AC_C_CONST dnl but defines HAVE_C_CONST instead of redefining "const" directly. - +dnl AC_DEFUN(AC_MY_C_CONST, -[AH_TEMPLATE([HAVE_C_CONST], [Define if "const" is supported by the C compiler.]) +[AH_TEMPLATE(HAVE_C_CONST, [Define if "const" is supported by the C compiler.]) dnl This message is consistent in form with the other checking messages, dnl and with the result message. AC_CACHE_CHECK([for working const], ac_cv_my_c_const, @@ -848,16 +904,16 @@ changequote([, ])dnl ac_cv_my_c_const=yes, ac_cv_my_c_const=no)]) if test $ac_cv_my_c_const = yes; then - AC_DEFINE_UNQUOTED(HAVE_C_CONST) + AC_DEFINE(HAVE_C_CONST) fi ]) dnl AC_MY_C_CHAR_UNSIGNED works like the standard script AC_C_CHAR_UNSIGNED dnl but defines C_CHAR_UNSIGNED instead of __CHAR_UNSIGNED__. - +dnl AC_DEFUN(AC_MY_C_CHAR_UNSIGNED, -[AH_TEMPLATE([C_CHAR_UNSIGNED], [Define if char is unsigned on the C compiler.]) +[AH_TEMPLATE(C_CHAR_UNSIGNED, [Define if char is unsigned on the C compiler.]) AC_CACHE_CHECK(whether char is unsigned, ac_cv_my_c_char_unsigned, [if test "$GCC" = yes; then # GCC predefines this symbol on systems where it applies. @@ -884,9 +940,9 @@ dnl AC_MY_C_RIGHTSHIFT_UNSIGNED checks whether the right shift operation dnl is unsigned and, if yes, defines C_RIGHTSHIFT_UNSIGNED. - +dnl AC_DEFUN(AC_MY_C_RIGHTSHIFT_UNSIGNED, -[AH_TEMPLATE([C_RIGHTSHIFT_UNSIGNED], [Define if >> is unsigned on the C compiler]) +[AH_TEMPLATE(C_RIGHTSHIFT_UNSIGNED, [Define if >> is unsigned on the C compiler.]) AC_CACHE_CHECK(whether right shift is unsigned, ac_cv_my_c_rightshift_unsigned, [ AC_TRY_RUN( @@ -915,18 +971,18 @@ ], ac_cv_my_c_rightshift_unsigned=yes, ac_cv_my_c_rightshift_unsigned=no) ]) if test $ac_cv_my_c_rightshift_unsigned = yes ; then - AC_DEFINE(C_CHAR_UNSIGNED) + AC_DEFINE(C_RIGHTSHIFT_UNSIGNED) fi ]) dnl AC_CHECK_IOS_NOCREATE checks if the flag ios::nocreate is defined. - +dnl dnl AC_CHECK_IOS_NOCREATE(IOS-Name, header [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]) AC_DEFUN(AC_CHECK_IOS_NOCREATE, [ AC_MSG_CHECKING([declaration of ios::nocreate (in $2)]) -AH_TEMPLATE([HAVE_IOS_NOCREATE], [Define if your system defines ios::nocreate in iostream.h]) +AH_TEMPLATE(HAVE_IOS_NOCREATE, [Define if your system defines ios::nocreate in iostream.h.]) ac_cv_declaration=ac_cv_declaration_ios_nocreate AC_CACHE_VAL($ac_cv_declaration, [AC_TRY_COMPILE([ @@ -936,10 +992,7 @@ ifstream file("name", $1::nocreate)] ,eval "$ac_cv_declaration=yes", eval "$ac_cv_declaration=no")])dnl if eval "test \"\$$ac_cv_declaration\" = yes"; then AC_MSG_RESULT(yes) -changequote(, )dnl - ac_tr_declaration=HAVE_IOS_NOCREATE -changequote([, ])dnl - AC_DEFINE_UNQUOTED($ac_tr_declaration) + AC_DEFINE(HAVE_IOS_NOCREATE) ifelse([$3], , :, [$3]) else AC_MSG_RESULT(no) @@ -950,7 +1003,6 @@ ]) - dnl AC_CHECK_OLD_READDIR_R checks if there is a function readdir_r dnl conforming to the Posix 1.c Draft 6 interface, i.e. dnl struct dirent *readdir_r(DIR *dirp, struct dirent *entry); @@ -963,7 +1015,7 @@ AC_DEFUN(AC_CHECK_OLD_READDIR_R, [ AC_MSG_CHECKING([if declaration of readdir_r conforms to Posix 1.c draft 6]) -AH_TEMPLATE([HAVE_OLD_READDIR_R], [Define if your system supports readdir_r with the obsolete +AH_TEMPLATE(HAVE_OLD_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.]) ac_cv_result=ac_cv_old_readdir_r @@ -996,10 +1048,7 @@ ], eval "$ac_cv_result=yes", eval "$ac_cv_result=no")])dnl if eval "test \"\$$ac_cv_result\" = yes"; then AC_MSG_RESULT(yes) -changequote(, )dnl - ac_cv_result=HAVE_OLD_READDIR_R -changequote([, ])dnl - AC_DEFINE_UNQUOTED($ac_cv_result) + AC_DEFINE(HAVE_OLD_READDIR_R) ifelse([$1], , , [$1 ])dnl else @@ -1013,12 +1062,12 @@ dnl AC_CHECK_INTP_GETSOCKOPT checks if the prototype for getsockopt() dnl specifies arguments 5 to be int* instead of size_t *. - +dnl dnl AC_CHECK_INTP_GETSOCKOPT(HEADER-FILE..., ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]) AC_DEFUN(AC_CHECK_INTP_GETSOCKOPT, [AC_MSG_CHECKING([ifelse([$1], , [if getsockopt() needs int* parameters], [if getsockopt() needs int* parameters (in $1)])]) -AH_TEMPLATE([HAVE_INTP_GETSOCKOPT], [Define if your system declares argument 5 of getsockopt() +AH_TEMPLATE(HAVE_INTP_GETSOCKOPT, [Define if your system declares argument 5 of getsockopt() as int * instead of size_t * or socklen_t.]) ifelse([$1], , [ac_includes="" ], @@ -1063,10 +1112,7 @@ eval "ac_cv_prototype_intp_getsockopt=yes", eval "ac_cv_prototype_intp_getsockopt=no")])]) if eval "test \"`echo $ac_cv_prototype_intp_getsockopt`\" = yes"; then AC_MSG_RESULT(yes) -changequote(, )dnl - ac_tr_prototype=HAVE_INTP_GETSOCKOPT -changequote([, ])dnl - AC_DEFINE_UNQUOTED($ac_tr_prototype) + AC_DEFINE(HAVE_INTP_GETSOCKOPT) ifelse([$2], , :, [$2]) else AC_MSG_RESULT(no) @@ -1079,12 +1125,12 @@ dnl callback function passed to signal() needs an ellipse (...) dnl as parameter. Needed for example on Irix 5. dnl The header files for signal() have to be specified. - +dnl dnl AC_CHECK_ELLIPSE_SIGNAL_HANDLER(HEADER-FILE..., ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]) AC_DEFUN(AC_CHECK_ELLIPSE_SIGNAL_HANDLER, [AC_MSG_CHECKING([ifelse([$1], , [if signal() callback needs ellipse], [if signal() callback needs ellipse (in $1)])]) -AH_TEMPLATE([SIGNAL_HANDLER_WITH_ELLIPSE], [Define if signal handlers need ellipse (...) parameters.]) +AH_TEMPLATE(SIGNAL_HANDLER_WITH_ELLIPSE, [Define if signal handlers need ellipse (...) parameters.]) ifelse([$1], , [ac_includes="" ], [ac_includes="" @@ -1132,10 +1178,7 @@ eval "ac_cv_signal_handler_with_ellipse=yes", eval "ac_cv_signal_handler_with_ellipse=no")])]) if eval "test \"`echo $ac_cv_signal_handler_with_ellipse`\" = yes"; then AC_MSG_RESULT(yes) -changequote(, )dnl - ac_tr_prototype=SIGNAL_HANDLER_WITH_ELLIPSE -changequote([, ])dnl - AC_DEFINE_UNQUOTED($ac_tr_prototype) + AC_DEFINE(SIGNAL_HANDLER_WITH_ELLIPSE) ifelse([$2], , :, [$2]) else AC_MSG_RESULT(no) @@ -1144,15 +1187,14 @@ ]) - dnl AC_INCLUDE_MATH_H_AS_CXX checks if 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 . - +dnl dnl AC_INCLUDE_MATH_H_AS_CXX(HEADER-FILE..., ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]) AC_DEFUN(AC_INCLUDE_MATH_H_AS_CXX, [AC_MSG_CHECKING([if fails if included extern "C"]) -AH_TEMPLATE([INCLUDE_MATH_H_AS_CXX], [Define if fails if included extern "C".]) +AH_TEMPLATE(INCLUDE_MATH_H_AS_CXX, [Define if fails if included extern "C".]) AC_CACHE_VAL(ac_cv_include_math_h_as_cxx, [AC_TRY_COMPILE([ extern "C" @@ -1171,10 +1213,7 @@ eval "ac_cv_include_math_h_as_cxx=yes", eval "ac_cv_include_math_h_as_cxx=no")])]) if eval "test \"`echo $ac_cv_include_math_h_as_cxx`\" = yes"; then AC_MSG_RESULT(yes) -changequote(, )dnl - ac_tr_prototype=INCLUDE_MATH_H_AS_CXX -changequote([, ])dnl - AC_DEFINE_UNQUOTED($ac_tr_prototype) + AC_DEFINE(INCLUDE_MATH_H_AS_CXX) ifelse([$2], , :, [$2]) else AC_MSG_RESULT(no) @@ -1182,13 +1221,14 @@ fi ]) + dnl AC_CHECK_CXX_VOLATILE checks if volatile is a built-in C++ keyword dnl (which is not the case on older compilers). - +dnl dnl AC_CHECK_CXX_VOLATILE(ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]) AC_DEFUN(AC_CHECK_CXX_VOLATILE, [AC_MSG_CHECKING([if volatile is known keyword]) -AH_TEMPLATE([HAVE_CXX_VOLATILE], [Define if volatile is a known keyword]) +AH_TEMPLATE(HAVE_CXX_VOLATILE, [Define if volatile is a known keyword.]) AC_CACHE_VAL(ac_cv_have_cxx_volatile, [AC_TRY_COMPILE([],[ volatile int i=0; @@ -1197,10 +1237,7 @@ eval "ac_cv_have_cxx_volatile=no")]) if eval "test \"`echo $ac_cv_have_cxx_volatile`\" = yes"; then AC_MSG_RESULT(yes) -changequote(, )dnl - ac_tr_prototype=HAVE_CXX_VOLATILE -changequote([, ])dnl - AC_DEFINE_UNQUOTED($ac_tr_prototype, ,[Define if volatile is a known keyword.]) + AC_DEFINE(HAVE_CXX_VOLATILE) ifelse([$1], , :, [$1]) else AC_MSG_RESULT(no) @@ -1213,7 +1250,7 @@ dnl http://www.gnu.org/software/ac-archive/htmldoc/ac_cxx_typename.html dnl AC_DEFUN([AC_CXX_TYPENAME], -[AH_TEMPLATE([HAVE_TYPENAME], [Define if typename is a known keyword]) +[AH_TEMPLATE(HAVE_TYPENAME, [Define if typename is a known keyword.]) AC_CACHE_CHECK(whether the compiler recognizes typename, ac_cv_cxx_typename, [AC_LANG_SAVE @@ -1224,7 +1261,7 @@ AC_LANG_RESTORE ]) if test "$ac_cv_cxx_typename" = yes; then - AC_DEFINE(HAVE_TYPENAME,,[Define if the compiler recognizes typename.]) + AC_DEFINE(HAVE_TYPENAME) fi ]) @@ -1233,7 +1270,7 @@ dnl http://www.gnu.org/software/ac-archive/htmldoc/ac_cxx_const_cast.html dnl AC_DEFUN([AC_CXX_CONST_CAST], -[AH_TEMPLATE([HAVE_CONST_CAST], [Define if the compiler supports const_cast<>]) +[AH_TEMPLATE(HAVE_CONST_CAST, [Define if the compiler supports const_cast<>.]) AC_CACHE_CHECK(whether the compiler supports const_cast<>, ac_cv_cxx_const_cast, [AC_LANG_SAVE @@ -1243,7 +1280,7 @@ AC_LANG_RESTORE ]) if test "$ac_cv_cxx_const_cast" = yes; then - AC_DEFINE(HAVE_CONST_CAST,,[Define if the compiler supports const_cast<>.]) + AC_DEFINE(HAVE_CONST_CAST) fi ]) @@ -1252,7 +1289,7 @@ dnl http://www.gnu.org/software/ac-archive/htmldoc/ac_cxx_dynamic_cast.html dnl AC_DEFUN([AC_CXX_DYNAMIC_CAST], -[AH_TEMPLATE([HAVE_DYNAMIC_CAST], [Define if the compiler supports dynamic_cast<>]) +[AH_TEMPLATE(HAVE_DYNAMIC_CAST, [Define if the compiler supports dynamic_cast<>.]) AC_CACHE_CHECK(whether the compiler supports dynamic_cast<>, ac_cv_cxx_dynamic_cast, [AC_LANG_SAVE @@ -1265,7 +1302,7 @@ AC_LANG_RESTORE ]) if test "$ac_cv_cxx_dynamic_cast" = yes; then - AC_DEFINE(HAVE_DYNAMIC_CAST,,[Define if the compiler supports dynamic_cast<>.]) + AC_DEFINE(HAVE_DYNAMIC_CAST) fi ]) @@ -1274,7 +1311,7 @@ dnl http://www.gnu.org/software/ac-archive/htmldoc/ac_cxx_reinterpret_cast.html dnl AC_DEFUN([AC_CXX_REINTERPRET_CAST], -[AH_TEMPLATE([HAVE_REINTERPRET_CAST], [Define if the compiler supports reinterpret_cast<>]) +[AH_TEMPLATE(HAVE_REINTERPRET_CAST, [Define if the compiler supports reinterpret_cast<>.]) AC_CACHE_CHECK(whether the compiler supports reinterpret_cast<>, ac_cv_cxx_reinterpret_cast, [AC_LANG_SAVE @@ -1289,8 +1326,7 @@ AC_LANG_RESTORE ]) if test "$ac_cv_cxx_reinterpret_cast" = yes; then - AC_DEFINE(HAVE_REINTERPRET_CAST,, - [Define if the compiler supports reinterpret_cast<>.]) + AC_DEFINE(HAVE_REINTERPRET_CAST) fi ]) @@ -1299,7 +1335,7 @@ dnl http://www.gnu.org/software/ac-archive/htmldoc/ac_cxx_static_cast.html dnl AC_DEFUN([AC_CXX_STATIC_CAST], -[AH_TEMPLATE([HAVE_STATIC_CAST], [Define if the compiler supports static_cast<>]) +[AH_TEMPLATE(HAVE_STATIC_CAST, [Define if the compiler supports static_cast<>.]) AC_CACHE_CHECK(whether the compiler supports static_cast<>, ac_cv_cxx_static_cast, [AC_LANG_SAVE @@ -1313,17 +1349,16 @@ AC_LANG_RESTORE ]) if test "$ac_cv_cxx_static_cast" = yes; then - AC_DEFINE(HAVE_STATIC_CAST,, - [Define if the compiler supports static_cast<>.]) + AC_DEFINE(HAVE_STATIC_CAST) fi ]) dnl AC_CXX_STD_NOTHROW checks if the compiler supports non-throwing new using dnl std::nothrow. - +dnl AC_DEFUN([AC_CXX_STD_NOTHROW], -[AH_TEMPLATE([HAVE_STD__NOTHROW], [Define if the compiler supports std::nothrow]) +[AH_TEMPLATE(HAVE_STD__NOTHROW, [Define if the compiler supports std::nothrow.]) AC_CACHE_CHECK(whether the compiler supports std::nothrow, ac_cv_cxx_std_nothrow, [AC_LANG_SAVE @@ -1333,16 +1368,16 @@ AC_LANG_RESTORE ]) if test "$ac_cv_cxx_std_nothrow" = yes; then - AC_DEFINE(HAVE_STD__NOTHROW,, [Define if the compiler supports std::nothrow.]) + AC_DEFINE(HAVE_STD__NOTHROW) fi ]) dnl AC_CXX_NOTHROW_DELETE checks if the compiler supports non-throwing delete using dnl std::nothrow. - +dnl AC_DEFUN([AC_CXX_NOTHROW_DELETE], -[AH_TEMPLATE([HAVE_NOTHROW_DELETE], [Define if the compiler supports operator delete (std::nothrow.)]) +[AH_TEMPLATE(HAVE_NOTHROW_DELETE, [Define if the compiler supports operator delete (std::nothrow).]) AC_CACHE_CHECK(whether the compiler supports operator delete (std::nothrow), ac_cv_cxx_nothrow_delete, [AC_LANG_SAVE @@ -1352,16 +1387,16 @@ AC_LANG_RESTORE ]) if test "$ac_cv_cxx_nothrow_delete" = yes; then - AC_DEFINE(HAVE_NOTHROW_DELETE,, [Define if the compiler supports operator delete (std::nothrow.)]) + AC_DEFINE(HAVE_NOTHROW_DELETE) fi ]) dnl AC_CXX_NOTHROW_DELETE checks if the compiler supports non-throwing delete using dnl std::nothrow. - +dnl AC_DEFUN([AC_CXX_STATIC_ASSERT], -[AH_TEMPLATE([HAVE_STATIC_ASSERT], [Define if the compiler supports static_assert]) +[AH_TEMPLATE(HAVE_STATIC_ASSERT, [Define if the compiler supports static_assert.]) AC_CACHE_CHECK(whether the compiler supports static_assert, ac_cv_cxx_static_assert, [AC_LANG_SAVE @@ -1371,7 +1406,7 @@ AC_LANG_RESTORE ]) if test "$ac_cv_cxx_static_assert" = yes; then - AC_DEFINE(HAVE_STATIC_ASSERT,, [Define if the compiler supports static_assert]) + AC_DEFINE(HAVE_STATIC_ASSERT) fi ]) @@ -1379,9 +1414,9 @@ dnl AC_CXX_LIBC_H_EXTERN_C checks if and cause a problem if 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. - +dnl 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]) +[AH_TEMPLATE(INCLUDE_LIBC_H_AS_CXX, [Define if libc.h should be treated as a C++ header.]) AC_CACHE_CHECK(whether libc.h should be treated as a C++ header, ac_cv_cxx_libc_h_is_cxx, [AC_LANG_SAVE @@ -1394,7 +1429,7 @@ AC_LANG_RESTORE ]) if test "$ac_cv_cxx_libc_h_is_cxx" = yes; then - AC_DEFINE(INCLUDE_LIBC_H_AS_CXX,, [Define if libc.h should be treated as a C++ header]) + AC_DEFINE(INCLUDE_LIBC_H_AS_CXX) fi ]) @@ -1406,11 +1441,11 @@ dnl Examples: dnl AC_CHECK_POINTER_TYPE(pthread_d, pthread.h) dnl AC_CHECK_POINTER_TYPE(void *) - +dnl dnl AC_CHECK_POINTER_TYPE(FUNCTION, HEADER-FILE...) AC_DEFUN(AC_CHECK_POINTER_TYPE, [AC_MSG_CHECKING([ifelse([$2], , [if $1 is a pointer type], [if $1 is a pointer type (in $2)])]) -AH_TEMPLATE(AS_TR_CPP(HAVE_POINTER_TYPE_$1), [Define if $1 is a pointer type on your system]) +AH_TEMPLATE(AS_TR_CPP(HAVE_POINTER_TYPE_$1), [Define if $1 is a pointer type on your system.]) ifelse([$2], , [ac_includes="" ], [ac_includes="" @@ -1447,10 +1482,7 @@ eval "ac_cv_pointer_type_$tmp_save_1=no", eval "ac_cv_pointer_type_$tmp_save_1=yes")])dnl if eval "test \"`echo '$''{'ac_cv_pointer_type_$tmp_save_1'}'`\" = yes"; then AC_MSG_RESULT(yes) -changequote(, )dnl - ac_tr_prototype=HAVE_POINTER_TYPE_`echo $tmp_save_1 | tr '[a-z]' '[A-Z]'` -changequote([, ])dnl - AC_DEFINE_UNQUOTED([$ac_tr_prototype]) + AC_DEFINE(AS_TR_CPP(HAVE_POINTER_TYPE_$1)) ifelse([$3], , :, [$3]) else AC_MSG_RESULT(no) @@ -1458,12 +1490,11 @@ ]) -dnl dnl CHECK_VLA checks if the C Compiler supports variable-length arrays dnl AC_DEFUN(CHECK_VLA, [AC_MSG_CHECKING([whether variable-length arrays are supported]) -AH_TEMPLATE([HAVE_VLA], [Define if variable-length arrays are supported in C]) +AH_TEMPLATE(HAVE_VLA, [Define if variable-length arrays are supported in C.]) AC_LANG_SAVE AC_LANG_C AC_TRY_COMPILE([], [ @@ -1519,8 +1550,8 @@ # when _LARGEFILE64_SOURCE is defined # AC_DEFUN([AC_LFS64], -[ 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]) +[ 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 AC_LANG_SAVE @@ -1532,8 +1563,8 @@ if test "$ac_cv_lfs64_support" = yes; then AC_MSG_RESULT([yes]) - 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]) + AC_DEFINE(DCMTK_ENABLE_LFS, DCMTK_LFS64) + AC_DEFINE(_LARGEFILE64_SOURCE) else AC_MSG_RESULT([no]) fi @@ -1551,15 +1582,15 @@ incorrectly reject 9223372036854775807. */ @%:@define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[[(LARGE_OFF_T % 2147483629 == 721 - && LARGE_OFF_T % 2147483647 == 1) - ? 1 : -1]];[]dnl + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]];[]dnl ]) # MY_AC_SYS_LARGEFILE_MACRO_VALUE(C-MACRO, VALUE, -# CACHE-VAR, -# DESCRIPTION, -# PROLOGUE, [FUNCTION-BODY]) +# CACHE-VAR, +# DESCRIPTION, +# PROLOGUE, [FUNCTION-BODY]) # Copied from autoconf 2.60 repository of specific tests and renamed # ---------------------------------------------------------- m4_define([MY_AC_SYS_LARGEFILE_MACRO_VALUE], @@ -1567,10 +1598,10 @@ [while :; do $3=no AC_COMPILE_IFELSE([AC_LANG_PROGRAM([$5], [$6])], - [ac_cv_lfs_support=yes; break]) + [ac_cv_lfs_support=yes; break]) AC_COMPILE_IFELSE([AC_LANG_PROGRAM([@%:@define $1 $2 $5], [$6])], - [$3=$2; ac_cv_lfs_support=yes; break]) + [$3=$2; ac_cv_lfs_support=yes; break]) break done]) if test "$$3" != no; then @@ -1597,13 +1628,13 @@ AC_LANG_C ac_save_CC=$CC while :; do - # IRIX 6.2 and later do not support large files by default, - # so use the C compiler's -n32 option if that helps. - AC_LANG_CONFTEST([AC_LANG_PROGRAM([MY_AC_SYS_LARGEFILE_TEST_INCLUDES])]) - AC_COMPILE_IFELSE([], [break]) - CC="$CC -n32" - AC_COMPILE_IFELSE([], [ac_cv_sys_largefile_CC=' -n32'; break]) - break + # IRIX 6.2 and later do not support large files by default, + # so use the C compiler's -n32 option if that helps. + AC_LANG_CONFTEST([AC_LANG_PROGRAM([MY_AC_SYS_LARGEFILE_TEST_INCLUDES])]) + AC_COMPILE_IFELSE([], [break]) + CC="$CC -n32" + AC_COMPILE_IFELSE([], [ac_cv_sys_largefile_CC=' -n32'; break]) + break done CC=$ac_save_CC rm -f conftest.$ac_ext @@ -1615,7 +1646,7 @@ fi ac_cv_lfs64_support=no - AH_TEMPLATE([DCMTK_ENABLE_LFS], [Select LFS mode (defined above) that shall be used or don't define it]) + 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.], @@ -1626,7 +1657,7 @@ [MY_AC_SYS_LARGEFILE_TEST_INCLUDES]) if test "$ac_cv_lfs_support" = yes; then - AC_DEFINE(DCMTK_ENABLE_LFS, DCMTK_LFS, [Select LFS mode (defined above) that shall be used or don't define it]) + AC_DEFINE(DCMTK_ENABLE_LFS, DCMTK_LFS) fi ])# MY_AC_SYS_LARGEFILE @@ -1639,16 +1670,12 @@ # in namespace standard or in global namespace. # AC_DEFUN([AC_STDIO_NAMESPACE], -[ AH_TEMPLATE([STDIO_NAMESPACE], [Namespace for ANSI C functions in standard C++ headers]) +[ AH_TEMPLATE(STDIO_NAMESPACE, [Namespace for ANSI C functions in standard C++ headers.]) ac_cv_stdio_namespace_is_std=no AC_LANG_SAVE AC_LANG_CPLUSPLUS AC_TRY_COMPILE([ -#ifdef USE_STD_CXX_INCLUDES #include -#else -#include -#endif ],[FILE *f = ::fopen("name", "r");], ac_cv_stdio_namespace_is_std=no, ac_cv_stdio_namespace_is_std=yes) AC_LANG_RESTORE @@ -1669,8 +1696,8 @@ AC_DEFUN(AC_CHECK_CHARP_STRERROR_R, [AC_MSG_CHECKING([ifelse([$1], , [if strerror_r() returns a char *], [if strerror_r() returns a char * (in $1)])]) -AH_TEMPLATE([HAVE_CHARP_STRERROR_R], [Define if your system declares the return type of strerror_r - as char * instead of int]) +AH_TEMPLATE(HAVE_CHARP_STRERROR_R, [Define if your system declares the return type of strerror_r + as char * instead of int.]) ifelse([$1], , [ac_includes="" ], [ac_includes="" @@ -1699,10 +1726,7 @@ )]) if eval "test \"`echo $ac_cv_prototype_charp_strerror_r`\" = yes"; then AC_MSG_RESULT(yes) -changequote(, )dnl - ac_tr_prototype=HAVE_CHARP_STRERROR_R -changequote([, ])dnl - AC_DEFINE_UNQUOTED($ac_tr_prototype) + AC_DEFINE(HAVE_CHARP_STRERROR_R) ifelse([$2], , :, [$2]) else AC_MSG_RESULT(no) @@ -1963,61 +1987,11 @@ dnl AC_MY_SYMBOL_EXISTS(SYMBOL) AC_DEFUN([AC_MY_SYMBOL_EXISTS], [ - AH_TEMPLATE([HAVE_$1_MACRO], [Define if the compiler supports $1.])dnl + AH_TEMPLATE(HAVE_$1_MACRO, [Define if the compiler supports $1.])dnl AC_CACHE_CHECK([for $1 macro], [ac_cv_have_$1_macro], [dnl AC_TRY_COMPILE([], [const char * func = $1;], [ac_cv_have_$1_macro=yes], [ac_cv_have_$1_macro=no])dnl ]) if test "x$ac_cv_have_$1_macro" = "xyes"; then - AC_DEFINE([HAVE_$1_MACRO]) + AC_DEFINE(HAVE_$1_MACRO) fi ]) - -dnl -dnl This macro checks if OpenSSL provides the SSL_CTX_get0_param function -dnl -dnl AC_CHECK_SSL_CTX_GET0_PARAM -AC_DEFUN([AC_CHECK_SSL_CTX_GET0_PARAM], -[ - AH_TEMPLATE([HAVE_SSL_CTX_GET0_PARAM], [Define if OpenSSL provides the SSL_CTX_get0_param function.])dnl - SAVELIBS=$LIBS - HAVE_SSL_CTX_GET0_PARAM=yes - LIBS="$LIBS $OPENSSLLIBS" - AC_MSG_CHECKING([whether OpenSSL provides the SSL_CTX_get0_param function]) - AC_COMPILE_IFELSE( - [ - AC_LANG_PROGRAM([[#include ]],[[&SSL_CTX_get0_param;]]) - ], - [ - AC_MSG_RESULT([yes]) - AC_DEFINE([HAVE_SSL_CTX_GET0_PARAM]) - ], - [ - AC_MSG_RESULT([no]) - ]) - LIBS=$SAVELIBS -]) - -dnl -dnl This macro checks if OpenSSL provides the RAND_egd function -dnl -dnl AC_CHECK_RAND_EGD -AC_DEFUN([AC_CHECK_RAND_EGD], -[ - AH_TEMPLATE([HAVE_RAND_EGD], [Define if OpenSSL provides the RAND_egd function.])dnl - SAVELIBS=$LIBS - HAVE_RAND_EGD=yes - LIBS="$LIBS $OPENSSLLIBS" - AC_MSG_CHECKING([whether OpenSSL provides the RAND_egd function]) - AC_COMPILE_IFELSE( - [ - AC_LANG_PROGRAM([[#include ]],[[&RAND_egd;]]) - ], - [ - AC_MSG_RESULT([yes]) - AC_DEFINE([HAVE_RAND_EGD]) - ], - [ - AC_MSG_RESULT([no]) - ]) - LIBS=$SAVELIBS -]) diff -Nru dcmtk-3.6.6/config/configure dcmtk-3.6.7/config/configure --- dcmtk-3.6.6/config/configure 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/config/configure 2022-04-28 13:47:25.000000000 +0000 @@ -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.6. +# Generated by GNU Autoconf 2.69 for dcmtk 3.6.7. # # Report bugs to . # @@ -579,9 +579,9 @@ # Identity of this package. PACKAGE_NAME='dcmtk' -PACKAGE_TARNAME='dcmtk-3.6.6' -PACKAGE_VERSION='3.6.6' -PACKAGE_STRING='dcmtk 3.6.6' +PACKAGE_TARNAME='dcmtk-3.6.7' +PACKAGE_VERSION='3.6.7' +PACKAGE_STRING='dcmtk 3.6.7' PACKAGE_BUGREPORT='bugs@dcmtk.org' PACKAGE_URL='http://www.dcmtk.org/' @@ -722,10 +722,9 @@ enable_debug enable_threads enable_lfs -enable_std_includes +enable_default_dict +enable_dcmdictpath enable_private_tags -enable_external_dict -enable_builtin_dict enable_rpath with_opensslinc with_openssl @@ -1324,7 +1323,7 @@ # 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.6 to adapt to many kinds of systems. +\`configure' configures dcmtk 3.6.7 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1390,7 +1389,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of dcmtk 3.6.6:";; + short | recursive ) echo "Configuration of dcmtk 3.6.7:";; esac cat <<\_ACEOF @@ -1404,14 +1403,14 @@ --disable-threads compile without MT support --enable-lfs=TYPE compile with LFS support (lfs/lfs64/auto=default) --disable-lfs compile without LFS support - --enable-std-includes use C++ ANSI standard includes (default: auto) - --disable-std-includes use old C++ includes + --enable-default-dict=TYPE + enable default dictionary and specify type + (external=default/builtin) + --disable-default-dict disable default dictionary + --enable-dcmdictpath enable DCMDICTPATH environment variable (default) + --disable-dcmdictpath disable DCMDICTPATH environment variable --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) @@ -1563,7 +1562,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -dcmtk configure 3.6.6 +dcmtk configure 3.6.7 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2423,7 +2422,7 @@ 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.6, which was +It was created by dcmtk $as_me 3.6.7, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2845,10 +2844,10 @@ -PACKAGE_VERSION_NUMBER=366 -PACKAGE_VERSION_SUFFIX="" -PACKAGE_DATE="2021-01-14" +PACKAGE_VERSION_NUMBER=367 +PACKAGE_VERSION_SUFFIX="" +PACKAGE_DATE="2022-04-22" cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION_NUMBER ${PACKAGE_VERSION_NUMBER} @@ -5340,9 +5339,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_my_c_const" >&5 $as_echo "$ac_cv_my_c_const" >&6; } if test $ac_cv_my_c_const = yes; then - cat >>confdefs.h <<_ACEOF -#define HAVE_C_CONST 1 -_ACEOF + $as_echo "#define HAVE_C_CONST 1" >>confdefs.h fi @@ -5457,7 +5454,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_my_c_rightshift_unsigned" >&5 $as_echo "$ac_cv_my_c_rightshift_unsigned" >&6; } if test $ac_cv_my_c_rightshift_unsigned = yes ; then - $as_echo "#define C_CHAR_UNSIGNED 1" >>confdefs.h + $as_echo "#define C_RIGHTSHIFT_UNSIGNED 1" >>confdefs.h fi @@ -6062,7 +6059,7 @@ fi done -for ac_func in strerror strdup bzero index rindex access +for ac_func in strerror strdup index rindex access 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" @@ -6453,8 +6450,7 @@ } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - -$as_echo "#define HAVE_ENAMETOOLONG /**/" >>confdefs.h + $as_echo "#define HAVE_ENAMETOOLONG 1" >>confdefs.h fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext @@ -6525,8 +6521,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_const_cast" >&5 $as_echo "$ac_cv_cxx_const_cast" >&6; } if test "$ac_cv_cxx_const_cast" = yes; then - -$as_echo "#define HAVE_CONST_CAST /**/" >>confdefs.h + $as_echo "#define HAVE_CONST_CAST 1" >>confdefs.h fi @@ -6574,8 +6569,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_dynamic_cast" >&5 $as_echo "$ac_cv_cxx_dynamic_cast" >&6; } if test "$ac_cv_cxx_dynamic_cast" = yes; then - -$as_echo "#define HAVE_DYNAMIC_CAST /**/" >>confdefs.h + $as_echo "#define HAVE_DYNAMIC_CAST 1" >>confdefs.h fi @@ -6625,8 +6619,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_reinterpret_cast" >&5 $as_echo "$ac_cv_cxx_reinterpret_cast" >&6; } if test "$ac_cv_cxx_reinterpret_cast" = yes; then - -$as_echo "#define HAVE_REINTERPRET_CAST /**/" >>confdefs.h + $as_echo "#define HAVE_REINTERPRET_CAST 1" >>confdefs.h fi @@ -6675,8 +6668,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_static_cast" >&5 $as_echo "$ac_cv_cxx_static_cast" >&6; } if test "$ac_cv_cxx_static_cast" = yes; then - -$as_echo "#define HAVE_STATIC_CAST /**/" >>confdefs.h + $as_echo "#define HAVE_STATIC_CAST 1" >>confdefs.h fi @@ -6721,8 +6713,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_std_nothrow" >&5 $as_echo "$ac_cv_cxx_std_nothrow" >&6; } if test "$ac_cv_cxx_std_nothrow" = yes; then - -$as_echo "#define HAVE_STD__NOTHROW /**/" >>confdefs.h + $as_echo "#define HAVE_STD__NOTHROW 1" >>confdefs.h fi @@ -6767,8 +6758,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_nothrow_delete" >&5 $as_echo "$ac_cv_cxx_nothrow_delete" >&6; } if test "$ac_cv_cxx_nothrow_delete" = yes; then - -$as_echo "#define HAVE_NOTHROW_DELETE /**/" >>confdefs.h + $as_echo "#define HAVE_NOTHROW_DELETE 1" >>confdefs.h fi @@ -6813,8 +6803,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_static_assert" >&5 $as_echo "$ac_cv_cxx_static_assert" >&6; } if test "$ac_cv_cxx_static_assert" = yes; then - -$as_echo "#define HAVE_STATIC_ASSERT /**/" >>confdefs.h + $as_echo "#define HAVE_STATIC_ASSERT 1" >>confdefs.h fi @@ -8841,9 +8830,7 @@ if eval "test \"`echo '$ac_cv_header_poll_h'`\" = yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } - cat >>confdefs.h <<_ACEOF -#define DCMTK_HAVE_POLL 1 -_ACEOF + $as_echo "#define DCMTK_HAVE_POLL 1" >>confdefs.h : else @@ -8899,8 +8886,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_libc_h_is_cxx" >&5 $as_echo "$ac_cv_cxx_libc_h_is_cxx" >&6; } if test "$ac_cv_cxx_libc_h_is_cxx" = yes; then - -$as_echo "#define INCLUDE_LIBC_H_AS_CXX /**/" >>confdefs.h + $as_echo "#define INCLUDE_LIBC_H_AS_CXX 1" >>confdefs.h fi @@ -8964,10 +8950,7 @@ if eval "test \"`echo '$''{'ac_cv_pointer_type_$tmp_save_1'}'`\" = yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } - ac_tr_prototype=HAVE_POINTER_TYPE_`echo $tmp_save_1 | tr '[a-z]' '[A-Z]'` - cat >>confdefs.h <<_ACEOF -#define $ac_tr_prototype 1 -_ACEOF + $as_echo "#define HAVE_POINTER_TYPE_PTHREAD_T 1" >>confdefs.h : else @@ -9258,7 +9241,7 @@ if test "x$ac_cv_lib_pthread_pthread_rwlock_init" = xyes; then : -$as_echo "#define HAVE_PTHREAD_RWLOCK /**/" >>confdefs.h +$as_echo "#define HAVE_PTHREAD_RWLOCK 1" >>confdefs.h POSIXRWLOCKSAVAILABLE="yes" case "${host}" in @@ -9313,7 +9296,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } -$as_echo "#define HAVE_PTHREAD_RWLOCK /**/" >>confdefs.h +$as_echo "#define HAVE_PTHREAD_RWLOCK 1" >>confdefs.h POSIXRWLOCKSAVAILABLE="yes" case "${host}" in @@ -9368,7 +9351,7 @@ CXXFLAGS="-D_REENTRANT $CXXFLAGS" CFLAGS="-D_REENTRANT $CFLAGS" -$as_echo "#define WITH_THREADS /**/" >>confdefs.h +$as_echo "#define WITH_THREADS 1" >>confdefs.h ;; posix) @@ -9382,7 +9365,7 @@ CXXFLAGS="-D_REENTRANT $CXXFLAGS" CFLAGS="-D_REENTRANT $CFLAGS" -$as_echo "#define WITH_THREADS /**/" >>confdefs.h +$as_echo "#define WITH_THREADS 1" >>confdefs.h ;; *) @@ -9434,11 +9417,9 @@ if test "$ac_cv_lfs64_support" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } + $as_echo "#define DCMTK_ENABLE_LFS DCMTK_LFS64" >>confdefs.h -$as_echo "#define DCMTK_ENABLE_LFS DCMTK_LFS64" >>confdefs.h - - -$as_echo "#define _LARGEFILE64_SOURCE 1" >>confdefs.h + $as_echo "#define _LARGEFILE64_SOURCE 1" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 @@ -9467,9 +9448,9 @@ ac_save_CC=$CC while :; do - # IRIX 6.2 and later do not support large files by default, - # so use the C compiler's -n32 option if that helps. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + # IRIX 6.2 and later do not support large files by default, + # so use the C compiler's -n32 option if that helps. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include /* Check that off_t can represent 2**63 - 1 correctly. @@ -9478,8 +9459,8 @@ incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 - && LARGE_OFF_T % 2147483647 == 1) - ? 1 : -1]; + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; int main () { @@ -9488,16 +9469,16 @@ return 0; } _ACEOF - if ac_fn_c_try_compile "$LINENO"; then : + if ac_fn_c_try_compile "$LINENO"; then : break fi rm -f core conftest.err conftest.$ac_objext - CC="$CC -n32" - if ac_fn_c_try_compile "$LINENO"; then : + CC="$CC -n32" + if ac_fn_c_try_compile "$LINENO"; then : ac_cv_sys_largefile_CC=' -n32'; break fi rm -f core conftest.err conftest.$ac_objext - break + break done CC=$ac_save_CC rm -f conftest.$ac_ext @@ -9534,8 +9515,8 @@ incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 - && LARGE_OFF_T % 2147483647 == 1) - ? 1 : -1]; + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; int main () { @@ -9558,8 +9539,8 @@ incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 - && LARGE_OFF_T % 2147483647 == 1) - ? 1 : -1]; + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; int main () { @@ -9601,8 +9582,8 @@ incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 - && LARGE_OFF_T % 2147483647 == 1) - ? 1 : -1]; + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; int main () { @@ -9625,8 +9606,8 @@ incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 - && LARGE_OFF_T % 2147483647 == 1) - ? 1 : -1]; + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; int main () { @@ -9654,8 +9635,7 @@ rm -f conftest* if test "$ac_cv_lfs_support" = yes; then - -$as_echo "#define DCMTK_ENABLE_LFS DCMTK_LFS" >>confdefs.h + $as_echo "#define DCMTK_ENABLE_LFS DCMTK_LFS" >>confdefs.h fi @@ -10187,7 +10167,6 @@ $as_echo_n "checking prototype for feenableexcept (in fenv.h)... " >&6; } : - ac_includes="" for ac_header in fenv.h do @@ -10235,10 +10214,7 @@ 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 + $as_echo "#define HAVE_PROTOTYPE_FEENABLEEXCEPT 1" >>confdefs.h : else @@ -10250,7 +10226,6 @@ $as_echo_n "checking prototype for _stricmp (in string.h)... " >&6; } : - ac_includes="" for ac_header in string.h do @@ -10298,10 +10273,7 @@ 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 + $as_echo "#define HAVE_PROTOTYPE__STRICMP 1" >>confdefs.h : else @@ -10313,7 +10285,6 @@ $as_echo_n "checking prototype for accept (in sys/types.h sys/socket.h)... " >&6; } : - ac_includes="" for ac_header in sys/types.h sys/socket.h do @@ -10361,10 +10332,7 @@ 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 + $as_echo "#define HAVE_PROTOTYPE_ACCEPT 1" >>confdefs.h : else @@ -10455,10 +10423,7 @@ if eval "test \"`echo $ac_cv_prototype_intp_accept`\" = yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } - ac_tr_prototype=HAVE_INTP_ACCEPT - cat >>confdefs.h <<_ACEOF -#define $ac_tr_prototype 1 -_ACEOF + $as_echo "#define HAVE_INTP_ACCEPT 1" >>confdefs.h : else @@ -10472,7 +10437,6 @@ $as_echo_n "checking prototype for bind (in sys/types.h sys/socket.h)... " >&6; } : - ac_includes="" for ac_header in sys/types.h sys/socket.h do @@ -10520,73 +10484,7 @@ 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 bzero (in string.h strings.h libc.h unistd.h stdlib.h)" >&5 -$as_echo_n "checking prototype for bzero (in string.h strings.h libc.h unistd.h stdlib.h)... " >&6; } - -: - -ac_includes="" -for ac_header in string.h strings.h libc.h unistd.h stdlib.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 bzero | 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 bzero(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 + $as_echo "#define HAVE_PROTOTYPE_BIND 1" >>confdefs.h : else @@ -10598,7 +10496,6 @@ $as_echo_n "checking prototype for connect (in sys/types.h sys/socket.h)... " >&6; } : - ac_includes="" for ac_header in sys/types.h sys/socket.h do @@ -10646,10 +10543,7 @@ 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 + $as_echo "#define HAVE_PROTOTYPE_CONNECT 1" >>confdefs.h : else @@ -10661,7 +10555,6 @@ $as_echo_n "checking prototype for finite (in math.h)... " >&6; } : - ac_includes="" for ac_header in math.h do @@ -10709,10 +10602,7 @@ 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 + $as_echo "#define HAVE_PROTOTYPE_FINITE 1" >>confdefs.h : else @@ -10724,7 +10614,6 @@ $as_echo_n "checking prototype for isinf (in math.h)... " >&6; } : - ac_includes="" for ac_header in math.h do @@ -10772,10 +10661,7 @@ 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 + $as_echo "#define HAVE_PROTOTYPE_ISINF 1" >>confdefs.h : else @@ -10787,7 +10673,6 @@ $as_echo_n "checking prototype for isnan (in math.h)... " >&6; } : - ac_includes="" for ac_header in math.h do @@ -10835,10 +10720,7 @@ 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 + $as_echo "#define HAVE_PROTOTYPE_ISNAN 1" >>confdefs.h : else @@ -10850,7 +10732,6 @@ $as_echo_n "checking prototype for std::finite (in cmath)... " >&6; } : - ac_includes="" for ac_header in cmath do @@ -10898,10 +10779,7 @@ 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 + $as_echo "#define HAVE_PROTOTYPE_STD__FINITE 1" >>confdefs.h : else @@ -10913,7 +10791,6 @@ $as_echo_n "checking prototype for std::isinf (in cmath)... " >&6; } : - ac_includes="" for ac_header in cmath do @@ -10961,10 +10838,7 @@ 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 + $as_echo "#define HAVE_PROTOTYPE_STD__ISINF 1" >>confdefs.h : else @@ -10976,7 +10850,6 @@ $as_echo_n "checking prototype for std::isnan (in cmath)... " >&6; } : - ac_includes="" for ac_header in cmath do @@ -11024,10 +10897,7 @@ 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 + $as_echo "#define HAVE_PROTOTYPE_STD__ISNAN 1" >>confdefs.h : else @@ -11039,7 +10909,6 @@ $as_echo_n "checking prototype for flock (in sys/file.h)... " >&6; } : - ac_includes="" for ac_header in sys/file.h do @@ -11087,10 +10956,7 @@ 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 + $as_echo "#define HAVE_PROTOTYPE_FLOCK 1" >>confdefs.h : else @@ -11102,7 +10968,6 @@ $as_echo_n "checking prototype for gethostbyname (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 @@ -11150,10 +11015,7 @@ 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 + $as_echo "#define HAVE_PROTOTYPE_GETHOSTBYNAME 1" >>confdefs.h : else @@ -11165,7 +11027,6 @@ $as_echo_n "checking prototype for gethostbyname_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 @@ -11213,10 +11074,7 @@ 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 + $as_echo "#define HAVE_PROTOTYPE_GETHOSTBYNAME_R 1" >>confdefs.h : else @@ -11228,7 +11086,6 @@ $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 @@ -11276,10 +11133,7 @@ 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 + $as_echo "#define HAVE_PROTOTYPE_GETHOSTBYADDR_R 1" >>confdefs.h : else @@ -11291,7 +11145,6 @@ $as_echo_n "checking prototype for gethostid (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 @@ -11339,10 +11192,7 @@ 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 + $as_echo "#define HAVE_PROTOTYPE_GETHOSTID 1" >>confdefs.h : else @@ -11354,7 +11204,6 @@ $as_echo_n "checking prototype for gethostname (in unistd.h libc.h stdlib.h netdb.h)... " >&6; } : - ac_includes="" for ac_header in unistd.h libc.h stdlib.h netdb.h do @@ -11402,10 +11251,7 @@ 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 + $as_echo "#define HAVE_PROTOTYPE_GETHOSTNAME 1" >>confdefs.h : else @@ -11417,7 +11263,6 @@ $as_echo_n "checking prototype for getsockname (in sys/types.h sys/socket.h)... " >&6; } : - ac_includes="" for ac_header in sys/types.h sys/socket.h do @@ -11465,10 +11310,7 @@ 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 + $as_echo "#define HAVE_PROTOTYPE_GETSOCKNAME 1" >>confdefs.h : else @@ -11480,7 +11322,6 @@ $as_echo_n "checking prototype for getsockopt (in sys/types.h sys/socket.h)... " >&6; } : - ac_includes="" for ac_header in sys/types.h sys/socket.h do @@ -11528,10 +11369,7 @@ 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 + $as_echo "#define HAVE_PROTOTYPE_GETSOCKOPT 1" >>confdefs.h : else @@ -11543,7 +11381,6 @@ $as_echo_n "checking prototype for strerror_r (in string.h)... " >&6; } : - ac_includes="" for ac_header in string.h do @@ -11591,10 +11428,7 @@ 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 + $as_echo "#define HAVE_PROTOTYPE_STRERROR_R 1" >>confdefs.h : else @@ -11649,10 +11483,7 @@ if eval "test \"`echo $ac_cv_prototype_charp_strerror_r`\" = yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } - ac_tr_prototype=HAVE_CHARP_STRERROR_R - cat >>confdefs.h <<_ACEOF -#define $ac_tr_prototype 1 -_ACEOF + $as_echo "#define HAVE_CHARP_STRERROR_R 1" >>confdefs.h : else @@ -11737,10 +11568,7 @@ if eval "test \"`echo $ac_cv_prototype_intp_getsockopt`\" = yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } - ac_tr_prototype=HAVE_INTP_GETSOCKOPT - cat >>confdefs.h <<_ACEOF -#define $ac_tr_prototype 1 -_ACEOF + $as_echo "#define HAVE_INTP_GETSOCKOPT 1" >>confdefs.h : else @@ -11754,7 +11582,6 @@ $as_echo_n "checking prototype for gettimeofday (in sys/time.h unistd.h)... " >&6; } : - ac_includes="" for ac_header in sys/time.h unistd.h do @@ -11802,10 +11629,7 @@ 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 + $as_echo "#define HAVE_PROTOTYPE_GETTIMEOFDAY 1" >>confdefs.h : else @@ -11817,7 +11641,6 @@ $as_echo_n "checking prototype for listen (in sys/types.h sys/socket.h)... " >&6; } : - ac_includes="" for ac_header in sys/types.h sys/socket.h do @@ -11865,10 +11688,7 @@ 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 + $as_echo "#define HAVE_PROTOTYPE_LISTEN 1" >>confdefs.h : else @@ -11880,7 +11700,6 @@ $as_echo_n "checking prototype for mktemp (in libc.h unistd.h stdlib.h)... " >&6; } : - ac_includes="" for ac_header in libc.h unistd.h stdlib.h do @@ -11928,10 +11747,7 @@ 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 + $as_echo "#define HAVE_PROTOTYPE_MKTEMP 1" >>confdefs.h : else @@ -11943,7 +11759,6 @@ $as_echo_n "checking prototype for mkstemp (in libc.h unistd.h stdlib.h)... " >&6; } : - ac_includes="" for ac_header in libc.h unistd.h stdlib.h do @@ -11991,10 +11806,7 @@ 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 + $as_echo "#define HAVE_PROTOTYPE_MKSTEMP 1" >>confdefs.h : else @@ -12006,7 +11818,6 @@ $as_echo_n "checking prototype for select (in sys/select.h sys/types.h sys/socket.h sys/time.h)... " >&6; } : - ac_includes="" for ac_header in sys/select.h sys/types.h sys/socket.h sys/time.h do @@ -12054,10 +11865,7 @@ 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 + $as_echo "#define HAVE_PROTOTYPE_SELECT 1" >>confdefs.h : else @@ -12143,10 +11951,7 @@ if eval "test \"`echo $ac_cv_prototype_intp_select`\" = yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } - ac_tr_prototype=HAVE_INTP_SELECT - cat >>confdefs.h <<_ACEOF -#define $ac_tr_prototype 1 -_ACEOF + $as_echo "#define HAVE_INTP_SELECT 1" >>confdefs.h : else @@ -12160,7 +11965,6 @@ $as_echo_n "checking prototype for setsockopt (in sys/types.h sys/socket.h)... " >&6; } : - ac_includes="" for ac_header in sys/types.h sys/socket.h do @@ -12208,10 +12012,7 @@ 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 + $as_echo "#define HAVE_PROTOTYPE_SETSOCKOPT 1" >>confdefs.h : else @@ -12223,7 +12024,6 @@ $as_echo_n "checking prototype for socket (in sys/types.h sys/socket.h)... " >&6; } : - ac_includes="" for ac_header in sys/types.h sys/socket.h do @@ -12271,10 +12071,7 @@ 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 + $as_echo "#define HAVE_PROTOTYPE_SOCKET 1" >>confdefs.h : else @@ -12286,7 +12083,6 @@ $as_echo_n "checking prototype for strcasecmp (in string.h)... " >&6; } : - ac_includes="" for ac_header in string.h do @@ -12334,10 +12130,7 @@ 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 + $as_echo "#define HAVE_PROTOTYPE_STRCASECMP 1" >>confdefs.h : else @@ -12349,7 +12142,6 @@ $as_echo_n "checking prototype for strncasecmp (in string.h)... " >&6; } : - ac_includes="" for ac_header in string.h do @@ -12397,10 +12189,7 @@ 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 + $as_echo "#define HAVE_PROTOTYPE_STRNCASECMP 1" >>confdefs.h : else @@ -12412,7 +12201,6 @@ $as_echo_n "checking prototype for usleep (in libc.h unistd.h stdlib.h)... " >&6; } : - ac_includes="" for ac_header in libc.h unistd.h stdlib.h do @@ -12460,10 +12248,7 @@ 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 + $as_echo "#define HAVE_PROTOTYPE_USLEEP 1" >>confdefs.h : else @@ -12475,7 +12260,6 @@ $as_echo_n "checking prototype for vsnprintf (in stdio.h stdarg.h)... " >&6; } : - ac_includes="" for ac_header in stdio.h stdarg.h do @@ -12523,10 +12307,7 @@ 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 + $as_echo "#define HAVE_PROTOTYPE_VSNPRINTF 1" >>confdefs.h : else @@ -12538,7 +12319,6 @@ $as_echo_n "checking prototype for wait3 (in libc.h sys/wait.h sys/time.h sys/resource.h)... " >&6; } : - ac_includes="" for ac_header in libc.h sys/wait.h sys/time.h sys/resource.h do @@ -12586,10 +12366,7 @@ 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 + $as_echo "#define HAVE_PROTOTYPE_WAIT3 1" >>confdefs.h : else @@ -12601,7 +12378,6 @@ $as_echo_n "checking prototype for waitpid (in sys/wait.h sys/time.h sys/resource.h)... " >&6; } : - ac_includes="" for ac_header in sys/wait.h sys/time.h sys/resource.h do @@ -12649,10 +12425,7 @@ 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 + $as_echo "#define HAVE_PROTOTYPE_WAITPID 1" >>confdefs.h : else @@ -12712,10 +12485,7 @@ if eval "test \"\$$ac_cv_declaration\" = yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } - ac_tr_declaration=HAVE_DECLARATION_`echo struct utimbuf | tr ' :[a-z]' '__[A-Z]'` - cat >>confdefs.h <<_ACEOF -#define $ac_tr_declaration 1 -_ACEOF + $as_echo "#define HAVE_DECLARATION_STRUCT_UTIMBUF 1" >>confdefs.h : else @@ -12776,10 +12546,7 @@ if eval "test \"\$$ac_cv_declaration\" = yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } - ac_tr_declaration=HAVE_DECLARATION_`echo socklen_t | tr ' :[a-z]' '__[A-Z]'` - cat >>confdefs.h <<_ACEOF -#define $ac_tr_declaration 1 -_ACEOF + $as_echo "#define HAVE_DECLARATION_SOCKLEN_T 1" >>confdefs.h : else @@ -12842,10 +12609,7 @@ if eval "test \"\$$ac_cv_result\" = yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } - ac_cv_result=HAVE_OLD_READDIR_R - cat >>confdefs.h <<_ACEOF -#define $ac_cv_result 1 -_ACEOF + $as_echo "#define HAVE_OLD_READDIR_R 1" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 @@ -12931,10 +12695,7 @@ if eval "test \"`echo $ac_cv_signal_handler_with_ellipse`\" = yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } - ac_tr_prototype=SIGNAL_HANDLER_WITH_ELLIPSE - cat >>confdefs.h <<_ACEOF -#define $ac_tr_prototype 1 -_ACEOF + $as_echo "#define SIGNAL_HANDLER_WITH_ELLIPSE 1" >>confdefs.h : else @@ -12997,10 +12758,7 @@ if eval "test \"`echo $ac_cv_include_math_h_as_cxx`\" = yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } - ac_tr_prototype=INCLUDE_MATH_H_AS_CXX - cat >>confdefs.h <<_ACEOF -#define $ac_tr_prototype 1 -_ACEOF + $as_echo "#define INCLUDE_MATH_H_AS_CXX 1" >>confdefs.h : else @@ -13013,60 +12771,7 @@ -{ $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" -# Check whether --enable-std-includes was given. -if test "${enable_std_includes+set}" = set; then : - enableval=$enable_std_includes; case "$enableval" in - yes) - ac_use_std_includes="yes" - ;; - - *) - ac_use_std_includes="no" - ;; - esac - -fi - - -if test "$ac_cv_header_fstream" = "yes" -a "$ac_cv_header_iostream" = "yes" -a "$ac_cv_header_iomanip" = "yes"; then - ac_have_std_includes="yes" -else - ac_have_std_includes="no" -fi - -if test "$ac_cv_header_fstream_h" = "yes" -a "$ac_cv_header_iostream_h" = "yes" -a "$ac_cv_header_iomanip_h" = "yes"; then - ac_have_old_includes="yes" -else - ac_have_old_includes="no" -fi - -if test "$ac_use_std_includes" = "yes"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - -$as_echo "#define USE_STD_CXX_INCLUDES /**/" >>confdefs.h - -elif test "$ac_use_std_includes" = "no"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -elif test "$ac_have_std_includes" = "yes"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - -$as_echo "#define USE_STD_CXX_INCLUDES /**/" >>confdefs.h - - ac_use_std_includes="yes" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ac_use_std_includes="no" -fi - -if test "$ac_use_std_includes" = "yes"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ standard namespace" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ standard namespace" >&5 $as_echo_n "checking for C++ standard namespace... " >&6; } if ${ac_cv_check_std_namespace+:} false; then : @@ -13074,7 +12779,7 @@ else ac_link_o='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.o $LIBS 1>&5' cat > conftest.$ac_ext < @@ -13115,10 +12820,7 @@ if eval "test \"`echo '$ac_cv_check_std_namespace'`\" = yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } - ac_tr_std_namespace=HAVE_STD_NAMESPACE - cat >>confdefs.h <<_ACEOF -#define $ac_tr_std_namespace 1 -_ACEOF + $as_echo "#define HAVE_STD_NAMESPACE 1" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 @@ -13177,10 +12879,7 @@ if eval "test \"\$$ac_cv_declaration\" = yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } - ac_tr_declaration=HAVE_DECLARATION_`echo std::ios_base::openmode | tr ' :[a-z]' '__[A-Z]'` - cat >>confdefs.h <<_ACEOF -#define $ac_tr_declaration 1 -_ACEOF + $as_echo "#define HAVE_DECLARATION_STD__IOS_BASE__OPENMODE 1" >>confdefs.h : else @@ -13222,10 +12921,7 @@ if eval "test \"\$$ac_cv_declaration\" = yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } - ac_tr_declaration=HAVE_IOS_NOCREATE - cat >>confdefs.h <<_ACEOF -#define $ac_tr_declaration 1 -_ACEOF + $as_echo "#define HAVE_IOS_NOCREATE 1" >>confdefs.h : else @@ -13234,7 +12930,7 @@ fi unset ac_cv_declaration - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for std::vfprintf (in cstdarg cstdio)" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for std::vfprintf (in cstdarg cstdio)" >&5 $as_echo_n "checking for std::vfprintf (in cstdarg cstdio)... " >&6; } ac_includes="" @@ -13271,10 +12967,7 @@ if eval "test \"`echo '$''{'ac_cv_compiles_$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 + $as_echo "#define HAVE_PROTOTYPE_STD__VFPRINTF 1" >>confdefs.h : else @@ -13282,7 +12975,7 @@ $as_echo "no" >&6; } fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for std::vsnprintf (in cstdarg cstdio)" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for std::vsnprintf (in cstdarg cstdio)" >&5 $as_echo_n "checking for std::vsnprintf (in cstdarg cstdio)... " >&6; } ac_includes="" @@ -13319,10 +13012,7 @@ if eval "test \"`echo '$''{'ac_cv_compiles_$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 + $as_echo "#define HAVE_PROTOTYPE_STD__VSNPRINTF 1" >>confdefs.h : else @@ -13330,32 +13020,89 @@ $as_echo "no" >&6; } fi -else - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking declaration for std::ios_base::openmode (in iostream.h)" >&5 -$as_echo_n "checking declaration for std::ios_base::openmode (in iostream.h)... " >&6; } - -ac_includes="" -ac_cpp_includes="" -for ac_header in iostream.h -do - ac_safe=`echo "$ac_header" | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'}'`\" = yes"; then - ac_cpp_includes="$ac_cpp_includes -#include<$ac_header>" - fi -done -ac_cv_declaration=`echo 'ac_cv_declaration_std::ios_base::openmode' | tr ' :' '__'` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ standard namespace" >&5 +$as_echo_n "checking for C++ standard namespace... " >&6; } -if eval \${$ac_cv_declaration+:} false; then : +if ${ac_cv_check_std_namespace+:} false; then : $as_echo_n "(cached) " >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef __cplusplus -extern "C" { + ac_link_o='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.o $LIBS 1>&5' +cat > conftest.$ac_ext < +using namespace std; + +int main() { + + cout << "Hello World" << endl; + +; return 0; } +EOF +if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link_o\""; } >&5 + (eval $ac_link_o) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + rm -rf conftest* + eval "ac_cv_check_std_namespace=yes" + else + echo "configure: failed link was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_check_std_namespace=no" + fi +else + echo "configure: failed compile was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_check_std_namespace=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_check_std_namespace'`\" = yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + $as_echo "#define HAVE_STD_NAMESPACE 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 declaration for std::ios_base::openmode (in iostream)" >&5 +$as_echo_n "checking declaration for std::ios_base::openmode (in iostream)... " >&6; } + +ac_includes="" + +ac_cpp_includes="" +for ac_header in iostream +do + ac_safe=`echo "$ac_header" | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'}'`\" = yes"; then + ac_cpp_includes="$ac_cpp_includes +#include<$ac_header>" + fi +done + +ac_cv_declaration=`echo 'ac_cv_declaration_std::ios_base::openmode' | tr ' :' '__'` + +if eval \${$ac_cv_declaration+:} 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 @@ -13383,10 +13130,7 @@ if eval "test \"\$$ac_cv_declaration\" = yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } - ac_tr_declaration=HAVE_DECLARATION_`echo std::ios_base::openmode | tr ' :[a-z]' '__[A-Z]'` - cat >>confdefs.h <<_ACEOF -#define $ac_tr_declaration 1 -_ACEOF + $as_echo "#define HAVE_DECLARATION_STD__IOS_BASE__OPENMODE 1" >>confdefs.h : else @@ -13396,8 +13140,8 @@ unset ac_cv_declaration -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking declaration of ios::nocreate (in fstream.h)" >&5 -$as_echo_n "checking declaration of ios::nocreate (in fstream.h)... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking declaration of ios::nocreate (in fstream)" >&5 +$as_echo_n "checking declaration of ios::nocreate (in fstream)... " >&6; } ac_cv_declaration=ac_cv_declaration_ios_nocreate if eval \${$ac_cv_declaration+:} false; then : @@ -13406,14 +13150,14 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include +#include int main () { namespace std { } using namespace std; -ifstream file("name", ios::nocreate) +ifstream file("name", std::ios::nocreate) ; return 0; } @@ -13428,10 +13172,7 @@ if eval "test \"\$$ac_cv_declaration\" = yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } - ac_tr_declaration=HAVE_IOS_NOCREATE - cat >>confdefs.h <<_ACEOF -#define $ac_tr_declaration 1 -_ACEOF + $as_echo "#define HAVE_IOS_NOCREATE 1" >>confdefs.h : else @@ -13440,11 +13181,11 @@ fi unset ac_cv_declaration - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for std::vfprintf (in stdarg.h stdio.h)" >&5 -$as_echo_n "checking for std::vfprintf (in stdarg.h stdio.h)... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for std::vfprintf (in cstdarg cstdio)" >&5 +$as_echo_n "checking for std::vfprintf (in cstdarg cstdio)... " >&6; } ac_includes="" -for ac_header in stdarg.h stdio.h +for ac_header in cstdarg cstdio do ac_safe=`echo "$ac_header" | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'}'`\" = yes"; then @@ -13477,10 +13218,7 @@ if eval "test \"`echo '$''{'ac_cv_compiles_$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 + $as_echo "#define HAVE_PROTOTYPE_STD__VFPRINTF 1" >>confdefs.h : else @@ -13488,11 +13226,11 @@ $as_echo "no" >&6; } fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for std::vsnprintf (in stdarg.h stdio.h)" >&5 -$as_echo_n "checking for std::vsnprintf (in stdarg.h stdio.h)... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for std::vsnprintf (in cstdarg cstdio)" >&5 +$as_echo_n "checking for std::vsnprintf (in cstdarg cstdio)... " >&6; } ac_includes="" -for ac_header in stdarg.h stdio.h +for ac_header in cstdarg cstdio do ac_safe=`echo "$ac_header" | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'}'`\" = yes"; then @@ -13525,10 +13263,7 @@ if eval "test \"`echo '$''{'ac_cv_compiles_$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 + $as_echo "#define HAVE_PROTOTYPE_STD__VSNPRINTF 1" >>confdefs.h : else @@ -13536,7 +13271,6 @@ $as_echo "no" >&6; } fi -fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ class template" >&5 $as_echo_n "checking for C++ class template... " >&6; } @@ -13546,7 +13280,7 @@ else ac_link_o='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.o $LIBS 1>&5' cat > conftest.$ac_ext < @@ -13600,10 +13334,7 @@ if eval "test \"`echo '$ac_cv_check_class_template'`\" = yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } - ac_tr_class_template=HAVE_CLASS_TEMPLATE - cat >>confdefs.h <<_ACEOF -#define $ac_tr_class_template 1 -_ACEOF + $as_echo "#define HAVE_CLASS_TEMPLATE 1" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 @@ -13618,7 +13349,7 @@ else ac_link_o='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.o $LIBS 1>&5' cat > conftest.$ac_ext <&5 $as_echo "yes" >&6; } - ac_tr_static_template_method=HAVE_STATIC_TEMPLATE_METHOD - cat >>confdefs.h <<_ACEOF -#define $ac_tr_static_template_method 1 -_ACEOF + $as_echo "#define HAVE_STATIC_TEMPLATE_METHOD 1" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 @@ -13690,7 +13418,7 @@ else ac_link_o='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.o $LIBS 1>&5' cat > conftest.$ac_ext < @@ -13736,10 +13464,7 @@ if eval "test \"`echo '$ac_cv_check_function_template'`\" = yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } - ac_tr_function_template=HAVE_FUNCTION_TEMPLATE - cat >>confdefs.h <<_ACEOF -#define $ac_tr_function_template 1 -_ACEOF + $as_echo "#define HAVE_FUNCTION_TEMPLATE 1" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 @@ -13786,10 +13511,7 @@ if eval "test \"`echo '$ac_cv_check_explicit_template_specialization'`\" = yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } - ac_tr_explicit_template_specialization=HAVE_EXPLICIT_TEMPLATE_SPECIALIZATION - cat >>confdefs.h <<_ACEOF -#define $ac_tr_explicit_template_specialization 1 -_ACEOF + $as_echo "#define HAVE_EXPLICIT_TEMPLATE_SPECIALIZATION 1" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 @@ -13826,11 +13548,7 @@ if eval "test \"`echo $ac_cv_have_cxx_volatile`\" = yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } - ac_tr_prototype=HAVE_CXX_VOLATILE - -cat >>confdefs.h <<_ACEOF -#define $ac_tr_prototype /**/ -_ACEOF + $as_echo "#define HAVE_CXX_VOLATILE 1" >>confdefs.h : else @@ -13880,8 +13598,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_typename" >&5 $as_echo "$ac_cv_cxx_typename" >&6; } if test "$ac_cv_cxx_typename" = yes; then - -$as_echo "#define HAVE_TYPENAME /**/" >>confdefs.h + $as_echo "#define HAVE_TYPENAME 1" >>confdefs.h fi @@ -13897,11 +13614,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#ifdef USE_STD_CXX_INCLUDES #include -#else -#include -#endif int main () @@ -13934,79 +13647,90 @@ -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable private tag dictionary" >&5 -$as_echo_n "checking whether to enable private tag dictionary... " >&6; } -# Check whether --enable-private-tags was given. -if test "${enable_private_tags+set}" = set; then : - enableval=$enable_private_tags; case "$enableval" in - yes) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -$as_echo "#define ENABLE_PRIVATE_TAGS /**/" >>confdefs.h +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable default dictionary" >&5 +$as_echo_n "checking whether to enable default dictionary... " >&6; } +# Check whether --enable-default-dict was given. +if test "${enable_default_dict+set}" = set; then : + enableval=$enable_default_dict; case "$enableval" in + external|yes) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, type=external" >&5 +$as_echo "yes, type=external" >&6; } +$as_echo "#define DCM_DICT_DEFAULT 2" >>confdefs.h -cat >>confdefs.h <<_ACEOF -#define DCM_DICT_DEFAULT_PATH "${DATA_DIR}/dicom.dic:${DATA_DIR}/private.dic" -_ACEOF + ;; + builtin) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, type=builtin" >&5 +$as_echo "yes, type=builtin" >&6; } + +$as_echo "#define DCM_DICT_DEFAULT 1" >>confdefs.h ;; - *) + no) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } + +$as_echo "#define DCM_DICT_DEFAULT 0" >>confdefs.h + ;; esac else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +$as_echo "#define DCM_DICT_DEFAULT 2" >>confdefs.h + fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable loading external dictionary from default path" >&5 -$as_echo_n "checking whether to enable loading external dictionary from default path... " >&6; } -# Check whether --enable-external-dict was given. -if test "${enable_external_dict+set}" = set; then : - enableval=$enable_external_dict; case "$enableval" in + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to evaluate DCMDICTPATH environment variable" >&5 +$as_echo_n "checking whether to evaluate DCMDICTPATH environment variable... " >&6; } +# Check whether --enable-dcmdictpath was given. +if test "${enable_dcmdictpath+set}" = set; then : + enableval=$enable_dcmdictpath; case "$enableval" in yes) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } -$as_echo "#define ENABLE_EXTERNAL_DICTIONARY /**/" >>confdefs.h +$as_echo "#define DCM_DICT_USE_DCMDICTPATH 1" >>confdefs.h ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } - -cat >>confdefs.h <<_ACEOF -#define DCM_DICT_DEFAULT_PATH "" -_ACEOF - ;; esac else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } -$as_echo "#define ENABLE_EXTERNAL_DICTIONARY /**/" >>confdefs.h +$as_echo "#define DCM_DICT_USE_DCMDICTPATH 1" >>confdefs.h fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable built-in dictionary loading" >&5 -$as_echo_n "checking whether to enable built-in dictionary loading... " >&6; } -# Check whether --enable-builtin-dict was given. -if test "${enable_builtin_dict+set}" = set; then : - enableval=$enable_builtin_dict; case "$enableval" in + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable private tag dictionary" >&5 +$as_echo_n "checking whether to enable private tag dictionary... " >&6; } +# Check whether --enable-private-tags was given. +if test "${enable_private_tags+set}" = set; then : + enableval=$enable_private_tags; case "$enableval" in yes) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } -$as_echo "#define ENABLE_BUILTIN_DICTIONARY /**/" >>confdefs.h +$as_echo "#define ENABLE_PRIVATE_TAGS 1" >>confdefs.h + + +cat >>confdefs.h <<_ACEOF +#define DCM_DICT_DEFAULT_PATH "${DATA_DIR}/dicom.dic:${DATA_DIR}/private.dic" +_ACEOF ;; *) @@ -14023,19 +13747,1962 @@ - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wl,-rpath is supported" >&5 -$as_echo_n "checking whether -Wl,-rpath is supported... " >&6; } -if ${dcmtk_cv_rpath_works+:} false; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wl,-rpath is supported" >&5 +$as_echo_n "checking whether -Wl,-rpath is supported... " >&6; } +if ${dcmtk_cv_rpath_works+:} false; then : + $as_echo_n "(cached) " >&6 +else + # Check whether --enable-rpath was given. +if test "${enable_rpath+set}" = set; then : + enableval=$enable_rpath; dcmtk_cv_rpath_works=$enableval +else + old_LDFLAGS="$LDFLAGS" + LDFLAGS="-Wl,-rpath,$srcdir $LDFLAGS" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_link "$LINENO"; then : + dcmtk_cv_rpath_works=yes +else + dcmtk_cv_rpath_works=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS="$old_LDFLAGS" +fi + + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dcmtk_cv_rpath_works" >&5 +$as_echo "$dcmtk_cv_rpath_works" >&6; } + + + +# Check whether --with-opensslinc was given. +if test "${with_opensslinc+set}" = set; then : + withval=$with_opensslinc; case $withval in #( + yes|no) : + + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-opensslinc called without argument - will use default" >&5 +$as_echo "$as_me: WARNING: --with-opensslinc called without argument - will use default" >&2;} + ;; #( + *) : + + if test ! -d ${withval}; then + as_fn_error $? "called with --with-opensslinc but OpenSSL base directory ${withval} does not exist or is not a directory." "$LINENO" 5 + fi + + CPPFLAGS="-I${withval}/include $CPPFLAGS" + LDFLAGS="-L${withval}/lib $LDFLAGS" + if test "x$dcmtk_cv_rpath_works" = "xyes"; then + LDFLAGS="-Wl,-rpath,${withval}/lib $LDFLAGS" + fi + ;; +esac + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to include OpenSSL support" >&5 +$as_echo_n "checking whether to include OpenSSL support... " >&6; } + +OPENSSL_WORKS="" + +# Check whether --with-openssl was given. +if test "${with_openssl+set}" = set; then : + withval=$with_openssl; case "$withval" in + yes) + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ + +#if OPENSSL_VERSION_NUMBER < 0x10001000L +#error OpenSSL too old +#endif + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + $as_echo "#define WITH_OPENSSL 1" >>confdefs.h + + OPENSSL_WORKS="yes" + OPENSSLLIBS="-lssl -lcrypto $OPENSSLLIBS" +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no - DCMTK requires OpenSSL version 1.0.1 or newer" >&5 +$as_echo "no - DCMTK requires OpenSSL version 1.0.1 or newer" >&6; } +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ;; + *) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + ;; + esac +else + SAVELIBS="$LIBS" + LIBS="$LIBS -lssl -lcrypto $OPENSSLLIBS" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +(void) TLSv1_method() + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_link "$LINENO"; then : + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ + +#if OPENSSL_VERSION_NUMBER < 0x10001000L +#error OpenSSL too old +#endif + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + $as_echo "#define WITH_OPENSSL 1" >>confdefs.h + + OPENSSL_WORKS="yes" + OPENSSLLIBS="-lssl -lcrypto $OPENSSLLIBS" +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no - DCMTK requires OpenSSL version 1.0.1 or newer" >&5 +$as_echo "no - DCMTK requires OpenSSL version 1.0.1 or newer" >&6; } +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LIBS="$SAVELIBS" +fi + + +if test "$OPENSSL_WORKS" = "yes"; then + +for ac_header in openssl/asn1.h +do : + ac_fn_cxx_check_header_mongrel "$LINENO" "openssl/asn1.h" "ac_cv_header_openssl_asn1_h" "$ac_includes_default" +if test "x$ac_cv_header_openssl_asn1_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_OPENSSL_ASN1_H 1 +_ACEOF + +fi + +done + +for ac_header in openssl/dh.h +do : + ac_fn_cxx_check_header_mongrel "$LINENO" "openssl/dh.h" "ac_cv_header_openssl_dh_h" "$ac_includes_default" +if test "x$ac_cv_header_openssl_dh_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_OPENSSL_DH_H 1 +_ACEOF + +fi + +done + +for ac_header in openssl/evp.h +do : + ac_fn_cxx_check_header_mongrel "$LINENO" "openssl/evp.h" "ac_cv_header_openssl_evp_h" "$ac_includes_default" +if test "x$ac_cv_header_openssl_evp_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_OPENSSL_EVP_H 1 +_ACEOF + +fi + +done + +for ac_header in openssl/ssl.h +do : + ac_fn_cxx_check_header_mongrel "$LINENO" "openssl/ssl.h" "ac_cv_header_openssl_ssl_h" "$ac_includes_default" +if test "x$ac_cv_header_openssl_ssl_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_OPENSSL_SSL_H 1 +_ACEOF + +fi + +done + +for ac_header in openssl/ts.h +do : + ac_fn_cxx_check_header_mongrel "$LINENO" "openssl/ts.h" "ac_cv_header_openssl_ts_h" "$ac_includes_default" +if test "x$ac_cv_header_openssl_ts_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_OPENSSL_TS_H 1 +_ACEOF + +fi + +done + +for ac_header in openssl/x509.h +do : + ac_fn_cxx_check_header_mongrel "$LINENO" "openssl/x509.h" "ac_cv_header_openssl_x509_h" "$ac_includes_default" +if test "x$ac_cv_header_openssl_x509_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_OPENSSL_X509_H 1 +_ACEOF + +fi + +done + +for ac_header in openssl/provider.h +do : + ac_fn_cxx_check_header_mongrel "$LINENO" "openssl/provider.h" "ac_cv_header_openssl_provider_h" "$ac_includes_default" +if test "x$ac_cv_header_openssl_provider_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_OPENSSL_PROVIDER_H 1 +_ACEOF + +fi + +done + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OpenSSL provides a prototype for DH_bits (in openssl/dh.h)" >&5 +$as_echo_n "checking whether OpenSSL provides a prototype for DH_bits (in openssl/dh.h)... " >&6; } + +: +ac_includes="" +for ac_header in openssl/dh.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 DH_bits | 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 DH_bits(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; } + $as_echo "#define HAVE_OPENSSL_PROTOTYPE_DH_BITS 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 whether OpenSSL provides a prototype for EVP_PKEY_RSA_PSS (in openssl/evp.h)" >&5 +$as_echo_n "checking whether OpenSSL provides a prototype for EVP_PKEY_RSA_PSS (in openssl/evp.h)... " >&6; } + +ac_includes="" +for ac_header in openssl/evp.h +do + ac_includes="$ac_includes +#include<$ac_header>" +done +tmp_save_1=`echo EVP_PKEY_RSA_PSS | tr ' :' '__'` +if eval \${ac_cv_compiles_$tmp_save_1+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_includes +int +main () +{ +EVP_PKEY_RSA_PSS + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + eval "ac_cv_compiles_$tmp_save_1=yes" +else + eval "ac_cv_compiles_$tmp_save_1=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +if eval "test \"`echo '$''{'ac_cv_compiles_$tmp_save_1'}'`\" = yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + $as_echo "#define HAVE_OPENSSL_PROTOTYPE_EVP_PKEY_RSA_PSS 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 whether OpenSSL provides a prototype for EVP_PKEY_base_id (in openssl/evp.h)" >&5 +$as_echo_n "checking whether OpenSSL provides a prototype for EVP_PKEY_base_id (in openssl/evp.h)... " >&6; } + +: +ac_includes="" +for ac_header in openssl/evp.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 EVP_PKEY_base_id | 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 EVP_PKEY_base_id(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; } + $as_echo "#define HAVE_OPENSSL_PROTOTYPE_EVP_PKEY_BASE_ID 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 whether OpenSSL provides a prototype for RAND_egd (in openssl/rand.h)" >&5 +$as_echo_n "checking whether OpenSSL provides a prototype for RAND_egd (in openssl/rand.h)... " >&6; } + +: +ac_includes="" +for ac_header in openssl/rand.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 RAND_egd | 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 RAND_egd(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; } + $as_echo "#define HAVE_OPENSSL_PROTOTYPE_RAND_EGD 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 whether OpenSSL provides a prototype for SSL_CTX_get_cert_store (in openssl/ssl.h)" >&5 +$as_echo_n "checking whether OpenSSL provides a prototype for SSL_CTX_get_cert_store (in openssl/ssl.h)... " >&6; } + +: +ac_includes="" +for ac_header in openssl/ssl.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 SSL_CTX_get_cert_store | 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 SSL_CTX_get_cert_store(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; } + $as_echo "#define HAVE_OPENSSL_PROTOTYPE_SSL_CTX_GET_CERT_STORE 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 whether OpenSSL provides a prototype for SSL_CTX_get_ciphers (in openssl/ssl.h)" >&5 +$as_echo_n "checking whether OpenSSL provides a prototype for SSL_CTX_get_ciphers (in openssl/ssl.h)... " >&6; } + +: +ac_includes="" +for ac_header in openssl/ssl.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 SSL_CTX_get_ciphers | 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 SSL_CTX_get_ciphers(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; } + $as_echo "#define HAVE_OPENSSL_PROTOTYPE_SSL_CTX_GET_CIPHERS 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 whether OpenSSL provides a prototype for SSL_CTX_get0_param (in openssl/ssl.h)" >&5 +$as_echo_n "checking whether OpenSSL provides a prototype for SSL_CTX_get0_param (in openssl/ssl.h)... " >&6; } + +: +ac_includes="" +for ac_header in openssl/ssl.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 SSL_CTX_get0_param | 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 SSL_CTX_get0_param(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; } + $as_echo "#define HAVE_OPENSSL_PROTOTYPE_SSL_CTX_GET0_PARAM 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 whether OpenSSL provides a prototype for SSL_CTX_set0_tmp_dh_pkey (in openssl/ssl.h)" >&5 +$as_echo_n "checking whether OpenSSL provides a prototype for SSL_CTX_set0_tmp_dh_pkey (in openssl/ssl.h)... " >&6; } + +: +ac_includes="" +for ac_header in openssl/ssl.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 SSL_CTX_set0_tmp_dh_pkey | 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 SSL_CTX_set0_tmp_dh_pkey(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; } + $as_echo "#define HAVE_OPENSSL_PROTOTYPE_SSL_CTX_SET0_TMP_DH_PKEY 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 whether OpenSSL provides a prototype for SSL_CTX_set1_curves (in openssl/ssl.h)" >&5 +$as_echo_n "checking whether OpenSSL provides a prototype for SSL_CTX_set1_curves (in openssl/ssl.h)... " >&6; } + +ac_includes="" +for ac_header in openssl/ssl.h +do + ac_includes="$ac_includes +#include<$ac_header>" +done +tmp_save_1=`echo SSL_CTX_set1_curves | tr ' :' '__'` +if eval \${ac_cv_compiles_$tmp_save_1+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_includes +int +main () +{ +SSL_CTX_set1_curves(0,0,0) + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + eval "ac_cv_compiles_$tmp_save_1=yes" +else + eval "ac_cv_compiles_$tmp_save_1=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +if eval "test \"`echo '$''{'ac_cv_compiles_$tmp_save_1'}'`\" = yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + $as_echo "#define HAVE_OPENSSL_PROTOTYPE_SSL_CTX_SET1_CURVES 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 whether OpenSSL provides a prototype for SSL_CTX_set1_sigalgs (in openssl/ssl.h)" >&5 +$as_echo_n "checking whether OpenSSL provides a prototype for SSL_CTX_set1_sigalgs (in openssl/ssl.h)... " >&6; } + +: +ac_includes="" +for ac_header in openssl/ssl.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 SSL_CTX_set1_sigalgs | 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 SSL_CTX_set1_sigalgs(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; } + $as_echo "#define HAVE_OPENSSL_PROTOTYPE_SSL_CTX_SET1_SIGALGS 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 whether OpenSSL provides a prototype for SSL_CTX_set_ecdh_auto (in openssl/ssl.h)" >&5 +$as_echo_n "checking whether OpenSSL provides a prototype for SSL_CTX_set_ecdh_auto (in openssl/ssl.h)... " >&6; } + +ac_includes="" +for ac_header in openssl/ssl.h +do + ac_includes="$ac_includes +#include<$ac_header>" +done +tmp_save_1=`echo SSL_CTX_set_ecdh_auto | tr ' :' '__'` +if eval \${ac_cv_compiles_$tmp_save_1+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_includes +int +main () +{ +SSL_CTX_set_ecdh_auto(0,0) + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + eval "ac_cv_compiles_$tmp_save_1=yes" +else + eval "ac_cv_compiles_$tmp_save_1=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +if eval "test \"`echo '$''{'ac_cv_compiles_$tmp_save_1'}'`\" = yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + $as_echo "#define HAVE_OPENSSL_PROTOTYPE_SSL_CTX_SET_ECDH_AUTO 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 whether OpenSSL provides a prototype for SSL_CTX_set_max_proto_version (in openssl/ssl.h)" >&5 +$as_echo_n "checking whether OpenSSL provides a prototype for SSL_CTX_set_max_proto_version (in openssl/ssl.h)... " >&6; } + +ac_includes="" +for ac_header in openssl/ssl.h +do + ac_includes="$ac_includes +#include<$ac_header>" +done +tmp_save_1=`echo SSL_CTX_set_max_proto_version | tr ' :' '__'` +if eval \${ac_cv_compiles_$tmp_save_1+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_includes +int +main () +{ +SSL_CTX_set_max_proto_version(0,0) + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + eval "ac_cv_compiles_$tmp_save_1=yes" +else + eval "ac_cv_compiles_$tmp_save_1=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +if eval "test \"`echo '$''{'ac_cv_compiles_$tmp_save_1'}'`\" = yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + $as_echo "#define HAVE_OPENSSL_PROTOTYPE_SSL_CTX_SET_MAX_PROTO_VERSION 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 whether OpenSSL provides a prototype for SSL_CTX_set_security_level (in openssl/ssl.h)" >&5 +$as_echo_n "checking whether OpenSSL provides a prototype for SSL_CTX_set_security_level (in openssl/ssl.h)... " >&6; } + +: +ac_includes="" +for ac_header in openssl/ssl.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 SSL_CTX_set_security_level | 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 SSL_CTX_set_security_level(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; } + $as_echo "#define HAVE_OPENSSL_PROTOTYPE_SSL_CTX_SET_SECURITY_LEVEL 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 whether OpenSSL provides a prototype for SSL_ERROR_WANT_ASYNC (in openssl/ssl.h)" >&5 +$as_echo_n "checking whether OpenSSL provides a prototype for SSL_ERROR_WANT_ASYNC (in openssl/ssl.h)... " >&6; } + +ac_includes="" +for ac_header in openssl/ssl.h +do + ac_includes="$ac_includes +#include<$ac_header>" +done +tmp_save_1=`echo SSL_ERROR_WANT_ASYNC | tr ' :' '__'` +if eval \${ac_cv_compiles_$tmp_save_1+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_includes +int +main () +{ +SSL_ERROR_WANT_ASYNC + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + eval "ac_cv_compiles_$tmp_save_1=yes" +else + eval "ac_cv_compiles_$tmp_save_1=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +if eval "test \"`echo '$''{'ac_cv_compiles_$tmp_save_1'}'`\" = yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + $as_echo "#define HAVE_OPENSSL_PROTOTYPE_SSL_ERROR_WANT_ASYNC 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 whether OpenSSL provides a prototype for SSL_ERROR_WANT_ASYNC_JOB (in openssl/ssl.h)" >&5 +$as_echo_n "checking whether OpenSSL provides a prototype for SSL_ERROR_WANT_ASYNC_JOB (in openssl/ssl.h)... " >&6; } + +ac_includes="" +for ac_header in openssl/ssl.h +do + ac_includes="$ac_includes +#include<$ac_header>" +done +tmp_save_1=`echo SSL_ERROR_WANT_ASYNC_JOB | tr ' :' '__'` +if eval \${ac_cv_compiles_$tmp_save_1+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_includes +int +main () +{ +SSL_ERROR_WANT_ASYNC_JOB + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + eval "ac_cv_compiles_$tmp_save_1=yes" +else + eval "ac_cv_compiles_$tmp_save_1=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +if eval "test \"`echo '$''{'ac_cv_compiles_$tmp_save_1'}'`\" = yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + $as_echo "#define HAVE_OPENSSL_PROTOTYPE_SSL_ERROR_WANT_ASYNC_JOB 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 whether OpenSSL provides a prototype for SSL_ERROR_WANT_CLIENT_HELLO_CB (in openssl/ssl.h)" >&5 +$as_echo_n "checking whether OpenSSL provides a prototype for SSL_ERROR_WANT_CLIENT_HELLO_CB (in openssl/ssl.h)... " >&6; } + +ac_includes="" +for ac_header in openssl/ssl.h +do + ac_includes="$ac_includes +#include<$ac_header>" +done +tmp_save_1=`echo SSL_ERROR_WANT_CLIENT_HELLO_CB | tr ' :' '__'` +if eval \${ac_cv_compiles_$tmp_save_1+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_includes +int +main () +{ +SSL_ERROR_WANT_CLIENT_HELLO_CB + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + eval "ac_cv_compiles_$tmp_save_1=yes" +else + eval "ac_cv_compiles_$tmp_save_1=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +if eval "test \"`echo '$''{'ac_cv_compiles_$tmp_save_1'}'`\" = yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + $as_echo "#define HAVE_OPENSSL_PROTOTYPE_SSL_ERROR_WANT_CLIENT_HELLO_CB 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 whether OpenSSL provides a prototype for TLS1_TXT_ECDHE_RSA_WITH_CHACHA20_POLY1305 (in openssl/ssl.h)" >&5 +$as_echo_n "checking whether OpenSSL provides a prototype for TLS1_TXT_ECDHE_RSA_WITH_CHACHA20_POLY1305 (in openssl/ssl.h)... " >&6; } + +ac_includes="" +for ac_header in openssl/ssl.h +do + ac_includes="$ac_includes +#include<$ac_header>" +done +tmp_save_1=`echo TLS1_TXT_ECDHE_RSA_WITH_CHACHA20_POLY1305 | tr ' :' '__'` +if eval \${ac_cv_compiles_$tmp_save_1+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_includes +int +main () +{ +TLS1_TXT_ECDHE_RSA_WITH_CHACHA20_POLY1305 + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + eval "ac_cv_compiles_$tmp_save_1=yes" +else + eval "ac_cv_compiles_$tmp_save_1=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +if eval "test \"`echo '$''{'ac_cv_compiles_$tmp_save_1'}'`\" = yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + $as_echo "#define HAVE_OPENSSL_PROTOTYPE_TLS1_TXT_ECDHE_RSA_WITH_CHACHA20_POLY1305 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 whether OpenSSL provides a prototype for TLS_method (in openssl/ssl.h)" >&5 +$as_echo_n "checking whether OpenSSL provides a prototype for TLS_method (in openssl/ssl.h)... " >&6; } + +: +ac_includes="" +for ac_header in openssl/ssl.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 TLS_method | 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 TLS_method(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; } + $as_echo "#define HAVE_OPENSSL_PROTOTYPE_TLS_METHOD 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 whether OpenSSL provides a prototype for X509_STORE_get0_param (in openssl/x509.h)" >&5 +$as_echo_n "checking whether OpenSSL provides a prototype for X509_STORE_get0_param (in openssl/x509.h)... " >&6; } + +: +ac_includes="" +for ac_header in openssl/x509.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 X509_STORE_get0_param | 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 X509_STORE_get0_param(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; } + $as_echo "#define HAVE_OPENSSL_PROTOTYPE_X509_STORE_GET0_PARAM 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 whether OpenSSL provides a prototype for X509_get_signature_nid (in openssl/x509.h)" >&5 +$as_echo_n "checking whether OpenSSL provides a prototype for X509_get_signature_nid (in openssl/x509.h)... " >&6; } + +: +ac_includes="" +for ac_header in openssl/x509.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 X509_get_signature_nid | 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 X509_get_signature_nid(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; } + $as_echo "#define HAVE_OPENSSL_PROTOTYPE_X509_GET_SIGNATURE_NID 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 whether OpenSSL provides a prototype for ASN1_STRING_get0_data (in openssl/asn1.h)" >&5 +$as_echo_n "checking whether OpenSSL provides a prototype for ASN1_STRING_get0_data (in openssl/asn1.h)... " >&6; } + +: +ac_includes="" +for ac_header in openssl/asn1.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 ASN1_STRING_get0_data | 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 ASN1_STRING_get0_data(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; } + $as_echo "#define HAVE_OPENSSL_PROTOTYPE_ASN1_STRING_GET0_DATA 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 whether OpenSSL provides a prototype for EVP_PKEY_get0_EC_KEY (in openssl/evp.h)" >&5 +$as_echo_n "checking whether OpenSSL provides a prototype for EVP_PKEY_get0_EC_KEY (in openssl/evp.h)... " >&6; } + +: +ac_includes="" +for ac_header in openssl/evp.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 EVP_PKEY_get0_EC_KEY | 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 EVP_PKEY_get0_EC_KEY(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; } + $as_echo "#define HAVE_OPENSSL_PROTOTYPE_EVP_PKEY_GET0_EC_KEY 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 whether OpenSSL provides a prototype for EVP_PKEY_get_group_name (in openssl/evp.h)" >&5 +$as_echo_n "checking whether OpenSSL provides a prototype for EVP_PKEY_get_group_name (in openssl/evp.h)... " >&6; } + +: +ac_includes="" +for ac_header in openssl/evp.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 EVP_PKEY_get_group_name | 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 EVP_PKEY_get_group_name(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; } + $as_echo "#define HAVE_OPENSSL_PROTOTYPE_EVP_PKEY_GET_GROUP_NAME 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 whether OpenSSL provides a prototype for EVP_PKEY_id (in openssl/evp.h)" >&5 +$as_echo_n "checking whether OpenSSL provides a prototype for EVP_PKEY_id (in openssl/evp.h)... " >&6; } + +: +ac_includes="" +for ac_header in openssl/evp.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 EVP_PKEY_id | 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 EVP_PKEY_id(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; } + $as_echo "#define HAVE_OPENSSL_PROTOTYPE_EVP_PKEY_ID 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 whether OpenSSL provides a prototype for OSSL_PROVIDER_load (in openssl/provider.h)" >&5 +$as_echo_n "checking whether OpenSSL provides a prototype for OSSL_PROVIDER_load (in openssl/provider.h)... " >&6; } + +: +ac_includes="" +for ac_header in openssl/provider.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 OSSL_PROVIDER_load | 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 OSSL_PROVIDER_load(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; } + $as_echo "#define HAVE_OPENSSL_PROTOTYPE_OSSL_PROVIDER_LOAD 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 whether OpenSSL provides a prototype for TS_STATUS_INFO_get0_failure_info (in openssl/ts.h)" >&5 +$as_echo_n "checking whether OpenSSL provides a prototype for TS_STATUS_INFO_get0_failure_info (in openssl/ts.h)... " >&6; } + +: +ac_includes="" +for ac_header in openssl/ts.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 TS_STATUS_INFO_get0_failure_info | 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 TS_STATUS_INFO_get0_failure_info(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; } + $as_echo "#define HAVE_OPENSSL_PROTOTYPE_TS_STATUS_INFO_GET0_FAILURE_INFO 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 whether OpenSSL provides a prototype for TS_STATUS_INFO_get0_status (in openssl/ts.h)" >&5 +$as_echo_n "checking whether OpenSSL provides a prototype for TS_STATUS_INFO_get0_status (in openssl/ts.h)... " >&6; } + +: +ac_includes="" +for ac_header in openssl/ts.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 TS_STATUS_INFO_get0_status | 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 TS_STATUS_INFO_get0_status(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; } + $as_echo "#define HAVE_OPENSSL_PROTOTYPE_TS_STATUS_INFO_GET0_STATUS 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 whether OpenSSL provides a prototype for TS_STATUS_INFO_get0_text (in openssl/ts.h)" >&5 +$as_echo_n "checking whether OpenSSL provides a prototype for TS_STATUS_INFO_get0_text (in openssl/ts.h)... " >&6; } + +: +ac_includes="" +for ac_header in openssl/ts.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 TS_STATUS_INFO_get0_text | 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 TS_STATUS_INFO_get0_text(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; } + $as_echo "#define HAVE_OPENSSL_PROTOTYPE_TS_STATUS_INFO_GET0_TEXT 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 whether OpenSSL provides a prototype for TS_VERIFY_CTS_set_certs (in openssl/ts.h)" >&5 +$as_echo_n "checking whether OpenSSL provides a prototype for TS_VERIFY_CTS_set_certs (in openssl/ts.h)... " >&6; } + +ac_includes="" +for ac_header in openssl/ts.h +do + ac_includes="$ac_includes +#include<$ac_header>" +done +tmp_save_1=`echo TS_VERIFY_CTS_set_certs | tr ' :' '__'` +if eval \${ac_cv_compiles_$tmp_save_1+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_includes +int +main () +{ +TS_VERIFY_CTS_set_certs(0,0) + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + eval "ac_cv_compiles_$tmp_save_1=yes" +else + eval "ac_cv_compiles_$tmp_save_1=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +if eval "test \"`echo '$''{'ac_cv_compiles_$tmp_save_1'}'`\" = yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + $as_echo "#define HAVE_OPENSSL_PROTOTYPE_TS_VERIFY_CTS_SET_CERTS 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 whether OpenSSL provides a prototype for TS_VERIFY_CTX_set_data (in openssl/ts.h)" >&5 +$as_echo_n "checking whether OpenSSL provides a prototype for TS_VERIFY_CTX_set_data (in openssl/ts.h)... " >&6; } + +: +ac_includes="" +for ac_header in openssl/ts.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 TS_VERIFY_CTX_set_data | 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 TS_VERIFY_CTX_set_data(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; } + $as_echo "#define HAVE_OPENSSL_PROTOTYPE_TS_VERIFY_CTX_SET_DATA 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 whether OpenSSL provides a prototype for TS_VERIFY_CTX_set_flags (in openssl/ts.h)" >&5 +$as_echo_n "checking whether OpenSSL provides a prototype for TS_VERIFY_CTX_set_flags (in openssl/ts.h)... " >&6; } + +: +ac_includes="" +for ac_header in openssl/ts.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 TS_VERIFY_CTX_set_flags | 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 TS_VERIFY_CTX_set_flags(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; } + $as_echo "#define HAVE_OPENSSL_PROTOTYPE_TS_VERIFY_CTX_SET_FLAGS 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 whether OpenSSL provides a prototype for TS_VERIFY_CTX_set_store (in openssl/ts.h)" >&5 +$as_echo_n "checking whether OpenSSL provides a prototype for TS_VERIFY_CTX_set_store (in openssl/ts.h)... " >&6; } + +: +ac_includes="" +for ac_header in openssl/ts.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 TS_VERIFY_CTX_set_store | tr ' :' '__'` +if eval \${ac_cv_prototype_$tmp_save_1+:} false; then : $as_echo_n "(cached) " >&6 else - # Check whether --enable-rpath was given. -if test "${enable_rpath+set}" = set; then : - enableval=$enable_rpath; dcmtk_cv_rpath_works=$enableval -else - old_LDFLAGS="$LDFLAGS" - LDFLAGS="-Wl,-rpath,$srcdir $LDFLAGS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + 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 TS_VERIFY_CTX_set_store(dummyStruct); + int main () @@ -14045,210 +15712,194 @@ return 0; } _ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : - dcmtk_cv_rpath_works=yes +if ac_fn_cxx_try_compile "$LINENO"; then : + eval "ac_cv_prototype_$tmp_save_1=no" else - dcmtk_cv_rpath_works=no + eval "ac_cv_prototype_$tmp_save_1=yes" fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS="$old_LDFLAGS" +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; } + $as_echo "#define HAVE_OPENSSL_PROTOTYPE_TS_VERIFY_CTX_SET_STORE 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}: result: $dcmtk_cv_rpath_works" >&5 -$as_echo "$dcmtk_cv_rpath_works" >&6; } - - - -# Check whether --with-opensslinc was given. -if test "${with_opensslinc+set}" = set; then : - withval=$with_opensslinc; case $withval in #( - yes|no) : - - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-opensslinc called without argument - will use default" >&5 -$as_echo "$as_me: WARNING: --with-opensslinc called without argument - will use default" >&2;} - ;; #( - *) : - - if test ! -d ${withval}; then - as_fn_error $? "called with --with-opensslinc but OpenSSL base directory ${withval} does not exist or is not a directory." "$LINENO" 5 - fi - - CPPFLAGS="-I${withval}/include $CPPFLAGS" - LDFLAGS="-L${withval}/lib $LDFLAGS" - if test "x$dcmtk_cv_rpath_works" = "xyes"; then - LDFLAGS="-Wl,-rpath,${withval}/lib $LDFLAGS" - fi - ;; -esac -fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OpenSSL provides a prototype for X509_get0_notAfter (in openssl/x509.h)" >&5 +$as_echo_n "checking whether OpenSSL provides a prototype for X509_get0_notAfter (in openssl/x509.h)... " >&6; } +: +ac_includes="" +for ac_header in openssl/x509.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 X509_get0_notAfter | 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 X509_get0_notAfter(dummyStruct); -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to include OpenSSL support" >&5 -$as_echo_n "checking whether to include OpenSSL support... " >&6; } -# Check whether --with-openssl was given. -if test "${with_openssl+set}" = set; then : - withval=$with_openssl; case "$withval" in - yes) - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include int main () { -#if OPENSSL_VERSION_NUMBER < 0x10001000L -#error OpenSSL too old -#endif - ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - -$as_echo "#define WITH_OPENSSL /**/" >>confdefs.h - - OPENSSLLIBS="-lssl -lcrypto $OPENSSLLIBS" + eval "ac_cv_prototype_$tmp_save_1=no" else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no - DCMTK requires OpenSSL version 1.0.1 or newer" >&5 -$as_echo "no - DCMTK requires OpenSSL version 1.0.1 or newer" >&6; } + eval "ac_cv_prototype_$tmp_save_1=yes" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ;; - *) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +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; } + $as_echo "#define HAVE_OPENSSL_PROTOTYPE_X509_GET0_NOTAFTER 1" >>confdefs.h + + : +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } - ;; - esac +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OpenSSL provides a prototype for X509_get0_notBefore (in openssl/x509.h)" >&5 +$as_echo_n "checking whether OpenSSL provides a prototype for X509_get0_notBefore (in openssl/x509.h)... " >&6; } + +: +ac_includes="" +for ac_header in openssl/x509.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 X509_get0_notBefore | tr ' :' '__'` +if eval \${ac_cv_prototype_$tmp_save_1+:} false; then : + $as_echo_n "(cached) " >&6 else - SAVELIBS="$LIBS" - LIBS="$LIBS $OPENSSLLIBS -lssl -lcrypto" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include -int -main () -{ -(void) TLSv1_method() - ; - return 0; +#ifdef __cplusplus +extern "C" { +#endif +$ac_includes +#ifdef __cplusplus } -_ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : +#endif +typedef union { int member; } dummyStruct; +#ifdef __cplusplus +extern "C" +#endif +dummyStruct X509_get0_notBefore(dummyStruct); + - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include int main () { -#if OPENSSL_VERSION_NUMBER < 0x10001000L -#error OpenSSL too old -#endif - ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - -$as_echo "#define WITH_OPENSSL /**/" >>confdefs.h - - OPENSSLLIBS="-lssl -lcrypto $OPENSSLLIBS" + eval "ac_cv_prototype_$tmp_save_1=no" else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no - DCMTK requires OpenSSL version 1.0.1 or newer" >&5 -$as_echo "no - DCMTK requires OpenSSL version 1.0.1 or newer" >&6; } + 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; } + $as_echo "#define HAVE_OPENSSL_PROTOTYPE_X509_GET0_NOTBEFORE 1" >>confdefs.h + + : else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LIBS="$SAVELIBS" -fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OpenSSL defines the new typedef of EVP_MD_CTX as struct evp_md_ctx_st" >&5 +$as_echo_n "checking whether OpenSSL defines the new typedef of EVP_MD_CTX as struct evp_md_ctx_st... " >&6; } - SAVELIBS=$LIBS - HAVE_SSL_CTX_GET0_PARAM=yes - LIBS="$LIBS $OPENSSLLIBS" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OpenSSL provides the SSL_CTX_get0_param function" >&5 -$as_echo_n "checking whether OpenSSL provides the SSL_CTX_get0_param function... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - - #include +#include int main () { -&SSL_CTX_get0_param; +struct evp_md_ctx_st *a; EVP_MD_CTX *b=a ; return 0; } - _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } - $as_echo "#define HAVE_SSL_CTX_GET0_PARAM 1" >>confdefs.h - + $as_echo "#define HAVE_OPENSSL_DECLARATION_NEW_EVP_MD_CTX 1" >>confdefs.h else - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } - fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - LIBS=$SAVELIBS +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OpenSSL defines the first parameter of function X509_ALGOR_get0() const" >&5 +$as_echo_n "checking whether OpenSSL defines the first parameter of function X509_ALGOR_get0() const... " >&6; } - SAVELIBS=$LIBS - HAVE_RAND_EGD=yes - LIBS="$LIBS $OPENSSLLIBS" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OpenSSL provides the RAND_egd function" >&5 -$as_echo_n "checking whether OpenSSL provides the RAND_egd function... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - - #include +#include int main () { -&RAND_egd; +const ASN1_OBJECT *a; X509_ALGOR_get0(&a,0,0,0) ; return 0; } - _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } - $as_echo "#define HAVE_RAND_EGD 1" >>confdefs.h - + $as_echo "#define HAVE_OPENSSL_X509_ALGOR_GET0_CONST_PARAM 1" >>confdefs.h else - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } - fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - LIBS=$SAVELIBS + +fi @@ -14343,6 +15994,7 @@ + # Check whether --with-zlibinc was given. if test "${with_zlibinc+set}" = set; then : withval=$with_zlibinc; case $withval in #( @@ -14372,14 +16024,14 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to include zlib support" >&5 $as_echo_n "checking whether to include zlib support... " >&6; } + # Check whether --with-zlib was given. if test "${with_zlib+set}" = set; then : withval=$with_zlib; case "$withval" in yes) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } - -$as_echo "#define WITH_ZLIB /**/" >>confdefs.h + $as_echo "#define WITH_ZLIB 1" >>confdefs.h ZLIBLIBS="-lz" ;; @@ -14405,8 +16057,7 @@ if ac_fn_cxx_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } - -$as_echo "#define WITH_ZLIB /**/" >>confdefs.h + $as_echo "#define WITH_ZLIB 1" >>confdefs.h ZLIBLIBS="-lz" else @@ -14422,6 +16073,7 @@ + # Check whether --with-libtiffinc was given. if test "${with_libtiffinc+set}" = set; then : withval=$with_libtiffinc; case $withval in #( @@ -14451,14 +16103,14 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to include libtiff support" >&5 $as_echo_n "checking whether to include libtiff support... " >&6; } + # Check whether --with-libtiff was given. if test "${with_libtiff+set}" = set; then : withval=$with_libtiff; case "$withval" in yes) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } - -$as_echo "#define WITH_LIBTIFF /**/" >>confdefs.h + $as_echo "#define WITH_LIBTIFF 1" >>confdefs.h TIFFLIBS="-ltiff $JPEGLIBS $ZLIBLIBS" ;; @@ -14484,8 +16136,7 @@ if ac_fn_cxx_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } - -$as_echo "#define WITH_LIBTIFF /**/" >>confdefs.h + $as_echo "#define WITH_LIBTIFF 1" >>confdefs.h TIFFLIBS="-ltiff $JPEGLIBS $ZLIBLIBS" @@ -14545,6 +16196,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to include libpng support" >&5 $as_echo_n "checking whether to include libpng support... " >&6; } + # Check whether --with-libpng was given. if test "${with_libpng+set}" = set; then : withval=$with_libpng; case "$withval" in @@ -14552,8 +16204,7 @@ if test "x$ZLIBLIBS" != x; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } - -$as_echo "#define WITH_LIBPNG /**/" >>confdefs.h + $as_echo "#define WITH_LIBPNG 1" >>confdefs.h PNGLIBS="-lpng" else @@ -14589,8 +16240,7 @@ if ac_fn_cxx_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } - -$as_echo "#define WITH_LIBPNG /**/" >>confdefs.h + $as_echo "#define WITH_LIBPNG 1" >>confdefs.h PNGLIBS="-lpng" else @@ -14612,6 +16262,7 @@ + # Check whether --with-libxmlinc was given. if test "${with_libxmlinc+set}" = set; then : withval=$with_libxmlinc; case $withval in #( @@ -14648,14 +16299,14 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to include libxml support" >&5 $as_echo_n "checking whether to include libxml support... " >&6; } + # Check whether --with-libxml was given. if test "${with_libxml+set}" = set; then : withval=$with_libxml; case "$withval" in yes) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } - -$as_echo "#define WITH_LIBXML /**/" >>confdefs.h + $as_echo "#define WITH_LIBXML 1" >>confdefs.h XMLLIBS=$LIBXMLLIBS ;; @@ -14681,8 +16332,7 @@ if ac_fn_cxx_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } - -$as_echo "#define WITH_LIBXML /**/" >>confdefs.h + $as_echo "#define WITH_LIBXML 1" >>confdefs.h XMLLIBS=$LIBXMLLIBS else @@ -14727,14 +16377,14 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to include libwrap support" >&5 $as_echo_n "checking whether to include libwrap support... " >&6; } + # Check whether --with-libwrap was given. if test "${with_libwrap+set}" = set; then : withval=$with_libwrap; case "$withval" in yes) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } - -$as_echo "#define WITH_TCPWRAPPER /**/" >>confdefs.h + $as_echo "#define WITH_TCPWRAPPER 1" >>confdefs.h TCPWRAPPERLIBS="-lwrap" ;; @@ -14776,8 +16426,7 @@ if ac_fn_cxx_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } - -$as_echo "#define WITH_TCPWRAPPER /**/" >>confdefs.h + $as_echo "#define WITH_TCPWRAPPER 1" >>confdefs.h TCPWRAPPERLIBS="-lwrap" else @@ -14830,14 +16479,14 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to include OpenJPEG support" >&5 $as_echo_n "checking whether to include OpenJPEG support... " >&6; } + # Check whether --with-libwrap was given. if test "${with_libwrap+set}" = set; then : withval=$with_libwrap; case "$withval" in yes) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } - -$as_echo "#define WITH_OPENJPEG /**/" >>confdefs.h + $as_echo "#define WITH_OPENJPEG 1" >>confdefs.h OPENJPEGLIBS="-lopenjp2 $OPENJPEGLIBS" ;; @@ -14863,8 +16512,7 @@ if ac_fn_cxx_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } - -$as_echo "#define WITH_OPENJPEG /**/" >>confdefs.h + $as_echo "#define WITH_OPENJPEG 1" >>confdefs.h OPENJPEGLIBS="-lopenjp2 $OPENJPEGLIBS" else @@ -14910,14 +16558,14 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to include libsndfile support" >&5 $as_echo_n "checking whether to include libsndfile support... " >&6; } + # Check whether --with-libsndfile was given. if test "${with_libsndfile+set}" = set; then : withval=$with_libsndfile; case "$withval" in yes) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } - -$as_echo "#define WITH_SNDFILE /**/" >>confdefs.h + $as_echo "#define WITH_SNDFILE 1" >>confdefs.h SNDFILELIBS="-lsndfile" ;; @@ -14943,8 +16591,7 @@ if ac_fn_cxx_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } - -$as_echo "#define WITH_SNDFILE /**/" >>confdefs.h + $as_echo "#define WITH_SNDFILE 1" >>confdefs.h SNDFILELIBS="-lsndfile" else @@ -14985,12 +16632,12 @@ fi - WITH_LIBICONV=no ICONVLIBS="" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to include libiconv support" >&5 $as_echo_n "checking whether to include libiconv support... " >&6; } + # Check whether --with-libiconv was given. if test "${with_libiconv+set}" = set; then : withval=$with_libiconv; case "$withval" in @@ -15033,6 +16680,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the second argument to iconv() is const" >&5 $as_echo_n "checking whether the second argument to iconv() is const... " >&6; } + SAVELIBS="$LIBS" LIBS="$LIBS $ICONVLIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -15049,8 +16697,7 @@ if ac_fn_cxx_try_compile "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } - -$as_echo "#define LIBICONV_SECOND_ARGUMENT_CONST /**/" >>confdefs.h + $as_echo "#define LIBICONV_SECOND_ARGUMENT_CONST 1" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 @@ -16129,7 +17776,6 @@ { $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; } @@ -16163,7 +17809,7 @@ _ACEOF if ac_fn_cxx_try_run "$LINENO"; then : -$as_echo "#define HAVE_STL_VECTOR /**/" >>confdefs.h +$as_echo "#define HAVE_STL_VECTOR 1" >>confdefs.h else ac_enable_stl_vector="unsupported -> no" @@ -16209,7 +17855,7 @@ _ACEOF if ac_fn_cxx_try_run "$LINENO"; then : -$as_echo "#define HAVE_STL_ALGORITHM /**/" >>confdefs.h +$as_echo "#define HAVE_STL_ALGORITHM 1" >>confdefs.h else ac_enable_stl_algorithm="unsupported -> no" @@ -16255,7 +17901,7 @@ _ACEOF if ac_fn_cxx_try_run "$LINENO"; then : -$as_echo "#define HAVE_STL_LIMITS /**/" >>confdefs.h +$as_echo "#define HAVE_STL_LIMITS 1" >>confdefs.h else ac_enable_stl_limits="unsupported -> no" @@ -16301,7 +17947,7 @@ _ACEOF if ac_fn_cxx_try_run "$LINENO"; then : -$as_echo "#define HAVE_STL_LIST /**/" >>confdefs.h +$as_echo "#define HAVE_STL_LIST 1" >>confdefs.h else ac_enable_stl_list="unsupported -> no" @@ -16347,7 +17993,7 @@ _ACEOF if ac_fn_cxx_try_run "$LINENO"; then : -$as_echo "#define HAVE_STL_MAP /**/" >>confdefs.h +$as_echo "#define HAVE_STL_MAP 1" >>confdefs.h else ac_enable_stl_map="unsupported -> no" @@ -16393,7 +18039,7 @@ _ACEOF if ac_fn_cxx_try_run "$LINENO"; then : -$as_echo "#define HAVE_STL_MEMORY /**/" >>confdefs.h +$as_echo "#define HAVE_STL_MEMORY 1" >>confdefs.h else ac_enable_stl_memory="unsupported -> no" @@ -16439,7 +18085,7 @@ _ACEOF if ac_fn_cxx_try_run "$LINENO"; then : -$as_echo "#define HAVE_STL_STACK /**/" >>confdefs.h +$as_echo "#define HAVE_STL_STACK 1" >>confdefs.h else ac_enable_stl_stack="unsupported -> no" @@ -16485,7 +18131,7 @@ _ACEOF if ac_fn_cxx_try_run "$LINENO"; then : -$as_echo "#define HAVE_STL_STRING /**/" >>confdefs.h +$as_echo "#define HAVE_STL_STRING 1" >>confdefs.h else ac_enable_stl_string="unsupported -> no" @@ -16531,7 +18177,7 @@ _ACEOF if ac_fn_cxx_try_run "$LINENO"; then : -$as_echo "#define HAVE_STL_TYPE_TRAITS /**/" >>confdefs.h +$as_echo "#define HAVE_STL_TYPE_TRAITS 1" >>confdefs.h else ac_enable_stl_type_traits="unsupported -> no" @@ -16577,7 +18223,7 @@ _ACEOF if ac_fn_cxx_try_run "$LINENO"; then : -$as_echo "#define HAVE_STL_TUPLE /**/" >>confdefs.h +$as_echo "#define HAVE_STL_TUPLE 1" >>confdefs.h else ac_enable_stl_tuple="unsupported -> no" @@ -16623,7 +18269,7 @@ _ACEOF if ac_fn_cxx_try_run "$LINENO"; then : -$as_echo "#define HAVE_STL_SYSTEM_ERROR /**/" >>confdefs.h +$as_echo "#define HAVE_STL_SYSTEM_ERROR 1" >>confdefs.h else ac_enable_stl_system_error="unsupported -> no" @@ -16840,6 +18486,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct pwd contains the field pw_gecos" >&5 $as_echo_n "checking whether struct pwd contains the field pw_gecos... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include @@ -16854,8 +18501,7 @@ if ac_fn_cxx_try_compile "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } - -$as_echo "#define HAVE_PASSWD_GECOS /**/" >>confdefs.h + $as_echo "#define HAVE_PASSWD_GECOS 1" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 @@ -16866,6 +18512,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SYS_gettid in sys/syscall.h" >&5 $as_echo_n "checking for SYS_gettid in sys/syscall.h... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include @@ -16880,8 +18527,7 @@ if ac_fn_cxx_try_compile "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } - -$as_echo "#define HAVE_SYS_GETTID /**/" >>confdefs.h + $as_echo "#define HAVE_SYS_GETTID 1" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 @@ -17597,7 +19243,7 @@ # 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.6, which was +This file was extended by dcmtk $as_me 3.6.7, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -17660,7 +19306,7 @@ 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.6 +dcmtk config.status 3.6.7 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff -Nru dcmtk-3.6.6/config/configure.in dcmtk-3.6.7/config/configure.in --- dcmtk-3.6.6/config/configure.in 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/config/configure.in 2022-04-28 13:47:25.000000000 +0000 @@ -1,5 +1,5 @@ dnl Process this file with autoconf to produce a configure script. -AC_INIT(dcmtk, 3.6.6, [bugs@dcmtk.org], [dcmtk-3.6.6], [http://www.dcmtk.org/]) +AC_INIT(dcmtk, 3.6.7, [bugs@dcmtk.org], [dcmtk-3.6.7], [http://www.dcmtk.org/]) AC_PREREQ(2.60) AC_CONFIG_SRCDIR(Makefile.in) AC_CONFIG_HEADERS(include/dcmtk/config/osconfig.h) @@ -10,9 +10,9 @@ dnl Additional Package Information dnl ------------------------------------------------------- -PACKAGE_VERSION_NUMBER=366 +PACKAGE_VERSION_NUMBER=367 PACKAGE_VERSION_SUFFIX="" -PACKAGE_DATE="2021-01-14" +PACKAGE_DATE="2022-04-22" 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.]) AC_DEFINE_UNQUOTED(PACKAGE_DATE,"${PACKAGE_DATE}",[Define to the release date of this package.]) @@ -23,7 +23,7 @@ dnl ------------------------------------------------------- dnl Identify the host platform we're compiling for, -dnl using config.guess and config.sub. +dnl using config.guess and config.sub dnl ------------------------------------------------------- AC_CANONICAL_HOST @@ -83,7 +83,7 @@ #define OSCONFIG_H /* -** Define enclosures for include files with C linkage (mostly system headers) +** Define enclosures for include files with C linkage (mostly system headers). */ #ifdef __cplusplus #define BEGIN_EXTERN_C extern "C" { @@ -196,19 +196,19 @@ AC_ISC_POSIX AC_SYS_LONG_FILE_NAMES -dnl ------------------------------------------------------- +dnl ---------------------------------------------------------- dnl Perform some tests with the C compiler, needed for dcmjpeg -dnl ------------------------------------------------------- +dnl ---------------------------------------------------------- AC_MY_C_INLINE AC_MY_C_CONST AC_MY_C_CHAR_UNSIGNED AC_MY_C_RIGHTSHIFT_UNSIGNED -dnl ------------------------------------------------------- +dnl -------------------------------------------------------- dnl Check some typedefs versus definitions in , dnl needed for JasPer support -dnl ------------------------------------------------------- +dnl -------------------------------------------------------- AC_TYPEDEF(uchar, unsigned char) AC_TYPEDEF(ushort, unsigned short) @@ -237,7 +237,7 @@ AC_CHECK_TYPES([sigjmp_buf], [], [], [[#include ]]) dnl ------------------------------------------------------- -dnl Checks for libc library functions. +dnl Check for libc library functions dnl ------------------------------------------------------- AC_FUNC_MEMCMP @@ -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(strerror strdup index rindex access) AC_CHECK_FUNCS(uname cuserid getlogin getlogin_r) AC_CHECK_FUNCS(usleep) AC_CHECK_FUNCS(flock lockf) @@ -273,12 +273,12 @@ dnl ------------------------------------------------------- -dnl Checks for libcs library functions needed by oflog +dnl Check for libcs library functions needed by oflog dnl ------------------------------------------------------- AC_DEFUN([TYPE_SOCKLEN_T], [ -AH_TEMPLATE([socklen_t], [Define to int if undefined.]) +AH_TEMPLATE(socklen_t, [Define to int if undefined.]) AC_CACHE_CHECK([for socklen_t], ac_cv_type_socklen_t, [ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include @@ -295,13 +295,13 @@ AC_CHECK_HEADERS(syslog.h) TYPE_SOCKLEN_T -AH_TEMPLATE([HAVE_ENAMETOOLONG]) +AH_TEMPLATE(HAVE_ENAMETOOLONG, [Define if your system provides ENAMETOOLONG errno value.]) AC_COMPILE_IFELSE( [AC_LANG_PROGRAM([#include ], [int value = ENAMETOOLONG;])], - [AC_DEFINE([HAVE_ENAMETOOLONG], , [Define if your system provides ENAMETOOLONG errno value.])]) + [AC_DEFINE(HAVE_ENAMETOOLONG)]) dnl ------------------------------------------------------- -dnl Checks for libm library functions. +dnl Check for libm library functions dnl ------------------------------------------------------- SAVELIBS="$LIBS" @@ -416,7 +416,7 @@ ) dnl ------------------------------------------------------- -dnl Checks for libraries. +dnl Check for libraries dnl ------------------------------------------------------- AC_CHECK_GXXLIB @@ -472,7 +472,7 @@ ]) dnl ------------------------------------------------------- -dnl Checks for header files. +dnl Check for header files dnl ------------------------------------------------------- AC_HEADER_STDC @@ -564,10 +564,10 @@ fi fi -dnl ------------------------------------------------------- +dnl -------------------------------------------------------- dnl Tests for pointer vs. integer types dnl These tests REQUIRE as a prerequisite AC_CXX_STATIC_CAST -dnl ------------------------------------------------------- +dnl -------------------------------------------------------- if test $ac_cv_header_pthread_h = yes ; then AC_CHECK_POINTER_TYPE(pthread_t, pthread.h) @@ -636,7 +636,7 @@ dnl POSIXRWLOCKSAVAILABLE="no" AC_CHECK_LIB(pthread, pthread_rwlock_init, [ - AC_DEFINE(HAVE_PTHREAD_RWLOCK, , [Define if your system supports POSIX read/write locks.]) + AC_DEFINE(HAVE_PTHREAD_RWLOCK, 1, [Define if your system supports POSIX read/write locks.]) dnl dnl we're going to use POSIX threads with read/write locks. dnl Linux 2.2.x only declares all prototypes if _XOPEN_SOURCE=500 and _BSD_SOURCE @@ -685,7 +685,7 @@ AC_TRY_LINK([extern "C" int pthread_rwlock_init(void *rwlock, void *attr); ] , [(void) pthread_rwlock_init(NULL, NULL);], [ AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_PTHREAD_RWLOCK, , [Define if your system supports POSIX read/write locks.]) + AC_DEFINE(HAVE_PTHREAD_RWLOCK, 1, [Define if your system supports POSIX read/write locks.]) dnl dnl we're going to use POSIX threads with read/write locks. dnl Linux 2.2.x only declares all prototypes if _XOPEN_SOURCE=500 and _BSD_SOURCE @@ -735,7 +735,7 @@ AC_MSG_RESULT([yes, solaris threads]) CXXFLAGS="-D_REENTRANT $CXXFLAGS" CFLAGS="-D_REENTRANT $CFLAGS" - AC_DEFINE(WITH_THREADS, , [Define if we are compiling with any type of multi-thread support.]) + AC_DEFINE(WITH_THREADS, 1, [Define if we are compiling with any type of multi-thread support.]) ;; posix) if test $POSIXRWLOCKSAVAILABLE = yes ; then @@ -745,7 +745,7 @@ fi CXXFLAGS="-D_REENTRANT $CXXFLAGS" CFLAGS="-D_REENTRANT $CFLAGS" - AC_DEFINE(WITH_THREADS, , [Define if we are compiling with any type of multi-thread support.]) + AC_DEFINE(WITH_THREADS, 1, [Define if we are compiling with any type of multi-thread support.]) ;; *) AC_MSG_RESULT(none) @@ -767,9 +767,9 @@ MY_AC_SYS_LARGEFILE fi -dnl ------------------------------------------------------- -dnl Checks for typedefs, structures, and compiler characteristics. -dnl ------------------------------------------------------- +dnl ------------------------------------------------------------ +dnl Check for typedefs, structures, and compiler characteristics +dnl ------------------------------------------------------------ AC_TYPEDEF(size_t, unsigned) AC_TYPEDEF(ssize_t, long) @@ -788,7 +788,7 @@ AC_MY_SYMBOL_EXISTS([__func__]) dnl ------------------------------------------------------- -dnl Checks for prototypes +dnl Check for prototypes dnl ------------------------------------------------------- dnl dnl The following AC_CHECK_* macros _must_ have corresponding entries in @@ -802,7 +802,6 @@ AC_CHECK_INTP_ACCEPT(sys/types.h sys/socket.h) fi AC_CHECK_PROTOTYPE(bind, sys/types.h sys/socket.h) -AC_CHECK_PROTOTYPE(bzero, string.h strings.h libc.h unistd.h stdlib.h) AC_CHECK_PROTOTYPE(connect, sys/types.h sys/socket.h) AC_CHECK_PROTOTYPE(finite, math.h) AC_CHECK_PROTOTYPE(isinf, math.h) @@ -851,67 +850,25 @@ dnl ------------------------------------------------------- -dnl Checks for the usage of standard C++ headers. +dnl Check for the usage of standard C++ headers dnl ------------------------------------------------------- -AC_MSG_CHECKING(whether to use C++ standard includes) -ac_use_std_includes="auto" -AC_ARG_ENABLE(std-includes, -[ --enable-std-includes use C++ ANSI standard includes (default: auto) - --disable-std-includes use old C++ includes ], -[ case "$enableval" in - yes) - ac_use_std_includes="yes" - ;; - - *) - ac_use_std_includes="no" - ;; - esac ] -) - -if test "$ac_cv_header_fstream" = "yes" -a "$ac_cv_header_iostream" = "yes" -a "$ac_cv_header_iomanip" = "yes"; then - ac_have_std_includes="yes" -else - ac_have_std_includes="no" -fi - -if test "$ac_cv_header_fstream_h" = "yes" -a "$ac_cv_header_iostream_h" = "yes" -a "$ac_cv_header_iomanip_h" = "yes"; then - ac_have_old_includes="yes" -else - ac_have_old_includes="no" -fi - -if test "$ac_use_std_includes" = "yes"; then - AC_MSG_RESULT(yes) - AC_DEFINE(USE_STD_CXX_INCLUDES, , [Define if ANSI standard C++ includes are used.]) -elif test "$ac_use_std_includes" = "no"; then - AC_MSG_RESULT(no) -elif test "$ac_have_std_includes" = "yes"; then - AC_MSG_RESULT(yes) - AC_DEFINE(USE_STD_CXX_INCLUDES, , [Define if ANSI standard C++ includes are used.]) - ac_use_std_includes="yes" -else - AC_MSG_RESULT(no) - ac_use_std_includes="no" -fi - -if test "$ac_use_std_includes" = "yes"; then - AC_CHECK_STD_NAMESPACE - AC_CHECK_DECLARATION(std::ios_base::openmode, , iostream) - AC_CHECK_IOS_NOCREATE(std::ios, fstream) - AC_CHECK_COMPILES(std::vfprintf, cstdarg cstdio, - [FILE *stream; va_list ap; std::vfprintf(stream, "", ap);]) - AC_CHECK_COMPILES(std::vsnprintf, cstdarg cstdio, - [char buf[256]; va_list ap; std::vsnprintf(buf, 0, "", ap);]) -else - AC_CHECK_DECLARATION(std::ios_base::openmode, , iostream.h) - AC_CHECK_IOS_NOCREATE(ios, fstream.h) - AC_CHECK_COMPILES(std::vfprintf, stdarg.h stdio.h, - [FILE *stream; va_list ap; std::vfprintf(stream, "", ap);]) - AC_CHECK_COMPILES(std::vsnprintf, stdarg.h stdio.h, - [char buf[256]; va_list ap; std::vsnprintf(buf, 0, "", ap);]) -fi +AC_CHECK_STD_NAMESPACE +AC_CHECK_DECLARATION(std::ios_base::openmode, , iostream) +AC_CHECK_IOS_NOCREATE(std::ios, fstream) +AC_CHECK_COMPILES(std::vfprintf, cstdarg cstdio, + [FILE *stream; va_list ap; std::vfprintf(stream, "", ap);]) +AC_CHECK_COMPILES(std::vsnprintf, cstdarg cstdio, + [char buf[256]; va_list ap; std::vsnprintf(buf, 0, "", ap);]) + + +AC_CHECK_STD_NAMESPACE +AC_CHECK_DECLARATION(std::ios_base::openmode, , iostream) +AC_CHECK_IOS_NOCREATE(std::ios, fstream) +AC_CHECK_COMPILES(std::vfprintf, cstdarg cstdio, + [FILE *stream; va_list ap; std::vfprintf(stream, "", ap);]) +AC_CHECK_COMPILES(std::vsnprintf, cstdarg cstdio, + [char buf[256]; va_list ap; std::vsnprintf(buf, 0, "", ap);]) AC_CHECK_CLASS_TEMPLATE AC_CHECK_STATIC_TEMPLATE_METHOD @@ -921,62 +878,83 @@ AC_CXX_TYPENAME AC_STDIO_NAMESPACE + dnl ------------------------------------------------------- -dnl Check for Private Tag support +dnl Check whether to load a default dictionary dnl ------------------------------------------------------- -AC_MSG_CHECKING(whether to enable private tag dictionary) -AC_ARG_ENABLE(private-tags, -[ --enable-private-tags enable private tag dictionary - --disable-private-tags don't enable private tag dictionary (default)], -[ case "$enableval" in - yes) - AC_MSG_RESULT(yes) - AC_DEFINE(ENABLE_PRIVATE_TAGS, , [Define if we are compiling for enabling external private tag dictionary.]) - AC_DEFINE_UNQUOTED(DCM_DICT_DEFAULT_PATH, "${DATA_DIR}/dicom.dic:${DATA_DIR}/private.dic", [Define the default data dictionary path for the dcmdata library package.]) +AC_MSG_CHECKING(whether to enable default dictionary) +AC_ARG_ENABLE(default-dict, +[ --enable-default-dict=TYPE + enable default dictionary and specify type + (external=default/builtin) + --disable-default-dict disable default dictionary], +[ case "$enableval" in + external|yes) + AC_MSG_RESULT([yes, type=external]) + AC_DEFINE(DCM_DICT_DEFAULT, 2, [Define the type of default dictionary that we want to use: \ + Do not load any default dictionary on startup (0), \ + load builtin dictionary on startup (1), or \ + load external (i.e. file-based) dictionary on startup (2).]) + ;; + builtin) + AC_MSG_RESULT([yes, type=builtin]) + AC_DEFINE(DCM_DICT_DEFAULT, 1, [Define the type of default dictionary that we want to use: \ + Do not load any default dictionary on startup (0), \ + load builtin dictionary on startup (1), or \ + load external (i.e. file-based) dictionary on startup (2).]) ;; - *) + no) AC_MSG_RESULT(no) + AC_DEFINE(DCM_DICT_DEFAULT, 0, [Define the type of default dictionary that we want to use: \ + Do not load any default dictionary on startup (0), \ + load builtin dictionary on startup (1), or \ + load external (i.e. file-based) dictionary on startup (2).]) ;; esac ], - AC_MSG_RESULT(no) + AC_MSG_RESULT(yes) + AC_DEFINE(DCM_DICT_DEFAULT, 2, [Define the type of default dictionary that we want to use: \ + Do not load any default dictionary on startup (0), \ + load builtin dictionary on startup (1), or \ + load external (i.e. file-based) dictionary on startup (2).]) ) -dnl ------------------------------------------------------- -dnl Check for External Dictionary support -dnl ------------------------------------------------------- -AC_MSG_CHECKING(whether to enable loading external dictionary from default path) -AC_ARG_ENABLE(external-dict, -[ --enable-external-dict enable loading of external dictionary (default) - --disable-external-dict don't load external dictionary], +dnl ---------------------------------------------------------- +dnl Check whether to evaluate DCMDICTPATH environment variable +dnl ---------------------------------------------------------- + +AC_MSG_CHECKING(whether to evaluate DCMDICTPATH environment variable) +AC_ARG_ENABLE(dcmdictpath, +[ --enable-dcmdictpath enable DCMDICTPATH environment variable (default) + --disable-dcmdictpath disable DCMDICTPATH environment variable], [ case "$enableval" in yes) AC_MSG_RESULT(yes) - AC_DEFINE(ENABLE_EXTERNAL_DICTIONARY, , [Define if we are compiling for loading external dictionary from default path.]) + AC_DEFINE(DCM_DICT_USE_DCMDICTPATH, 1, [Define whether dictionaries defined through DCMDICTPATH environment variable should be loaded.]) ;; *) AC_MSG_RESULT(no) - dnl Reset default path so the dictionary is not loaded automatically on startup - AC_DEFINE_UNQUOTED(DCM_DICT_DEFAULT_PATH, "", [Define the default data dictionary path for the dcmdata library package.]) ;; esac ], AC_MSG_RESULT(yes) - AC_DEFINE(ENABLE_EXTERNAL_DICTIONARY, , [Define if we are compiling for loading external dictionary from default path.]) + AC_DEFINE(DCM_DICT_USE_DCMDICTPATH, 1, [Define whether dictionaries defined through DCMDICTPATH environment variable should be loaded.]) ) + dnl ------------------------------------------------------- -dnl Check for Built-in (compiled-in) Dictionary support +dnl Check for Private Tag support dnl ------------------------------------------------------- -AC_MSG_CHECKING(whether to enable built-in dictionary loading) -AC_ARG_ENABLE(builtin-dict, -[ --enable-builtin-dict enable loading of built-in dictionary - --disable-builtin-dict don't load built-in dictionary (default)], +AC_MSG_CHECKING(whether to enable private tag dictionary) +AC_ARG_ENABLE(private-tags, +[ --enable-private-tags enable private tag dictionary + --disable-private-tags don't enable private tag dictionary (default)], [ case "$enableval" in yes) AC_MSG_RESULT(yes) - AC_DEFINE(ENABLE_BUILTIN_DICTIONARY, , [Define if we are compiling with built-in (compiled-in) dictionary enabled.]) + AC_DEFINE(ENABLE_PRIVATE_TAGS, 1, [Define if we are compiling for enabling external private tag dictionary.]) + AC_DEFINE_UNQUOTED(DCM_DICT_DEFAULT_PATH, "${DATA_DIR}/dicom.dic:${DATA_DIR}/private.dic", [Define the default data dictionary path for the dcmdata library package.]) ;; *) AC_MSG_RESULT(no) @@ -985,6 +963,7 @@ AC_MSG_RESULT(no) ) + dnl ------------------------------------------------------- dnl Check for OpenSSL support dnl ------------------------------------------------------- @@ -992,6 +971,8 @@ AC_MY_LIB_PATH([openssl], [OpenSSL]) AC_MSG_CHECKING([whether to include OpenSSL support]) +AH_TEMPLATE(WITH_OPENSSL, [Define if we are compiling with OpenSSL support.]) +OPENSSL_WORKS="" AC_ARG_WITH(openssl, [AS_HELP_STRING([--with-openssl], [include OpenSSL support (default: auto)]) AS_HELP_STRING([--without-openssl], [don't include OpenSSL support])], @@ -1003,16 +984,17 @@ #endif ], [ AC_MSG_RESULT(yes) - AC_DEFINE(WITH_OPENSSL, , [Define if we are compiling with OpenSSL support.]) + AC_DEFINE(WITH_OPENSSL) + OPENSSL_WORKS="yes" OPENSSLLIBS="-lssl -lcrypto $OPENSSLLIBS" ], - [AC_MSG_RESULT(no - DCMTK requires OpenSSL version 1.0.1 or newer)] ) + [ AC_MSG_RESULT(no - DCMTK requires OpenSSL version 1.0.1 or newer)] ) ;; *) AC_MSG_RESULT(no) ;; esac ], [ SAVELIBS="$LIBS" - LIBS="$LIBS $OPENSSLLIBS -lssl -lcrypto" + LIBS="$LIBS -lssl -lcrypto $OPENSSLLIBS" AC_TRY_LINK([#include ], [(void) TLSv1_method()], [ AC_TRY_COMPILE([#include ], [ @@ -1021,18 +1003,85 @@ #endif ], [ AC_MSG_RESULT(yes) - AC_DEFINE(WITH_OPENSSL, , [Define if we are compiling with OpenSSL support.]) + AC_DEFINE(WITH_OPENSSL) + OPENSSL_WORKS="yes" OPENSSLLIBS="-lssl -lcrypto $OPENSSLLIBS" ], - [AC_MSG_RESULT(no - DCMTK requires OpenSSL version 1.0.1 or newer)] )], + [ AC_MSG_RESULT(no - DCMTK requires OpenSSL version 1.0.1 or newer)] )], [AC_MSG_RESULT(no)]) LIBS="$SAVELIBS"] ) -AC_CHECK_SSL_CTX_GET0_PARAM -AC_CHECK_RAND_EGD +if test "$OPENSSL_WORKS" = "yes"; then -dnl ------------------------------------------------------- +AC_CHECK_HEADERS(openssl/asn1.h) +AC_CHECK_HEADERS(openssl/dh.h) +AC_CHECK_HEADERS(openssl/evp.h) +AC_CHECK_HEADERS(openssl/ssl.h) +AC_CHECK_HEADERS(openssl/ts.h) +AC_CHECK_HEADERS(openssl/x509.h) +AC_CHECK_HEADERS(openssl/provider.h) + +dnl test presence of functions, constants and macros needed for the dcmtls module +AC_CHECK_EXT_LIB_PROTOTYPE(DH_bits, OpenSSL, openssl/dh.h) +AC_CHECK_EXT_LIB_COMPILES(EVP_PKEY_RSA_PSS, OpenSSL, openssl/evp.h, [EVP_PKEY_RSA_PSS]) +AC_CHECK_EXT_LIB_PROTOTYPE(EVP_PKEY_base_id, OpenSSL, openssl/evp.h) +AC_CHECK_EXT_LIB_PROTOTYPE(RAND_egd, OpenSSL, openssl/rand.h) +AC_CHECK_EXT_LIB_PROTOTYPE(SSL_CTX_get_cert_store, OpenSSL, openssl/ssl.h) +AC_CHECK_EXT_LIB_PROTOTYPE(SSL_CTX_get_ciphers, OpenSSL, openssl/ssl.h) +AC_CHECK_EXT_LIB_PROTOTYPE(SSL_CTX_get0_param, OpenSSL, openssl/ssl.h) +AC_CHECK_EXT_LIB_PROTOTYPE(SSL_CTX_set0_tmp_dh_pkey, OpenSSL, openssl/ssl.h) +AC_CHECK_EXT_LIB_COMPILES(SSL_CTX_set1_curves, OpenSSL, openssl/ssl.h, [SSL_CTX_set1_curves(0,0,0)]) +AC_CHECK_EXT_LIB_PROTOTYPE(SSL_CTX_set1_sigalgs, OpenSSL, openssl/ssl.h) +AC_CHECK_EXT_LIB_COMPILES(SSL_CTX_set_ecdh_auto, OpenSSL, openssl/ssl.h, [SSL_CTX_set_ecdh_auto(0,0)]) +AC_CHECK_EXT_LIB_COMPILES(SSL_CTX_set_max_proto_version, OpenSSL, openssl/ssl.h, [SSL_CTX_set_max_proto_version(0,0)]) +AC_CHECK_EXT_LIB_PROTOTYPE(SSL_CTX_set_security_level, OpenSSL, openssl/ssl.h) +AC_CHECK_EXT_LIB_COMPILES(SSL_ERROR_WANT_ASYNC, OpenSSL, openssl/ssl.h, [SSL_ERROR_WANT_ASYNC]) +AC_CHECK_EXT_LIB_COMPILES(SSL_ERROR_WANT_ASYNC_JOB, OpenSSL, openssl/ssl.h, [SSL_ERROR_WANT_ASYNC_JOB]) +AC_CHECK_EXT_LIB_COMPILES(SSL_ERROR_WANT_CLIENT_HELLO_CB, OpenSSL, openssl/ssl.h, [SSL_ERROR_WANT_CLIENT_HELLO_CB]) +AC_CHECK_EXT_LIB_COMPILES(TLS1_TXT_ECDHE_RSA_WITH_CHACHA20_POLY1305, OpenSSL, openssl/ssl.h, [TLS1_TXT_ECDHE_RSA_WITH_CHACHA20_POLY1305]) +AC_CHECK_EXT_LIB_PROTOTYPE(TLS_method, OpenSSL, openssl/ssl.h) +AC_CHECK_EXT_LIB_PROTOTYPE(X509_STORE_get0_param, OpenSSL, openssl/x509.h) +AC_CHECK_EXT_LIB_PROTOTYPE(X509_get_signature_nid, OpenSSL, openssl/x509.h) + +dnl test presence of functions, constants and macros needed for the dcmsign module +AC_CHECK_EXT_LIB_PROTOTYPE(ASN1_STRING_get0_data, OpenSSL, openssl/asn1.h) +AC_CHECK_EXT_LIB_PROTOTYPE(EVP_PKEY_get0_EC_KEY, OpenSSL, openssl/evp.h) +AC_CHECK_EXT_LIB_PROTOTYPE(EVP_PKEY_get_group_name, OpenSSL, openssl/evp.h) +AC_CHECK_EXT_LIB_PROTOTYPE(EVP_PKEY_id, OpenSSL, openssl/evp.h) +AC_CHECK_EXT_LIB_PROTOTYPE(OSSL_PROVIDER_load, OpenSSL, openssl/provider.h) +AC_CHECK_EXT_LIB_PROTOTYPE(TS_STATUS_INFO_get0_failure_info, OpenSSL, openssl/ts.h) +AC_CHECK_EXT_LIB_PROTOTYPE(TS_STATUS_INFO_get0_status, OpenSSL, openssl/ts.h) +AC_CHECK_EXT_LIB_PROTOTYPE(TS_STATUS_INFO_get0_text, OpenSSL, openssl/ts.h) +AC_CHECK_EXT_LIB_COMPILES(TS_VERIFY_CTS_set_certs, OpenSSL, openssl/ts.h, [TS_VERIFY_CTS_set_certs(0,0)]) +AC_CHECK_EXT_LIB_PROTOTYPE(TS_VERIFY_CTX_set_data, OpenSSL, openssl/ts.h) +AC_CHECK_EXT_LIB_PROTOTYPE(TS_VERIFY_CTX_set_flags, OpenSSL, openssl/ts.h) +AC_CHECK_EXT_LIB_PROTOTYPE(TS_VERIFY_CTX_set_store, OpenSSL, openssl/ts.h) +AC_CHECK_EXT_LIB_PROTOTYPE(X509_get0_notAfter, OpenSSL, openssl/x509.h) +AC_CHECK_EXT_LIB_PROTOTYPE(X509_get0_notBefore, OpenSSL, openssl/x509.h) + +dnl check if type EVP_MD_CTX is defined as typedef for "struct evp_md_ctx_st" (new) or "struct env_md_ctx_st" (old) +AC_MSG_CHECKING(whether OpenSSL defines the new typedef of EVP_MD_CTX as struct evp_md_ctx_st) +AH_TEMPLATE(HAVE_OPENSSL_DECLARATION_NEW_EVP_MD_CTX, [Define if OpenSSL provides the new typedef EVP_MD_CTX defined as struct evp_md_ctx_st.]) + AC_TRY_COMPILE([#include ], + [struct evp_md_ctx_st *a; EVP_MD_CTX *b=a], + [ AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_OPENSSL_DECLARATION_NEW_EVP_MD_CTX) ], + [AC_MSG_RESULT(no)]) + +dnl check if the first parameter passed to X509_ALGOR_get0() should be "const ASN1_OBJECT **" (new) or "ASN1_OBJECT **" (old) +AC_MSG_CHECKING(whether OpenSSL defines the first parameter of function X509_ALGOR_get0() const) +AH_TEMPLATE(HAVE_OPENSSL_X509_ALGOR_GET0_CONST_PARAM, [Define if OpenSSL provides the X509_ALGOR_get0() function that expects a const pointer as first parameter.]) +AC_TRY_COMPILE([#include ], + [const ASN1_OBJECT *a; X509_ALGOR_get0(&a,0,0,0)], + [ AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_OPENSSL_X509_ALGOR_GET0_CONST_PARAM) ], + [AC_MSG_RESULT(no)]) + +fi + + +dnl --------------------------------------------------------------- dnl Check for libjpeg, which is needed by libtiff on some platforms -dnl ------------------------------------------------------- +dnl --------------------------------------------------------------- JPEGLIBS="" AC_CHECK_LIB(jpeg, jpeg_set_defaults,[ @@ -1044,6 +1093,7 @@ ]) fi + dnl ------------------------------------------------------- dnl Check for zlib support dnl ------------------------------------------------------- @@ -1052,13 +1102,14 @@ ZLIBLIBS="" AC_MSG_CHECKING(whether to include zlib support) +AH_TEMPLATE(WITH_ZLIB, [Define if we are compiling with zlib support.]) AC_ARG_WITH(zlib, [AS_HELP_STRING([--with-zlib], [include zlib support (default: auto)]) AS_HELP_STRING([--without-zlib], [don't include zlib support])], [ case "$withval" in yes) AC_MSG_RESULT(yes) - AC_DEFINE(WITH_ZLIB, , [Define if we are compiling with zlib support.]) + AC_DEFINE(WITH_ZLIB) ZLIBLIBS="-lz" ;; *) @@ -1069,11 +1120,12 @@ LIBS="$LIBS -lz" AC_TRY_LINK([#include ], [(void) zlibVersion()], [ AC_MSG_RESULT(yes) - AC_DEFINE(WITH_ZLIB, , [Define if we are compiling with zlib support.]) + AC_DEFINE(WITH_ZLIB) ZLIBLIBS="-lz" ], [AC_MSG_RESULT(no)]) LIBS="$SAVELIBS"] ) + dnl ------------------------------------------------------- dnl Check for libtiff support dnl ------------------------------------------------------- @@ -1082,13 +1134,14 @@ TIFFLIBS="" AC_MSG_CHECKING(whether to include libtiff support) +AH_TEMPLATE(WITH_LIBTIFF, [Define if we are compiling with libtiff support.]) AC_ARG_WITH(libtiff, [AS_HELP_STRING([--with-libtiff], [include libtiff support (default: auto)]) AS_HELP_STRING([--without-libtiff], [don't include libtiff support])], [ case "$withval" in yes) AC_MSG_RESULT(yes) - AC_DEFINE(WITH_LIBTIFF, , [Define if we are compiling with libtiff support.]) + AC_DEFINE(WITH_LIBTIFF) TIFFLIBS="-ltiff $JPEGLIBS $ZLIBLIBS" ;; *) @@ -1099,7 +1152,7 @@ LIBS="$LIBS -ltiff $JPEGLIBS $ZLIBLIBS" AC_TRY_LINK([#include ], [(void) TIFFGetVersion()], [ AC_MSG_RESULT(yes) - AC_DEFINE(WITH_LIBTIFF, , [Define if we are compiling with libtiff support.]) + AC_DEFINE(WITH_LIBTIFF) TIFFLIBS="-ltiff $JPEGLIBS $ZLIBLIBS" ], [AC_MSG_RESULT(no)]) @@ -1117,6 +1170,7 @@ PNGLIBS="" AC_MSG_CHECKING(whether to include libpng support) +AH_TEMPLATE(WITH_LIBPNG, [Define if we are compiling with libpng support.]) AC_ARG_WITH(libpng, [AS_HELP_STRING([--with-libpng], [include libpng support (default: auto)]) AS_HELP_STRING([--without-libpng], [don't include libpng support])], @@ -1124,7 +1178,7 @@ yes) if test "x$ZLIBLIBS" != x; then AC_MSG_RESULT(yes) - AC_DEFINE(WITH_LIBPNG, , [Define if we are compiling with libpng support.]) + AC_DEFINE(WITH_LIBPNG) PNGLIBS="-lpng" else AC_MSG_RESULT(no because libpng requires zlib) @@ -1144,7 +1198,7 @@ #include #endif], [(void) png_access_version_number()], [ AC_MSG_RESULT(yes) - AC_DEFINE(WITH_LIBPNG, , [Define if we are compiling with libpng support.]) + AC_DEFINE(WITH_LIBPNG) PNGLIBS="-lpng" ], [AC_MSG_RESULT(no)]) @@ -1154,6 +1208,7 @@ fi ] ) + dnl ------------------------------------------------------- dnl Check for libxml support dnl ------------------------------------------------------- @@ -1169,13 +1224,14 @@ XMLLIBS="" AC_MSG_CHECKING(whether to include libxml support) +AH_TEMPLATE(WITH_LIBXML, [Define if we are compiling with libxml support.]) AC_ARG_WITH(libxml, [AS_HELP_STRING([--with-libxml], [include libxml support (default: auto)]) AS_HELP_STRING([--without-libxml], [don't include libxml support])], [ case "$withval" in yes) AC_MSG_RESULT(yes) - AC_DEFINE(WITH_LIBXML, , [Define if we are compiling with libxml support.]) + AC_DEFINE(WITH_LIBXML) XMLLIBS=$LIBXMLLIBS ;; *) @@ -1186,7 +1242,7 @@ LIBS="$LIBS $LIBXMLLIBS" AC_TRY_LINK([#include ], [(void) xmlInitParser()], [ AC_MSG_RESULT(yes) - AC_DEFINE(WITH_LIBXML, , [Define if we are compiling with libxml support.]) + AC_DEFINE(WITH_LIBXML) XMLLIBS=$LIBXMLLIBS ], [AC_MSG_RESULT(no)]) LIBS="$SAVELIBS"] ) @@ -1199,13 +1255,14 @@ TCPWRAPPERLIBS="" AC_MSG_CHECKING(whether to include libwrap support) +AH_TEMPLATE(WITH_TCPWRAPPER, [Define if we are compiling with libwrap (TCP wrapper) support.]) AC_ARG_WITH(libwrap, [AS_HELP_STRING([--with-libwrap], [include libwrap support (default: auto)]) AS_HELP_STRING([--without-libwrap], [don't include libwrap support])], [ case "$withval" in yes) AC_MSG_RESULT(yes) - AC_DEFINE(WITH_TCPWRAPPER, , [Define if we are compiling with libwrap (TCP wrapper) support.]) + AC_DEFINE(WITH_TCPWRAPPER) TCPWRAPPERLIBS="-lwrap" ;; *) @@ -1233,7 +1290,7 @@ int deny_severity = 0; int allow_severity = 0;], [struct request_info r; (void) hosts_access(&r)], [ AC_MSG_RESULT(yes) - AC_DEFINE(WITH_TCPWRAPPER, , [Define if we are compiling with libwrap (TCP wrapper) support.]) + AC_DEFINE(WITH_TCPWRAPPER) TCPWRAPPERLIBS="-lwrap" ], [AC_MSG_RESULT(no)]) LIBS="$SAVELIBS"] ) @@ -1246,13 +1303,14 @@ AC_MY_OPENJPEG_PATH() AC_MSG_CHECKING(whether to include OpenJPEG support) +AH_TEMPLATE(WITH_OPENJPEG, [Define if we are compiling with OpenJPEG support.]) AC_ARG_WITH(libwrap, [AS_HELP_STRING([--with-openjpeg], [include OpenJPEG support (default: auto)]) AS_HELP_STRING([--without-openjpeg], [don't include OpenJPEG support])], [ case "$withval" in yes) AC_MSG_RESULT(yes) - AC_DEFINE(WITH_OPENJPEG, , [Define if we are compiling with OpenJPEG support.]) + AC_DEFINE(WITH_OPENJPEG) OPENJPEGLIBS="-lopenjp2 $OPENJPEGLIBS" ;; *) @@ -1263,7 +1321,7 @@ LIBS="-lopenjp2 $OPENJPEGLIBS $LIBS" AC_TRY_LINK([#include ], [(void) opj_version()], [ AC_MSG_RESULT(yes) - AC_DEFINE(WITH_OPENJPEG, , [Define if we are compiling with OpenJPEG support.]) + AC_DEFINE(WITH_OPENJPEG) OPENJPEGLIBS="-lopenjp2 $OPENJPEGLIBS" ], [AC_MSG_RESULT(no)]) LIBS="$SAVELIBS"] ) @@ -1277,13 +1335,14 @@ SNDFILELIBS="" AC_MSG_CHECKING(whether to include libsndfile support) +AH_TEMPLATE(WITH_SNDFILE, [Define if we are compiling with libsndfile support.]) AC_ARG_WITH(libsndfile, [AS_HELP_STRING([--with-libsndfile], [include libsndfile support (default: auto)]) AS_HELP_STRING([--without-libsndfile], [don't include libsndfile support])], [ case "$withval" in yes) AC_MSG_RESULT(yes) - AC_DEFINE(WITH_SNDFILE, , [Define if we are compiling with libsndfile support.]) + AC_DEFINE(WITH_SNDFILE) SNDFILELIBS="-lsndfile" ;; *) @@ -1294,7 +1353,7 @@ LIBS="$LIBS -lsndfile" AC_TRY_LINK([#include ], [char buffer [128]; sf_command (NULL, SFC_GET_LIB_VERSION, buffer, sizeof (buffer));], [ AC_MSG_RESULT(yes) - AC_DEFINE(WITH_SNDFILE, , [Define if we are compiling with libsndfile support.]) + AC_DEFINE(WITH_SNDFILE) SNDFILELIBS="-lsndfile" ], [AC_MSG_RESULT(no)]) LIBS="$SAVELIBS"] @@ -1305,10 +1364,10 @@ dnl ------------------------------------------------------- AC_MY_LIB_PATH([libiconv]) -AH_TEMPLATE(WITH_LIBICONV, [Define if we are compiling with libiconv support.]) WITH_LIBICONV=no ICONVLIBS="" AC_MSG_CHECKING(whether to include libiconv support) +AH_TEMPLATE(WITH_LIBICONV, [Define if we are compiling with libiconv support.]) AC_ARG_WITH(libiconv, [AS_HELP_STRING([--with-libiconv], [include libiconv support (default: auto)]) AS_HELP_STRING([--without-libiconv], [don't include libiconv support])], @@ -1331,11 +1390,12 @@ AC_MSG_RESULT($WITH_LIBICONV) AC_MSG_CHECKING(whether the second argument to iconv() is const) +AH_TEMPLATE(LIBICONV_SECOND_ARGUMENT_CONST, [Define if the second argument to iconv() is const.]) SAVELIBS="$LIBS" LIBS="$LIBS $ICONVLIBS" AC_TRY_COMPILE([#include ], [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_DEFINE(LIBICONV_SECOND_ARGUMENT_CONST) ], [AC_MSG_RESULT(no)]) LIBS="$SAVELIBS" @@ -1343,7 +1403,7 @@ dnl Check for iconv inside C standard library dnl ------------------------------------------------------- -AH_TEMPLATE([WITH_STDLIBC_ICONV], [Define if the C standard library has iconv builtin.])dnl +AH_TEMPLATE(WITH_STDLIBC_ICONV, [Define if the C standard library has iconv builtin.])dnl WITH_STDLIBC_ICONV=no AC_MSG_CHECKING([whether the C standard library provides iconv functionality]) SAVELIBS="$LIBS" @@ -1359,7 +1419,7 @@ dnl ------------------------------------------------------- AC_MY_LIB_PATH([libicu]) -AH_TEMPLATE([WITH_LIBICU], [Define if we are compiling with ICU support.]) +AH_TEMPLATE(WITH_LIBICU, [Define if we are compiling with ICU support.]) WITH_LIBICU=no AC_ARG_WITH(libicu, [AS_HELP_STRING([--with-libicu], [include libicu support (default: auto)]) @@ -1393,7 +1453,7 @@ AC_MSG_RESULT($WITH_LIBICU) dnl ------------------------------------------------------- -dnl character set conversion support +dnl Check for character set conversion support dnl ------------------------------------------------------- AH_VERBATIM([DCMTK_CHARSET_CONVERSION_CONSTANTS], [/* character set conversion constants. */ @@ -1450,7 +1510,7 @@ AC_RUN_IFELSE( [AC_LANG_SOURCE([[#include "tests/iconv.cc"]])], [ - AC_DEFINE_UNQUOTED(DCMTK_FIXED_ICONV_CONVERSION_FLAGS, [`./conftest$EXEEXT`], [Try to define the iconv behavior as conversion flags]) + AC_DEFINE_UNQUOTED(DCMTK_FIXED_ICONV_CONVERSION_FLAGS, [`./conftest$EXEEXT`], [Try to define the iconv behavior as conversion flags.]) AC_MSG_RESULT() ], [AC_MSG_RESULT([unknown])] @@ -1464,7 +1524,7 @@ AC_RUN_IFELSE( [AC_LANG_SOURCE([[#include "tests/lciconv.cc"]])], [ - AC_DEFINE(DCMTK_STDLIBC_ICONV_HAS_DEFAULT_ENCODING, 1, [Define if iconv_open() accepts "" as an argument]) + AC_DEFINE(DCMTK_STDLIBC_ICONV_HAS_DEFAULT_ENCODING, 1, [Define if iconv_open() accepts "" as an argument.]) AC_MSG_RESULT(yes) ], [AC_MSG_RESULT(no)] @@ -1537,7 +1597,7 @@ dnl ------------------------------------------------------- -dnl Enable/disable STL support. +dnl Enable/disable STL support dnl ------------------------------------------------------- ac_enable_stl="no" @@ -1557,7 +1617,6 @@ ) 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, @@ -1577,7 +1636,7 @@ 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"]) + AC_RUN_IFELSE([AC_LANG_SOURCE([[#include "tests/vector.cc"]])], [AC_DEFINE(HAVE_STL_VECTOR, 1, [Define if STL's vector should be used.])], [ac_enable_stl_vector="unsupported -> no"]) fi AC_MSG_RESULT($ac_enable_stl_vector) @@ -1600,7 +1659,7 @@ 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"]) + AC_RUN_IFELSE([AC_LANG_SOURCE([[#include "tests/algo.cc"]])], [AC_DEFINE(HAVE_STL_ALGORITHM, 1, [Define if STL's algorithm should be used.])], [ac_enable_stl_algorithm="unsupported -> no"]) fi AC_MSG_RESULT($ac_enable_stl_algorithm) @@ -1623,7 +1682,7 @@ 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"]) + AC_RUN_IFELSE([AC_LANG_SOURCE([[#include "tests/limits.cc"]])], [AC_DEFINE(HAVE_STL_LIMITS, 1, [Define if STL's limits should be used.])], [ac_enable_stl_limits="unsupported -> no"]) fi AC_MSG_RESULT($ac_enable_stl_limits) @@ -1646,7 +1705,7 @@ 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"]) + AC_RUN_IFELSE([AC_LANG_SOURCE([[#include "tests/list.cc"]])], [AC_DEFINE(HAVE_STL_LIST, 1, [Define if STL's list should be used.])], [ac_enable_stl_list="unsupported -> no"]) fi AC_MSG_RESULT($ac_enable_stl_list) @@ -1669,7 +1728,7 @@ 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"]) + AC_RUN_IFELSE([AC_LANG_SOURCE([[#include "tests/map.cc"]])], [AC_DEFINE(HAVE_STL_MAP, 1, [Define if STL's map should be used.])], [ac_enable_stl_map="unsupported -> no"]) fi AC_MSG_RESULT($ac_enable_stl_map) @@ -1692,7 +1751,7 @@ 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"]) + AC_RUN_IFELSE([AC_LANG_SOURCE([[#include "tests/memory.cc"]])], [AC_DEFINE(HAVE_STL_MEMORY, 1, [Define if STL's memory should be used.])], [ac_enable_stl_memory="unsupported -> no"]) fi AC_MSG_RESULT($ac_enable_stl_memory) @@ -1715,7 +1774,7 @@ 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") + AC_RUN_IFELSE([AC_LANG_SOURCE([[#include "tests/stack.cc"]])], [AC_DEFINE(HAVE_STL_STACK, 1, [Define if STL's stack should be used.])], []ac_enable_stl_stack="unsupported -> no") fi AC_MSG_RESULT($ac_enable_stl_stack) @@ -1738,7 +1797,7 @@ 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"]) + AC_RUN_IFELSE([AC_LANG_SOURCE([[#include "tests/string.cc"]])], [AC_DEFINE(HAVE_STL_STRING, 1, [Define if STL's string should be used.])], [ac_enable_stl_string="unsupported -> no"]) fi AC_MSG_RESULT($ac_enable_stl_string) @@ -1763,7 +1822,7 @@ 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"]) + AC_RUN_IFELSE([AC_LANG_SOURCE([[#include "tests/ttraits.cc"]])], [AC_DEFINE(HAVE_STL_TYPE_TRAITS, 1, [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) @@ -1786,7 +1845,7 @@ 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"]) + AC_RUN_IFELSE([AC_LANG_SOURCE([[#include "tests/tuple.cc"]])], [AC_DEFINE(HAVE_STL_TUPLE, 1, [Define if STL's tuple should be used.])], [ac_enable_stl_tuple="unsupported -> no"]) fi AC_MSG_RESULT($ac_enable_stl_tuple) @@ -1811,7 +1870,7 @@ 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"]) + AC_RUN_IFELSE([AC_LANG_SOURCE([[#include "tests/syserr.cc"]])], [AC_DEFINE(HAVE_STL_SYSTEM_ERROR, 1, [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) @@ -1832,10 +1891,11 @@ dnl ------------------------------------------------------- AC_MSG_CHECKING(whether struct pwd contains the field pw_gecos) +AH_TEMPLATE(HAVE_PASSWD_GECOS, [Define if passwd::pw_gecos is available.]) AC_TRY_COMPILE([#include ], [&passwd::pw_gecos;], [ AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_PASSWD_GECOS, , [Define if passwd::pw_gecos is available.]) ], + AC_DEFINE(HAVE_PASSWD_GECOS) ], [AC_MSG_RESULT(no)]) dnl ------------------------------------------------------- @@ -1843,10 +1903,11 @@ dnl ------------------------------------------------------- AC_MSG_CHECKING(for SYS_gettid in sys/syscall.h) +AH_TEMPLATE(HAVE_SYS_GETTID, [Define if your system has a prototype for gettid.]) AC_TRY_COMPILE([#include ], [SYS_gettid;], [ AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_SYS_GETTID, , [Define if your system has a prototype for gettid.]) ], + AC_DEFINE(HAVE_SYS_GETTID) ], [AC_MSG_RESULT(no)]) @@ -1869,7 +1930,7 @@ CXXFLAGS="$DEBUGCXXFLAGS $CXXFLAGS" dnl ------------------------------------------------------- -dnl Special Definitions for output +dnl Special definitions for output dnl ------------------------------------------------------- AC_SUBST(CXXFLAGS) AC_SUBST(OPENSSLLIBS) diff -Nru dcmtk-3.6.6/config/docs/macros.txt dcmtk-3.6.7/config/docs/macros.txt --- dcmtk-3.6.6/config/docs/macros.txt 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/config/docs/macros.txt 2022-04-28 13:47:25.000000000 +0000 @@ -2,31 +2,34 @@ DCMTK COMPILE TIME FLAGS AND MACROS =================================== -The behavior of several DCMTK tools and libraries can be modified by -a number of compile time flags (macros), which are explained below. -Most of these macros enable experimental or rarely needed features -in DCMTK, others disable certain functions. So please, use with care! +The behavior of several DCMTK tools and libraries can be modified by a number +of compile time flags (macros), which are explained below. +Most of these macros enable experimental or rarely needed features in DCMTK, +others disable certain functions. So please, use with care! + +Note: CMake users simply need to add a new definition to CXXFLAGS, e.g.: + + CXXFLAGS=-DENABLE_DCMJPLS_INTERLEAVE_NONE && cmake [...] /path/to/dcmtk ALLOW_ILLUMINATION_OVERRIDE Affected: dcmprscu Type of modification: Activates experimental or rarely used feature - Explanation: Allows the settings for Illumination and Reflected - Ambient Light, which are stored in a Stored Print object, to be - overridden from the print job command file. + Explanation: Allows the settings for Illumination and Reflected Ambient Light, + which are stored in a Stored Print object, to be overridden from the print + job command file. BUGGY_IMPLEMENTATION_CLASS_UID_PREFIX Affected: storescp Type of modification: Activates workaround for known bug in other product Explanation: The dcmnet module contains a workaround that allows to communicate with some buggy Storage SCUs. If the global flag - dcmPeerRequiresExactUIDCopy is enabled, an illegal space padding in - the Affected SOP Instance UID field of the C-STORE-RQ message is - retained in the corresponding C-STORE-RSP message. When this - preprocessor macro is defined, it should contain the prefix of an - implementation class UID of an implementation known to exhibit the - buggy behavior. The workaround is then activated in storescp - whenever a Storage SCU with the given implementation class UID root - connects. + dcmPeerRequiresExactUIDCopy is enabled, an illegal space padding in the + Affected SOP Instance UID field of the C-STORE-RQ message is retained in the + corresponding C-STORE-RSP message. When this preprocessor macro is defined, + it should contain the prefix of an implementation class UID of an + implementation known to exhibit the buggy behavior. The workaround is then + activated in storescp whenever a Storage SCU with the given implementation + class UID root connects. DCMTK_BUILD_DATE Affected: dcmdata @@ -55,32 +58,40 @@ raised by the sanitizer and thus prevent the CMake configure phase from completing. +DCMTK_ENABLE_STRICT_HUFFMAN_TABLE_CHECK + Affected: dcmjpeg + Type of modification: Activates feature + Explanation: DCMTK releases up to 3.6.6 contained a relatively strict check + for the validity of Huffman tables for DC components in the JPEG decoder. + At least one JPEG implementation produces valid JPEG images that fail this + test (see DCMTK issue #1018). The test has, therefore, been disabled. This + macro re-enables the old behavior. + DCMTK_ENABLE_UNSAFE_VSNPRINTF Affected: ofstd Type of modification: Activates feature - Explanation: DCMTK requires the snprintf(3)/vsnprintf(3) function, which - was introduced with C99 and may not be supported by very old compilers. - As a "last resort", an implementation interally using sprintf/vsprintf - can be enabled with this macro, which allows the user to compile DCMTK - on platforms that do not have the new functions. - The implementation allocates a buffer that is 1 kByte larger than - the "size" parameter, formats the string into that buffer, and then - uses strlcpy() to copy the formatted string into the output buffer, - truncating if necessary. - This will work in most cases, since few snprintf calls should overrun - their buffer by more than 1K, but it can be easily abused by - a malicious attacker to cause a buffer overrun. - Therefore, this implementation should only be used as a "last resort" - and we strongly advise against using it in production code. + Explanation: DCMTK requires the snprintf(3)/vsnprintf(3) function, which was + introduced with C99 and may not be supported by very old compilers. As a + "last resort", an implementation interally using sprintf/vsprintf can be + enabled with this macro, which allows the user to compile DCMTK on platforms + that do not have the new functions. + The implementation allocates a buffer that is 1 kByte larger than the "size" + parameter, formats the string into that buffer, and then uses strlcpy() to + copy the formatted string into the output buffer, truncating if necessary. + This will work in most cases, since few snprintf calls should overrun their + buffer by more than 1K, but it can be easily abused by a malicious attacker + to cause a buffer overrun. + Therefore, this implementation should only be used as a "last resort" and we + strongly advise against using it in production code. DCMTK_GUI Affected: all modules Type of modification: Activates experimental or rarely used feature - Explanation: When this macro is defined, DCMTK re-assigns the standard - output and error streams maintained by ofConsole to string streams. - This will allow a GUI based application to extract the messages and - either present them to the user or store them in a log file. See - comments in ofstd/include/dcmtk/ofstd/ofconsol.h. + Explanation: When this macro is defined, DCMTK re-assigns the standard output + and error streams maintained by ofConsole to string streams. This will + allow a GUI based application to extract the messages and either present + them to the user or store them in a log file. See comments in + ofstd/include/dcmtk/ofstd/ofconsol.h. DCMTK_LOG4CPLUS_AVOID_WIN32_FLS Affected: oflog @@ -89,80 +100,89 @@ instead of thread local storage in the oflog module on Windows to store thread-specific information. This has the advantage that a callback can be (and is) registered that automatically cleans up the memory when a - thread ends. The old behaviour can be re-activated with this macro. + thread ends. The old behavior can be re-activated with this macro. This may be necessary when an application wants to use multiple fibers within a single thread. In that case, before ending a thread, dcmtk::log4cplus::threadCleanup() should be called by the user code in order to clean-up oflog's thread local storage. +DCMTK_MERGE_STDERR_TO_STDOUT + Affected: dcmdata + Type of modification: Activates feature + Explanation: DCMTK releases up to 3.6.6 redirected the stderr stream to stdout + on Windows to make it easier to pipe the output of the command line tools to + "more". With the introduction of the ability to write DICOM files to + stdout, this feature has been disabled as debug output will otherwise get + mixed into the DICOM file. The old behavior can be re-activated by + compiling with this macro. In this case, DICOM files should never be + written to stdout as this will be unreliable. + DICOMDIR_WITHOUT_BACKUP Affected: dcmdata Type of modification: Disables feature Explanation: By default, DCMTK creates a backup of an existing DICOMDIR - (using the name DICOMDIR.$$$) when a DcmDicomDir object is written - to file. The creation of the backup can be disabled with this macro. + (using the name DICOMDIR.$$$) when a DcmDicomDir object is written to file. + The creation of the backup can be disabled with this macro. DISABLE_COMPRESSION_EXTENSION Affected: dcmqrdb Type of modification: Disables feature - Explanation: Disables the support of compression (various transfer - syntaxes) in dcmqrdb, a feature which is still experimental. + 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 (dcmjpls only up to DCMTK 3.6.4) 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. - In the dcmjpls module, the macro has been replaced by a codec - parameter that can be set at runtime starting with DCMTK 3.6.5. + marker, writing "ff/ff/d9" instead of adding a zero byte after the EOI + marker, i.e. writing "ff/d9/00". The old behavior can be restored by + defining this macro. + In the dcmjpls module, the macro has been replaced by a codec parameter that + can be set at runtime starting with DCMTK 3.6.5. DISABLE_NAGLE_ALGORITHM Affected: dcmnet Type of modification: Disables feature - Explanation: By default, DCMTK does not disable the so-called Nagle - algorithm, which allows for improving the efficiency of TCP/IP networks - by reducing the number of packets that need to be sent over the network. - When compiled with this macro, the Nagle algorithm is disabled for each - DICOM transport connection. This was the default in earlier versions of - the DCMTK but does not seem to be appropriate anymore for most modern - operating systems. The default behavior can be changed by setting the - environment variable TCP_NODELAY accordingly (see config/docs/envvars.txt - or /usr/local/share/doc/dcmtk/envvars.txt). + Explanation: By default, DCMTK does not disable the so-called Nagle algorithm, + which allows for improving the efficiency of TCP/IP networks by reducing the + number of packets that need to be sent over the network. When compiled with + this macro, the Nagle algorithm is disabled for each DICOM transport + connection. This was the default in earlier versions of the DCMTK but does + not seem to be appropriate anymore for most modern operating systems. + The default behavior can be changed by setting the environment variable + TCP_NODELAY accordingly (see config/docs/envvars.txt or + /usr/local/share/doc/dcmtk/envvars.txt). DISABLE_OFSTD_ATOF Affected: all modules Type of modification: Disables feature - Explanation: By default, DCMTK uses its own implementation of atof() - to convert strings to double numbers in a locale-independent manner. - This flag forces DCMTK to use the standard sscanf() function - instead, which is normally much faster and gives a higher precision - than DCMTK's built in code, but is locale dependent, i.e. cannot be - used with locales such as German since DICOM decimal strings always - use the Posix locale. + Explanation: By default, DCMTK uses its own implementation of atof() to + convert strings to double numbers in a locale-independent manner. + This flag forces DCMTK to use the standard sscanf() function instead, which + is normally much faster and gives a higher precision than DCMTK's built in + code, but is locale dependent, i.e. cannot be used with locales such as + German since DICOM decimal strings always use the Posix locale. DISABLE_OFSTD_FTOA Affected: all modules Type of modification: Disables feature - Explanation: By default, DCMTK uses its own implementation to convert - double numbers to strings to in a locale-independent manner. - This flag forces DCMTK to use the standard sprintf() function - instead, which is locale dependent, i.e. cannot be used with locales - such as German since DICOM decimal strings always use the Posix - locale. + Explanation: By default, DCMTK uses its own implementation to convert double + numbers to strings to in a locale-independent manner. + This flag forces DCMTK to use the standard sprintf() function instead, which + is locale dependent, i.e. cannot be used with locales such as German since + DICOM decimal strings always use the Posix locale. DISABLE_PORT_PERMISSION_CHECK Affected: most/all network server tools Type of modification: Disables feature - Explanation: By default, most network server tools (e.g. storescp) check - for sufficient privileges to listen on the specified port (if geteuid() - is available on the particular system). For examples, on Unix systems - listening on port < 1024 usually requires root privileges. However, - the port permission check might prevent the tool from being run on such - ports on systems with fine-grained permission control (e.g. Linux). - Therefore, this check can be disabled using this flag. + Explanation: By default, most network server tools (e.g. storescp) check for + sufficient privileges to listen on the specified port (if geteuid() is + available on the particular system). For examples, on Unix systems + listening on port < 1024 usually requires root privileges. However, the + port permission check might prevent the tool from being run on such ports on + systems with fine-grained permission control (e.g. Linux). Therefore, this + check can be disabled using this flag. DISABLE_RECV_TIMEOUT This macro is not supported anymore since the timeout for the recv() function @@ -176,65 +196,47 @@ This macro is not supported anymore since the Nagle algorithm is no longer disabled by default. See DISABLE_NAGLE_ALGORITHM for details. -DONT_LOAD_EXTERNAL_DICTIONARIES - This macro is not supported anymore since it has been superseded by macro - ENABLE_EXTERNAL_DICTIONARY. See ENABLE_EXTERNAL_DICTIONARY for details. - DOXYGEN Affected: everything Type of modification: Hides complexity from Doxygen - Explanation: Doxygen is unable to parse some complex statements correctly - and it is sometimes sufficient to provide documentation for the basic + Explanation: Doxygen is unable to parse some complex statements correctly and + it is sometimes sufficient to provide documentation for the basic functionality instead of documenting every detail. This macro is defined when creating the documentation with Doxygen and should NEVER be defined when compiling DCMTK with a C/C++ compiler. - NOTE: Doxygen is still unable to expand some macros correctly - (e.g. HAVE_WINDOWS_H). Using this macro at the appropriate locations - could be a solution for this problem. + NOTE: Doxygen is still unable to expand some macros correctly (e.g. + HAVE_WINDOWS_H). Using this macro at the appropriate locations could + be a solution for this problem. + +DCM_DICT_DEFAULT + Affected: dcmdata + Type of modification: Activates feature + Explanation: This macro controls which kind of default dictionary is loaded + on startup. Three settings are possible: + 0: Do not load any default dictionary on startup + 1: Load builtin dictionary on startup + 2: Load external (i.e. file-based) dictionary on startup + See dcmtk/dcmdata/docs/datadict.txt for further details. -ENABLE_BUILTIN_DICTIONARY +DCM_DICT_USE_DCMDICTPATH Affected: dcmdata Type of modification: Activates feature - Explanation: If enabled, DCMTK's global builtin dictionary, that is always - loaded on startup, is populated with known DICOM tags. Otherwise, the - builtin dictionary stays empty. For further information about dictionary - configuration read dcmdata/docs/datadict.txt. + Explanation: This macro controls whether DCMDICTPATH environment variable is + evaluated on startup. If so, any dictionary files provided through + DCMDICTPATH will be loaded on startup. + See dcmtk/dcmdata/docs/datadict.txt for further details. ENABLE_DCMJPLS_INTERLEAVE_NONE Affected: dcmjpls Type of modification: Enables feature Explanation: Re-enables the option for uninterleaved encoding (--interleave-none) in the JPEG-LS encoder on command line and library - level. This option was removed after DCMTK 3.6.5 since it may in certain + level. This option was removed after DCMTK 3.6.5 since it may in certain cases (color image with BitsStored > 12) create compressed images that are correct but cannot be decoded by the JPEG-LS library due to a known - bug (DCMTK issue #892). The option will be re-enabled permanently once - DCMTK has been ported to CharLS 2.x, another branch of the JPEG-LS - library that requires a C++14 compiler, however. - -ENABLE_EXTERNAL_DICTIONARY - Affected: dcmdata - Type of modification: Enables feature - Explanation: DCMTK is able to load DICOM data dictionaries from files at - application start (before the main function is called). These files - are either specified by the DCMDICTPATH environment variable or the - default files are used. This flag enables the loading of external - dictionaries from file at application start. Disabling it might be useful - when only the builtin dictionary should be used. However, if no - dictionary gets loaded, this is likely to cause unexpected behavior. - Even if this flag is disabled, the reloadDictionaries() method can be - used to load the external dictionaries after application start. - However, the environment variable DCMDICTPATH has to point to one or more - related dictionary files in that case, since if ENABLE_EXTERNAL_DICTIONARY - is disabled, no default dictionary path is set within the DCMTK code. - On Unix-like systems this flag is enabled by default while on Windows it is - disabled. For more information about dictionary configuration read - dcmdata/docs/datadict.txt. - Note that in former versions of DCMTK a macro called - DONT_LOAD_EXTERNAL_DICTIONARIES has been specified which now has been - replaced with ENABLE_EXTERNAL_DICTIONARY in order to be consistent with - the existing Autoconf and CMake configuration switches. See also entry for - DONT_LOAD_EXTERNAL_DICTIONARIES. + bug (DCMTK issue #892). The option will be re-enabled permanently once + DCMTK has been ported to CharLS 2.x, another branch of the JPEG-LS library + that requires a C++14 compiler, however. EXPERIMENTAL_READ_FROM_FILE Affected: dump2dcm @@ -245,15 +247,15 @@ LOCK_IMAGE_FILES Affected: dcmpstat, dcmqrdb Type of modification: Activates experimental or rarely used feature - Explanation: When this macro is defined, the DICOM image file to be - send or received/created is locked exclusively. + Explanation: When this macro is defined, the DICOM image file to be send or + received/created is locked exclusively. LOG4CPLUS_DISABLE_xxx (where xxx is one of TRACE, DEBUG, INFO, WARN, ERROR and FATAL) Affected: oflog Type of modification: Disables feature - Explanation: When one of these macros is defined all log message of - this type and lower are disabled and optimized away. + Explanation: When one of these macros is defined, all log message of this type + and lower are disabled and optimized away. NO_GET_SUPPORT Affected: dcmqrdb @@ -263,119 +265,113 @@ NO_PATIENTSTUDYONLY_SUPPORT Affected: dcmqrdb Type of modification: Disables feature - Explanation: Disables support for the Patient/Study Only Query/Retrieve - Model in dcmqrdb. + Explanation: Disables support for the Patient/Study Only Query/Retrieve Model + in dcmqrdb. OFCONDITION_IMPLICIT_BOOL_CONVERSION Affected: ofstd Type of modification: Activates experimental or rarely used feature - Explanation: Activates an implicit conversion from OFCondition to - OFBool, i.e. operator OFBool(). Implicit conversion might not always - be a good idea since it can hide unwanted constructs. Therefore, - this operator is disabled by default. + Explanation: Activates an implicit conversion from OFCondition to OFBool, i.e. + operator OFBool(). Implicit conversion might not always be a good idea + since it can hide unwanted constructs. Therefore, this operator is disabled + by default. ON_THE_FLY_COMPRESSION Affected: storescu Type of modification: Activates experimental or rarely used feature - Explanation: When this macro is defined, the storescu tries to compress - or decompress the DICOM image to be sent (if required) depending on - the negotiated transfer syntax. + Explanation: When this macro is defined, the storescu tries to compress or + decompress the DICOM image to be sent (if required) depending on the + negotiated transfer syntax. OLD_USER_INFO_SUB_ITEM_ORDER Affected: dcmnet Type of modification: Activates experimental or rarely used feature - Explanation: Prior DCMTK releases did not encode A-ASSOCIATE user - information sub-items in ascending order, i.e. they sent 55H - followed by 54H and 56H. This behavior has been "legalized" by - DICOM CP 280 but is known to create problems with some other - toolkits. The current DCMTK release always sends the user - information sub-items in ascending order, but can be "forced" with - this macro to revert to the old behavior. It should be re-activated - for testing purposes only. + Explanation: Prior DCMTK releases did not encode A-ASSOCIATE user information + sub-items in ascending order, i.e. they sent 55H followed by 54H and 56H. + This behavior has been "legalized" by DICOM CP-280, but is known to create + problems with some other toolkits. The current DCMTK release always sends + the user information sub-items in ascending order, but can be "forced" with + this macro to revert to the old behavior. It should be re-activated for + testing purposes only. PASTEL_COLOR_OUTPUT Affected: dcmimgle, dcmimage Type of modification: Activates experimental or rarely used feature - Explanation: Activates experimental code in dcmimgle/dcmimage that - renders monochrome images with pastel colors. + Explanation: Activates experimental code in dcmimgle/dcmimage that renders + monochrome images with pastel colors. PDV_TEST Affected: dcmnet Type of modification: Activates experimental or rarely used feature - Explanation: Causes the network module to insert a false, zero-length - PDV (2 byte header) into each P-DATA-PDU. + Explanation: Causes the network module to insert a false, zero-length PDV + (2-byte header) into each P-DATA-PDU. PIXELSTACK_MEMORY_LEAK_WORKAROUND Affected: dcmdata Type of modification: Activates experimental or rarely used feature Explanation: On certain platforms there seems to be a memory leak in - DcmDataset::chooseRepresentation(). The work-around activated by - this macro should solve this issue. + DcmDataset::chooseRepresentation(). The work-around activated by this macro + should solve this issue. PRINT_REPLACED_DICTIONARY_ENTRIES Affected: dcmdata Type of modification: Activates experimental or rarely used feature - Explanation: When reading the data dictionary, duplicate entries (i.e. - entries replacing an older entry in the dictionary) are reported on - console if compiled with this macro. Useful for testing a new - dictionary version. + Explanation: When reading the data dictionary, duplicate entries (i.e. entries + replacing an older entry in the dictionary) are reported on console if + compiled with this macro. Useful for testing a new dictionary version. REJECT_FILE_IF_META_GROUP_LENGTH_ABSENT Affected: dcmdata Type of modification: Disables feature - Explanation: When reading the a file that contains an incorrect meta - header where meta header group length (0002,0000) is absent, DCMTK - since release 3.5.4 nevertheless tries to parse the file, unless this - macro is enabled, in which case the behavior up to DCMTK 3.5.3 is - retained. + Explanation: When reading the a file that contains an incorrect meta header + where meta header group length (0002,0000) is absent, DCMTK since release + 3.5.4 nevertheless tries to parse the file, unless this macro is enabled, in + which case the behavior up to DCMTK 3.5.3 is retained. RETAIN_ASSOCIATION Affected: dcmqrti Type of modification: Activates experimental or rarely used feature Explanation: Keeps association to remote Query SCP open after - study/series/image listing. Default behavior is to open new - association for each query. + study/series/image listing. Default behavior is to open a new association + for each query. REVERSE_OVERLAY_ORIGIN_ORDER Affected: dcmimgle Type of modification: Activates experimental or rarely used feature - Explanation: When compiled with this macro, dcmimgle assumes that the - values in DCM_ImageFrameOrigin are in reverse order, i.e. X\Y - instead of Y\X. + Explanation: When compiled with this macro, dcmimgle assumes that the values + in Overlay Origin (60xx,0050) are in reverse order, i.e. X\Y instead of Y\X. SITE_UID_ROOT Affected: dcmdata Type of modification: Site customization Explanation: dcmdata contains a routine that generates DICOM unique - identifiers (UIDs). By default, these are constructed from the OFFIS - UID namespace, i.e. using the OFFIS UID Root "1.2.276.0.7230010.3". - Users who prefer to let the toolkit generate UIDs from their own UID - namespace should compile DCMTK with SITE_UID_ROOT defined to their own - UID root. Please make sure that the resulting UIDs do not exceed the - 64 characters limit! - DCMTK may add a maximum of 44 characters to the UID root when - generating UIDs. Therefore, the root must not be longer than 20 - characters in order to avoid UID truncation. + identifiers (UIDs). By default, these are constructed from the OFFIS UID + namespace, i.e. using the OFFIS UID Root "1.2.276.0.7230010.3". Users who + prefer to let the toolkit generate UIDs from their own UID namespace should + compile DCMTK with SITE_UID_ROOT defined to their own UID root. Please make + sure that the resulting UIDs do not exceed the 64 characters limit! + DCMTK may add a maximum of 44 characters to the UID root when generating + UIDs. Therefore, the root must not be longer than 20 characters in order to + avoid UID truncation. STARVIEW Affected: dcmimgle, dcmimage Type of modification: Activates experimental or rarely used feature - Explanation: Enables support for old StarView 2 GUI class library from - Star Division. + Explanation: Enables support for old StarView 2 GUI class library from Star + Division. SUPPRESS_CREATE_STAMP Affected: dcmdata Type of modification: Activates experimental or rarely used feature - Explanation: When defined, suppresses the creation of a time stamp - comment when re-generating dcdeftag.h and dcdictbi.cc. + Explanation: When defined, suppresses the creation of a time stamp comment + when re-generating dcdeftag.h and dcdictbi.cc. USE__LOCKING Affected: dcmnet Type of modification: Activates alternative implementation - Explanation: Activates an alternative emulation of flock() on Win32 - platforms using _locking(). This version should only be used on - compilers where _get_osfhandle() is not available since it does not - implement shared locks. + Explanation: Activates an alternative emulation of flock() on Win32 platforms + using _locking(). This version should only be used on compilers where + _get_osfhandle() is not available since it does not implement shared locks. USE_BINARY_MODE_FOR_STDOUT_ON_WINDOWS Affected: dcmdata @@ -390,30 +386,30 @@ USE_NULL_SAFE_OFSTRING Affected: ofstd Type of modification: Activates feature - Explanation: When this macro is defined, OFString(NULL) results in an - empty string. If this macro is not defined, OFString(NULL) causes a - NULL pointer dereference. This macro has no effect when HAVE_STL_STRING - is also defined. Currently, this macro is always defined by DCMTK's - Makefiles. This will change in future releases. + Explanation: When this macro is defined, OFString(NULL) results in an empty + string. If this macro is not defined, OFString(NULL) causes a NULL pointer + dereference. This macro has no effect when HAVE_STL_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. + 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. USE_WIN32_READ_WRITE_LOCK_HELPER Affected: ofstd Type of modification: Re-activated behavior of earlier DCMTK releases Explanation: Starting with DCMTK 3.6.4, the Win32 version of the - OFReadWriteLock class uses Slim Reader/Writer (SRW) Locks, - which are available since Windows Vista, instead of the older - implementation based on a Mutex, a Semaphore and a counter, because - SRW locks are much faster. Users who want to revert to the - behavior of older DCMTK releases can define this macro. + OFReadWriteLock class uses Slim Reader/Writer (SRW) Locks, which are + available since Windows Vista, instead of the older implementation based on + a Mutex, a Semaphore and a counter, because SRW locks are much faster. + Users who want to revert to the behavior of older DCMTK releases can define + this macro. USING_STD_NAMESPACE Affected: all modules @@ -430,10 +426,10 @@ Type of modification: Activates feature Explanation: In addition to the standard file I/O functions, the OFFile class also defines the corresponding wide character functions from C99 standard. - Since these functions are not yet supported by all compilers and the - current implementation is Windows-specific, this feature is disabled by - default. When using CMake, you can enable this macro by setting the CMake - option DCMTK_WIDE_CHAR_FILE_IO_FUNCTIONS to "on". + Since these functions are not yet supported by all compilers and the current + implementation is Windows-specific, this feature is disabled by default. + When using CMake, you can enable this macro by setting the CMake option + DCMTK_WIDE_CHAR_FILE_IO_FUNCTIONS to "on". WIDE_CHAR_MAIN_FUNCTION Affected: currently not used diff -Nru dcmtk-3.6.6/config/include/dcmtk/config/osconfig.h.in dcmtk-3.6.7/config/include/dcmtk/config/osconfig.h.in --- dcmtk-3.6.6/config/include/dcmtk/config/osconfig.h.in 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/config/include/dcmtk/config/osconfig.h.in 2022-04-28 13:47:25.000000000 +0000 @@ -4,7 +4,7 @@ #define OSCONFIG_H /* -** Define enclosures for include files with C linkage (mostly system headers) +** Define enclosures for include files with C linkage (mostly system headers). */ #ifdef __cplusplus #define BEGIN_EXTERN_C extern "C" { @@ -33,10 +33,10 @@ #undef C_CHAR_UNSIGNED /* Define to the inline keyword supported by the C compiler, if any, or to the - empty string */ + empty string. */ #undef C_INLINE -/* Define if >> is unsigned on the C compiler */ +/* Define if >> is unsigned on the C compiler. */ #undef C_RIGHTSHIFT_UNSIGNED /* character set conversion constants. */ @@ -51,10 +51,10 @@ /* 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 */ +/* Select LFS mode (defined above) that shall be used or don't define it. */ #undef DCMTK_ENABLE_LFS -/* Try to define the iconv behavior as conversion flags */ +/* Try to define the iconv behavior as conversion flags. */ #undef DCMTK_FIXED_ICONV_CONVERSION_FLAGS /* Define if your system has a usable . */ @@ -63,26 +63,27 @@ /* Define the DCMTK default path. */ #undef DCMTK_PREFIX -/* Define if iconv_open() accepts "" as an argument */ +/* Define if iconv_open() accepts "" as an argument. */ #undef DCMTK_STDLIBC_ICONV_HAS_DEFAULT_ENCODING +/* Define the type of default dictionary that we want to use: Do not load any + default dictionary on startup (0), load builtin dictionary on startup (1), + or load external (i.e. file-based) dictionary on startup (2). */ +#undef DCM_DICT_DEFAULT + /* Define the default data dictionary path for the dcmdata library package. */ #undef DCM_DICT_DEFAULT_PATH +/* Define whether dictionaries defined through DCMDICTPATH environment + variable should be loaded. */ +#undef DCM_DICT_USE_DCMDICTPATH + /* Define the default directory where configuration files reside. */ #undef DEFAULT_CONFIGURATION_DIR /* Define the default directory where support data files reside. */ #undef DEFAULT_SUPPORT_DATA_DIR -/* Define if we are compiling with built-in (compiled-in) dictionary enabled. - */ -#undef ENABLE_BUILTIN_DICTIONARY - -/* Define if we are compiling for loading external dictionary from default - path. */ -#undef ENABLE_EXTERNAL_DICTIONARY - /* Define if we are compiling for enabling external private tag dictionary. */ #undef ENABLE_PRIVATE_TAGS @@ -124,14 +125,11 @@ /* Define to 1 if you have the `bind' function. */ #undef HAVE_BIND -/* Define to 1 if you have the `bzero' function. */ -#undef HAVE_BZERO - /* Define to 1 if the system has the type `char16_t'. */ #undef HAVE_CHAR16_T /* Define if your system declares the return type of strerror_r as char * - instead of int */ + instead of int. */ #undef HAVE_CHARP_STRERROR_R /* Define if your C++ compiler can work with class templates. */ @@ -170,10 +168,10 @@ /* Define to 1 if you have the `cuserid' function. */ #undef HAVE_CUSERID -/* define if the compiler supports basic C++11 syntax */ +/* Define if the compiler supports basic C++11 syntax. */ #undef HAVE_CXX11 -/* Define if volatile is a known keyword */ +/* Define if volatile is a known keyword. */ #undef HAVE_CXX_VOLATILE /* Define if "const" is supported by the C compiler. */ @@ -184,7 +182,7 @@ #undef HAVE_DECLARATION_SOCKLEN_T /* Define if your system has a declaration for std::ios_base::openmode in - iostream.h. */ + iostream. */ #undef HAVE_DECLARATION_STD__IOS_BASE__OPENMODE /* Define if your system has a declaration for struct utimbuf in sys/types.h @@ -377,7 +375,7 @@ /* Define to 1 if you have the header file. */ #undef HAVE_IOSTREAM_H -/* Define if your system defines ios::nocreate in iostream.h */ +/* Define if your system defines ios::nocreate in iostream.h. */ #undef HAVE_IOS_NOCREATE /* Define to 1 if you have the header file. */ @@ -497,7 +495,7 @@ /* Define to 1 if you have the header file. */ #undef HAVE_NEW_H -/* Define if the compiler supports operator delete (std::nothrow.) */ +/* Define if the compiler supports operator delete (std::nothrow). */ #undef HAVE_NOTHROW_DELETE /* Define `pid_t' to `int' if does not define. */ @@ -563,6 +561,169 @@ arguments. */ #undef HAVE_OLD_READDIR_R +/* Define to 1 if you have the header file. */ +#undef HAVE_OPENSSL_ASN1_H + +/* Define if OpenSSL provides the new typedef EVP_MD_CTX defined as struct + evp_md_ctx_st. */ +#undef HAVE_OPENSSL_DECLARATION_NEW_EVP_MD_CTX + +/* Define to 1 if you have the header file. */ +#undef HAVE_OPENSSL_DH_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_OPENSSL_EVP_H + +/* Define if OpenSSL provides a prototype for ASN1_STRING_get0_data in + . */ +#undef HAVE_OPENSSL_PROTOTYPE_ASN1_STRING_GET0_DATA + +/* Define if OpenSSL provides a prototype for DH_bits in . */ +#undef HAVE_OPENSSL_PROTOTYPE_DH_BITS + +/* Define if OpenSSL provides a prototype for EVP_PKEY_base_id in + . */ +#undef HAVE_OPENSSL_PROTOTYPE_EVP_PKEY_BASE_ID + +/* Define if OpenSSL provides a prototype for EVP_PKEY_get0_EC_KEY in + . */ +#undef HAVE_OPENSSL_PROTOTYPE_EVP_PKEY_GET0_EC_KEY + +/* Define if OpenSSL provides a prototype for EVP_PKEY_get_group_name in + . */ +#undef HAVE_OPENSSL_PROTOTYPE_EVP_PKEY_GET_GROUP_NAME + +/* Define if OpenSSL provides a prototype for EVP_PKEY_id in . + */ +#undef HAVE_OPENSSL_PROTOTYPE_EVP_PKEY_ID + +/* Define if OpenSSL provides a prototype for EVP_PKEY_RSA_PSS in + . */ +#undef HAVE_OPENSSL_PROTOTYPE_EVP_PKEY_RSA_PSS + +/* Define if OpenSSL provides a prototype for OSSL_PROVIDER_load in + . */ +#undef HAVE_OPENSSL_PROTOTYPE_OSSL_PROVIDER_LOAD + +/* Define if OpenSSL provides a prototype for RAND_egd in . */ +#undef HAVE_OPENSSL_PROTOTYPE_RAND_EGD + +/* Define if OpenSSL provides a prototype for SSL_CTX_get0_param in + . */ +#undef HAVE_OPENSSL_PROTOTYPE_SSL_CTX_GET0_PARAM + +/* Define if OpenSSL provides a prototype for SSL_CTX_get_cert_store in + . */ +#undef HAVE_OPENSSL_PROTOTYPE_SSL_CTX_GET_CERT_STORE + +/* Define if OpenSSL provides a prototype for SSL_CTX_get_ciphers in + . */ +#undef HAVE_OPENSSL_PROTOTYPE_SSL_CTX_GET_CIPHERS + +/* Define if OpenSSL provides a prototype for SSL_CTX_set0_tmp_dh_pkey in + . */ +#undef HAVE_OPENSSL_PROTOTYPE_SSL_CTX_SET0_TMP_DH_PKEY + +/* Define if OpenSSL provides a prototype for SSL_CTX_set1_curves in + . */ +#undef HAVE_OPENSSL_PROTOTYPE_SSL_CTX_SET1_CURVES + +/* Define if OpenSSL provides a prototype for SSL_CTX_set1_sigalgs in + . */ +#undef HAVE_OPENSSL_PROTOTYPE_SSL_CTX_SET1_SIGALGS + +/* Define if OpenSSL provides a prototype for SSL_CTX_set_ecdh_auto in + . */ +#undef HAVE_OPENSSL_PROTOTYPE_SSL_CTX_SET_ECDH_AUTO + +/* Define if OpenSSL provides a prototype for SSL_CTX_set_max_proto_version in + . */ +#undef HAVE_OPENSSL_PROTOTYPE_SSL_CTX_SET_MAX_PROTO_VERSION + +/* Define if OpenSSL provides a prototype for SSL_CTX_set_security_level in + . */ +#undef HAVE_OPENSSL_PROTOTYPE_SSL_CTX_SET_SECURITY_LEVEL + +/* Define if OpenSSL provides a prototype for SSL_ERROR_WANT_ASYNC in + . */ +#undef HAVE_OPENSSL_PROTOTYPE_SSL_ERROR_WANT_ASYNC + +/* Define if OpenSSL provides a prototype for SSL_ERROR_WANT_ASYNC_JOB in + . */ +#undef HAVE_OPENSSL_PROTOTYPE_SSL_ERROR_WANT_ASYNC_JOB + +/* Define if OpenSSL provides a prototype for SSL_ERROR_WANT_CLIENT_HELLO_CB + in . */ +#undef HAVE_OPENSSL_PROTOTYPE_SSL_ERROR_WANT_CLIENT_HELLO_CB + +/* Define if OpenSSL provides a prototype for + TLS1_TXT_ECDHE_RSA_WITH_CHACHA20_POLY1305 in . */ +#undef HAVE_OPENSSL_PROTOTYPE_TLS1_TXT_ECDHE_RSA_WITH_CHACHA20_POLY1305 + +/* Define if OpenSSL provides a prototype for TLS_method in . + */ +#undef HAVE_OPENSSL_PROTOTYPE_TLS_METHOD + +/* Define if OpenSSL provides a prototype for TS_STATUS_INFO_get0_failure_info + in . */ +#undef HAVE_OPENSSL_PROTOTYPE_TS_STATUS_INFO_GET0_FAILURE_INFO + +/* Define if OpenSSL provides a prototype for TS_STATUS_INFO_get0_status in + . */ +#undef HAVE_OPENSSL_PROTOTYPE_TS_STATUS_INFO_GET0_STATUS + +/* Define if OpenSSL provides a prototype for TS_STATUS_INFO_get0_text in + . */ +#undef HAVE_OPENSSL_PROTOTYPE_TS_STATUS_INFO_GET0_TEXT + +/* Define if OpenSSL provides a prototype for TS_VERIFY_CTS_set_certs in + . */ +#undef HAVE_OPENSSL_PROTOTYPE_TS_VERIFY_CTS_SET_CERTS + +/* Define if OpenSSL provides a prototype for TS_VERIFY_CTX_set_data in + . */ +#undef HAVE_OPENSSL_PROTOTYPE_TS_VERIFY_CTX_SET_DATA + +/* Define if OpenSSL provides a prototype for TS_VERIFY_CTX_set_flags in + . */ +#undef HAVE_OPENSSL_PROTOTYPE_TS_VERIFY_CTX_SET_FLAGS + +/* Define if OpenSSL provides a prototype for TS_VERIFY_CTX_set_store in + . */ +#undef HAVE_OPENSSL_PROTOTYPE_TS_VERIFY_CTX_SET_STORE + +/* Define if OpenSSL provides a prototype for X509_get0_notAfter in + . */ +#undef HAVE_OPENSSL_PROTOTYPE_X509_GET0_NOTAFTER + +/* Define if OpenSSL provides a prototype for X509_get0_notBefore in + . */ +#undef HAVE_OPENSSL_PROTOTYPE_X509_GET0_NOTBEFORE + +/* Define if OpenSSL provides a prototype for X509_get_signature_nid in + . */ +#undef HAVE_OPENSSL_PROTOTYPE_X509_GET_SIGNATURE_NID + +/* Define if OpenSSL provides a prototype for X509_STORE_get0_param in + . */ +#undef HAVE_OPENSSL_PROTOTYPE_X509_STORE_GET0_PARAM + +/* Define to 1 if you have the header file. */ +#undef HAVE_OPENSSL_PROVIDER_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_OPENSSL_SSL_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_OPENSSL_TS_H + +/* Define if OpenSSL provides the X509_ALGOR_get0() function that expects a + const pointer as first parameter. */ +#undef HAVE_OPENSSL_X509_ALGOR_GET0_CONST_PARAM + +/* Define to 1 if you have the header file. */ +#undef HAVE_OPENSSL_X509_H + /* Define if the output iterator category is supported. */ #undef HAVE_OUTPUT_ITERATOR_CATEGORY @@ -572,7 +733,7 @@ /* Define to 1 if you have the `pclose' function. */ #undef HAVE_PCLOSE -/* Define if pthread_t is a pointer type on your system */ +/* Define if pthread_t is a pointer type on your system. */ #undef HAVE_POINTER_TYPE_PTHREAD_T /* Define to 1 if you have the `popen' function. */ @@ -586,10 +747,6 @@ */ #undef HAVE_PROTOTYPE_BIND -/* Define if your system has a prototype for bzero in string.h strings.h - libc.h unistd.h stdlib.h. */ -#undef HAVE_PROTOTYPE_BZERO - /* Define if your system has a prototype for connect in sys/types.h sys/socket.h. */ #undef HAVE_PROTOTYPE_CONNECT @@ -674,12 +831,12 @@ /* Define if your system has a prototype for std::isnan in cmath. */ #undef HAVE_PROTOTYPE_STD__ISNAN -/* Define if your system has a prototype for std::vfprintf in stdarg.h - stdio.h. */ +/* Define if your system has a prototype for std::vfprintf in cstdarg cstdio. + */ #undef HAVE_PROTOTYPE_STD__VFPRINTF -/* Define if your system has a prototype for std::vsnprintf in stdarg.h - stdio.h. */ +/* Define if your system has a prototype for std::vsnprintf in cstdarg cstdio. + */ #undef HAVE_PROTOTYPE_STD__VSNPRINTF /* Define if your system has a prototype for strcasecmp in string.h. */ @@ -721,9 +878,6 @@ /* Define if the random_access iterator category is supported. */ #undef HAVE_RANDOM_ACCESS_ITERATOR_CATEGORY -/* 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 @@ -760,9 +914,6 @@ /* Define to 1 if you have the `socket' function. */ #undef HAVE_SOCKET -/* Define if OpenSSL provides the SSL_CTX_get0_param function. */ -#undef HAVE_SSL_CTX_GET0_PARAM - /* Define to 1 if you have the header file. */ #undef HAVE_SSTREAM @@ -772,7 +923,7 @@ /* Define to 1 if you have the `stat' function. */ #undef HAVE_STAT -/* Define if the compiler supports static_assert */ +/* Define if the compiler supports static_assert. */ #undef HAVE_STATIC_ASSERT /* Define if the compiler supports static_cast<>. */ @@ -964,7 +1115,7 @@ /* Define to 1 if you have the `tmpnam' function. */ #undef HAVE_TMPNAM -/* Define if the compiler recognizes typename. */ +/* Define if typename is a known keyword. */ #undef HAVE_TYPENAME /* Define to 1 if the system has the type `uint64_t'. */ @@ -991,7 +1142,7 @@ /* Define to 1 if you have the header file. */ #undef HAVE_UTIME_H -/* Define if variable-length arrays are supported in C */ +/* Define if variable-length arrays are supported in C. */ #undef HAVE_VLA /* Define to 1 if you have the `vprintf' function. */ @@ -1028,7 +1179,7 @@ /* Define if the compiler supports __func__. */ #undef HAVE___func___MACRO -/* Define if libc.h should be treated as a C++ header */ +/* Define if libc.h should be treated as a C++ header. */ #undef INCLUDE_LIBC_H_AS_CXX /* Define if fails if included extern "C". */ @@ -1097,15 +1248,12 @@ /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS -/* Namespace for ANSI C functions in standard C++ headers */ +/* Namespace for ANSI C functions in standard C++ headers. */ #undef STDIO_NAMESPACE /* Define to 1 if your declares `struct tm'. */ #undef TM_IN_SYS_TIME -/* Define if ANSI standard C++ includes are used. */ -#undef USE_STD_CXX_INCLUDES - /* Enable extensions on AIX 3, Interix. */ #ifndef _ALL_SOURCE # undef _ALL_SOURCE @@ -1167,7 +1315,7 @@ /* Number of bits in a file offset, on hosts where this is settable. */ #undef _FILE_OFFSET_BITS -/* Define to enable LFS64 (explicit large file support) if available */ +/* Define to enable LFS64 (explicit large file support) if available. */ #undef _LARGEFILE64_SOURCE /* Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */ diff -Nru dcmtk-3.6.6/config/math.cc dcmtk-3.6.7/config/math.cc --- dcmtk-3.6.6/config/math.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/config/math.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2015-2016, OFFIS e.V. + * Copyright (C) 2015-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -23,11 +23,19 @@ #include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ -#define INCLUDE_CMATH -#define INCLUDE_CFLOAT -#define INCLUDE_IOSTREAM -#include "dcmtk/ofstd/ofstdinc.h" +#include +#include +#include +#include +#include +#include + #include "dcmtk/ofstd/oftypes.h" +#include "dcmtk/ofstd/ofstream.h" + +#ifdef HAVE_IEEEFP_H +#include +#endif #ifdef HAVE_WINDOWS_H #define WIN32_LEAN_AND_MEAN diff -Nru dcmtk-3.6.6/config/stdcxx.m4 dcmtk-3.6.7/config/stdcxx.m4 --- dcmtk-3.6.6/config/stdcxx.m4 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/config/stdcxx.m4 2022-04-28 13:47:25.000000000 +0000 @@ -134,8 +134,8 @@ 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]) + AC_DEFINE(HAVE_CXX$1, 1, + [Define if the compiler supports basic C++$1 syntax.]) fi AC_SUBST(HAVE_CXX$1) ]) @@ -977,4 +977,4 @@ #endif // __cplusplus <= 201402L -]]) \ No newline at end of file +]]) diff -Nru dcmtk-3.6.6/config/tests/arith.cc dcmtk-3.6.7/config/tests/arith.cc --- dcmtk-3.6.6/config/tests/arith.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/config/tests/arith.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2014-2019, OFFIS e.V. + * Copyright (C) 2014-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -23,10 +23,6 @@ // although it is part of configure testing itself. // Therefore, ensure osconfig.h has already been generated // before this program is used. -#define INCLUDE_CLIMITS -#define INCLUDE_CMATH -#define INCLUDE_CSETJMP -#define INCLUDE_CSIGNAL #include "../math.cc" #ifdef HAVE_FENV_H @@ -40,7 +36,7 @@ #include #endif -#ifdef __APPLE__ +#if defined(__APPLE__) && !defined(__aarch64__) // For controlling floating point exceptions on OS X. #include #endif @@ -340,13 +336,17 @@ #ifdef HAVE_WINDOWS_H _clearfp(); _controlfp( _controlfp(0,0) & ~_EM_INVALID, _MCW_EM ); -#elif defined(__APPLE__) +#elif defined(__APPLE__) && !defined(__aarch64__) _MM_SET_EXCEPTION_MASK( _MM_GET_EXCEPTION_MASK() & ~_MM_MASK_INVALID ); #elif defined(HAVE_FENV_H) && defined(HAVE_PROTOTYPE_FEENABLEEXCEPT) feenableexcept( FE_INVALID ); #elif defined(HAVE_IEEEFP_H) && !defined(__CYGWIN__) // Cygwin unfortunately seems to have but no implementation of fgetmask/fpsetmask +#ifdef HAVE_DECLARATION_FP_EXCEPT_T + fp_except_t cw = fpgetmask(); +#else fp_except cw = fpgetmask(); +#endif #ifdef FP_X_DX // on some systems, the devide-by-zero flag is called FP_X_DX @@ -382,13 +382,17 @@ _controlfp( _controlfp(0,0) | _EM_INVALID, _MCW_EM ); #elif defined(HAVE_FENV_H) feclearexcept( FE_INVALID ); -#ifdef __APPLE__ +#if defined(__APPLE__) && !defined(__aarch64__) _MM_SET_EXCEPTION_MASK( _MM_GET_EXCEPTION_MASK() | _MM_MASK_INVALID ); #elif defined(HAVE_FENV_H) && defined(HAVE_PROTOTYPE_FEENABLEEXCEPT) fedisableexcept( FE_INVALID ); #elif defined(HAVE_IEEEFP_H) && !defined(__CYGWIN__) // Cygwin unfortunately seems to have but no implementation of fgetmask/fpsetmask +#ifdef HAVE_DECLARATION_FP_EXCEPT_T + fp_except_t cw = fpgetmask(); +#else fp_except cw = fpgetmask(); +#endif #ifdef FP_X_DX // on some systems, the devide-by-zero flag is called FP_X_DX diff -Nru dcmtk-3.6.6/COPYRIGHT dcmtk-3.6.7/COPYRIGHT --- dcmtk-3.6.6/COPYRIGHT 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/COPYRIGHT 2022-04-28 13:47:25.000000000 +0000 @@ -5,7 +5,7 @@ copyright: /* - * Copyright (C) 1994-2021, OFFIS e.V. + * Copyright (C) 1994-2022, OFFIS e.V. * All rights reserved. * * This software and supporting documentation were developed by @@ -501,8 +501,8 @@ --------------------------------------------------------------------------- -Copyright (C) 2008-2012, OFFIS e.V. and ICSMED AG, Oldenburg, Germany -Copyright (C) 2013-2021, J. Riesmeier, Oldenburg, Germany +Copyright (C) 2008-2022, OFFIS e.V. and ICSMED AG, Oldenburg, Germany +Copyright (C) 2013-2022, J. Riesmeier, Oldenburg, Germany All rights reserved. Redistribution and use in source and binary forms, with or without @@ -537,7 +537,7 @@ --------------------------------------------------------------------------- -Copyright (C) 2015-2021, J. Riesmeier, Oldenburg, Germany +Copyright (C) 2015-2022, J. Riesmeier, Oldenburg, Germany All rights reserved. Redistribution and use in source and binary forms, with or without diff -Nru dcmtk-3.6.6/CREDITS dcmtk-3.6.7/CREDITS --- dcmtk-3.6.6/CREDITS 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/CREDITS 2022-04-28 13:47:25.000000000 +0000 @@ -5,7 +5,7 @@ (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 +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). @@ -43,6 +43,10 @@ Cancer Research (ITCR) initiative to the Quantitative Image Informatics for Cancer Research (QIICR) project, award U24 CA180918. +Segmed: The support for reading DICOM files or datasets from stdin and writing + DICOM files or datasets to stdout was contributed by Jasper den Otter and + W. Adam Koszek of Segmed, Inc. (Palo Alto, CA, United States). + SlicerDMRI: The work on DCMTK Tractography modules was supported in part by funding from the National Institutes of Health National Institute of Biomedical Imaging and Bioengineering (NIBIB), to project Neuroimage Analysis @@ -61,4 +65,4 @@ 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, 2021-01-14 +DCMTK Team, 2022-02-08 diff -Nru dcmtk-3.6.6/dcmdata/apps/CMakeLists.txt dcmtk-3.6.7/dcmdata/apps/CMakeLists.txt --- dcmtk-3.6.6/dcmdata/apps/CMakeLists.txt 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/apps/CMakeLists.txt 2022-04-28 13:47:25.000000000 +0000 @@ -3,9 +3,12 @@ # declare executables foreach(PROGRAM dcm2xml dcmconv dcmcrle dcmdrle dcmdump dcmftest dcmgpdir dump2dcm xml2dcm stl2dcm pdf2dcm dcm2pdf img2dcm dcm2json cda2dcm) - DCMTK_ADD_EXECUTABLE(${PROGRAM} ${PROGRAM}) + DCMTK_ADD_EXECUTABLE(${PROGRAM} ${PROGRAM}.cc) endforeach() -DCMTK_ADD_EXECUTABLE(dcmodify dcmodify mdfconen mdfdsman) +DCMTK_ADD_EXECUTABLE(dcmodify + dcmodify.cc + mdfconen.cc + mdfdsman.cc) # make sure executables are linked to the corresponding libraries foreach(PROGRAM dcm2xml dcmconv dcmcrle dcmdrle dcmdump dcmgpdir dcmodify dump2dcm xml2dcm stl2dcm pdf2dcm dcm2pdf img2dcm dcm2json cda2dcm) @@ -13,5 +16,4 @@ endforeach() DCMTK_TARGET_LINK_MODULES(dcmftest ofstd) -DCMTK_TARGET_LINK_LIBRARIES(xml2dcm ${LIBXML_LIBS}) DCMTK_TARGET_LINK_MODULES(img2dcm i2d dcmdata) diff -Nru dcmtk-3.6.6/dcmdata/apps/dcm2json.cc dcmtk-3.6.7/dcmdata/apps/dcm2json.cc --- dcmtk-3.6.6/dcmdata/apps/dcm2json.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/apps/dcm2json.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * -* Copyright (C) 2016-2020, OFFIS e.V. +* Copyright (C) 2016-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -239,8 +239,24 @@ OFString csetString; if (dset->findAndGetOFStringArray(DCM_SpecificCharacterSet, csetString).good()) { - if (csetString.compare("ISO_IR 192") != 0 && csetString.compare("ISO_IR 6") != 0) + if (csetString.compare("ISO_IR 6") == 0) { + /* SpecificCharacterSet indicates ASCII without extended characters. + * If this is true, no conversion is necessary. Check for extended characters. + */ + if (dset->containsExtendedCharacters(OFFalse /*checkAllStrings*/)) + { + OFLOG_FATAL(dcm2jsonLogger, "dataset contains extended characters but SpecificCharacterSet (0008,0005) is 'ISO_IR 6'"); + result = EXITCODE_CANNOT_CONVERT_TO_UNICODE; + } + } + else if (csetString.compare("ISO_IR 192") == 0) + { + /* DICOM dataset is already in UTF-8, no conversion necessary */ + } + else + { + /* we have a character set other than ASCII or UTF-8. Perform conversion. */ #ifdef DCMTK_ENABLE_CHARSET_CONVERSION /* convert all DICOM strings to UTF-8 */ OFLOG_INFO(dcm2jsonLogger, "converting all element values that are affected by SpecificCharacterSet (0008,0005) to UTF-8"); @@ -256,6 +272,16 @@ #endif } } + else + { + /* SpecificCharacterSet not present */ + if (dset->containsExtendedCharacters(OFFalse /*checkAllStrings*/)) + { + OFLOG_FATAL(dcm2jsonLogger, "dataset contains extended characters but no SpecificCharacterSet (0008,0005)"); + result = EXITCODE_CANNOT_CONVERT_TO_UNICODE; + } + } + if (result == 0) { /* if second parameter is present, it is treated as the output filename ("stdout" otherwise) */ diff -Nru dcmtk-3.6.6/dcmdata/apps/dcm2pdf.cc dcmtk-3.6.7/dcmdata/apps/dcm2pdf.cc --- dcmtk-3.6.6/dcmdata/apps/dcm2pdf.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/apps/dcm2pdf.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2007-2019, OFFIS e.V. + * Copyright (C) 2007-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -21,11 +21,6 @@ #include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ -#define INCLUDE_CSTDLIB -#define INCLUDE_CSTDIO -#define INCLUDE_CSTRING -#include "dcmtk/ofstd/ofstdinc.h" - BEGIN_EXTERN_C #ifdef HAVE_FCNTL_H #include /* for O_RDONLY */ diff -Nru dcmtk-3.6.6/dcmdata/apps/dcm2xml.cc dcmtk-3.6.7/dcmdata/apps/dcm2xml.cc --- dcmtk-3.6.6/dcmdata/apps/dcm2xml.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/apps/dcm2xml.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2002-2019, OFFIS e.V. + * Copyright (C) 2002-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -534,11 +534,16 @@ #endif if (result == 0) { - /* if second parameter is present, it is treated as the output filename ("stdout" otherwise) */ + /* if second parameter is present, it is treated as the output filename, + * unless it is "-". If the name is absent or equal to "-", write to stdout */ + const char *ofname = NULL; if (cmd.getParamCount() == 2) { - const char *ofname = NULL; cmd.getParam(2, ofname); + } + + if (ofname && (strcmp(ofname, "-") != 0)) + { STD_NAMESPACE ofstream stream(ofname); if (stream.good()) { diff -Nru dcmtk-3.6.6/dcmdata/apps/dcmconv.cc dcmtk-3.6.7/dcmdata/apps/dcmconv.cc --- dcmtk-3.6.6/dcmdata/apps/dcmconv.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/apps/dcmconv.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1994-2020, OFFIS e.V. + * Copyright (C) 1994-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -21,11 +21,6 @@ #include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ -#define INCLUDE_CSTDLIB -#define INCLUDE_CSTDIO -#define INCLUDE_CSTRING -#include "dcmtk/ofstd/ofstdinc.h" - #include "dcmtk/dcmdata/dctk.h" #include "dcmtk/dcmdata/cmdlnarg.h" #include "dcmtk/ofstd/ofconapp.h" diff -Nru dcmtk-3.6.6/dcmdata/apps/dcmcrle.cc dcmtk-3.6.7/dcmdata/apps/dcmcrle.cc --- dcmtk-3.6.6/dcmdata/apps/dcmcrle.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/apps/dcmcrle.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2002-2018, OFFIS e.V. + * Copyright (C) 2002-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -21,11 +21,6 @@ #include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ -#define INCLUDE_CSTDLIB -#define INCLUDE_CSTDIO -#define INCLUDE_CSTRING -#include "dcmtk/ofstd/ofstdinc.h" - #include "dcmtk/dcmdata/dctk.h" #include "dcmtk/dcmdata/cmdlnarg.h" #include "dcmtk/ofstd/ofconapp.h" diff -Nru dcmtk-3.6.6/dcmdata/apps/dcmdrle.cc dcmtk-3.6.7/dcmdata/apps/dcmdrle.cc --- dcmtk-3.6.6/dcmdata/apps/dcmdrle.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/apps/dcmdrle.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2002-2017, OFFIS e.V. + * Copyright (C) 2002-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -21,11 +21,6 @@ #include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ -#define INCLUDE_CSTDLIB -#define INCLUDE_CSTDIO -#define INCLUDE_CSTRING -#include "dcmtk/ofstd/ofstdinc.h" - #include "dcmtk/dcmdata/dctk.h" #include "dcmtk/dcmdata/cmdlnarg.h" #include "dcmtk/ofstd/ofconapp.h" diff -Nru dcmtk-3.6.6/dcmdata/apps/dcmdump.cc dcmtk-3.6.7/dcmdata/apps/dcmdump.cc --- dcmtk-3.6.6/dcmdata/apps/dcmdump.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/apps/dcmdump.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1994-2018, OFFIS e.V. + * Copyright (C) 1994-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -29,10 +29,6 @@ #include "dcmtk/dcmdata/dcuid.h" /* for dcmtk version name */ #include "dcmtk/dcmdata/dcistrmz.h" /* for dcmZlibExpectRFC1950Encoding */ -#define INCLUDE_CSTDLIB -#define INCLUDE_CSTRING -#include "dcmtk/ofstd/ofstdinc.h" - #ifdef WITH_ZLIB #include /* for zlibVersion() */ #endif diff -Nru dcmtk-3.6.6/dcmdata/apps/dcmftest.cc dcmtk-3.6.7/dcmdata/apps/dcmftest.cc --- dcmtk-3.6.6/dcmdata/apps/dcmftest.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/apps/dcmftest.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1994-2012, OFFIS e.V. + * Copyright (C) 1994-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -21,13 +21,6 @@ #include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ -#define INCLUDE_CSTDLIB -#define INCLUDE_CSTDIO -#define INCLUDE_CSTRING -#define INCLUDE_LIBC -#define INCLUDE_UNISTD -#include "dcmtk/ofstd/ofstdinc.h" - #include "dcmtk/dcmdata/dcmetinf.h" #include "dcmtk/ofstd/ofconapp.h" #include "dcmtk/dcmdata/dcuid.h" /* for dcmtk version name */ diff -Nru dcmtk-3.6.6/dcmdata/apps/dump2dcm.cc dcmtk-3.6.7/dcmdata/apps/dump2dcm.cc --- dcmtk-3.6.6/dcmdata/apps/dump2dcm.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/apps/dump2dcm.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1994-2020, OFFIS e.V. + * Copyright (C) 1994-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -79,11 +79,6 @@ // if defined, use createValueFromTempFile() for large binary data files //#define EXPERIMENTAL_READ_FROM_FILE -#define INCLUDE_CSTDLIB -#define INCLUDE_CSTDIO -#define INCLUDE_CCTYPE -#include "dcmtk/ofstd/ofstdinc.h" - #ifdef HAVE_SYS_TYPES_H #include #endif diff -Nru dcmtk-3.6.6/dcmdata/apps/img2dcm.cc dcmtk-3.6.7/dcmdata/apps/img2dcm.cc --- dcmtk-3.6.6/dcmdata/apps/img2dcm.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/apps/img2dcm.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2007-2020, OFFIS e.V. + * Copyright (C) 2007-2022, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -32,6 +32,8 @@ #include "dcmtk/dcmdata/libi2d/i2dplsc.h" #include "dcmtk/dcmdata/libi2d/i2dplvlp.h" #include "dcmtk/dcmdata/libi2d/i2dplnsc.h" +#include "dcmtk/dcmdata/libi2d/i2dplop.h" +#include "dcmtk/dcmdata/xml2dcm.h" #define OFFIS_CONSOLE_APPLICATION "img2dcm" static char rcsid[] = "$dcmtk: " OFFIS_CONSOLE_APPLICATION " v" OFFIS_DCMTK_VERSION " " OFFIS_DCMTK_RELEASEDATE " $"; @@ -39,22 +41,56 @@ #define SHORTCOL 4 #define LONGCOL 21 +enum InputFormat +{ + InputFormatJPEG, + InputFormatBMP +}; + static OFLogger img2dcmLogger = OFLog::getLogger("dcmtk.apps." OFFIS_CONSOLE_APPLICATION); -static OFCondition evaluateFromFileOptions(OFCommandLine& cmd, - Image2Dcm& converter) +static OFCondition evaluateFromFileOptions( +#ifdef WITH_LIBXML + OFConsoleApplication& app, +#else + OFConsoleApplication& /* app */, +#endif + OFCommandLine& cmd, + Image2Dcm& converter) { OFCondition cond; +#ifdef WITH_LIBXML + OFBool dataset_from = OFFalse; +#endif + // Parse command line options dealing with DICOM file import if ( cmd.findOption("--dataset-from") ) { +#ifdef WITH_LIBXML + dataset_from = OFTrue; +#endif + OFString tempStr; + OFCommandLine::E_ValueStatus valStatus; + valStatus = cmd.getValue(tempStr); + if (valStatus != OFCommandLine::VS_Normal) + return makeOFCondition(OFM_dcmdata, 18, OF_error, "Unable to read value of --dataset-from option"); + converter.setTemplateFile(tempStr); + converter.setTemplateFileIsXML(OFFalse); + } + +#ifdef WITH_LIBXML + if ( cmd.findOption("--dataset-from-xml") ) + { + app.checkConflict("--dataset-from-xml", "--dataset-from", dataset_from); OFString tempStr; OFCommandLine::E_ValueStatus valStatus; valStatus = cmd.getValue(tempStr); if (valStatus != OFCommandLine::VS_Normal) return makeOFCondition(OFM_dcmdata, 18, OF_error, "Unable to read value of --dataset-from option"); converter.setTemplateFile(tempStr); + converter.setTemplateFileIsXML(OFTrue); } +#endif if (cmd.findOption("--study-from")) { @@ -86,7 +122,7 @@ static void addCmdLineOptions(OFCommandLine& cmd) { - cmd.addParam("imgfile-in", "image input filename"); + cmd.addParam("imgfile-in", "image input filename", OFCmdParam::PM_MultiMandatory); cmd.addParam("dcmfile-out", "DICOM output filename"); cmd.addGroup("general options:", LONGCOL, SHORTCOL + 2); @@ -96,10 +132,14 @@ cmd.addGroup("input options:", LONGCOL, SHORTCOL + 2); cmd.addSubGroup("general:"); - cmd.addOption("--input-format", "-i", 1, "[i]nput file format: string", "supported formats: JPEG (default), BMP"); + cmd.addOption("--input-format", "-i", 1, "[i]nput file format: string", + "supported formats: JPEG (default), BMP"); cmd.addOption("--dataset-from", "-df", 1, "[f]ilename: string", "use dataset from DICOM file f"); - +#ifdef WITH_LIBXML + cmd.addOption("--dataset-from-xml", "-dx", 1, "[f]ilename: string", + "use dataset from XML file f"); +#endif cmd.addOption("--study-from", "-stf", 1, "[f]ilename: string", "read patient/study from DICOM file f"); cmd.addOption("--series-from", "-sef", 1, "[f]ilename: string", @@ -110,6 +150,12 @@ cmd.addOption("--disable-ext", "-de", "disable support for extended sequential JPEG"); cmd.addOption("--insist-on-jfif", "-jf", "insist on JFIF header"); cmd.addOption("--keep-appn", "-ka", "keep APPn sections (except JFIF)"); + cmd.addOption("--remove-com", "-rc", "remove COM segment"); +#ifdef WITH_LIBXML + cmd.addSubGroup("XML validation:"); + cmd.addOption("--validate-document", "+Vd", "validate XML document against DTD"); + cmd.addOption("--check-namespace", "+Vn", "check XML namespace in document root"); +#endif cmd.addGroup("processing options:", LONGCOL, SHORTCOL + 2); cmd.addSubGroup("attribute checking:"); @@ -119,9 +165,9 @@ cmd.addOption("--no-type2-insert", "-i2", "do not insert missing type 2 attributes \n(only with --do-checks)"); cmd.addOption("--invent-type1", "+i1", "invent missing type 1 attributes (default)\n(only with --do-checks)"); cmd.addOption("--no-type1-invent", "-i1", "do not invent missing type 1 attributes\n(only with --do-checks)"); - cmd.addSubGroup("character set:"); - cmd.addOption("--latin1", "+l1", "set latin-1 as standard character set (default)"); - cmd.addOption("--no-latin1", "-l1", "keep 7-bit ASCII as standard character set"); + cmd.addSubGroup("character set conversion of study/series file:"); + cmd.addOption("--transliterate", "-Ct", "try to approximate characters that cannot be\nrepresented through similar looking characters"); + cmd.addOption("--discard-illegal", "-Cd", "discard characters that cannot be represented\nin destination character set"); cmd.addSubGroup("other processing options:"); cmd.addOption("--key", "-k", 1, "[k]ey: gggg,eeee=\"str\", path or dict. name=\"str\"", "add further attribute"); @@ -131,6 +177,7 @@ cmd.addOption("--sec-capture", "-sc", "write Secondary Capture SOP class (default)"); cmd.addOption("--new-sc", "-nsc", "write new Secondary Capture SOP classes"); cmd.addOption("--vl-photo", "-vlp", "write Visible Light Photographic SOP class"); + cmd.addOption("--oph-photo", "-oph", "write Ophthalmic Photography SOP classes"); cmd.addSubGroup("output file format:"); cmd.addOption("--write-file", "+F", "write file format (default)"); @@ -149,25 +196,23 @@ } -static OFCondition startConversion(OFCommandLine& cmd, - int argc, - char *argv[]) +static I2DImgSource *createInputPlugin(InputFormat ifrm) { - // Parse command line and exclusive options - prepareCmdLineArgs(argc, argv, OFFIS_CONSOLE_APPLICATION); - OFConsoleApplication app(OFFIS_CONSOLE_APPLICATION, "Convert standard image formats into DICOM format", rcsid); - if (app.parseCommandLine(cmd, argc, argv)) + switch (ifrm) { - /* check exclusive options first */ - if (cmd.hasExclusiveOption()) - { - if (cmd.findOption("--version")) - { - app.printHeader(OFTrue /*print host identifier*/); - exit(0); - } - } + case InputFormatBMP: + return new I2DBmpSource(); + case InputFormatJPEG: + default: + return new I2DJpegSource(); } +} + + +static OFCondition startConversion( + OFConsoleApplication& app, + OFCommandLine& cmd) +{ /* print resource identifier */ OFLOG_DEBUG(img2dcmLogger, rcsid << OFendl); @@ -194,72 +239,83 @@ OFList overrideKeys; // The transfer syntax proposed to be written by output plugin E_TransferSyntax writeXfer; + // the input file format + InputFormat inForm = InputFormatJPEG; // Parse rest of command line options OFLog::configureFromCommandLine(cmd, app); - OFString pixDataFile, outputFile, tempStr; - cmd.getParam(1, tempStr); - - if (tempStr.empty()) + // create list of input files + OFString paramValue; + OFString outputFile; + OFList inputFiles; + const int paramCount = cmd.getParamCount(); + for (int i = 1; i < paramCount; i++) { - OFLOG_ERROR(img2dcmLogger, "No image input filename specified"); - return EC_IllegalCall; + cmd.getParam(i, paramValue); + inputFiles.push_back(paramValue); } - else - pixDataFile = tempStr; - cmd.getParam(2, tempStr); - if (tempStr.empty()) - { - OFLOG_ERROR(img2dcmLogger, "No DICOM output filename specified"); - return EC_IllegalCall; - } - else - outputFile = tempStr; + // get output filename + cmd.getParam(paramCount, outputFile); + OFString tempStr; if (cmd.findOption("--input-format")) { app.checkValue(cmd.getValue(tempStr)); if (tempStr == "JPEG") { - inputPlug = new I2DJpegSource(); + inForm = InputFormatJPEG; } else if (tempStr == "BMP") { - inputPlug = new I2DBmpSource(); + inForm = InputFormatBMP; } else { return makeOFCondition(OFM_dcmdata, 18, OF_error, "No plugin for selected input format available"); } - if (!inputPlug) - { - return EC_MemoryExhausted; - } - } - else // default is JPEG - { - inputPlug = new I2DJpegSource(); } + + inputPlug = createInputPlugin(inForm); OFLOG_INFO(img2dcmLogger, OFFIS_CONSOLE_APPLICATION ": Instantiated input plugin: " << inputPlug->inputFormat()); - // Find out which plugin to use + // Find out which output plugin to use cmd.beginOptionBlock(); if (cmd.findOption("--sec-capture")) + { outPlug = new I2DOutputPlugSC(); + } + if (cmd.findOption("--new-sc")) + { + outPlug = new I2DOutputPlugNewSC(); + } if (cmd.findOption("--vl-photo")) { outPlug = new I2DOutputPlugVLP(); } - if (cmd.findOption("--new-sc")) - outPlug = new I2DOutputPlugNewSC(); + if (cmd.findOption("--oph-photo")) + { + outPlug = new I2DOutputPlugOphthalmicPhotography(); + } + cmd.endOptionBlock(); if (!outPlug) // default is the old Secondary Capture object outPlug = new I2DOutputPlugSC(); if (outPlug == NULL) return EC_MemoryExhausted; OFLOG_INFO(img2dcmLogger, OFFIS_CONSOLE_APPLICATION ": Instantiated output plugin: " << outPlug->ident()); + if (inputFiles.size() > 1) + { + // check if the output format supports multiframe + if (! outPlug->supportsMultiframe()) + { + OFLOG_ERROR(img2dcmLogger, outPlug->ident() << " does not support multiframe images"); + delete outPlug; + return EC_SOPClassMismatch; + } + } + cmd.beginOptionBlock(); if (cmd.findOption("--write-file")) writeMode = EWM_fileformat; if (cmd.findOption("--write-dataset")) writeMode = EWM_dataset; @@ -303,15 +359,12 @@ } i2d.setOverrideKeys(overrideKeys); - // Test for ISO Latin 1 option - OFBool insertLatin1 = OFTrue; - cmd.beginOptionBlock(); - if (cmd.findOption("--latin1")) - insertLatin1 = OFTrue; - if (cmd.findOption("--no-latin1")) - insertLatin1 = OFFalse; - cmd.endOptionBlock(); - i2d.setISOLatin1(insertLatin1); + size_t conversionFlags = 0; + if (cmd.findOption("--transliterate")) + conversionFlags |= DCMTypes::CF_transliterate; + if (cmd.findOption("--discard-illegal")) + conversionFlags |= DCMTypes::CF_discardIllegal; + i2d.setConversionFlags(conversionFlags); // evaluate validity checking options OFBool insertType2 = OFTrue; @@ -340,9 +393,25 @@ i2d.setValidityChecking(doChecks, insertType2, inventType1); outPlug->setValidityChecking(doChecks, insertType2, inventType1); +#ifdef WITH_LIBXML + // evaluate XML parsing options + if (cmd.findOption("--validate-document")) + { + app.checkDependence("--validate-document", "--dataset-from-xml", cmd.findOption("--dataset-from-xml")); + i2d.setXMLvalidation(OFTrue); + } else i2d.setXMLvalidation(OFFalse); + + if (cmd.findOption("--check-namespace")) + { + app.checkDependence("--check-namespace", "--dataset-from-xml", cmd.findOption("--dataset-from-xml")); + i2d.setXMLnamespaceCheck(OFTrue); + } + else i2d.setXMLnamespaceCheck(OFFalse); +#endif + // evaluate --xxx-from options and transfer syntax options OFCondition cond; - cond = evaluateFromFileOptions(cmd, i2d); + cond = evaluateFromFileOptions(app, cmd, i2d); if (cond.bad()) { delete outPlug; outPlug = NULL; @@ -367,8 +436,9 @@ jpgSource->setInsistOnJFIF(OFTrue); if ( cmd.findOption("--keep-appn") ) jpgSource->setKeepAPPn(OFTrue); + if ( cmd.findOption("--remove-com") ) + jpgSource->setKeepCOM(OFFalse); } - inputPlug->setImageFile(pixDataFile); /* make sure data dictionary is loaded */ if (!dcmDataDict.isDictionaryLoaded()) @@ -379,14 +449,36 @@ DcmDataset *resultObject = NULL; OFLOG_INFO(img2dcmLogger, OFFIS_CONSOLE_APPLICATION ": Starting image conversion"); - cond = i2d.convert(inputPlug, outPlug, resultObject, writeXfer); + + OFListIterator(OFString) if_iter = inputFiles.begin(); + OFListIterator(OFString) if_last = inputFiles.end(); + + inputPlug->setImageFile(*if_iter++); // we are guaranteed to have at least one input file + cond = i2d.convertFirstFrame(inputPlug, outPlug, inputFiles.size(), resultObject, writeXfer); + size_t frameNum = 1; + + // iterate over all extra input filenames + while (cond.good() && (if_iter != if_last)) + { + // create a new input format plugin for each file to be processed + delete inputPlug; + inputPlug = createInputPlugin(inForm); + inputPlug->setImageFile(*if_iter++); + cond = i2d.convertNextFrame(inputPlug, ++frameNum); + } + + // update offset table if image type is encapsulated + if (cond.good()) cond = i2d.updateOffsetTable(); + + // update attributes related to lossy compression + if (cond.good()) cond = i2d.updateLossyCompressionInfo(inputPlug, inputFiles.size(), resultObject); // Save if (cond.good()) { OFLOG_INFO(img2dcmLogger, OFFIS_CONSOLE_APPLICATION ": Saving output DICOM to file " << outputFile); DcmFileFormat dcmff(resultObject); - cond = dcmff.saveFile(outputFile.c_str(), writeXfer, lengthEnc, grpLengthEnc, padEnc, OFstatic_cast(Uint32, filepad), OFstatic_cast(Uint32, itempad), writeMode); + cond = dcmff.saveFile(outputFile, writeXfer, lengthEnc, grpLengthEnc, padEnc, OFstatic_cast(Uint32, filepad), OFstatic_cast(Uint32, itempad), writeMode); } // Cleanup and return @@ -400,21 +492,55 @@ int main(int argc, char *argv[]) { - - // variables for command line - OFConsoleApplication app(OFFIS_CONSOLE_APPLICATION, "Convert image file to DICOM", rcsid); + // Parse command line and exclusive options + OFConsoleApplication app(OFFIS_CONSOLE_APPLICATION, "Convert standard image formats into DICOM format", rcsid); OFCommandLine cmd; cmd.setOptionColumns(LONGCOL, SHORTCOL); cmd.setParamColumn(LONGCOL + SHORTCOL + 4); addCmdLineOptions(cmd); - OFCondition cond = startConversion(cmd, argc, argv); + prepareCmdLineArgs(argc, argv, OFFIS_CONSOLE_APPLICATION); + if (app.parseCommandLine(cmd, argc, argv)) + { + /* check exclusive options first */ + if (cmd.hasExclusiveOption()) + { + if (cmd.findOption("--version")) + { + app.printHeader(OFTrue /*print host identifier*/); + +#ifdef WITH_LIBXML + COUT << OFendl << "External libraries used:" << OFendl; + COUT << "- LIBXML, Version " << LIBXML_DOTTED_VERSION << OFendl; +#if defined(LIBXML_ICONV_ENABLED) && defined(LIBXML_ZLIB_ENABLED) + COUT << " with built-in LIBICONV and ZLIB support" << OFendl; +#elif defined(LIBXML_ICONV_ENABLED) + COUT << " with built-in LIBICONV support" << OFendl; +#elif defined(LIBXML_ZLIB_ENABLED) + COUT << " with built-in ZLIB support" << OFendl; +#endif +#endif + exit(0); + } + } + } + +#ifdef WITH_LIBXML + DcmXMLParseHelper::initLibrary(); // initialize XML parser +#endif + + int result = 0; + OFCondition cond = startConversion(app, cmd); if (cond.bad()) { OFLOG_FATAL(img2dcmLogger, "Error converting file: " << cond.text()); - return 1; + result = 1; } - return 0; +#ifdef WITH_LIBXML + DcmXMLParseHelper::cleanupLibrary(); // clean up XML library before quitting +#endif + + return result; } diff -Nru dcmtk-3.6.6/dcmdata/apps/Makefile.dep dcmtk-3.6.7/dcmdata/apps/Makefile.dep --- dcmtk-3.6.6/dcmdata/apps/Makefile.dep 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/apps/Makefile.dep 2022-04-28 13:47:25.000000000 +0000 @@ -174,7 +174,6 @@ ../../ofstd/include/dcmtk/ofstd/ofexit.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 \ ../../oflog/include/dcmtk/oflog/oflog.h \ ../../oflog/include/dcmtk/oflog/logger.h \ @@ -182,6 +181,7 @@ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../oflog/include/dcmtk/oflog/config/defines.h \ ../../oflog/include/dcmtk/oflog/helpers/threadcf.h \ ../../oflog/include/dcmtk/oflog/loglevel.h \ @@ -350,7 +350,6 @@ ../../ofstd/include/dcmtk/ofstd/ofexit.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 \ ../../oflog/include/dcmtk/oflog/oflog.h \ ../../oflog/include/dcmtk/oflog/logger.h \ @@ -358,6 +357,7 @@ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../oflog/include/dcmtk/oflog/config/defines.h \ ../../oflog/include/dcmtk/oflog/helpers/threadcf.h \ ../../oflog/include/dcmtk/oflog/loglevel.h \ @@ -439,7 +439,6 @@ ../include/dcmtk/dcmdata/dcostrmz.h ../include/dcmtk/dcmdata/dcistrmz.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 \ ../../oflog/include/dcmtk/oflog/oflog.h \ ../../oflog/include/dcmtk/oflog/logger.h \ @@ -447,6 +446,7 @@ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../oflog/include/dcmtk/oflog/config/defines.h \ ../../oflog/include/dcmtk/oflog/helpers/threadcf.h \ ../../oflog/include/dcmtk/oflog/loglevel.h \ @@ -527,7 +527,6 @@ ../../ofstd/include/dcmtk/ofstd/ofexit.h \ ../include/dcmtk/dcmdata/dcrleerg.h dcmdrle.o: dcmdrle.cc ../../config/include/dcmtk/config/osconfig.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../include/dcmtk/dcmdata/dctk.h ../include/dcmtk/dcmdata/dctypes.h \ ../../oflog/include/dcmtk/oflog/oflog.h \ ../../oflog/include/dcmtk/oflog/logger.h \ @@ -535,6 +534,7 @@ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../oflog/include/dcmtk/oflog/config/defines.h \ ../../oflog/include/dcmtk/oflog/helpers/threadcf.h \ ../../oflog/include/dcmtk/oflog/loglevel.h \ @@ -616,6 +616,7 @@ ../include/dcmtk/dcmdata/dcrledrg.h dcmdump.o: dcmdump.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../include/dcmtk/dcmdata/dctk.h ../include/dcmtk/dcmdata/dctypes.h \ ../../oflog/include/dcmtk/oflog/oflog.h \ ../../oflog/include/dcmtk/oflog/logger.h \ @@ -623,7 +624,6 @@ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../oflog/include/dcmtk/oflog/config/defines.h \ ../../oflog/include/dcmtk/oflog/helpers/threadcf.h \ ../../oflog/include/dcmtk/oflog/loglevel.h \ @@ -704,13 +704,13 @@ ../include/dcmtk/dcmdata/dcistrmz.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 \ ../../ofstd/include/dcmtk/ofstd/offile.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/ofstring.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ @@ -898,13 +898,13 @@ ../include/dcmtk/dcmdata/dctagkey.h ../include/dcmtk/dcmdata/dcstack.h \ ../include/dcmtk/dcmdata/dclist.h ../include/dcmtk/dcmdata/dcpcache.h dump2dcm.o: dump2dcm.cc ../../config/include/dcmtk/config/osconfig.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.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 \ ../../ofstd/include/dcmtk/ofstd/ofstring.h \ ../../ofstd/include/dcmtk/ofstd/oftraits.h \ @@ -989,9 +989,9 @@ ../../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/ofconapp.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../../ofstd/include/dcmtk/ofstd/ofcmdln.h \ ../../ofstd/include/dcmtk/ofstd/ofexbl.h \ @@ -1047,12 +1047,14 @@ ../include/dcmtk/dcmdata/libi2d/i2define.h \ ../include/dcmtk/dcmdata/libi2d/i2dimgs.h \ ../include/dcmtk/dcmdata/dcpixel.h ../include/dcmtk/dcmdata/dcvrpobw.h \ - ../include/dcmtk/dcmdata/dcvrobow.h \ + ../include/dcmtk/dcmdata/dcvrobow.h ../include/dcmtk/dcmdata/dcofsetl.h \ ../include/dcmtk/dcmdata/libi2d/i2djpgs.h \ ../include/dcmtk/dcmdata/libi2d/i2dbmps.h \ ../include/dcmtk/dcmdata/libi2d/i2dplsc.h \ ../include/dcmtk/dcmdata/libi2d/i2dplvlp.h \ - ../include/dcmtk/dcmdata/libi2d/i2dplnsc.h + ../include/dcmtk/dcmdata/libi2d/i2dplnsc.h \ + ../include/dcmtk/dcmdata/libi2d/i2dplop.h \ + ../include/dcmtk/dcmdata/xml2dcm.h mdfconen.o: mdfconen.cc ../../config/include/dcmtk/config/osconfig.h \ mdfconen.h ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ @@ -1485,4 +1487,4 @@ ../../ofstd/include/dcmtk/ofstd/ofexbl.h \ ../../ofstd/include/dcmtk/ofstd/ofconsol.h \ ../../ofstd/include/dcmtk/ofstd/ofexit.h \ - ../include/dcmtk/dcmdata/dcostrmz.h + ../include/dcmtk/dcmdata/dcostrmz.h ../include/dcmtk/dcmdata/xml2dcm.h diff -Nru dcmtk-3.6.6/dcmdata/apps/Makefile.in dcmtk-3.6.7/dcmdata/apps/Makefile.in --- dcmtk-3.6.6/dcmdata/apps/Makefile.in 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/apps/Makefile.in 2022-04-28 13:47:25.000000000 +0000 @@ -57,7 +57,7 @@ $(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LOCALLIBS) $(LIBS) xml2dcm: xml2dcm.o - $(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(XMLLIBS) $(LOCALLIBS) $(LIBS) + $(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LOCALLIBS) $(XMLLIBS) $(LIBS) dcmodify: dcmodify.o mdfconen.o mdfdsman.o $(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o mdfconen.o mdfdsman.o $(LOCALLIBS) $(LIBS) @@ -75,7 +75,7 @@ $(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LOCALLIBS) $(LIBS) img2dcm: img2dcm.o - $(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LIBI2D) $(LOCALLIBS) $(LIBS) + $(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LIBI2D) $(LOCALLIBS) $(XMLLIBS) $(LIBS) dcm2json: dcm2json.o $(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LOCALLIBS) $(LIBS) diff -Nru dcmtk-3.6.6/dcmdata/apps/mdfconen.cc dcmtk-3.6.7/dcmdata/apps/mdfconen.cc --- dcmtk-3.6.6/dcmdata/apps/mdfconen.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/apps/mdfconen.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2003-2019, OFFIS e.V. + * Copyright (C) 2003-2020, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -541,7 +541,7 @@ { OFLOG_ERROR(dcmodifyLogger, "couldn't save file: " << result.text()); errors++; - if (!no_backup_option && !was_created) + if (!no_backup_option && !was_created && strcmp(filename, "-")) { result = restoreFile(filename); if (result.bad()) @@ -553,7 +553,7 @@ } } // errors occurred and user doesn't want to ignore them: - else if (!no_backup_option && !was_created) + else if (!no_backup_option && !was_created && strcmp(filename, "-")) { result = restoreFile(filename); if (result.bad()) @@ -589,7 +589,7 @@ // load file into dataset manager was_created = !OFStandard::fileExists(filename); result = ds_man->loadFile(filename, read_mode_option, input_xfer_option, create_if_necessary); - if (result.good() && !no_backup_option && !was_created) + if (result.good() && !no_backup_option && !was_created && strcmp(filename, "-")) result = backupFile(filename); return result; } diff -Nru dcmtk-3.6.6/dcmdata/apps/mdfdsman.cc dcmtk-3.6.7/dcmdata/apps/mdfdsman.cc --- dcmtk-3.6.6/dcmdata/apps/mdfdsman.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/apps/mdfdsman.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2003-2020, OFFIS e.V. + * Copyright (C) 2003-2022, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -19,31 +19,25 @@ * */ +#include "dcmtk/config/osconfig.h" // make sure OS specific configuration is included first -#include "dcmtk/config/osconfig.h" // make sure OS specific configuration is included first - -#include "mdfdsman.h" -#include "dcmtk/ofstd/ofstd.h" -#include "dcmtk/dcmdata/dctk.h" +#include "dcmtk/dcmdata/dcistrmf.h" /* for class DcmInputFileStream */ #include "dcmtk/dcmdata/dcpath.h" -#include "dcmtk/dcmdata/dcistrmf.h" /* for class DcmInputFileStream */ - -#define INCLUDE_CSTDIO -#include "dcmtk/ofstd/ofstdinc.h" - +#include "dcmtk/dcmdata/dctk.h" +#include "dcmtk/ofstd/ofstd.h" +#include "mdfdsman.h" static OFLogger mdfdsmanLogger = OFLog::getLogger("dcmtk.dcmdata.mdfdsman"); MdfDatasetManager::MdfDatasetManager() -: current_file(""), - dfile(NULL), - dset(NULL), - ignore_un_modifies(OFFalse) + : current_file("") + , dfile(NULL) + , dset(NULL) + , ignore_un_modifies(OFFalse) { } - -OFCondition MdfDatasetManager::loadFile(const char *file_name, +OFCondition MdfDatasetManager::loadFile(const char* file_name, const E_FileReadMode readMode, const E_TransferSyntax xfer, const OFBool createIfNecessary) @@ -52,24 +46,24 @@ // delete old dfile and free memory and reset current_file delete dfile; current_file = ""; - dfile = new DcmFileFormat(); - dset = dfile->getDataset(); + dfile = new DcmFileFormat(); + dset = dfile->getDataset(); // load file into dfile if it exists OFLOG_INFO(mdfdsmanLogger, "Loading file into dataset manager: " << file_name); - if (OFStandard::fileExists(file_name)) + if (OFStandard::fileExists(file_name) || (strcmp(file_name, "-") == 0)) { - cond = dfile->loadFile(file_name, xfer, EGL_noChange, DCM_MaxReadLength, readMode); + cond = dfile->loadFile(file_name, xfer, EGL_noChange, DCM_MaxReadLength, readMode); } // if it does not already exist, check whether it should be created else if (createIfNecessary) { - OFLOG_DEBUG(mdfdsmanLogger, "File " << file_name << "does not exist, creating it as desired"); - cond = dfile->saveFile(file_name, EXS_LittleEndianExplicit /* might change later */); + OFLOG_DEBUG(mdfdsmanLogger, "File " << file_name << "does not exist, creating it as desired"); + cond = dfile->saveFile(file_name, EXS_LittleEndianExplicit /* might change later */); } // no file, we have an error else - cond = makeOFCondition(OFM_dcmdata, 22, OF_error,"No such file or directory"); + cond = makeOFCondition(OFM_dcmdata, 22, OF_error, "No such file or directory"); // if there are errors: if (cond.bad()) @@ -81,7 +75,7 @@ { // get dataset from file OFLOG_INFO(mdfdsmanLogger, "Getting dataset from loaded file: " << file_name); - dset=dfile->getDataset(); + dset = dfile->getDataset(); /* load also pixeldata into memory: * Without this command pixeldata wouldn't be included into the file, * that's saved after modifying, because original filename was renamed @@ -94,12 +88,11 @@ return cond; } - static DcmTagKey getTagKeyFromDictionary(OFString tag) { - DcmTagKey key(0xffff,0xffff); + DcmTagKey key(0xffff, 0xffff); const DcmDataDictionary& globalDataDict = dcmDataDict.rdlock(); - const DcmDictEntry *dicent = globalDataDict.findEntry(tag.c_str()); + const DcmDictEntry* dicent = globalDataDict.findEntry(tag.c_str()); // successful lookup in dictionary -> translate to tag and return if (dicent) { @@ -109,397 +102,425 @@ return key; } - -static int readNextToken(const char *c, int& pos, DcmTagKey& key, Uint32& idx) +static int readNextToken(const char* c, int& pos, DcmTagKey& key, Uint32& idx) { - OFString aString; - int lpos = pos; - int spos = 0; - if (c[lpos]=='\0') return -1; // EOF - if (c[lpos]=='.') - { - ++pos; - return 3; // period - } - // look for item index between [] - if (c[lpos]=='[') - { - spos = ++lpos; - while ((c[lpos] >= '0')&&(c[lpos] <= '9')) ++lpos; - if (c[lpos] != ']') return 0; // parse error - unsigned long newindex = 0; - if (1 != sscanf(c+spos,"%lu", &newindex)) return 0; // parse error - idx = OFstatic_cast(Uint32, newindex); - pos = ++lpos; - return 2; // index - } - // look for tag between () - if (c[lpos]=='(') - { - spos = ++lpos; - while ((c[lpos] != ')')&&(c[lpos] != '\0')) ++lpos; - if (c[lpos] != ')') return 0; // parse error - unsigned int group=0; - unsigned int elem=0; - if (2 != sscanf(c+spos,"%x,%x", &group, &elem)) return 0; // parse error - key = DcmTagKey(OFstatic_cast(Uint16, group),OFstatic_cast(Uint16, elem)); - pos = ++lpos; - return 1; // tag key - } - // so far no tag and no item index found. So check if it's a dictionary name - spos = lpos; - while ( ((c[lpos] >= 'a')&&(c[lpos] <= 'z')) || - ((c[lpos] >= 'A')&&(c[lpos] <= 'Z')) || - ((c[lpos] >= '0')&&(c[lpos] <= '9'))) ++lpos; - aString.append(c + spos, (lpos-spos)); - key=getTagKeyFromDictionary(aString); - // if key was found in dictionary, return 1 for tag key - if ( (key.getGroup()!=0xffff) && (key.getElement()!=0xffff) ) - { - pos=lpos; - return 1; // tag key - } - // if no return command was processed this far, the token could not be parsed - return 0; // parse error -} - - -static DcmItem* getItemFromPath(DcmItem &dataset, - const char *location, - OFString &message) -{ - DcmTagKey key; - Uint32 idx = 0; - int pos = 0; - int token = 0; - int expected = 1; // first expected is a tagkey - OFBool finished = OFFalse; - DcmItem *result = &dataset; - DcmSequenceOfItems *sq = NULL; - DcmStack stack; - message.clear(); - do - { - token = readNextToken(location, pos, key, idx); - if ((token != expected)&&(token != -1)) - { - message=message + "parse error in path '" + location + "'"; - return NULL; - } - if (token == -1) - { - if (!finished) - { - message=message + "Error: path '" + location + "' incomplete"; - return NULL; - } - return result; - } - if (token == 1) - { - // we have read a tag key - stack.clear(); - if (EC_Normal != result->search(key, stack, ESM_fromHere, OFFalse)) - { - message=message + "Error: attribute not found in dataset (path is '" - + location + "')"; - return NULL; - } - if (stack.top()->ident() == EVR_SQ) - { - sq = OFstatic_cast(DcmSequenceOfItems *, stack.top()); - } else { - message=message + "Error: attribute is not a sequence (path is '" + location + "')"; - return NULL; - } - expected = 2; - finished = OFFalse; - } - else if (token == 2) - { - // we have read an index - if (sq == NULL) - { - message=message + "Error: sequence not found in path '" + location +"'"; - return NULL; - } - if (idx >= sq->card()) - { - message=message + "Error: cannot allocate item in sequence (path is '" + location + "')"; - return NULL; - } - result = sq->getItem(idx); - if (result == NULL) - { - message=message + "Error: item not found in path '" + location + "'"; - return NULL; - } - expected = 3; - finished = OFTrue; - } - else if (token == 3) - { - // we have read a period - expected = 1; - finished = OFFalse; + OFString aString; + int lpos = pos; + int spos = 0; + if (c[lpos] == '\0') + return -1; // EOF + if (c[lpos] == '.') + { + ++pos; + return 3; // period + } + // look for item index between [] + if (c[lpos] == '[') + { + spos = ++lpos; + while ((c[lpos] >= '0') && (c[lpos] <= '9')) + ++lpos; + if (c[lpos] != ']') + return 0; // parse error + unsigned long newindex = 0; + if (1 != sscanf(c + spos, "%lu", &newindex)) + return 0; // parse error + idx = OFstatic_cast(Uint32, newindex); + pos = ++lpos; + return 2; // index + } + // look for tag between () + if (c[lpos] == '(') + { + spos = ++lpos; + while ((c[lpos] != ')') && (c[lpos] != '\0')) + ++lpos; + if (c[lpos] != ')') + return 0; // parse error + unsigned int group = 0; + unsigned int elem = 0; + if (2 != sscanf(c + spos, "%x,%x", &group, &elem)) + return 0; // parse error + key = DcmTagKey(OFstatic_cast(Uint16, group), OFstatic_cast(Uint16, elem)); + pos = ++lpos; + return 1; // tag key + } + // so far no tag and no item index found. So check if it's a dictionary name + spos = lpos; + while (((c[lpos] >= 'a') && (c[lpos] <= 'z')) || ((c[lpos] >= 'A') && (c[lpos] <= 'Z')) + || ((c[lpos] >= '0') && (c[lpos] <= '9'))) + ++lpos; + aString.append(c + spos, (lpos - spos)); + key = getTagKeyFromDictionary(aString); + // if key was found in dictionary, return 1 for tag key + if ((key.getGroup() != 0xffff) && (key.getElement() != 0xffff)) + { + pos = lpos; + return 1; // tag key } - } while (token > 0); - return NULL; + // if no return command was processed this far, the token could not be parsed + return 0; // parse error } +static DcmItem* getItemFromPath(DcmItem& dataset, const char* location, OFString& message) +{ + DcmTagKey key; + Uint32 idx = 0; + int pos = 0; + int token = 0; + int expected = 1; // first expected is a tagkey + OFBool finished = OFFalse; + DcmItem* result = &dataset; + DcmSequenceOfItems* sq = NULL; + DcmStack stack; + message.clear(); + do + { + token = readNextToken(location, pos, key, idx); + if ((token != expected) && (token != -1)) + { + message = message + "parse error in path '" + location + "'"; + return NULL; + } + if (token == -1) + { + if (!finished) + { + message = message + "Error: path '" + location + "' incomplete"; + return NULL; + } + return result; + } + if (token == 1) + { + // we have read a tag key + stack.clear(); + if (EC_Normal != result->search(key, stack, ESM_fromHere, OFFalse)) + { + message = message + "Error: attribute not found in dataset (path is '" + location + "')"; + return NULL; + } + if (stack.top()->ident() == EVR_SQ) + { + sq = OFstatic_cast(DcmSequenceOfItems*, stack.top()); + } + else + { + message = message + "Error: attribute is not a sequence (path is '" + location + "')"; + return NULL; + } + expected = 2; + finished = OFFalse; + } + else if (token == 2) + { + // we have read an index + if (sq == NULL) + { + message = message + "Error: sequence not found in path '" + location + "'"; + return NULL; + } + if (idx >= sq->card()) + { + message = message + "Error: cannot allocate item in sequence (path is '" + location + "')"; + return NULL; + } + result = sq->getItem(idx); + if (result == NULL) + { + message = message + "Error: item not found in path '" + location + "'"; + return NULL; + } + expected = 3; + finished = OFTrue; + } + else if (token == 3) + { + // we have read a period + expected = 1; + finished = OFFalse; + } + } while (token > 0); + return NULL; +} -static OFCondition splitTagPath(OFString &tag_path, - DcmTagKey &key) +static OFCondition splitTagPath(OFString& tag_path, DcmTagKey& key) { OFString target_tag; - unsigned int group,elem; - size_t lpos,rpos; - rpos=tag_path.size()-1; - lpos=rpos; - if (tag_path[rpos]==')') + unsigned int group, elem; + size_t lpos, rpos; + rpos = tag_path.size() - 1; + lpos = rpos; + if (tag_path[rpos] == ')') { // get opening '(' of target tag; if its not found -> return error - while ( (tag_path[lpos]!='(') && (lpos>0) ) --lpos; - if (tag_path[lpos]!='(') - return makeOFCondition(OFM_dcmdata,22,OF_error,"Invalid tag path!"); + while ((tag_path[lpos] != '(') && (lpos > 0)) + --lpos; + if (tag_path[lpos] != '(') + return makeOFCondition(OFM_dcmdata, 22, OF_error, "Invalid tag path!"); // now lpos and rpos "point" to braces of target tag // copy target tag from tag path - target_tag=tag_path.substr(lpos,rpos-lpos+1); + target_tag = tag_path.substr(lpos, rpos - lpos + 1); // delete target tag from path (inclusive trailing '.') - tag_path.erase(lpos,tag_path.length()-lpos); + tag_path.erase(lpos, tag_path.length() - lpos); // if there's a tag path left, remove the '.', too - if ( !tag_path.empty() && (tag_path[tag_path.length()-1]=='.')) - tag_path.erase(tag_path.length()-1,1); + if (!tag_path.empty() && (tag_path[tag_path.length() - 1] == '.')) + tag_path.erase(tag_path.length() - 1, 1); // parse target_tag into DcmTagKey - if (2 != sscanf(target_tag.c_str(),"(%x,%x)", &group, &elem)) - return makeOFCondition(OFM_dcmdata,22,OF_error,"Invalid target tag!"); - key = DcmTagKey(OFstatic_cast(Uint16, group),OFstatic_cast(Uint16, elem)); + if (2 != sscanf(target_tag.c_str(), "(%x,%x)", &group, &elem)) + return makeOFCondition(OFM_dcmdata, 22, OF_error, "Invalid target tag!"); + key = DcmTagKey(OFstatic_cast(Uint16, group), OFstatic_cast(Uint16, elem)); } else // otherwise we could have a dictionary name { - while ( (lpos>0) && (((tag_path[lpos] >= 'a')&&(tag_path[lpos] <= 'z')) || - ((tag_path[lpos] >= 'A')&&(tag_path[lpos] <= 'Z')) || - ((tag_path[lpos] >= '0')&&(tag_path[lpos] <= '9'))) - ) lpos--; - target_tag=tag_path.substr(lpos,rpos-lpos+1); - if (target_tag[0]=='.') target_tag.erase(0,1); - tag_path.erase(lpos,tag_path.length()-lpos); - key=getTagKeyFromDictionary(target_tag); - if ( (key.getGroup()==0xffff) && (key.getElement()==0xffff) ) + while ((lpos > 0) + && (((tag_path[lpos] >= 'a') && (tag_path[lpos] <= 'z')) + || ((tag_path[lpos] >= 'A') && (tag_path[lpos] <= 'Z')) + || ((tag_path[lpos] >= '0') && (tag_path[lpos] <= '9')))) + lpos--; + target_tag = tag_path.substr(lpos, rpos - lpos + 1); + if (target_tag[0] == '.') + target_tag.erase(0, 1); + tag_path.erase(lpos, tag_path.length() - lpos); + key = getTagKeyFromDictionary(target_tag); + if ((key.getGroup() == 0xffff) && (key.getElement() == 0xffff)) { - OFString message=target_tag; + OFString message = target_tag; message.append(" not found in dictionary!"); - return makeOFCondition(OFM_dcmdata,22,OF_error,message.c_str()); + return makeOFCondition(OFM_dcmdata, 22, OF_error, message.c_str()); } } return EC_Normal; } - OFCondition MdfDatasetManager::modifyOrInsertPath(OFString tag_path, - const OFString &value, + const OFString& value, const OFBool only_modify, const OFBool update_metaheader, const OFBool ignore_missing_tags, const OFBool no_reservation_checks) { - // if no file loaded: return an error - if (dfile == NULL) - return makeOFCondition(OFM_dcmdata, 22, OF_error, "No file loaded yet!"); - - // find or create specified path - DcmPathProcessor proc; - proc.checkPrivateReservations(!no_reservation_checks); - OFCondition result = proc.findOrCreatePath(dset, tag_path, !only_modify /*create if desired*/); - // if desired, handle tag not found as being not an error - if ( (result == EC_TagNotFound) && only_modify && ignore_missing_tags ) - return EC_Normal; - if (result.bad()) return result; - OFList resultPaths; - Uint32 numResultPaths = proc.getResults(resultPaths); - if (numResultPaths == 0) return EC_IllegalCall; - - // general validity checking; must only be done for one result - OFListIterator(DcmPath*) resultPath = resultPaths.begin(); - // verify that groups 0 (invalid) and 2 (meta header) were not used - if ( (*resultPath)->containsGroup(0) || (*resultPath)->containsGroup(2) ) - return makeOFCondition(OFM_dcmdata, 22, OF_error, "Cannot insert/modify tags with group 0000 or 0002!"); - // also - according to the standard - groups 1,3,5,7,FF are illegal - if ( (*resultPath)->containsGroup(1) || (*resultPath)->containsGroup(3) || - (*resultPath)->containsGroup(5) || (*resultPath)->containsGroup(7) || - (*resultPath)->containsGroup(0xffff) ) - return makeOFCondition(OFM_dcmdata, 22, OF_error, "Groups 0001,0003,0005,0007,FFFF are illegal!"); - - DcmPathNode *lastElement = (*resultPath)->back(); - if (lastElement == NULL) return EC_IllegalCall; - DcmObject *obj = lastElement->m_obj; - if (obj == NULL) return EC_IllegalCall; - // if object at the end is not a leaf, the insertion is completed (or must fail) - if (!obj->isLeaf()) - { - // if user specified a value to be inserted into non-leaf element, return error - if (!value.empty()) - return makeOFCondition(OFM_dcmdata, 22, OF_error, "Cannot put value into non-leaf elements!"); - // non-leaf elements (items/sequences) cannot just be modified - if (only_modify) - return makeOFCondition(OFM_dcmdata, 22, OF_error, "Cannot modify non-leaf elements!"); - // we have inserted an item/sequence at the end -> job completed - return EC_Normal; - } - - // start modifying element value as desired - resultPath = resultPaths.begin(); - while (resultPath != resultPaths.end()) - { - lastElement = (*resultPath)->back(); - if (lastElement == NULL) return EC_IllegalCall; - // if tag is already present, start modify operation - DcmElement *elem = OFstatic_cast(DcmElement*, lastElement->m_obj); - if (elem == NULL) return EC_IllegalCall; - result = startModify(elem, value); - if (result.bad()) return result; - if (update_metaheader) - deleteRelatedMetaheaderTag(elem->getTag()); - resultPath++; - } - return EC_Normal; -} + // if no file loaded: return an error + if (dfile == NULL) + return makeOFCondition(OFM_dcmdata, 22, OF_error, "No file loaded yet!"); + // find or create specified path + DcmPathProcessor proc; + proc.checkPrivateReservations(!no_reservation_checks); + OFCondition result = proc.findOrCreatePath(dset, tag_path, !only_modify /*create if desired*/); + // if desired, handle tag not found as being not an error + if ((result == EC_TagNotFound) && only_modify && ignore_missing_tags) + return EC_Normal; + if (result.bad()) + return result; + OFList resultPaths; + Uint32 numResultPaths = proc.getResults(resultPaths); + if (numResultPaths == 0) + return EC_IllegalCall; + + // general validity checking; must only be done for one result + OFListIterator(DcmPath*) resultPath = resultPaths.begin(); + // verify that groups 0 (invalid) and 2 (meta header) were not used + if ((*resultPath)->containsGroup(0) || (*resultPath)->containsGroup(2)) + return makeOFCondition(OFM_dcmdata, 22, OF_error, "Cannot insert/modify tags with group 0000 or 0002!"); + // also - according to the standard - groups 1,3,5,7,FF are illegal + if ((*resultPath)->containsGroup(1) || (*resultPath)->containsGroup(3) || (*resultPath)->containsGroup(5) + || (*resultPath)->containsGroup(7) || (*resultPath)->containsGroup(0xffff)) + return makeOFCondition(OFM_dcmdata, 22, OF_error, "Groups 0001,0003,0005,0007,FFFF are illegal!"); + + DcmPathNode* lastElement = (*resultPath)->back(); + if (lastElement == NULL) + return EC_IllegalCall; + DcmObject* obj = lastElement->m_obj; + if (obj == NULL) + return EC_IllegalCall; + // if object at the end is not a leaf, the insertion is completed (or must fail) + if (!obj->isLeaf()) + { + // if user specified a value to be inserted into non-leaf element, return error + if (!value.empty()) + return makeOFCondition(OFM_dcmdata, 22, OF_error, "Cannot put value into non-leaf elements!"); + // non-leaf elements (items/sequences) cannot just be modified + if (only_modify) + return makeOFCondition(OFM_dcmdata, 22, OF_error, "Cannot modify non-leaf elements!"); + // we have inserted an item/sequence at the end -> job completed + return EC_Normal; + } + + // start modifying element value as desired + resultPath = resultPaths.begin(); + while (resultPath != resultPaths.end()) + { + lastElement = (*resultPath)->back(); + if (lastElement == NULL) + return EC_IllegalCall; + // if tag is already present, start modify operation + DcmElement* elem = OFstatic_cast(DcmElement*, lastElement->m_obj); + if (elem == NULL) + return EC_IllegalCall; + // Check if pixel data insertion can be performed (and report error if result.bad()) + result = checkPixelDataInsertion(elem); + if (result.good()) + { + result = startModify(elem, value); + } + if (result.bad()) + return result; + if (update_metaheader) + deleteRelatedMetaheaderTag(elem->getTag()); + resultPath++; + } + return EC_Normal; +} OFCondition MdfDatasetManager::modifyOrInsertFromFile(OFString tag_path, - const OFString &filename, + const OFString& filename, const OFBool only_modify, const OFBool update_metaheader, const OFBool ignore_missing_tags, const OFBool no_reservation_checks) { - // if no file loaded: return an error - if (dfile == NULL) - return makeOFCondition(OFM_dcmdata, 22, OF_error, "No file loaded yet!"); - - // first, perform some basic checks on the specified file(name) - if (filename.empty()) - return makeOFCondition(OFM_dcmdata, 22, OF_error, "No filename specified to read value from!"); - if (!OFStandard::fileExists(filename)) - return makeOFCondition(OFM_dcmdata, 22, OF_error, "File to read value from does not exist!"); - if (!OFStandard::isReadable(filename)) - return makeOFCondition(OFM_dcmdata, 22, OF_error, "File to read value from is not readable!"); - - // find or create specified path - DcmPathProcessor proc; - proc.checkPrivateReservations(!no_reservation_checks); - OFCondition result = proc.findOrCreatePath(dset, tag_path, !only_modify /*create if desired*/); - // if desired, handle tag not found as being not an error - if ((result == EC_TagNotFound) && only_modify && ignore_missing_tags) - return EC_Normal; - if (result.bad()) return result; - OFList resultPaths; - Uint32 numResultPaths = proc.getResults(resultPaths); - if (numResultPaths == 0) return EC_IllegalCall; - - // general validity checking; must only be done for one result - OFListIterator(DcmPath*) resultPath = resultPaths.begin(); - // verify that groups 0 (invalid) and 2 (meta header) were not used - if ((*resultPath)->containsGroup(0) || (*resultPath)->containsGroup(2)) - return makeOFCondition(OFM_dcmdata,22,OF_error, "Cannot insert/modify tags with group 0000 or 0002!"); - // also - according to the standard - groups 1,3,5,7,FF are illegal - if ((*resultPath)->containsGroup(1) || (*resultPath)->containsGroup(3) || - (*resultPath)->containsGroup(5) || (*resultPath)->containsGroup(7) || - (*resultPath)->containsGroup(0xffff)) - return makeOFCondition(OFM_dcmdata, 22, OF_error, "Groups 0001,0003,0005,0007,FFFF are illegal!"); - - DcmPathNode *lastElement = (*resultPath)->back(); - if (lastElement == NULL) return EC_IllegalCall; - DcmObject *obj = lastElement->m_obj; - if (obj == NULL) return EC_IllegalCall; - // if object at the end is not a leaf, the insertion/modification fails - if (!obj->isLeaf()) - return makeOFCondition(OFM_dcmdata, 22, OF_error, "Cannot put value into non-leaf elements!"); - - // start modifying element value as desired - resultPath = resultPaths.begin(); - while (resultPath != resultPaths.end()) - { - lastElement = (*resultPath)->back(); - if (lastElement == NULL) return EC_IllegalCall; - // if tag is already present, start modify operation - DcmElement *elem = OFstatic_cast(DcmElement*, lastElement->m_obj); - if (elem == NULL) return EC_IllegalCall; - // check whether VR is "unknown" - DcmEVR vr = elem->getTag().getEVR(); - if (ignore_un_modifies && ((vr == EVR_UN) || (vr == EVR_UNKNOWN) || (vr == EVR_UNKNOWN2B))) - { - OFLOG_WARN(mdfdsmanLogger, "will not write value to attribute having VR=UN: " << elem->getTag()); - return EC_Normal; - } - // create stream object for binary file - DcmInputFileStream fileStream(filename.c_str()); - result = fileStream.status(); - if (result.good()) - { - const size_t fileLen = OFStandard::getFileSize(filename); - if (fileLen & 1) - return makeOFCondition(OFM_dcmdata, 22, OF_error, "Cannot insert/modify value with odd length from file!"); - // read element value from binary file (requires even length) - result = elem->createValueFromTempFile(fileStream.newFactory(), OFstatic_cast(Uint32, fileLen), EBO_LittleEndian); - } - if (result.bad()) return result; - if (update_metaheader) - deleteRelatedMetaheaderTag(elem->getTag()); - resultPath++; - } - return EC_Normal; -} + // if no file loaded: return an error + if (dfile == NULL) + return makeOFCondition(OFM_dcmdata, 22, OF_error, "No file loaded yet!"); + // first, perform some basic checks on the specified file(name) + if (filename.empty()) + return makeOFCondition(OFM_dcmdata, 22, OF_error, "No filename specified to read value from!"); + if (!OFStandard::fileExists(filename)) + return makeOFCondition(OFM_dcmdata, 22, OF_error, "File to read value from does not exist!"); + if (!OFStandard::isReadable(filename)) + return makeOFCondition(OFM_dcmdata, 22, OF_error, "File to read value from is not readable!"); + + // find or create specified path + DcmPathProcessor proc; + proc.checkPrivateReservations(!no_reservation_checks); + OFCondition result = proc.findOrCreatePath(dset, tag_path, !only_modify /*create if desired*/); + // if desired, handle tag not found as being not an error + if ((result == EC_TagNotFound) && only_modify && ignore_missing_tags) + return EC_Normal; + if (result.bad()) + return result; + OFList resultPaths; + Uint32 numResultPaths = proc.getResults(resultPaths); + if (numResultPaths == 0) + return EC_IllegalCall; + + // general validity checking; must only be done for one result + OFListIterator(DcmPath*) resultPath = resultPaths.begin(); + // verify that groups 0 (invalid) and 2 (meta header) were not used + if ((*resultPath)->containsGroup(0) || (*resultPath)->containsGroup(2)) + return makeOFCondition(OFM_dcmdata, 22, OF_error, "Cannot insert/modify tags with group 0000 or 0002!"); + // also - according to the standard - groups 1,3,5,7,FF are illegal + if ((*resultPath)->containsGroup(1) || (*resultPath)->containsGroup(3) || (*resultPath)->containsGroup(5) + || (*resultPath)->containsGroup(7) || (*resultPath)->containsGroup(0xffff)) + return makeOFCondition(OFM_dcmdata, 22, OF_error, "Groups 0001,0003,0005,0007,FFFF are illegal!"); + + DcmPathNode* lastElement = (*resultPath)->back(); + if (lastElement == NULL) + return EC_IllegalCall; + DcmObject* obj = lastElement->m_obj; + if (obj == NULL) + return EC_IllegalCall; + // if object at the end is not a leaf, the insertion/modification fails + if (!obj->isLeaf()) + return makeOFCondition(OFM_dcmdata, 22, OF_error, "Cannot put value into non-leaf elements!"); + + // start modifying element value as desired + resultPath = resultPaths.begin(); + while (resultPath != resultPaths.end()) + { + lastElement = (*resultPath)->back(); + if (lastElement == NULL) + return EC_IllegalCall; + // if tag is already present, start modify operation + DcmElement* elem = OFstatic_cast(DcmElement*, lastElement->m_obj); + if (elem == NULL) + return EC_IllegalCall; + // Check if pixel data insertion can be performed (and report error if result.bad()) + result = checkPixelDataInsertion(elem); + if (result.good()) + { + // check whether VR is "unknown" + DcmEVR vr = elem->getTag().getEVR(); + if (ignore_un_modifies && ((vr == EVR_UN) || (vr == EVR_UNKNOWN) || (vr == EVR_UNKNOWN2B))) + { + OFLOG_WARN(mdfdsmanLogger, "will not write value to attribute having VR=UN: " << elem->getTag()); + return EC_Normal; + } + // create stream object for binary file + DcmInputFileStream fileStream(filename.c_str()); + result = fileStream.status(); + if (result.good()) + { + const size_t fileLen = OFStandard::getFileSize(filename); + if (fileLen & 1) + return makeOFCondition( + OFM_dcmdata, 22, OF_error, "Cannot insert/modify value with odd length from file!"); + // read element value from binary file (requires even length) + result = elem->createValueFromTempFile( + fileStream.newFactory(), OFstatic_cast(Uint32, fileLen), EBO_LittleEndian); + } + if (result.bad()) + return result; + if (update_metaheader) + deleteRelatedMetaheaderTag(elem->getTag()); + } + resultPath++; + } + return EC_Normal; +} OFCondition MdfDatasetManager::modifyAllTags(OFString tag_path, - const OFString &value, + const OFString& value, const OFBool update_metaheader, - int &count, + int& count, const OFBool ignore_missing_tags) { // if no file loaded: return an error if (dfile == NULL) - return makeOFCondition(OFM_dcmdata,22,OF_error,"No file loaded yet!"); + return makeOFCondition(OFM_dcmdata, 22, OF_error, "No file loaded yet!"); DcmTagKey key; OFCondition result; // split tag_path into the path itself and the target tag - result=splitTagPath(tag_path, key); - if ( result.bad() ) + result = splitTagPath(tag_path, key); + if (result.bad()) return result; // check whether tag with this group can be modified if (!key.hasValidGroup()) - return makeOFCondition(OFM_dcmdata,22,OF_error,"Invalid group number!"); + return makeOFCondition(OFM_dcmdata, 22, OF_error, "Invalid group number!"); // modify metaheader if necessary; not necessary if not a main level tag - if ( update_metaheader && tag_path.empty() ) + if (update_metaheader && tag_path.empty()) deleteRelatedMetaheaderTag(key); // this stack will hold result of element search DcmStack result_stack; - DcmObject *elem; + DcmObject* elem; // get references to all matching tags in dataset and store them in stack OFLOG_DEBUG(mdfdsmanLogger, "looking for occurrences of: " << key.toString()); - result=dset->findAndGetElements(key, result_stack); + result = dset->findAndGetElements(key, result_stack); // if there are elements found, modify metaheader if necessary OFLOG_DEBUG(mdfdsmanLogger, "found " << result_stack.card() << " occurrences"); // as long there are matching elements left on the stack - while( result_stack.card() > 0 && result.good() ) + while (result_stack.card() > 0 && result.good()) { // get the top element - elem=result_stack.pop(); + elem = result_stack.pop(); // if user gives e.g. a sequence delimiter,don't try to change it! if (elem->isLeaf()) { // and put new value to element OFLOG_DEBUG(mdfdsmanLogger, "accessing existing tag for modify operation"); - result=startModify(OFstatic_cast(DcmElement*,elem),value); - if (result.good()) count++; + result = startModify(OFstatic_cast(DcmElement*, elem), value); + if (result.good()) + count++; } // if user gave "unchangeable" tag: - else result = makeOFCondition(OFM_dcmdata,22,OF_error,"Unable to modify tag!"); + else + result = makeOFCondition(OFM_dcmdata, 22, OF_error, "Unable to modify tag!"); } // if desired, handle "tag not found" as being OK if (ignore_missing_tags && (result == EC_TagNotFound)) @@ -507,91 +528,86 @@ return result; } +OFCondition MdfDatasetManager::deleteTag(OFString tag_path, const OFBool all_tags, const OFBool ignore_missing_tags) +{ -OFCondition MdfDatasetManager::deleteTag(OFString tag_path, - const OFBool all_tags, - const OFBool ignore_missing_tags) -{ - - // if no file loaded: return an error - if (dfile == NULL) - return makeOFCondition(OFM_dcmdata,22,OF_error,"No file loaded yet!"); - - OFCondition result; - if (all_tags) - { - // split tag path into item path and target tag - DcmTagKey key; - result = splitTagPath(tag_path, key); - if (result.bad()) - return result; // error parsing tag path - - // if group is 0 or 2: abort; deletion of tags with 1,3,5,7 should be allowed - if ( (key.getGroup() == 0) || (key.getGroup() == 2) ) - return makeOFCondition(OFM_dcmdata,22,OF_error, "Cannot delete tags with group 0000 or 0002!"); - - // if tag path still contains characters, user wants to modify item tag - if (!tag_path.empty()) - { - OFString error; - DcmItem *item=NULL; - item = getItemFromPath(*dset, tag_path.c_str(), error); - if (item != NULL) - result = item->findAndDeleteElement(key, all_tags, all_tags); - else - return makeOFCondition(OFM_dcmdata,22,OF_error,error.c_str()); - } - // other user specified single tag without path - else - { - result = dset->findAndDeleteElement(key, all_tags, all_tags); - } - if (ignore_missing_tags && (result == EC_TagNotFound)) - return EC_Normal; - return result; - } - - // do not delete all tags -> use path functions - DcmPathProcessor pathProc; - - Uint32 numDeletions = 0; - result = pathProc.findOrDeletePath(dset, tag_path, numDeletions); - if (ignore_missing_tags && (result == EC_TagNotFound)) - return EC_Normal; - return result; -} + // if no file loaded: return an error + if (dfile == NULL) + return makeOFCondition(OFM_dcmdata, 22, OF_error, "No file loaded yet!"); + + OFCondition result; + if (all_tags) + { + // split tag path into item path and target tag + DcmTagKey key; + result = splitTagPath(tag_path, key); + if (result.bad()) + return result; // error parsing tag path + + // if group is 0 or 2: abort; deletion of tags with 1,3,5,7 should be allowed + if ((key.getGroup() == 0) || (key.getGroup() == 2)) + return makeOFCondition(OFM_dcmdata, 22, OF_error, "Cannot delete tags with group 0000 or 0002!"); + + // if tag path still contains characters, user wants to modify item tag + if (!tag_path.empty()) + { + OFString error; + DcmItem* item = NULL; + item = getItemFromPath(*dset, tag_path.c_str(), error); + if (item != NULL) + result = item->findAndDeleteElement(key, all_tags, all_tags); + else + return makeOFCondition(OFM_dcmdata, 22, OF_error, error.c_str()); + } + // other user specified single tag without path + else + { + result = dset->findAndDeleteElement(key, all_tags, all_tags); + } + if (ignore_missing_tags && (result == EC_TagNotFound)) + return EC_Normal; + return result; + } + // do not delete all tags -> use path functions + DcmPathProcessor pathProc; + + Uint32 numDeletions = 0; + result = pathProc.findOrDeletePath(dset, tag_path, numDeletions); + if (ignore_missing_tags && (result == EC_TagNotFound)) + return EC_Normal; + return result; +} OFCondition MdfDatasetManager::deletePrivateData() { - // if no file loaded : return an error - if (dfile == NULL) - return makeOFCondition(OFM_dcmdata,22,OF_error,"No file loaded yet!"); - - DcmStack stack; - DcmObject *dobj = NULL; - DcmTagKey tag; - OFCondition status = dset->nextObject(stack, OFTrue); - while (status.good()) - { - dobj = stack.top(); - tag = dobj->getTag(); - if (tag.getGroup() & 1) // private tag ? - { - stack.pop(); - delete OFstatic_cast(DcmItem *, (stack.top()))->remove(dobj); - } - status = dset->nextObject(stack, OFTrue); - } - return EC_Normal; -} + // if no file loaded : return an error + if (dfile == NULL) + return makeOFCondition(OFM_dcmdata, 22, OF_error, "No file loaded yet!"); + DcmStack stack; + DcmObject* dobj = NULL; + DcmTagKey tag; + OFCondition status = dset->nextObject(stack, OFTrue); + while (status.good()) + { + dobj = stack.top(); + tag = dobj->getTag(); + if (tag.getGroup() & 1) // private tag ? + { + stack.pop(); + delete OFstatic_cast(DcmItem*, (stack.top()))->remove(dobj); + } + status = dset->nextObject(stack, OFTrue); + } + return EC_Normal; +} OFCondition MdfDatasetManager::generateAndInsertUID(const DcmTagKey& uidKey) { // if no file loaded : return an error - if (dfile==NULL) - return makeOFCondition(OFM_dcmdata,22,OF_error,"No file loaded yet!"); + if (dfile == NULL) + return makeOFCondition(OFM_dcmdata, 22, OF_error, "No file loaded yet!"); OFCondition result; char uid[100]; @@ -603,19 +619,19 @@ { dcmGenerateUniqueIdentifier(uid, SITE_INSTANCE_UID_ROOT); // force meta-header to refresh SOP Class/Instance UIDs. - DcmItem *meta_info = dfile->getMetaInfo(); + DcmItem* meta_info = dfile->getMetaInfo(); if (meta_info) { delete meta_info->remove(DCM_MediaStorageSOPInstanceUID); } } - else return EC_IllegalCall; + else + return EC_IllegalCall; result = dset->putAndInsertString(uidKey, uid); return result; } - -OFCondition MdfDatasetManager::saveFile(const char *file_name, +OFCondition MdfDatasetManager::saveFile(const char* file_name, E_TransferSyntax opt_xfer, E_EncodingType opt_enctype, E_GrpLenEncoding opt_glenc, @@ -625,12 +641,12 @@ OFBool opt_dataset) { // if no file loaded: return an error - if (dfile==NULL) - return makeOFCondition(OFM_dcmdata,22,OF_error,"No file loaded yet!"); + if (dfile == NULL) + return makeOFCondition(OFM_dcmdata, 22, OF_error, "No file loaded yet!"); OFCondition result; /* check whether transfer syntax is possible */ - if ( (opt_xfer==EXS_Unknown) || (dfile->canWriteXfer(opt_xfer)) ) + if ((opt_xfer == EXS_Unknown) || (dfile->canWriteXfer(opt_xfer))) { /* check whether pixel data is compressed */ if (opt_dataset && DcmXfer(opt_xfer).isEncapsulated()) @@ -643,19 +659,24 @@ * loaded file does not contain attributes which could make sense if * it is a template file that should be processed with dcmodify. */ - if ((dfile->getDataset()->getOriginalXfer() == EXS_Unknown) && (opt_xfer == EXS_Unknown)) + if ((dfile->getDataset()->getOriginalXfer() == EXS_Unknown) && (opt_xfer == EXS_Unknown)) { - opt_xfer = EXS_LittleEndianExplicit; + opt_xfer = EXS_LittleEndianExplicit; } /* write DICOM file */ - result = dfile->saveFile(file_name, opt_xfer, opt_enctype, opt_glenc, + result = dfile->saveFile(file_name, + opt_xfer, + opt_enctype, + opt_glenc, opt_padenc, OFstatic_cast(Uint32, opt_filepad), OFstatic_cast(Uint32, opt_itempad), (opt_dataset) ? EWM_dataset : EWM_createNewMeta); - - } else { - OFLOG_DEBUG(mdfdsmanLogger, "no conversion to transfer syntax " << DcmXfer(opt_xfer).getXferName() << " possible!"); + } + else + { + OFLOG_DEBUG(mdfdsmanLogger, + "no conversion to transfer syntax " << DcmXfer(opt_xfer).getXferName() << " possible!"); result = EC_CannotChangeRepresentation; } // save file @@ -663,77 +684,93 @@ return result; } - OFCondition MdfDatasetManager::saveFile() { // save file without changing any parameters - return saveFile(current_file.c_str(), EXS_Unknown, EET_UndefinedLength, - EGL_recalcGL, EPD_noChange, 0, 0, OFFalse); + return saveFile(current_file.c_str(), EXS_Unknown, EET_UndefinedLength, EGL_recalcGL, EPD_noChange, 0, 0, OFFalse); } - -OFCondition MdfDatasetManager::startModify(DcmElement *elem, - const OFString &value) +OFCondition MdfDatasetManager::startModify(DcmElement* elem, const OFString& value) { OFCondition result; DcmEVR vr = elem->getTag().getEVR(); - if ( ignore_un_modifies && ((vr == EVR_UN) || (vr == EVR_UNKNOWN) || (vr == EVR_UNKNOWN2B))) + if (ignore_un_modifies && ((vr == EVR_UN) || (vr == EVR_UNKNOWN) || (vr == EVR_UNKNOWN2B))) { - OFLOG_WARN(mdfdsmanLogger, "will not write value to attribute having VR=UN: " << elem->getTag().toString()); - return EC_Normal; + OFLOG_WARN(mdfdsmanLogger, "will not write value to attribute having VR=UN: " << elem->getTag().toString()); + return EC_Normal; } // start putString function being defined on all VRs result = elem->putString(value.c_str()); return result; } - -void MdfDatasetManager::deleteRelatedMetaheaderTag(const DcmTagKey &key) +void MdfDatasetManager::deleteRelatedMetaheaderTag(const DcmTagKey& key) { - DcmItem *meta_info=dfile->getMetaInfo(); + DcmItem* meta_info = dfile->getMetaInfo(); if (meta_info) { - if (key==DCM_SOPInstanceUID) + if (key == DCM_SOPInstanceUID) delete meta_info->remove(DCM_MediaStorageSOPInstanceUID); - else if (key==DCM_SOPClassUID) + else if (key == DCM_SOPClassUID) delete meta_info->remove(DCM_MediaStorageSOPClassUID); } } - DcmDataset* MdfDatasetManager::getDataset() { return dset; } - DcmFileFormat* MdfDatasetManager::getFileFormat() { return dfile; } - OFString MdfDatasetManager::getFilename() const { return current_file; } - -OFBool MdfDatasetManager::isTagInDictionary(const DcmTagKey &search_key) +OFBool MdfDatasetManager::isTagInDictionary(const DcmTagKey& search_key) { const DcmDataDictionary& globalDataDict = dcmDataDict.rdlock(); - const DcmDictEntry *dicent = globalDataDict.findEntry(search_key,NULL); + const DcmDictEntry* dicent = globalDataDict.findEntry(search_key, NULL); // successful lookup in dictionary -> translate to tag and return dcmDataDict.rdunlock(); if (dicent) return OFTrue; - else return OFFalse; + else + return OFFalse; } - void MdfDatasetManager::setModifyUNValues(OFBool modifyUNValues) { - ignore_un_modifies = !modifyUNValues; + ignore_un_modifies = !modifyUNValues; +} + +OFCondition MdfDatasetManager::checkPixelDataInsertion(DcmElement* elem) +{ + if (elem->ident() == EVR_PixelData) + { + DcmPixelData* pix = OFstatic_cast(DcmPixelData*, elem); + if (pix) + { + E_TransferSyntax ts = EXS_Unknown; + const DcmRepresentationParameter* dontCare = NULL; + pix->getCurrentRepresentationKey(ts, dontCare); + DcmXfer xfer(ts); + if (xfer.isEncapsulated()) + { + OFLOG_ERROR(mdfdsmanLogger, "Cannot replace encapsulated Pixel Data (not implemented)"); + return EC_IllegalParameter; + } + } + else + { + OFLOG_WARN(mdfdsmanLogger, "Unexpected error while casting Pixel Data element, trying to ignore"); + } + } + return EC_Normal; } diff -Nru dcmtk-3.6.6/dcmdata/apps/mdfdsman.h dcmtk-3.6.7/dcmdata/apps/mdfdsman.h --- dcmtk-3.6.6/dcmdata/apps/mdfdsman.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/apps/mdfdsman.h 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2003-2019, OFFIS e.V. + * Copyright (C) 2003-2022, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -230,6 +230,14 @@ */ OFBool isTagInDictionary(const DcmTagKey &search_key); + /** Make user user is not trying to replace encapsulated Pixel Data element value. + * This is currently not implemented since there is no direct / obvious way to insert + * raw data into the pixel sequence structure managed by the DcmPixelData class. + * @param elem The potential Pixel Data element to be checked + * @return EC_Normal if modification is possible, error code otherwise + */ + OFCondition checkPixelDataInsertion(DcmElement* elem); + private: /// name of file that is currently loaded diff -Nru dcmtk-3.6.6/dcmdata/apps/xml2dcm.cc dcmtk-3.6.7/dcmdata/apps/xml2dcm.cc --- dcmtk-3.6.6/dcmdata/apps/xml2dcm.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/apps/xml2dcm.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2003-2020, OFFIS e.V. + * Copyright (C) 2003-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -28,9 +28,7 @@ #include "dcmtk/ofstd/ofstd.h" #include "dcmtk/ofstd/ofconapp.h" #include "dcmtk/dcmdata/dcostrmz.h" /* for dcmZlibCompressionLevel */ - -#define INCLUDE_CSTDARG -#include "dcmtk/ofstd/ofstdinc.h" +#include "dcmtk/dcmdata/xml2dcm.h" #ifdef WITH_ZLIB #include /* for zlibVersion() */ @@ -42,9 +40,6 @@ // currently not used since DTD is always retrieved from XML document //#define DOCUMENT_TYPE_DEFINITION_FILE "dcm2xml.dtd" -static OFLogger xml2dcmLogger = OFLog::getLogger("dcmtk.apps." OFFIS_CONSOLE_APPLICATION); -static OFLogger xmlLogger = OFLog::getLogger("dcmtk.apps." OFFIS_CONSOLE_APPLICATION ".libxml"); - static char rcsid[] = "$dcmtk: " OFFIS_CONSOLE_APPLICATION " v" OFFIS_DCMTK_VERSION " " OFFIS_DCMTK_RELEASEDATE " $"; @@ -52,656 +47,11 @@ #ifdef WITH_LIBXML -#ifdef __ibmxl__ -// IBM xlC defines __GNUC__ but does not support the GNUC extension -// __attribute__ ((format (printf, 2, 3))). -// This avoids a compiler warning in . -#define LIBXML_ATTR_FORMAT(fmt,args) -#endif - -// The libxml library also uses unicode. So we have to reuse some -// workarounds for the ICU library here as well. -// The type char16_t is only supported since C++11. -#ifndef HAVE_CHAR16_T -#define UCHAR_TYPE uint16_t -#endif - -//If U_NOEXCEPT is not defined, ICU falls back to NOEXCEPT. -#ifndef HAVE_CXX11 -#define U_NOEXCEPT -#endif - -#include - - -// stores pointer to character encoding handler -static xmlCharEncodingHandlerPtr EncodingHandler = NULL; - -// This function is also used in dcmsr, try to stay in sync! -extern "C" void errorFunction(void * ctx, const char *msg, ...) -{ -#if defined(HAVE_VSNPRINTF) && defined(HAVE_PROTOTYPE_VSNPRINTF) - // Classic C requires us to declare variables at the beginning of the function. - OFString &buffer = *OFstatic_cast(OFString*, ctx); -#endif - - if (!xmlLogger.isEnabledFor(OFLogger::DEBUG_LOG_LEVEL)) - return; - -#if defined(HAVE_VSNPRINTF) && defined(HAVE_PROTOTYPE_VSNPRINTF) - // libxml calls us multiple times for one line of log output which would - // result in garbled output. To avoid this, we buffer the output in a local - // string in the caller which we get through our 'ctx' parameter. Then, we - // output this string on one go when we receive a newline. - va_list ap; - char buf[1024]; - - va_start(ap, msg); -#ifdef HAVE_PROTOTYPE_STD__VSNPRINTF - std::vsnprintf(buf, 1024, msg, ap); -#else - vsnprintf(buf, 1024, msg, ap); -#endif - va_end(ap); - - // Since we can't do anything about a too small buffer for vsnprintf(), we - // ignore it. But we do make sure the buffer is null-terminated! - buf[1023] = '\0'; - buffer += buf; - - // If there is a full line in the buffer... - size_t pos = buffer.find('\n'); - while (pos != OFString_npos) - { - // ..output it and remove it from the buffer - OFLOG_DEBUG(xmlLogger, buffer.substr(0, pos)); - buffer.erase(0, pos + 1); - - pos = buffer.find('\n'); - } -#elif defined(HAVE_VPRINTF) - // No vsnprint, but at least vfprintf. Output the messages directly to stderr. - va_list ap; - va_start(ap, msg); -#ifdef HAVE_PROTOTYPE_STD__VFPRINTF - std::vfprintf(stderr, msg, ap); -#else - vfprintf(stderr, msg, ap); -#endif - va_end(ap); -#else - // We can only show the most basic part of the message, this will look bad :( - printf("%s", msg); -#endif -} - - -static OFBool convertUtf8ToCharset(const xmlChar *fromString, - OFString &toString) -{ - OFBool result = OFFalse; - if (EncodingHandler != NULL) - { - /* prepare input/output buffers */ - xmlBufferPtr fromBuffer = xmlBufferCreate(); - xmlBufferPtr toBuffer = xmlBufferCreate(); - xmlBufferCat(fromBuffer, fromString); - /* convert character encoding of given string */ - result = (xmlCharEncOutFunc(EncodingHandler, toBuffer, fromBuffer) >= 0); - if (result) - toString = OFreinterpret_cast(const char *, xmlBufferContent(toBuffer)); - /* free allocated memory */ - xmlBufferFree(toBuffer); - xmlBufferFree(fromBuffer); - } - return result; -} - - -static OFCondition checkNode(xmlNodePtr current, - const char *name) -{ - OFCondition result = EC_Normal; - /* check whether node is valid at all */ - if (current != NULL) - { - /* check whether node has expected name */ - if (xmlStrcmp(current->name, OFreinterpret_cast(const xmlChar *, name)) != 0) - { - OFLOG_ERROR(xml2dcmLogger, "document of the wrong type, was '" << current->name << "', '" << name << "' expected"); - result = EC_IllegalCall; - } - } else { - OFLOG_ERROR(xml2dcmLogger, "document of the wrong type, '" << name << "' expected"); - result = EC_IllegalCall; - } - return result; -} - - -static OFCondition createNewElement(xmlNodePtr current, - DcmElement *&newElem) -{ - OFCondition result = EC_IllegalCall; - /* check whether node is valid */ - if (current != NULL) - { - /* get required information from XML element */ - xmlChar *elemTag = xmlGetProp(current, OFreinterpret_cast(const xmlChar *, "tag")); - xmlChar *elemVR = xmlGetProp(current, OFreinterpret_cast(const xmlChar *, "vr")); - /* convert tag string */ - DcmTagKey dcmTagKey; - unsigned int group = 0xffff; - unsigned int elem = 0xffff; - /* make sure that "tag" attribute exists */ - if (elemTag == NULL) - { - OFLOG_WARN(xml2dcmLogger, "missing 'tag' attribute, ignoring node"); - result = EC_InvalidTag; - } - /* determine group and element number from "tag" */ - else if (sscanf(OFreinterpret_cast(char *, elemTag), "%x,%x", &group, &elem ) == 2) - { - dcmTagKey.set(OFstatic_cast(Uint16, group), OFstatic_cast(Uint16, elem)); - DcmTag dcmTag(dcmTagKey); - /* convert vr string */ - DcmVR dcmVR(OFreinterpret_cast(char *, elemVR)); - DcmEVR dcmEVR = dcmVR.getEVR(); - if (dcmEVR == EVR_UNKNOWN) - { - /* check whether "vr" attribute exists */ - if (elemVR == NULL) - { - OFLOG_WARN(xml2dcmLogger, "missing 'vr' attribute for " << dcmTag - << ", using unknown VR"); - } else { - OFLOG_WARN(xml2dcmLogger, "invalid 'vr' attribute (" << elemVR - << ") for " << dcmTag << ", using unknown VR"); - } - } - /* check for correct vr */ - const DcmEVR tagEVR = dcmTag.getEVR(); - if ((tagEVR != dcmEVR) && (dcmEVR != EVR_UNKNOWN) && (tagEVR != EVR_UNKNOWN) && - ((dcmTagKey != DCM_LUTData) || ((dcmEVR != EVR_US) && (dcmEVR != EVR_SS) && (dcmEVR != EVR_OW))) && - ((tagEVR != EVR_xs) || ((dcmEVR != EVR_US) && (dcmEVR != EVR_SS))) && - (((tagEVR != EVR_ox) && (tagEVR != EVR_px)) || ((dcmEVR != EVR_OB) && (dcmEVR != EVR_OW)))) - { - OFLOG_WARN(xml2dcmLogger, "tag " << dcmTag << " has wrong VR (" << dcmVR.getVRName() - << "), correct is " << dcmTag.getVR().getVRName()); - } - if (dcmEVR != EVR_UNKNOWN) - dcmTag.setVR(dcmVR); - /* create DICOM element */ - result = DcmItem::newDicomElementWithVR(newElem, dcmTag); - } else { - OFLOG_WARN(xml2dcmLogger, "invalid 'tag' attribute (" << elemTag << "), ignoring node"); - result = EC_InvalidTag; - } - if (result.bad()) - { - /* delete new element if an error occurred */ - delete newElem; - newElem = NULL; - } - /* free allocated memory */ - xmlFree(elemTag); - xmlFree(elemVR); - } - return result; -} - - -static OFCondition putElementContent(xmlNodePtr current, - DcmElement *element) -{ - OFCondition result = EC_IllegalCall; - /* check whether node and element are valid */ - if ((current != NULL) && (element != NULL)) - { - DcmEVR dcmEVR = element->getVR(); - /* get the XML node content */ - xmlChar *elemVal = xmlNodeGetContent(current); - xmlChar *attrVal = xmlGetProp(current, OFreinterpret_cast(const xmlChar *, "binary")); - /* check whether node content is present */ - if (xmlStrcmp(attrVal, OFreinterpret_cast(const xmlChar *, "hidden")) == 0) - OFLOG_WARN(xml2dcmLogger, "content of node " << element->getTag() << " is 'hidden', empty element inserted"); - /* check whether node content is base64 encoded */ - else if (xmlStrcmp(attrVal, OFreinterpret_cast(const xmlChar *, "base64")) == 0) - { - Uint8 *data = NULL; - const size_t length = OFStandard::decodeBase64(OFreinterpret_cast(char *, elemVal), data); - if (length > 0) - { - if (dcmEVR == EVR_OW) - { - /* Base64 decoder produces big endian output data, convert to local byte order */ - swapIfNecessary(gLocalByteOrder, EBO_BigEndian, data, OFstatic_cast(Uint32, length), sizeof(Uint16)); - } - result = element->putUint8Array(data, OFstatic_cast(Uint32, length)); - /* delete buffer since data is copied into the element */ - delete[] data; - } - } - /* check whether node content is stored in a file */ - else if (xmlStrcmp(attrVal, OFreinterpret_cast(const xmlChar *, "file")) == 0) - { - if (xmlStrlen(elemVal) > 0) - { - const char *filename = OFreinterpret_cast(char *, elemVal); - /* try to open binary file */ - FILE *f = fopen(filename, "rb"); - if (f != NULL) - { - /* determine filesize */ - const size_t fileSize = OFStandard::getFileSize(filename); - size_t buflen = fileSize; - /* if odd then make even (DICOM requires even length values) */ - if (buflen & 1) - buflen++; - Uint8 *buf = NULL; - /* create buffer of OB or OW data */ - if (dcmEVR == EVR_OW) - { - Uint16 *buf16 = NULL; - result = element->createUint16Array(OFstatic_cast(Uint32, buflen / 2), buf16); - buf = OFreinterpret_cast(Uint8 *, buf16); - } else - result = element->createUint8Array(OFstatic_cast(Uint32, buflen), buf); - if (result.good()) - { - OFLOG_INFO(xml2dcmLogger, "reading " << fileSize << " bytes from binary data file: " << filename); - OFLOG_DEBUG(xml2dcmLogger, " and storing it in the element " << element->getTag()); - /* read binary file into the buffer */ - if (fread(buf, 1, OFstatic_cast(size_t, fileSize), f) != fileSize) - { - OFLOG_ERROR(xml2dcmLogger, "error reading binary data file: " << filename << ": " << OFStandard::getLastSystemErrorCode().message()); - result = EC_CorruptedData; - } - else if (dcmEVR == EVR_OW) - { - /* swap 16 bit OW data (if necessary) */ - swapIfNecessary(gLocalByteOrder, EBO_LittleEndian, buf, OFstatic_cast(Uint32, buflen), sizeof(Uint16)); - } - } - fclose(f); - } else { - OFLOG_ERROR(xml2dcmLogger, "cannot open binary data file: " << filename); - result = EC_InvalidTag; - } - } else - OFLOG_ERROR(xml2dcmLogger, "filename for element " << element->getTag() << " is missing, empty element inserted"); - } else { - OFString dicomVal; - /* convert character set from UTF-8 (for specific VRs only) */ - if (element->isAffectedBySpecificCharacterSet() && - (xmlStrlen(elemVal) > 0) && convertUtf8ToCharset(elemVal, dicomVal)) - { - result = element->putOFStringArray(dicomVal); - } else { - /* set the value of the newly created element */ - result = element->putString(OFreinterpret_cast(char *, elemVal)); - } - if (result.bad()) - OFLOG_ERROR(xml2dcmLogger, "cannot put content to element " << element->getTag() << ": " << result.text()); - } - /* free allocated memory */ - xmlFree(elemVal); - xmlFree(attrVal); - } - return result; -} - - -static OFCondition parseElement(DcmItem *dataset, - xmlNodePtr current) -{ - DcmElement *newElem = NULL; - /* create new DICOM element from XML element */ - OFCondition result = createNewElement(current, newElem); - if (result.good()) - { - /* retrieve specific character set (only on main dataset level) */ - if ((EncodingHandler == NULL) && (dataset->ident() == EVR_dataset) && - (newElem->getTag() == DCM_SpecificCharacterSet)) - { - const char *encString = NULL; - xmlChar *elemVal = xmlNodeGetContent(current); - /* check for known character set */ - if (xmlStrcmp(elemVal, OFreinterpret_cast(const xmlChar *, "ISO_IR 6")) == 0) - encString = "UTF-8"; - else if (xmlStrcmp(elemVal, OFreinterpret_cast(const xmlChar *, "ISO_IR 192")) == 0) - encString = "UTF-8"; - else if (xmlStrcmp(elemVal, OFreinterpret_cast(const xmlChar *, "ISO_IR 100")) == 0) - encString = "ISO-8859-1"; - else if (xmlStrcmp(elemVal, OFreinterpret_cast(const xmlChar *, "ISO_IR 101")) == 0) - encString = "ISO-8859-2"; - else if (xmlStrcmp(elemVal, OFreinterpret_cast(const xmlChar *, "ISO_IR 109")) == 0) - encString = "ISO-8859-3"; - else if (xmlStrcmp(elemVal, OFreinterpret_cast(const xmlChar *, "ISO_IR 110")) == 0) - encString = "ISO-8859-4"; - else if (xmlStrcmp(elemVal, OFreinterpret_cast(const xmlChar *, "ISO_IR 148")) == 0) - encString = "ISO-8859-9"; - else if (xmlStrcmp(elemVal, OFreinterpret_cast(const xmlChar *, "ISO_IR 144")) == 0) - encString = "ISO-8859-5"; - else if (xmlStrcmp(elemVal, OFreinterpret_cast(const xmlChar *, "ISO_IR 127")) == 0) - encString = "ISO-8859-6"; - else if (xmlStrcmp(elemVal, OFreinterpret_cast(const xmlChar *, "ISO_IR 126")) == 0) - encString = "ISO-8859-7"; - else if (xmlStrcmp(elemVal, OFreinterpret_cast(const xmlChar *, "ISO_IR 138")) == 0) - encString = "ISO-8859-8"; - else if (xmlStrlen(elemVal) > 0) - OFLOG_ERROR(xml2dcmLogger, "character set '" << elemVal << "' not supported"); - if (encString != NULL) - { - /* find appropriate encoding handler */ - EncodingHandler = xmlFindCharEncodingHandler(encString); - } - xmlFree(elemVal); - } - /* set the element value */ - result = putElementContent(current, newElem); - /* insert the new element into the dataset */ - if (result.good()) - result = dataset->insert(newElem, OFTrue /*replaceOld*/); - if (result.bad()) - { - /* delete element if insertion or putting the value failed */ - delete newElem; - } - } - return result; -} - - -// forward declaration -static OFCondition parseDataSet(DcmItem *dataset, - xmlNodePtr current, - E_TransferSyntax xfer); - - -static OFCondition parseSequence(DcmSequenceOfItems *sequence, - xmlNodePtr current, - E_TransferSyntax xfer) -{ - OFCondition result = EC_IllegalCall; - if (sequence != NULL) - { - /* ignore blank (empty or whitespace only) nodes */ - while ((current != NULL) && xmlIsBlankNode(current)) - current = current->next; - while (current != NULL) - { - /* ignore non-item nodes */ - if (xmlStrcmp(current->name, OFreinterpret_cast(const xmlChar *, "item")) == 0) - { - /* create new sequence item */ - DcmItem *newItem = new DcmItem(); - if (newItem != NULL) - { - sequence->insert(newItem); - /* proceed parsing the item content */ - parseDataSet(newItem, current->xmlChildrenNode, xfer); - } - } else if (!xmlIsBlankNode(current)) - OFLOG_WARN(xml2dcmLogger, "unexpected node '" << current->name << "', 'item' expected, skipping"); - /* proceed with next node */ - current = current->next; - } - result = EC_Normal; - } - return result; -} - - -static OFCondition parsePixelSequence(DcmPixelSequence *sequence, - xmlNodePtr current) -{ - OFCondition result = EC_IllegalCall; - if (sequence != NULL) - { - /* ignore blank (empty or whitespace only) nodes */ - while ((current != NULL) && xmlIsBlankNode(current)) - current = current->next; - while (current != NULL) - { - /* ignore non-pixel-item nodes */ - if (xmlStrcmp(current->name, OFreinterpret_cast(const xmlChar *, "pixel-item")) == 0) - { - /* create new pixel item */ - DcmPixelItem *newItem = new DcmPixelItem(DCM_PixelItemTag); - if (newItem != NULL) - { - sequence->insert(newItem); - /* put pixel data into the item */ - putElementContent(current, newItem); - } - } else if (!xmlIsBlankNode(current)) - OFLOG_WARN(xml2dcmLogger, "unexpected node '" << current->name << "', 'pixel-item' expected, skipping"); - /* proceed with next node */ - current = current->next; - } - result = EC_Normal; - } - return result; -} - - -static OFCondition parseMetaHeader(DcmMetaInfo *metainfo, - xmlNodePtr current, - const OFBool parse) -{ - /* check for valid node and correct name */ - OFCondition result = checkNode(current, "meta-header"); - if (result.good() && parse) - { - /* get child nodes */ - current = current->xmlChildrenNode; - while (current != NULL) - { - /* ignore non-element nodes */ - if (xmlStrcmp(current->name, OFreinterpret_cast(const xmlChar *, "element")) == 0) - parseElement(metainfo, current); - else if (!xmlIsBlankNode(current)) - OFLOG_WARN(xml2dcmLogger, "unexpected node '" << current->name << "', 'element' expected, skipping"); - /* proceed with next node */ - current = current->next; - } - } - return result; -} - - -static OFCondition parseDataSet(DcmItem *dataset, - xmlNodePtr current, - E_TransferSyntax xfer) -{ - OFCondition result = EC_Normal; - /* ignore blank (empty or whitespace only) nodes */ - while ((current != NULL) && xmlIsBlankNode(current)) - current = current->next; - while (current != NULL) - { - /* ignore non-element/sequence nodes */ - if (xmlStrcmp(current->name, OFreinterpret_cast(const xmlChar *, "element")) == 0) - parseElement(dataset, current); - else if (xmlStrcmp(current->name, OFreinterpret_cast(const xmlChar *, "sequence")) == 0) - { - DcmElement *newElem = NULL; - /* create new sequence element */ - if (createNewElement(current, newElem).good()) - { - /* insert new sequence element into the dataset */ - result = dataset->insert(newElem, OFTrue /*replaceOld*/); - if (result.good()) - { - /* special handling for compressed pixel data */ - if (newElem->getTag() == DCM_PixelData) - { - /* create new pixel sequence */ - DcmPixelSequence *sequence = new DcmPixelSequence(DCM_PixelSequenceTag); - if (sequence != NULL) - { - if (newElem->ident() == EVR_PixelData) - { - /* ... insert it into the dataset and proceed with the pixel items */ - OFstatic_cast(DcmPixelData *, newElem)->putOriginalRepresentation(xfer, NULL, sequence); - parsePixelSequence(sequence, current->xmlChildrenNode); - } else - OFLOG_WARN(xml2dcmLogger, "wrong VR for 'sequence' element with pixel data, ignoring child nodes"); - } - } else { - /* proceed parsing the items of the sequence */ - if (newElem->ident() == EVR_SQ) - parseSequence(OFstatic_cast(DcmSequenceOfItems *, newElem), current->xmlChildrenNode, xfer); - else - OFLOG_WARN(xml2dcmLogger, "wrong VR for 'sequence' element, ignoring child nodes"); - } - } else { - /* delete element if insertion failed */ - delete newElem; - } - } - } else if (!xmlIsBlankNode(current)) - OFLOG_WARN(xml2dcmLogger, "unexpected node '" << current->name << "', skipping"); - /* proceed with next node */ - current = current->next; - } - return result; -} - - -static OFCondition validateXmlDocument(xmlDocPtr doc) -{ - OFCondition result = EC_Normal; - OFLOG_INFO(xml2dcmLogger, "validating XML document ..."); - xmlGenericError(xmlGenericErrorContext, "--- libxml validating ---\n"); - /* temporary buffer needed for errorFunction - more detailed explanation there */ - OFString tmpErrorString; - /* create context for document validation */ - xmlValidCtxt cvp; - cvp.userData = &tmpErrorString; - cvp.error = errorFunction; - cvp.warning = errorFunction; - /* validate the document */ - const int valid = xmlValidateDocument(&cvp, doc); - xmlGenericError(xmlGenericErrorContext, "-------------------------\n"); - if (!valid) - { - OFLOG_ERROR(xml2dcmLogger, "document does not validate"); - result = EC_IllegalCall; - } - return result; -} - - -static OFCondition readXmlFile(const char *ifname, - DcmFileFormat &fileformat, - E_TransferSyntax &xfer, - const OFBool metaInfo, - const OFBool checkNamespace, - const OFBool validateDocument) -{ - OFCondition result = EC_Normal; - xfer = EXS_Unknown; - xmlGenericError(xmlGenericErrorContext, "--- libxml parsing ------\n"); - /* build an XML tree from the file */ -#if LIBXML_VERSION >= 20703 - /* - * Starting with libxml version 2.7.3, the maximum length of XML element values - * is limited to 10 MB. The following code disables this default limitation. - */ - xmlDocPtr doc = xmlReadFile(ifname, NULL /*encoding*/, XML_PARSE_HUGE); -#else - xmlDocPtr doc = xmlParseFile(ifname); -#endif - xmlGenericError(xmlGenericErrorContext, "-------------------------\n"); - if (doc != NULL) - { - /* validate document */ - if (validateDocument) - result = validateXmlDocument(doc); - if (result.good()) - { - /* check whether the document is of the right kind */ - xmlNodePtr current = xmlDocGetRootElement(doc); - if (current != NULL) - { - /* check namespace declaration (if required) */ - if (!checkNamespace || (xmlSearchNsByHref(doc, current, OFreinterpret_cast(const xmlChar *, DCMTK_XML_NAMESPACE_URI)) != NULL)) - { - /* check whether to parse a "file-format" or "data-set" */ - if (xmlStrcmp(current->name, OFreinterpret_cast(const xmlChar *, "file-format")) == 0) - { - OFLOG_INFO(xml2dcmLogger, "parsing file-format ..."); - if (metaInfo) - OFLOG_INFO(xml2dcmLogger, "parsing meta-header ..."); - else - OFLOG_INFO(xml2dcmLogger, "skipping meta-header ..."); - - current = current->xmlChildrenNode; - /* ignore blank (empty or whitespace only) nodes */ - while ((current != NULL) && xmlIsBlankNode(current)) - current = current->next; - /* parse/skip "meta-header" */ - result = parseMetaHeader(fileformat.getMetaInfo(), current, metaInfo /*parse*/); - if (result.good()) - { - current = current->next; - /* ignore blank (empty or whitespace only) nodes */ - while ((current != NULL) && xmlIsBlankNode(current)) - current = current->next; - } - } - /* there should always be a "data-set" node */ - if (result.good()) - { - OFLOG_INFO(xml2dcmLogger, "parsing data-set ..."); - /* parse "data-set" */ - result = checkNode(current, "data-set"); - if (result.good()) - { - DcmDataset *dataset = fileformat.getDataset(); - /* determine stored transfer syntax */ - xmlChar *xferUID = xmlGetProp(current, OFreinterpret_cast(const xmlChar *, "xfer")); - if (xferUID != NULL) - xfer = DcmXfer(OFreinterpret_cast(char *, xferUID)).getXfer(); - result = parseDataSet(dataset, current->xmlChildrenNode, xfer); - /* free allocated memory */ - xmlFree(xferUID); - } - } - if (result.bad() && xmlLogger.isEnabledFor(OFLogger::DEBUG_LOG_LEVEL)) - { - /* dump XML document for debugging purposes */ - xmlChar *str; - int size; - xmlDocDumpFormatMemory(doc, &str, &size, 1); - OFLOG_DEBUG(xmlLogger, str); - xmlFree(str); - } - } else { - OFLOG_ERROR(xml2dcmLogger, "document has wrong type, dcmtk namespace not found"); - result = EC_IllegalCall; - } - } else { - OFLOG_ERROR(xml2dcmLogger, "document is empty: " << ifname); - result = EC_IllegalCall; - } - } - } else { - OFLOG_ERROR(xml2dcmLogger, "could not parse document: " << ifname); - result = EC_IllegalCall; - } - /* free allocated memory */ - xmlFreeDoc(doc); - return result; -} - +static OFLogger xml2dcmLogger = OFLog::getLogger("dcmtk.apps." OFFIS_CONSOLE_APPLICATION); #define SHORTCOL 3 #define LONGCOL 21 - int main(int argc, char *argv[]) { OFBool opt_metaInfo = OFTrue; @@ -709,6 +59,7 @@ OFBool opt_validate = OFFalse; OFBool opt_generateUIDs = OFFalse; OFBool opt_overwriteUIDs = OFFalse; + OFBool opt_stopOnErrors = OFTrue; E_TransferSyntax opt_xfer = EXS_Unknown; E_EncodingType opt_enctype = EET_ExplicitLength; E_GrpLenEncoding opt_glenc = EGL_recalcGL; @@ -758,6 +109,9 @@ #ifdef WITH_ZLIB cmd.addOption("--write-xfer-deflated", "+td", "write with deflated expl. VR little endian TS"); #endif + cmd.addSubGroup("error handling:"); + cmd.addOption("--stop-on-error", "-E", "do not write if document is invalid (default)"); + cmd.addOption("--ignore-errors", "+E", "attempt to write even if document is invalid"); 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"); @@ -871,6 +225,11 @@ cmd.endOptionBlock(); cmd.beginOptionBlock(); + if (cmd.findOption("--stop-on-error")) opt_stopOnErrors = OFTrue; + if (cmd.findOption("--ignore-errors")) opt_stopOnErrors = OFFalse; + cmd.endOptionBlock(); + + cmd.beginOptionBlock(); if (cmd.findOption("--enable-new-vr")) dcmEnableGenerationOfNewVRs(); if (cmd.findOption("--disable-new-vr")) @@ -931,19 +290,8 @@ << DCM_DICT_ENVIRONMENT_VARIABLE); } - /* check for compatible libxml version */ - LIBXML_TEST_VERSION - /* temporary buffer needed for errorFunction - more detailed explanation there */ - OFString tmpErrorString; - /* initialize the XML library (only required for MT-safety) */ - xmlInitParser(); - /* do not substitute entities (other than the standard ones) */ - xmlSubstituteEntitiesDefault(0); - /* add line number to debug messages */ - xmlLineNumbersDefault(1); - /* enable libxml warnings and error messages */ - xmlGetWarningsDefaultValue = 1; - xmlSetGenericErrorFunc(&tmpErrorString, errorFunction); + // initialize XML parser + DcmXMLParseHelper::initLibrary(); OFCondition result = EC_Normal; const char *opt_ifname = NULL; @@ -967,9 +315,10 @@ { DcmFileFormat fileformat; E_TransferSyntax xfer; + DcmXMLParseHelper parser; OFLOG_INFO(xml2dcmLogger, "reading XML input file: " << opt_ifname); /* read XML file and feed data into DICOM fileformat */ - result = readXmlFile(opt_ifname, fileformat, xfer, opt_metaInfo, opt_namespace, opt_validate); + result = parser.readXmlFile(opt_ifname, fileformat, xfer, opt_metaInfo, opt_namespace, opt_validate, opt_stopOnErrors); if (result.good()) { DcmDataset *dataset = fileformat.getDataset(); @@ -1003,7 +352,7 @@ /* check whether pixel data is compressed */ if ((opt_writeMode == EWM_dataset) && DcmXfer(xfer).isEncapsulated()) { - OFLOG_ERROR(xml2dcmLogger, "encapsulated pixel data require file format, ignoring --write-dataset"); + OFLOG_WARN(xml2dcmLogger, "encapsulated pixel data require file format, ignoring --write-dataset"); opt_writeMode = EWM_fileformat; } /* write DICOM file */ @@ -1019,7 +368,7 @@ } /* clean up XML library before quitting */ - xmlCleanupParser(); + DcmXMLParseHelper::cleanupLibrary(); return result.status(); } diff -Nru dcmtk-3.6.6/dcmdata/data/dicom.dic dcmtk-3.6.7/dcmdata/data/dicom.dic --- dcmtk-3.6.6/dcmdata/data/dicom.dic 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/data/dicom.dic 2022-04-28 13:47:25.000000000 +0000 @@ -1,5 +1,5 @@ # -# Copyright (C) 1994-2020, OFFIS e.V. +# Copyright (C) 1994-2022, OFFIS e.V. # All rights reserved. See COPYRIGHT file for details. # # This software and supporting documentation were developed by @@ -21,8 +21,8 @@ # DICONDE (Digital Imaging and Communication in Nondestructive Evaluation) and # DICOS (Digital Imaging and Communications in Security) standard. # -# Generated automatically from DICOM PS 3.6-2020e and PS 3.7-2020e -# File created on 2020-11-24 14:44:39 by J. Riesmeier on thinkpad. +# Generated automatically from DICOM PS 3.6-2022b and PS 3.7-2022b. +# File created on 2022-04-11 09:58:24 by J. Riesmeier on thinkpad2. # # In addition, the data dictionary entries from the following final text # supplements and correction items (CP) have been incorporated: @@ -117,7 +117,9 @@ (0008,0014) UI InstanceCreatorUID 1 DICOM (0008,0015) DT InstanceCoercionDateTime 1 DICOM (0008,0016) UI SOPClassUID 1 DICOM +(0008,0017) UI AcquisitionUID 1 DICOM (0008,0018) UI SOPInstanceUID 1 DICOM +(0008,0019) UI PyramidUID 1 DICOM (0008,001A) UI RelatedGeneralSOPClassUID 1-n DICOM (0008,001B) UI OriginalSpecializedSOPClassUID 1 DICOM (0008,0020) DA StudyDate 1 DICOM @@ -220,6 +222,7 @@ (0008,1072) SQ OperatorIdentificationSequence 1 DICOM (0008,1080) LO AdmittingDiagnosesDescription 1-n DICOM (0008,1084) SQ AdmittingDiagnosesCodeSequence 1 DICOM +(0008,1088) LO PyramidDescription 1 DICOM (0008,1090) LO ManufacturerModelName 1 DICOM (0008,1110) SQ ReferencedStudySequence 1 DICOM (0008,1111) SQ ReferencedPerformedProcedureStepSequence 1 DICOM @@ -462,6 +465,8 @@ (0014,3077) TM TimeOfGainCalibration 1 DICOM/DICONDE (0014,3080) OB BadPixelImage 1 DICOM/DICONDE (0014,3099) LT CalibrationNotes 1 DICOM/DICONDE +(0014,3100) LT LinearityCorrectionTechnique 1 DICOM/DICONDE +(0014,3101) LT BeamHardeningCorrectionTechnique 1 DICOM/DICONDE (0014,4002) SQ PulserEquipmentSequence 1 DICOM/DICONDE (0014,4004) CS PulserType 1 DICOM/DICONDE (0014,4006) LT PulserNotes 1 DICOM/DICONDE @@ -542,9 +547,9 @@ (0014,409C) DS TranslationRateX 1 DICOM/DICONDE (0014,409D) DS TranslationRateY 1 DICOM/DICONDE (0014,409F) DS ChannelOverlap 1 DICOM/DICONDE -(0014,40A0) LO ImageQualityIndicatorType 1 DICOM/DICONDE -(0014,40A1) LO ImageQualityIndicatorMaterial 1 DICOM/DICONDE -(0014,40A2) LO ImageQualityIndicatorSize 1 DICOM/DICONDE +(0014,40A0) LO ImageQualityIndicatorType 1-n DICOM/DICONDE +(0014,40A1) LO ImageQualityIndicatorMaterial 1-n DICOM/DICONDE +(0014,40A2) LO ImageQualityIndicatorSize 1-n DICOM/DICONDE (0014,5002) IS LINACEnergy 1 DICOM/DICONDE (0014,5004) IS LINACOutput 1 DICOM/DICONDE (0014,5100) US ActiveAperture 1 DICOM/DICONDE @@ -849,9 +854,28 @@ (0018,11A3) DS CompressionPressure 1 DICOM (0018,11A4) LO PaddleDescription 1 DICOM (0018,11A5) DS CompressionContactArea 1 DICOM +(0018,11B0) LO AcquisitionMode 1 DICOM +(0018,11B1) LO DoseModeName 1 DICOM +(0018,11B2) CS AcquiredSubtractionMaskFlag 1 DICOM +(0018,11B3) CS FluoroscopyPersistenceFlag 1 DICOM +(0018,11B4) CS FluoroscopyLastImageHoldPersistenceFlag 1 DICOM +(0018,11B5) IS UpperLimitNumberOfPersistentFluoroscopyFrames 1 DICOM +(0018,11B6) CS ContrastBolusAutoInjectionTriggerFlag 1 DICOM +(0018,11B7) FD ContrastBolusInjectionDelay 1 DICOM +(0018,11B8) SQ XAAcquisitionPhaseDetailsSequence 1 DICOM +(0018,11B9) FD XAAcquisitionFrameRate 1 DICOM +(0018,11BA) SQ XAPlaneDetailsSequence 1 DICOM +(0018,11BB) LO AcquisitionFieldOfViewLabel 1 DICOM +(0018,11BC) SQ XRayFilterDetailsSequence 1 DICOM +(0018,11BD) FD XAAcquisitionDuration 1 DICOM +(0018,11BE) CS ReconstructionPipelineType 1 DICOM +(0018,11BF) SQ ImageFilterDetailsSequence 1 DICOM +(0018,11C0) CS AppliedMaskSubtractionFlag 1 DICOM +(0018,11C1) SQ RequestedSeriesDescriptionCodeSequence 1 DICOM (0018,1200) DA DateOfLastCalibration 1-n DICOM (0018,1201) TM TimeOfLastCalibration 1-n DICOM (0018,1202) DT DateTimeOfLastCalibration 1 DICOM +(0018,1203) DT CalibrationDateTime 1 DICOM (0018,1210) SH ConvolutionKernel 1-n DICOM (0018,1242) IS ActualFrameDuration 1 DICOM (0018,1243) IS CountRate 1 DICOM @@ -1005,6 +1029,7 @@ (0018,6058) UL TableOfPixelValues 1-n DICOM (0018,605A) FL TableOfParameterValues 1-n DICOM (0018,6060) FL RWaveTimeVector 1-n DICOM +(0018,6070) US ActiveImageAreaOverlayGroup 1 DICOM (0018,7000) CS DetectorConditionsNominalFlag 1 DICOM (0018,7001) DS DetectorTemperature 1 DICOM (0018,7004) CS DetectorType 1 DICOM @@ -1230,7 +1255,6 @@ (0018,9321) SQ CTExposureSequence 1 DICOM (0018,9322) FD ReconstructionPixelSpacing 2 DICOM (0018,9323) CS ExposureModulationType 1-n DICOM -(0018,9324) FD EstimatedDoseSaving 1 DICOM (0018,9325) SQ CTXRayDetailsSequence 1 DICOM (0018,9326) SQ CTPositionSequence 1 DICOM (0018,9327) FD TablePosition 1 DICOM @@ -1521,6 +1545,7 @@ (0020,0013) IS InstanceNumber 1 DICOM (0020,0019) IS ItemNumber 1 DICOM (0020,0020) CS PatientOrientation 2 DICOM +(0020,0027) LO PyramidLabel 1 DICOM (0020,0032) DS ImagePositionPatient 3 DICOM (0020,0037) DS ImageOrientationPatient 6 DICOM (0020,0052) UI FrameOfReferenceUID 1 DICOM @@ -1767,7 +1792,7 @@ (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,1642) UL NumberOfBscansPerFrame 1 DICOM (0022,1643) FL BscanSlabThickness 1 DICOM (0022,1644) FL DistanceBetweenBscanSlabs 1 DICOM (0022,1645) FL BscanCycleTime 1 DICOM @@ -2063,6 +2088,7 @@ (0032,1034) SQ RequestingServiceCodeSequence 1 DICOM (0032,1060) LO RequestedProcedureDescription 1 DICOM (0032,1064) SQ RequestedProcedureCodeSequence 1 DICOM +(0032,1065) SQ RequestedLateralityCodeSequence 1 DICOM (0032,1066) UT ReasonForVisit 1 DICOM (0032,1067) SQ ReasonForVisitCodeSequence 1 DICOM (0032,1070) LO RequestedContrastAgent 1 DICOM @@ -2303,6 +2329,7 @@ (0040,A027) LO VerifyingOrganization 1 DICOM (0040,A030) DT VerificationDateTime 1 DICOM (0040,A032) DT ObservationDateTime 1 DICOM +(0040,A033) DT ObservationStartDateTime 1 DICOM (0040,A040) CS ValueType 1 DICOM (0040,A043) SQ ConceptNameCodeSequence 1 DICOM (0040,A050) CS ContinuityOfContent 1 DICOM @@ -2353,7 +2380,7 @@ (0040,A730) SQ ContentSequence 1 DICOM (0040,A801) SQ TabulatedValuesSequence 1 DICOM (0040,A802) UL NumberOfTableRows 1 DICOM -(0040,A803) UL NumbeOfTableColumns 1 DICOM +(0040,A803) UL NumberOfTableColumns 1 DICOM (0040,A804) UL TableRowNumber 1 DICOM (0040,A805) UL TableColumnNumber 1 DICOM (0040,A806) SQ TableRowDefinitionSequence 1 DICOM @@ -2519,9 +2546,6 @@ (0048,0112) DS ObjectiveLensPower 1 DICOM (0048,0113) DS ObjectiveLensNumericalAperture 1 DICOM (0048,0120) SQ PaletteColorLookupTableSequence 1 DICOM -(0048,0200) SQ ReferencedImageNavigationSequence 1 DICOM -(0048,0201) US TopLeftHandCornerOfLocalizerArea 2 DICOM -(0048,0202) US BottomRightHandCornerOfLocalizerArea 2 DICOM (0048,0207) SQ OpticalPathIdentificationSequence 1 DICOM (0048,021A) SQ PlanePositionSlideSequence 1 DICOM (0048,021E) SL ColumnPositionInTotalImagePixelMatrix 1 DICOM @@ -2666,7 +2690,7 @@ (0062,0006) ST SegmentDescription 1 DICOM (0062,0007) SQ SegmentationAlgorithmIdentificationSequence 1 DICOM (0062,0008) CS SegmentAlgorithmType 1 DICOM -(0062,0009) LO SegmentAlgorithmName 1 DICOM +(0062,0009) LO SegmentAlgorithmName 1-n DICOM (0062,000A) SQ SegmentIdentificationSequence 1 DICOM (0062,000B) US ReferencedSegmentNumber 1-n DICOM (0062,000C) US RecommendedDisplayGrayscaleValue 1 DICOM @@ -2713,6 +2737,7 @@ (0066,001F) US VectorDimensionality 1 DICOM (0066,0020) FL VectorAccuracy 1-n DICOM (0066,0021) OF VectorCoordinateData 1 DICOM +(0066,0022) OD DoublePointCoordinatesData 1 DICOM (0066,0026) SQ TriangleStripSequence 1 DICOM (0066,0027) SQ TriangleFanSequence 1 DICOM (0066,0028) SQ LineSequence 1 DICOM @@ -2825,6 +2850,22 @@ (0068,7003) SQ ModelUsageCodeSequence 1 DICOM (0068,7004) UI ModelGroupUID 1 DICOM (0068,7005) UR RelativeURIReferenceWithinEncapsulatedDocument 1 DICOM +(006A,0001) CS AnnotationCoordinateType 1 DICOM +(006A,0002) SQ AnnotationGroupSequence 1 DICOM +(006A,0003) UI AnnotationGroupUID 1 DICOM +(006A,0005) LO AnnotationGroupLabel 1 DICOM +(006A,0006) UT AnnotationGroupDescription 1 DICOM +(006A,0007) CS AnnotationGroupGenerationType 1 DICOM +(006A,0008) SQ AnnotationGroupAlgorithmIdentificationSequence 1 DICOM +(006A,0009) SQ AnnotationPropertyCategoryCodeSequence 1 DICOM +(006A,000A) SQ AnnotationPropertyTypeCodeSequence 1 DICOM +(006A,000B) SQ AnnotationPropertyTypeModifierCodeSequence 1 DICOM +(006A,000C) UL NumberOfAnnotations 1 DICOM +(006A,000D) CS AnnotationAppliesToAllOpticalPaths 1 DICOM +(006A,000E) SH ReferencedOpticalPathIdentifier 1-n DICOM +(006A,000F) CS AnnotationAppliesToAllZPlanes 1 DICOM +(006A,0010) FD CommonZCoordinateValue 1-n DICOM +(006A,0011) OL AnnotationIndexList 1 DICOM (0070,0001) SQ GraphicAnnotationSequence 1 DICOM (0070,0002) CS GraphicLayer 1 DICOM (0070,0003) CS BoundingBoxAnnotationUnits 1 DICOM @@ -3377,6 +3418,8 @@ (2110,0010) CS PrinterStatus 1 DICOM (2110,0020) CS PrinterStatusInfo 1 DICOM (2110,0030) LO PrinterName 1 DICOM +(2130,00A0) SQ ProposedStudySequence 1 DICOM +(2130,00C0) SQ OriginalImageSequence 1 DICOM (2200,0001) CS LabelUsingInformationExtractedFromInstances 1 DICOM (2200,0002) UT LabelText 1 DICOM (2200,0003) CS LabelStyleSelection 1 DICOM @@ -3467,11 +3510,9 @@ (3006,0039) SQ ROIContourSequence 1 DICOM (3006,0040) SQ ContourSequence 1 DICOM (3006,0042) CS ContourGeometricType 1 DICOM -(3006,0044) DS ContourSlabThickness 1 DICOM -(3006,0045) DS ContourOffsetVector 3 DICOM (3006,0046) IS NumberOfContourPoints 1 DICOM (3006,0048) IS ContourNumber 1 DICOM -(3006,0049) IS AttachedContours 1-n DICOM +(3006,004A) SQ SourcePixelPlanesCharacteristicsSequence 1 DICOM (3006,0050) DS ContourData 3-3n DICOM (3006,0080) SQ RTROIObservationsSequence 1 DICOM (3006,0082) IS ObservationNumber 1 DICOM @@ -3549,6 +3590,7 @@ (3008,00B0) SQ RecordedWedgeSequence 1 DICOM (3008,00C0) SQ RecordedCompensatorSequence 1 DICOM (3008,00D0) SQ RecordedBlockSequence 1 DICOM +(3008,00D1) SQ RecordedBlockSlabSequence 1 DICOM (3008,00E0) SQ TreatmentSummaryMeasuredDoseReferenceSequence 1 DICOM (3008,00F0) SQ RecordedSnoutSequence 1 DICOM (3008,00F2) SQ RecordedRangeShifterSequence 1 DICOM @@ -3595,7 +3637,6 @@ (300A,0007) TM RTPlanTime 1 DICOM (300A,0009) LO TreatmentProtocols 1-n DICOM (300A,000A) CS PlanIntent 1 DICOM -(300A,000B) LO TreatmentSites 1-n DICOM (300A,000C) CS RTPlanGeometry 1 DICOM (300A,000E) ST PrescriptionDescription 1 DICOM (300A,0010) SQ DoseReferenceSequence 1 DICOM @@ -3858,6 +3899,7 @@ (300A,029C) DS SourceApplicatorWallNominalThickness 1 DICOM (300A,029E) DS SourceApplicatorWallNominalTransmission 1 DICOM (300A,02A0) DS SourceApplicatorStepSize 1 DICOM +(300A,02A1) IS ApplicatorShapeReferencedROINumber 1 DICOM (300A,02A2) IS TransferTubeNumber 1 DICOM (300A,02A4) DS TransferTubeLength 1 DICOM (300A,02B0) SQ ChannelShieldSequence 1 DICOM @@ -4036,7 +4078,6 @@ (300A,062F) SQ CArmPhotonElectronControlPointSequence 1 DICOM (300A,0630) SQ ReferencedRTRadiationSequence 1 DICOM (300A,0631) SQ ReferencedRTInstanceSequence 1 DICOM -(300A,0632) SQ ReferencedRTPatientSetupSequence 1 DICOM (300A,0634) FD SourceToPatientSurfaceDistance 1 DICOM (300A,0635) SQ TreatmentMachineSpecialModeCodeSequence 1 DICOM (300A,0636) US IntendedNumberOfFractions 1 DICOM @@ -4065,7 +4106,6 @@ (300A,064D) SQ RTBeamLimitingDeviceDefinitionSequence 1 DICOM (300A,064E) CS ParallelRTBeamDelimiterOpeningMode 1 DICOM (300A,064F) CS ParallelRTBeamDelimiterLeafMountingSide 1-n DICOM -(300A,0650) UI PatientSetupUID 1 DICOM (300A,0651) SQ WedgeDefinitionSequence 1 DICOM (300A,0652) FD RadiationBeamWedgeAngle 1 DICOM (300A,0653) FD RadiationBeamWedgeThinEdgeDistance 1 DICOM @@ -4165,6 +4205,33 @@ (300A,0774) SQ DoseMeasurementDeviceCodeSequence 1 DICOM (300A,0780) SQ AdditionalParameterRecordingInstanceSequence 1 DICOM (300A,0783) ST InterlockOriginDescription 1 DICOM +(300A,0784) SQ RTPatientPositionScopeSequence 1 DICOM +(300A,0785) UI ReferencedTreatmentPositionGroupUID 1 DICOM +(300A,0786) US RadiationOrderIndex 1 DICOM +(300A,0787) SQ OmittedRadiationSequence 1 DICOM +(300A,0788) SQ ReasonForOmissionCodeSequence 1 DICOM +(300A,0789) SQ RTDeliveryStartPatientPositionSequence 1 DICOM +(300A,078A) SQ RTTreatmentPreparationPatientPositionSequence 1 DICOM +(300A,078B) SQ ReferencedRTTreatmentPreparationSequence 1 DICOM +(300A,078C) SQ ReferencedPatientSetupPhotoSequence 1 DICOM +(300A,078D) SQ PatientTreatmentPreparationMethodCodeSequence 1 DICOM +(300A,078E) LT PatientTreatmentPreparationProcedureParameterDescription 1 DICOM +(300A,078F) SQ PatientTreatmentPreparationDeviceSequence 1 DICOM +(300A,0790) SQ PatientTreatmentPreparationProcedureSequence 1 DICOM +(300A,0791) SQ PatientTreatmentPreparationProcedureCodeSequence 1 DICOM +(300A,0792) LT PatientTreatmentPreparationMethodDescription 1 DICOM +(300A,0793) SQ PatientTreatmentPreparationProcedureParameterSequence 1 DICOM +(300A,0794) LT PatientSetupPhotoDescription 1 DICOM +(300A,0795) US PatientTreatmentPreparationProcedureIndex 1 DICOM +(300A,0796) US ReferencedPatientSetupProcedureIndex 1 DICOM +(300A,0797) SQ RTRadiationTaskSequence 1 DICOM +(300A,0798) SQ RTPatientPositionDisplacementSequence 1 DICOM +(300A,0799) SQ RTPatientPositionSequence 1 DICOM +(300A,079A) LO DisplacementReferenceLabel 1 DICOM +(300A,079B) FD DisplacementMatrix 16 DICOM +(300A,079C) SQ PatientSupportDisplacementSequence 1 DICOM +(300A,079D) SQ DisplacementReferenceLocationCodeSequence 1 DICOM +(300A,079E) CS RTRadiationSetDeliveryUsage 1 DICOM (300C,0002) SQ ReferencedRTPlanSequence 1 DICOM (300C,0004) SQ ReferencedBeamSequence 1 DICOM (300C,0006) IS ReferencedBeamNumber 1 DICOM @@ -4199,6 +4266,21 @@ (300C,0111) SQ OmittedBeamTaskSequence 1 DICOM (300C,0112) CS ReasonForOmission 1 DICOM (300C,0113) LO ReasonForOmissionDescription 1 DICOM +(300C,0114) SQ PrescriptionOverviewSequence 1 DICOM +(300C,0115) FL TotalPrescriptionDose 1 DICOM +(300C,0116) SQ PlanOverviewSequence 1 DICOM +(300C,0117) US PlanOverviewIndex 1 DICOM +(300C,0118) US ReferencedPlanOverviewIndex 1 DICOM +(300C,0119) US NumberOfFractionsIncluded 1 DICOM +(300C,0120) SQ DoseCalibrationConditionsSequence 1 DICOM +(300C,0121) FD AbsorbedDoseToMetersetRatio 1 DICOM +(300C,0122) FD DelineatedRadiationFieldSize 2 DICOM +(300C,0123) CS DoseCalibrationConditionsVerifiedFlag 1 DICOM +(300C,0124) FD CalibrationReferencePointDepth 1 DICOM +(300C,0125) SQ GatingBeamHoldTransitionSequence 1 DICOM +(300C,0126) CS BeamHoldTransition 1 DICOM +(300C,0127) DT BeamHoldTransitionDateTime 1 DICOM +(300C,0128) SQ BeamHoldOriginatingDeviceSequence 1 DICOM (300E,0002) CS ApprovalStatus 1 DICOM (300E,0004) DA ReviewDate 1 DICOM (300E,0005) TM ReviewTime 1 DICOM @@ -4567,6 +4649,7 @@ (0018,9166) CS RETIRED_BulkMotionStatus 1 DICOM/retired (0018,9195) FD RETIRED_ChemicalShiftMinimumIntegrationLimitInHz 1 DICOM/retired (0018,9196) FD RETIRED_ChemicalShiftMaximumIntegrationLimitInHz 1 DICOM/retired +(0018,9324) FD RETIRED_EstimatedDoseSaving 1 DICOM/retired (0020,0014) IS RETIRED_IsotopeNumber 1 DICOM/retired (0020,0015) IS RETIRED_PhaseNumber 1 DICOM/retired (0020,0016) IS RETIRED_IntervalNumber 1 DICOM/retired @@ -4790,6 +4873,9 @@ (0040,DB0B) CS RETIRED_TemplateExtensionFlag 1 DICOM/retired (0040,DB0C) UI RETIRED_TemplateExtensionOrganizationUID 1 DICOM/retired (0040,DB0D) UI RETIRED_TemplateExtensionCreatorUID 1 DICOM/retired +(0048,0200) SQ RETIRED_ReferencedImageNavigationSequence 1 DICOM/retired +(0048,0201) US RETIRED_TopLeftHandCornerOfLocalizerArea 2 DICOM/retired +(0048,0202) US RETIRED_BottomRightHandCornerOfLocalizerArea 2 DICOM/retired (0054,1400) CS RETIRED_CountsIncluded 1-n DICOM/retired (0054,1401) CS RETIRED_DeadTimeCorrectionFlag 1 DICOM/retired (0066,0023) OW RETIRED_TrianglePointIndexList 1 DICOM/retired @@ -4851,16 +4937,20 @@ (2130,0050) SQ RETIRED_AnnotationContentSequence 1 DICOM/retired (2130,0060) SQ RETIRED_ImageOverlayBoxContentSequence 1 DICOM/retired (2130,0080) SQ RETIRED_PresentationLUTContentSequence 1 DICOM/retired -(2130,00A0) SQ RETIRED_ProposedStudySequence 1 DICOM/retired -(2130,00C0) SQ RETIRED_OriginalImageSequence 1 DICOM/retired +(3006,0044) DS RETIRED_ContourSlabThickness 1 DICOM/retired +(3006,0045) DS RETIRED_ContourOffsetVector 3 DICOM/retired +(3006,0049) IS RETIRED_AttachedContours 1-n DICOM/retired (3006,00B9) SQ RETIRED_AdditionalRTROIIdentificationCodeSequence 1 DICOM/retired (3006,00C0) SQ RETIRED_FrameOfReferenceRelationshipSequence 1 DICOM/retired (3006,00C2) UI RETIRED_RelatedFrameOfReferenceUID 1 DICOM/retired (3006,00C4) CS RETIRED_FrameOfReferenceTransformationType 1 DICOM/retired +(300A,000B) LO RETIRED_TreatmentSites 1-n DICOM/retired (300A,0082) DS RETIRED_BeamDoseSpecificationPoint 3 DICOM/retired (300A,008D) FL RETIRED_AverageBeamDosePointDepth 1 DICOM/retired (300A,008E) FL RETIRED_AverageBeamDosePointEquivalentDepth 1 DICOM/retired (300A,008F) FL RETIRED_AverageBeamDosePointSSD 1 DICOM/retired +(300A,0632) SQ RETIRED_ReferencedRTPatientSetupSequence 1 DICOM/retired +(300A,0650) UI RETIRED_PatientSetupUID 1 DICOM/retired (4000,0010) LT RETIRED_Arbitrary 1 DICOM/retired (4000,4000) LT RETIRED_TextComments 1 DICOM/retired (4008,0040) SH RETIRED_ResultsID 1 DICOM/retired diff -Nru dcmtk-3.6.6/dcmdata/data/OP_template_latin_1.xml dcmtk-3.6.7/dcmdata/data/OP_template_latin_1.xml --- dcmtk-3.6.6/dcmdata/data/OP_template_latin_1.xml 1970-01-01 00:00:00.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/data/OP_template_latin_1.xml 2022-04-28 13:47:25.000000000 +0000 @@ -0,0 +1,245 @@ + + + + + + + + + + + ISO_IR 100 + + + + L + + + 409898007 + SCT + Fundus Camera + + + + + + 0.02\0.02 + + + + ORIGINAL\PRIMARY + 20180417 + 20210721120000 + 111210.48 + 0 + NO TRIGGER + N + 1.2.276.0.75.2.1.11.1.1.180417111300315.260535858133367.1000014 + 1.2.276.0.75.2.1.11.1.2.180417111335959.260535858133367.1000017 + 1.2.276.0.75.2.1.11.1.5.180417103449651.260535858133367.1000001 + (0018,1063) + NO + + + + 1 + 20210721 + 120000 + 987654321 + Sample Manufacturer + Smith^John + Müller^André + 12345678 + 19500101 + M + CCD + 54321 + 12345 + L\F + NO + 0.0 + 50.0 + 90.0 + NO + + + 111630 + DCM + Dynamic light + + + + + 445391002 + SCT + Polarizing optical filter + + + + + 111609 + DCM + No filter + + + + + 410686000 + SCT + Contact fundus lens + + + + + 1.0 + 1.0 + 2.5 + + + + + + + + 350086004 + SCT + Fluorescein + 1 + + + 47625008 + SCT + Intravenous route + + + + + + + + + + + + + + 408744005 + SCT + Primary gaze + + + + + + + + 111900 + DCM + Macula centered + + + 100 + 100 + + + + + 2 + + + + + + 414497003 + SCT + Infrared + + + 415770004 + SCT + Ultraviolet + + + + + + + + + + 771928002 + SCT + Atropine + + + 0.01 + + + % + UCUM + Percent + + + + + 2.0 + + + diff -Nru dcmtk-3.6.6/dcmdata/data/OP_template_utf_8.xml dcmtk-3.6.7/dcmdata/data/OP_template_utf_8.xml --- dcmtk-3.6.6/dcmdata/data/OP_template_utf_8.xml 1970-01-01 00:00:00.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/data/OP_template_utf_8.xml 2022-04-28 13:47:25.000000000 +0000 @@ -0,0 +1,245 @@ + + + + + + + + + + + ISO_IR 192 + + + + L + + + 409898007 + SCT + Fundus Camera + + + + + + 0.02\0.02 + + + + ORIGINAL\PRIMARY + 20180417 + 20210721120000 + 111210.48 + 0 + NO TRIGGER + N + 1.2.276.0.75.2.1.11.1.1.180417111300315.260535858133367.1000014 + 1.2.276.0.75.2.1.11.1.2.180417111335959.260535858133367.1000017 + 1.2.276.0.75.2.1.11.1.5.180417103449651.260535858133367.1000001 + (0018,1063) + NO + + + + 1 + 20210721 + 120000 + 987654321 + Sample Manufacturer + Smith^John + Müller^André + 12345678 + 19500101 + M + CCD + 54321 + 12345 + L\F + NO + 0.0 + 50.0 + 90.0 + NO + + + 111630 + DCM + Dynamic light + + + + + 445391002 + SCT + Polarizing optical filter + + + + + 111609 + DCM + No filter + + + + + 410686000 + SCT + Contact fundus lens + + + + + 1.0 + 1.0 + 2.5 + + + + + + + + 350086004 + SCT + Fluorescein + 1 + + + 47625008 + SCT + Intravenous route + + + + + + + + + + + + + + 408744005 + SCT + Primary gaze + + + + + + + + 111900 + DCM + Macula centered + + + 100 + 100 + + + + + 2 + + + + + + 414497003 + SCT + Infrared + + + 415770004 + SCT + Ultraviolet + + + + + + + + + + 771928002 + SCT + Atropine + + + 0.01 + + + % + UCUM + Percent + + + + + 2.0 + + + diff -Nru dcmtk-3.6.6/dcmdata/docs/cda2dcm.man dcmtk-3.6.7/dcmdata/docs/cda2dcm.man --- dcmtk-3.6.6/dcmdata/docs/cda2dcm.man 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/docs/cda2dcm.man 2022-04-28 13:47:25.000000000 +0000 @@ -277,6 +277,6 @@ \section cda2dcm_copyright COPYRIGHT -Copyright (C) 2018-2020 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany. +Copyright (C) 2018-2022 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany. */ diff -Nru dcmtk-3.6.6/dcmdata/docs/datadict.txt dcmtk-3.6.7/dcmdata/docs/datadict.txt --- dcmtk-3.6.6/dcmdata/docs/datadict.txt 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/docs/datadict.txt 2022-04-28 13:47:25.000000000 +0000 @@ -3,18 +3,21 @@ ----------------------------------------------------------------------------- In DICOM, the Data Dictionary (part 6 of the DICOM standard) stores for all -tags their respective VR, VM, attribute name and other information. This +attribute tags their respective VR, VM, name and other information. This information must also be made available in DCMTK. This is accomplished through a global data dictionary class. The global data dictionary is loaded within a C++ constructor into the global DcmDataDictionary class instance called dcmDataDict once it is accessed for -the first time from the code. The dictionary content is populated by three -different approaches: Either the content (tags, VR, ...) can be compiled -into the dictionary code, or the dictionary is filled by loading a text file -on startup from a pre-defined file path (also called an "external" data -dictionary). Lastly, DCMTK will load one or more additional external -dictionaries from the path set in the environment variable DCMDICTPATH, if set. +the first time from the code. The initial dictionary content is populated by +two different approaches: + +1. builtin: The content (tags, VR, ...) is compiled into the dictionary code. +2. external: The dictionary is filled by loading a default text file on + startup from a pre-defined file path. + +It is also possible to not load any default dictionary on startup at all +(option "disable" or setting "none", see below). The built-in approach offers the advantage that a binary will not have to load any information from a separate file, which may get lost or used in an @@ -27,11 +30,14 @@ these defaults can be changed or how both approaches can even be combined is further explained below. +There is also an option to evaluate the environment variable DCMDICTPATH and +to read dictionaries defined therein, see below for details. + ----------------------------------------------------------------------------- DICTIONARY DEFAULT: AUTOCONF ON POSIX SYSTEMS ----------------------------------------------------------------------------- -By default on a Posix system the global data dictionary will attempt to load +By default, on a Posix system the global data dictionary will attempt to load the data dictionary from an external file. The location is pre-configured to $DCMTK_DAT_DIR/dicom.dic where $DCMTK_DAT_DIR is DCMTK's data installation directory chosen using configure's --datadir option (default value: /dcmtk). @@ -44,64 +50,44 @@ DICTIONARY DEFAULT: CMAKE ON WINDOWS AND POSIX SYSTEMS ----------------------------------------------------------------------------- -On Windows, the default behavior is to compile a fully-populated DICOM -dictionary as global data dictionary into the dcmdata library. Thus, it is -not required to load an external data dictionary from a file. However, -usage of external dictionaries is still possible on Windows by setting the -environment variable DCMDICTPATH accordingly (see further details below). - -On Posix systems, the default setting is to load the data dictionary from an -external file (as described in the above section on Autoconf). +On Windows, the default behavior is to compile a fully-populated built-in data +dictionary as a global data dictionary into the dcmdata library. Thus, it is +not required to load an external data dictionary from a file. + +On Posix systems, the default setting when using CMake is to load the data +dictionary from an external file (as described in the above section on +Autoconf). ----------------------------------------------------------------------------- CHANGING DICTIONARY DEFAULTS ----------------------------------------------------------------------------- Autoconf as well as CMake provide options to change their default dictionary -behavior. For Autoconf, configure offers the options: +behavior. For Autoconf, there are two different options. The first one is: - --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 (default) - --disable-builtin-dict don't load built-in dictionary + --enable-default-dict=TYPE -They can be used to toggle both dictionaries on and off: If the external -dictionary is turned off, it is not tried to load it from any default -location. +Possible values for TYPE are: -When building with CMake, the related options are called + "external": Compile with external default dictionary + "builtin" : Compile with built-in default dictionary - - DCMTK_ENABLE_EXTERNAL_DICTIONARY - - DCMTK_ENABLE_BUILTIN_DICTIONARY +With the second option, the default dictionary can be disabled: ------------------------------------------------------------------------------ -DICTIONARY LOAD ORDER AND USING MULTIPLE DICTIONARIES ------------------------------------------------------------------------------ + --disable-default-dict -The built-in dictionary, if enabled, is always loaded first on startup, -followed by any external dictionary. Data dictionary entries loaded later in -the load sequence override entries loaded earlier. - -Note that most of the time (no matter whether using Autoconf or CMake) it -makes sense to enable only the built-in dictionary or only the external -dictionary. If both external and built-in version are enabled, the global -data dictionary is populated first with the compiled-in data, and afterwards -the external dictionary is loaded. If the latter is the one shipped with -DCMTK (dicom.dic) then the external dictionary provides no extra information -since it contains exactly the same data as the built-in one but only takes -time for loading. Thus it only makes sense to enable both options if the -external dictionary is modified to include (only) additional information not -available in the built-in dictionary. - -If the user disables both options, no dictionary will be loaded by default -on startup. However, a dictionary can be defined using the DCMDICTPATH -environment variable (see below). If DCMDICTPATH is used, the default -external dictionary will not be loaded at all. +When building with CMake, the related option is: -Application programs should check that a data dictionary has been loaded -before using the functionality of the dcmdata library. The absence of -a data dictionary is likely to cause unexpected behavior (e.g. unknown -attributes will be encoded using VR=UN). + - DCMTK_DEFAULT_DICT + +Possible values for this option are: + + "external": Compile with external default dictionary + "builtin" : Compile with built-in default dictionary + "none" : Compile without any default dictionary (same as "disable") + +That means, both Autoconf and CMake provide the same functionality. On Posix +systems "external" is the default value, while on Windows it is "builtin". ----------------------------------------------------------------------------- CUSTOM EXTERNAL DICTIONARIES THROUGH ENVIRONMENT VARIABLE "DCMDICTPATH" @@ -109,23 +95,26 @@ Sometimes it makes sense to change the dictionary that should be loaded without recompiling the source code. This can be done either by modifying -the dicom.dic that is already loaded, or, by specifying a different location -in an environment variable that is evaluated on DCMTK startup. That -environment variable is called "DCMDICTPATH" and is considered on Windows -and Posix platforms. If DCMDICTPATH is not set, the behavior described in -the sections above takes place (built-in and/or external dictionary from -default path is loaded). +the dicom.dic that is already loaded (if using 'external' standard dictionary) +or by specifying a different location in an environment variable that is +evaluated on DCMTK startup. This environment variable is called "DCMDICTPATH" +and can be used on Windows and Posix systems. +If DCMDICTPATH is not set, the behavior described in the sections above takes +place (built-in or external dictionary from default path is loaded). Otherwise, the file provided in the environment variable DCMDICTPATH is loaded -and any default external dictionary is ignored (!). However, note that the -built-in dictionary (if configured) will be always loaded. +and any default external dictionary is ignored (!). Note, however, that the +built-in dictionary (if configured) is always loaded. In order to set DCMDICTPATH on Unix, the csh shell command setenv DCMDICTPATH $HOME/dicom.dic would cause all applications using the dcmdata library to load the data -dictionary dicom.dic from the users home directory. +dictionary dicom.dic from the user's home directory. When using the bash, +the command is: + + export DCMDICTPATH=$HOME/dicom.dic For Windows, the call @@ -134,19 +123,70 @@ will cause all applications using the dcmdata library to load the data dictionary dicom.dic from the main directory on drive C. +It is possible to completely disable the evaluation of DCMDICTPATH (e.g. for +security reasons). The related configure options controlling this behavior +are the following: + + --enable-dcmdictpath (default) + --disable-dcmdictpath + +When building with CMake, the related option is: + + - DCMTK_USE_DCMDICTPATH (on/off, default: on) + +By default, DCMDICTPATH evaluation is enabled on both on Windows and Posix +systems. + +----------------------------------------------------------------------------- +DICTIONARY LOAD ORDER AND USING MULTIPLE DICTIONARIES +----------------------------------------------------------------------------- + +The load behavior is slightly different for built-in and external default +dictionaries: + +If the built-in dictionary is enabled, it will be loaded first on startup. +DCMTK then checks whether DCMDICTPATH should be evaluated (see above) and, if +it is set and provides a non-empty value, DCMTK will load all additional +dictionaries on top of the built-in default dictionary. + +If instead the external default dictionary is enabled and DCMDICTPATH +evaluation is turned off, the external default dictionary will be loaded. + +However, if DCMDICTPATH evaluation is enabled and the environment variable +provides a (non-empty) value, DCMTK will load the dictionary denoted by +DCMDICTPATH and will not load the external default dictionary at all. + +It is not possible to enable both external and built-in default dictionary at +the same time. + +If the user decides to use no default dictionary at all by defining +(DCMTK_DEFAULT_DICT=none), it is still possible to define a dictionary by +using the DCMDICTPATH mechanism. If DCMTK_USE_DCMDICTPATH is turned off +as well, no dictionary is loaded on startup and the user must populate +the dictionary using his own code during runtime. + +Application programs should check that a data dictionary has been loaded +before using the functionality of the dcmdata library. The absence of +a data dictionary is likely to cause unexpected behavior (e.g. unknown +attributes will be encoded using VR=UN). + ----------------------------------------------------------------------------- USING MORE THAN ONE EXTERNAL DICTIONARY ----------------------------------------------------------------------------- The DCMDICTPATH environment variable can even refer to several data dictionaries separated by colons (":") on Unix systems, or semicolons (";") -on Windows systems. Thus the Unix csh command: +on Windows systems. Thus the Unix csh command setenv DCMDICTPATH /usr/local/share/dcmtk/dicom.dic:$HOME/dicom.dic would cause all applications using the dcmdata library to first load the default data dictionary and subsequently load the data dictionary dicom.dic -from the user's home directory. On Windows systems, an example would be: +from the user's home directory. When using the bash, the command would be: + + export DCMDICTPATH=/usr/local/share/dcmtk/dicom.dic:$HOME/dicom.dic + +On Windows systems, the command would be: set DCMDICTPATH=c:\dcmtk-install\share\dcmtk\dicom.dic;c:\dicom.dic @@ -161,51 +201,55 @@ which is also installed (using Autoconf or CMake) and used as the default external dictionary (if external default dictionary is enabled). -The example data dictionary is is meant to be complete and includes all -standard and retired tags from part 6 of the DICOM standard (see the header of +The example data dictionary is meant to be complete and includes all standard +and retired attributes from part 6 of the DICOM standard (see the header of the file where the implemented version of the standard plus all supplements and CPs are listed). Also contained, since they are included in part 6, are the official DICONDE (Digital Imaging and Communication in Nondestructive -Evaluation) and DICOS (Digital Imaging and Communications in Security) tags. +Evaluation) and DICOS (Digital Imaging and Communications in Security) +attributes. Another example dictionary included is the dcmdata/data/private.dic, which includes all private tag information known to DCMTK developers and partly taken over from other DICOM toolkits and various other sources like DICOM -Conformance Statements. There is no guarantee that the tag information -contained is valid or even complete. By default, this dictionary is not -taken into account. It can be enabled to load on startup as an extra -external dictionary using Autoconf's configure option "--enable-private-tags" -and in CMake using the option "DCMTK_ENABLE_PRIVATE_TAGS". Enabling will -result in private.dic being added to the DCM_DICT_DEFAULT_PATH, which lists -those external dictionaries to be loaded on startup (see above). Note that -the private tag option is only considered for external dictionaries if -external dictionaries are not turned off. +Conformance Statements. There is no guarantee that the information contained +is valid or even complete. By default, this dictionary is not taken into +account. It can be enabled to load on startup as an extra external dictionary +using Autoconf's configure option --enable-private-tags and in CMake using the +option DCMTK_ENABLE_PRIVATE_TAGS. Enabling will result in private.dic being +added to the DCM_DICT_DEFAULT_PATH, which lists those external dictionaries to +be loaded on startup (see above). Note that the private tag option is only +considered for external dictionaries if external dictionaries are not disabled. DCMTK also includes two predefined built-in dictionaries, one fully populated -containing the information from DCMTK's dicom.dic file, and one that is empty. -Both are defined in dcdictbi.cc and the one to be used is selected by the -built-in dictionary build options (see above). +containing the information from DCMTK's dicom.dic file (and possibly from the +private.dic file if enabled, see next paragraph), and one that is empty. Both +are defined in dcdictbi.cc and the one to be used is selected by the dictionary +build options (see above). The code for a useful built-in data dictionary can be regenerated at any time by the mkdictbi program (dcmdata/libsrc/mkdictbi). The dcmdata library Makefiles (for Autoconf dcmdata/libsrc/Makefile.in, and for CMake -dcmdata/libsrc/CMakeLists.txt) include a target (updatebuiltindict) for this -purpose. After regenerating dcdictbi.cc, rebuilding the libdcmdata.a library -and relinking all your applications will ensure that the built-in data -dictionary is used. +dcmdata/libsrc/CMakeLists.txt) provide a target (updatebuiltindict) for this +purpose. After regenerating dcdictbi.cc, rebuilding the dcmdata library and +relinking all applications will ensure that the built-in data dictionary is +used. This dictionary contains all definitions from the dicom.dic and +private.dic file. Please note, however, that the latter is only available if +support for private tags has been enabled during DCMTK configuration and thus +ENABLE_PRIVATE_TAGS is defined in osconfig.h. ----------------------------------------------------------------------------- TAG NAME CONSTANTS FOR USE IN APPLICATIONS ----------------------------------------------------------------------------- The include file dcmdata/include/dcmtk/dcmdata/dcdeftag.h can be generated -from a data dictionary by the program mkdeftag. The include file defines tag -names for use in application programs. The names are generated from the names -specified in the data dictionary. Duplicate names in the data dictionary will -result in compiler warnings due to duplicate #define's when compiling code -that includes the dcdeftag.h header file. Thus, when adding new entries to -the data dictionary, care should be taken to ensure that attribute names are -not duplicated for distinct tags. +from a data dictionary by the program mkdeftag. The include file defines +attribute tag names for use in application programs. The names are generated +from the official keywords specified in the data dictionary. Duplicate names +in the data dictionary will result in compiler warnings due to duplicate +#define's when compiling code that includes the dcdeftag.h header file. +Thus, when adding new entries to the data dictionary, care should be taken to +ensure that attribute names are not duplicated for distinct tags. The dcmdata library Makefiles (for Autoconf dcmdata/libsrc/Makefile.in and for CMake dcmdata/libsrc/CMakeLists.txt) include a target (updatedeftag) that @@ -220,4 +264,4 @@ DCMTK Development Team, Oldenburg, Germany -Last revised: 2018-09-04 (Onken). +Last revised: 2021-08-31 (Riesmeier). diff -Nru dcmtk-3.6.6/dcmdata/docs/dcm2json.man dcmtk-3.6.7/dcmdata/docs/dcm2json.man --- dcmtk-3.6.6/dcmdata/docs/dcm2json.man 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/docs/dcm2json.man 2022-04-28 13:47:25.000000000 +0000 @@ -213,7 +213,7 @@ ] }, "00100030": { - "vr": "DT", + "vr": "DA", "Value": [ "19670701" ] @@ -295,6 +295,18 @@ \section dcm2json_notes NOTES +\subsection dcm2json_numbers_as_strings Numbers as Strings + +The DICOM standard allows certain numeric DICOM value representations, DS, IS, +SV and UV, to be converted either to a JSON number or a JSON string. +\b dcm2json converts DS and IS values to JSON numbers if they are valid decimal +strings or integer strings, and to strings if they contain any illegal +character. \b dcm2json converts SV and UV values to numbers if they are not +larger than 9007199254740991ll or smaller than -9007199254740991ll, and to +strings otherwise. While the JSON specification permits larger numbers, these +are the largest integers that JavaScript can handle. Therefore, many JSON +parsers cannot process larger numbers. + \subsection dcm2json_character_encoding Character Encoding As required by the DICOM JSON encoding, \b dcm2json always creates output in @@ -389,6 +401,6 @@ \section dcm2json_copyright COPYRIGHT -Copyright (C) 2016-2020 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany. +Copyright (C) 2016-2022 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany. */ diff -Nru dcmtk-3.6.6/dcmdata/docs/dcm2pdf.man dcmtk-3.6.7/dcmdata/docs/dcm2pdf.man --- dcmtk-3.6.6/dcmdata/docs/dcm2pdf.man 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/docs/dcm2pdf.man 2022-04-28 13:47:25.000000000 +0000 @@ -206,6 +206,6 @@ \section dcm2pdf_copyright COPYRIGHT -Copyright (C) 2007-2014 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany. +Copyright (C) 2007-2022 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany. */ diff -Nru dcmtk-3.6.6/dcmdata/docs/dcm2xml.man dcmtk-3.6.7/dcmdata/docs/dcm2xml.man --- dcmtk-3.6.6/dcmdata/docs/dcm2xml.man 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/docs/dcm2xml.man 2022-04-28 13:47:25.000000000 +0000 @@ -391,6 +391,6 @@ \section dcm2xml_copyright COPYRIGHT -Copyright (C) 2002-2020 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany. +Copyright (C) 2002-2022 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany. */ diff -Nru dcmtk-3.6.6/dcmdata/docs/dcmconv.man dcmtk-3.6.7/dcmdata/docs/dcmconv.man --- dcmtk-3.6.6/dcmdata/docs/dcmconv.man 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/docs/dcmconv.man 2022-04-28 13:47:25.000000000 +0000 @@ -387,6 +387,6 @@ \section dcmconv_copyright COPYRIGHT -Copyright (C) 1994-2020 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany. +Copyright (C) 1994-2022 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany. */ diff -Nru dcmtk-3.6.6/dcmdata/docs/dcmcrle.man dcmtk-3.6.7/dcmdata/docs/dcmcrle.man --- dcmtk-3.6.6/dcmdata/docs/dcmcrle.man 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/docs/dcmcrle.man 2022-04-28 13:47:25.000000000 +0000 @@ -258,6 +258,6 @@ \section dcmcrle_copyright COPYRIGHT -Copyright (C) 2002-2018 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany. +Copyright (C) 2002-2022 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany. */ diff -Nru dcmtk-3.6.6/dcmdata/docs/dcmdrle.man dcmtk-3.6.7/dcmdata/docs/dcmdrle.man --- dcmtk-3.6.6/dcmdata/docs/dcmdrle.man 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/docs/dcmdrle.man 2022-04-28 13:47:25.000000000 +0000 @@ -247,6 +247,6 @@ \section dcmdrle_copyright COPYRIGHT -Copyright (C) 2002-2014 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany +Copyright (C) 2002-2022 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany */ diff -Nru dcmtk-3.6.6/dcmdata/docs/dcmdump.man dcmtk-3.6.7/dcmdata/docs/dcmdump.man --- dcmtk-3.6.6/dcmdata/docs/dcmdump.man 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/docs/dcmdump.man 2022-04-28 13:47:25.000000000 +0000 @@ -423,6 +423,6 @@ \section dcmdump_copyright COPYRIGHT -Copyright (C) 1994-2017 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany. +Copyright (C) 1994-2022 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany. */ diff -Nru dcmtk-3.6.6/dcmdata/docs/dcmftest.man dcmtk-3.6.7/dcmdata/docs/dcmftest.man --- dcmtk-3.6.6/dcmdata/docs/dcmftest.man 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/docs/dcmftest.man 2022-04-28 13:47:25.000000000 +0000 @@ -39,6 +39,6 @@ \section dcmftest_copyright COPYRIGHT -Copyright (C) 1997-2014 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany. +Copyright (C) 1997-2022 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany. */ diff -Nru dcmtk-3.6.6/dcmdata/docs/dcmgpdir.man dcmtk-3.6.7/dcmdata/docs/dcmgpdir.man --- dcmtk-3.6.6/dcmdata/docs/dcmgpdir.man 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/docs/dcmgpdir.man 2022-04-28 13:47:25.000000000 +0000 @@ -296,6 +296,6 @@ \section dcmgpdir_copyright COPYRIGHT -Copyright (C) 1996-2016 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany. +Copyright (C) 1996-2022 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany. */ diff -Nru dcmtk-3.6.6/dcmdata/docs/dcmodify.man dcmtk-3.6.7/dcmdata/docs/dcmodify.man --- dcmtk-3.6.6/dcmdata/docs/dcmodify.man 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/docs/dcmodify.man 2022-04-28 13:47:25.000000000 +0000 @@ -590,6 +590,6 @@ \section dcmodify_copyright COPYRIGHT -Copyright (C) 2003-2014 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany. +Copyright (C) 2003-2022 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany. */ diff -Nru dcmtk-3.6.6/dcmdata/docs/dump2dcm.man dcmtk-3.6.7/dcmdata/docs/dump2dcm.man --- dcmtk-3.6.6/dcmdata/docs/dump2dcm.man 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/docs/dump2dcm.man 2022-04-28 13:47:25.000000000 +0000 @@ -314,6 +314,6 @@ \section dump2dcm_copyright COPYRIGHT -Copyright (C) 1996-2020 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany. +Copyright (C) 1996-2022 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany. */ diff -Nru dcmtk-3.6.6/dcmdata/docs/img2dcm.man dcmtk-3.6.7/dcmdata/docs/img2dcm.man --- dcmtk-3.6.6/dcmdata/docs/img2dcm.man 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/docs/img2dcm.man 2022-04-28 13:47:25.000000000 +0000 @@ -9,7 +9,7 @@ \section img2dcm_synopsis SYNOPSIS \verbatim -img2dcm [options] imgfile-in dcmfile-out +img2dcm [options] imgfile-in... dcmfile-out \endverbatim \section img2dcm_description DESCRIPTION @@ -22,16 +22,11 @@ missing DICOM type 1 and type 2 attributes to work even without any template dataset. -\b img2dcm only supports single-frame output so far, i.e. it is not possible to -create multi-frame objects. Thus, also output SOP Classes that potentially -allow multiple frames within one object (such as the new Secondary Capture SOP -Classes) can only be created containing a single frame. - \section img2dcm_parameters PARAMETERS \verbatim -imgfile-in image file to be imported +imgfile-in image input filename -dcmfile-out DICOM output file +dcmfile-out DICOM output filename \endverbatim \section img2dcm_options OPTIONS @@ -73,6 +68,9 @@ -df --dataset-from [f]ilename: string use dataset from DICOM file f + -dx --dataset-from-xml [f]ilename: string + use dataset from XML file f + -stf --study-from [f]ilename: string read patient/study from DICOM file f @@ -95,6 +93,17 @@ -ka --keep-appn keep APPn sections (except JFIF) + + -rc --remove-com + remove COM segment + +XML validation: + + +Vd --validate-document + validate XML document against DTD + + +Vn --check-namespace + check XML namespace in document root \endverbatim \subsection img2dcm_processing_options processing options @@ -116,20 +125,22 @@ (only with --do-checks) +i1 --invent-type1 - invent missing type 1 attributes + invent missing type 1 attributes (default) (only with --do-checks) -i1 --no-type1-invent do not invent missing type 1 attributes (only with --do-checks) -character set: +character set conversion of study/series file: - +l1 --latin1 - set latin-1 as standard character set (default) - - -l1 --no-latin1 - keep 7-bit ASCII as standard character set + -Ct --transliterate + try to approximate characters that cannot be + represented through similar looking characters + + -Cd --discard-illegal + discard characters that cannot be represented + in destination character set other processing options: @@ -142,13 +153,16 @@ target SOP class: -sc --sec-capture - write Secondary Capture SOP class + write Secondary Capture SOP class (default) -nsc --new-sc write new Secondary Capture SOP classes -vlp --vl-photo - write Visible Light Photographic SOP class (default) + write Visible Light Photographic SOP class + + -oph --oph-photo + write Ophthalmic Photography SOP classes output file format: @@ -204,11 +218,15 @@ As an exception, the SOP Instance UID is not copied by this option. Also image related data like Rows, Columns etc. is exchanged during conversion. Note that \b img2dcm does not check any other attribute - values for validity, e. g. it does not look into sequences to adapt any + values for validity, e.g. it does not look into sequences to adapt any attributes to the new object (referenced images etc.). Therefore, it is recommended to use the templates in the data directory for (old) SC and VLP objects. See also section "Input Templates". +\li Using the \e --dataset-from-xml option \b img2dcm is also forced to + import attributes from an existing file. In this case, however, the + file must contain XML data in the format as produced by \b dcm2xml. + \li The \e --study-from and \e --series-from options (mutually exclusive) can be used to import patient, study and series information from an existing DICOM file. If \e --series-from is specified, then the given DICOM file @@ -280,12 +298,32 @@ dump2dcm SC.dump SC.dcm \endverbatim +For Ophthalmic Photography images, XML templates are provided +(see sample file \e OP_template_utf_8.xml and \e OP_template_latin_1.xml). + It is possible to use any DICOM file as a template. Please note that the complete DICOM dataset is imported; hence, it should be assured that only 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 img2dcm_character_sets Character Sets + +When an input template is loaded using \e --dataset-from or \e --dataset-from-xml, +the specific character set of that template is used for the generated DICOM file. +If the \e --study-from or \e --series-from options are used additionally, +img2dcm will try to convert the character set of these attributes to that +of the template, and will report an error if that is not possible. +If the \e --study-from or \e --series-from options are used without a template, +the specific character set of this source is used for the generated DICOM file. +Any keys specified on the command line with the \e --key option are treated +as raw bytes and override any attributes that may already be present due +to a template or study/series file. Therefore, care should be taken to not +specify a specific character set on the command line if one might be loaded +from another file. It is also the user's responsibility to ensure that +attribute values specified on the command line use the correct encoding, +as no conversion will take place before the values are stored in the DICOM file. + \subsection img2dcm_input_plugins Input Plugins The \b img2dcm application currently supports the JPEG and the BMP image format @@ -294,12 +332,12 @@ \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 -conversion of even big JPEG files without the need of decoding and re-encoding. -The JPEG plugin chooses the necessary output transfer syntax automatically -depending on the actual encoding of the data inside the JPEG file. Therefore, -the following Transfer Syntaxes (and their corresponding JPEG encodings) are -used by the JPEG plugin: +and slightly transformed (e.g. JFIF header is cut off) to allow fast conversion +of even big JPEG files without the need of decoding and re-encoding. The JPEG +plugin chooses the necessary output transfer syntax automatically depending on +the actual encoding of the data inside the JPEG file. Therefore, the following +Transfer Syntaxes (and their corresponding JPEG encodings) are used by the JPEG +plugin: \li JPEG Coding Process 1 Baseline, Lossy, Non-Hierarchical, Sequential, DCT, Huffman, 8 Bit @@ -335,29 +373,33 @@ not. However, the most reliable approach is to cut those markers and their information off the JPEG stream. This approach is also taken by the \b img2dcm application. By default, all APPn markers are cut off from the original JPEG -stream. However, if you want to keep other APPn markers than JFIF (e. g. -EXIF information) inside the DICOM stream, the option \e --keep-appn -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. +stream. However, if you want to keep other APPn markers than JFIF (e.g. EXIF +information) inside the DICOM stream, the option \e --keep-appn 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. As stated before, +JFIF information is always removed by \b img2dcm. However, when using this +option, the APP2 marker is retained, but \b img2dcm does not create an +equivalent ICC Profile (0028,2000) attribute. \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 -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. +run length encoding will be rejected. Such images are uncommon. Input images +will either be converted into a DICOM image with RGB color model and a bit +depth of 24, or into an image with MONOCHROME2 color model an 8 bits per pixel. There are no specific options for fine-tuning BMP format conversion. \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 -\e -sc), the new Secondary Capture Image SOP classes (option \e -nsc) and -Visible Light Photographic Image SOP class (option \e -vl) are available. -Please note that the first one is deprecated according to the DICOM standard -but is selected as a default because it is widely supported. Future versions -of \b img2dcm might provide further output plugins for other SOP Classes. +export plugins for the Secondary Capture Image SOP class (default, option +\e -sc), the Multiframe Secondary Capture Image SOP classes (option \e -nsc), +Visible Light Photographic Image SOP class (option \e -vl), and the Ophthalmic +Photography Image SOP Classes (option \e -oph) are available. Please note that +the first one is deprecated according to the DICOM standard but is selected as +a default because it is widely supported. Future versions of \b img2dcm might +provide further output plugins for other SOP Classes. For the new Secondary Capture SOP classes, it is not possible to specify which specific SOP class should be used for output. That is because these new SOP @@ -406,7 +448,7 @@
Same as 1), but does not perform any attribute checking and no type 1 and type 2 attribute insertion! So in this case, an invalid DICOM object would be generated. This can be interesting if the output file is not meant to be -completed but will undergo further transformations, e. g. adding attributes +completed but will undergo further transformations, e.g. adding attributes using \b dcmodify. Only use option \e --no-checks if you know what you are doing! @@ -489,16 +531,18 @@ \section img2dcm_files FILES \/SC.dump - Sample dump file for Secondary Capture images -\n\/VLP.dump - Sample dump file for Visible Light Photographic -images +\n\/VLP.dump - Sample dump file for Visible Light +Photographic images +\n\/OP_template.xml - Sample XML template for Ophthalmic +Photography images \section img2dcm_see_also SEE ALSO dcm2pnm(1), dcmj2pnm(1), dump2dcm(1), dcmconv(1), -dcmodify(1) +dcmodify(1), dcm2xml(1) \section img2dcm_copyright COPYRIGHT -Copyright (C) 2007-2020 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany. +Copyright (C) 2007-2022 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany. */ diff -Nru dcmtk-3.6.6/dcmdata/docs/pdf2dcm.man dcmtk-3.6.7/dcmdata/docs/pdf2dcm.man --- dcmtk-3.6.6/dcmdata/docs/pdf2dcm.man 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/docs/pdf2dcm.man 2022-04-28 13:47:25.000000000 +0000 @@ -271,6 +271,6 @@ \section pdf2dcm_copyright COPYRIGHT -Copyright (C) 2005-2020 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany. +Copyright (C) 2005-2022 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany. */ diff -Nru dcmtk-3.6.6/dcmdata/docs/stl2dcm.man dcmtk-3.6.7/dcmdata/docs/stl2dcm.man --- dcmtk-3.6.6/dcmdata/docs/stl2dcm.man 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/docs/stl2dcm.man 2022-04-28 13:47:25.000000000 +0000 @@ -287,6 +287,6 @@ \section stl2dcm_copyright COPYRIGHT -Copyright (C) 2018-2020 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany. +Copyright (C) 2018-2022 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany. */ diff -Nru dcmtk-3.6.6/dcmdata/docs/xml2dcm.man dcmtk-3.6.7/dcmdata/docs/xml2dcm.man --- dcmtk-3.6.6/dcmdata/docs/xml2dcm.man 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/docs/xml2dcm.man 2022-04-28 13:47:25.000000000 +0000 @@ -121,6 +121,14 @@ +td --write-xfer-deflated write with deflated explicit VR little endian TS +error handling: + + -E --stop-on-error + do not write if document is invalid (default) + + +E --ignore-errors + attempt to write even if document is invalid + post-1993 value representations: +u --enable-new-vr @@ -342,6 +350,6 @@ \section xml2dcm_copyright COPYRIGHT -Copyright (C) 2003-2020 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany. +Copyright (C) 2003-2022 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany. */ diff -Nru dcmtk-3.6.6/dcmdata/include/dcmtk/dcmdata/dcchrstr.h dcmtk-3.6.7/dcmdata/include/dcmtk/dcmdata/dcchrstr.h --- dcmtk-3.6.6/dcmdata/include/dcmtk/dcmdata/dcchrstr.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/include/dcmtk/dcmdata/dcchrstr.h 2022-04-28 13:47:25.000000000 +0000 @@ -141,7 +141,7 @@ // ensure inherited overloads of matches take part in overload resolution using DcmByteString::matches; - /// @copydoc DcmByteString::matches(OFString,OFString,OFBool) + /// @copydoc DcmByteString::matches(const OFString&,const OFString&,OFBool) const virtual OFBool matches(const OFString& key, const OFString& candidate, const OFBool enableWildCardMatching = OFTrue) const; diff -Nru dcmtk-3.6.6/dcmdata/include/dcmtk/dcmdata/dcddirif.h dcmtk-3.6.7/dcmdata/include/dcmtk/dcmdata/dcddirif.h --- dcmtk-3.6.6/dcmdata/include/dcmtk/dcmdata/dcddirif.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/include/dcmtk/dcmdata/dcddirif.h 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2002-2016, OFFIS e.V. + * Copyright (C) 2002-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -1116,6 +1116,18 @@ const OFString &referencedFileID, const OFFilename &sourceFilename); + /** create or update annotation record and copy required values from dataset + * @param record record to be updated, use NULL to create a new one + * @param fileformat DICOM dataset of the current file + * @param referencedFileID value of the Referenced File ID attribute + * @param sourceFilename name of the source DICOM file + * @return pointer to new or updated record, NULL if an error occurred + */ + DcmDirectoryRecord *buildAnnotationRecord(DcmDirectoryRecord *record, + DcmFileFormat *fileformat, + const OFString &referencedFileID, + const OFFilename &sourceFilename); + /** create or update image record and copy required values from dataset * @param record record to be updated, use NULL to create a new one * @param fileformat DICOM dataset of the current file diff -Nru dcmtk-3.6.6/dcmdata/include/dcmtk/dcmdata/dcdeftag.h dcmtk-3.6.7/dcmdata/include/dcmtk/dcmdata/dcdeftag.h --- dcmtk-3.6.6/dcmdata/include/dcmtk/dcmdata/dcdeftag.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/include/dcmtk/dcmdata/dcdeftag.h 2022-04-28 13:47:25.000000000 +0000 @@ -3,8 +3,8 @@ ** It was generated automatically by: ** ** User: joergr -** Host: thinkpad -** Date: 2020-11-24 14:49:52 +** Host: thinkpad2 +** Date: 2022-04-12 12:43:36 ** 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 "2020-11-24 14:49:52" +#define DCM_DICT_DEFTAG_BUILD_DATE "2022-04-12 12:43:36" /* ** Fixed Tags in ascending (gggg,eeee) order. -** Number of entries: 4829 +** Number of entries: 4919 ** Tags with a repeating component (repeating tags) are listed later. */ #define DCM_CommandGroupLength DcmTagKey(0x0000, 0x0000) @@ -123,7 +123,9 @@ #define DCM_InstanceCreatorUID DcmTagKey(0x0008, 0x0014) #define DCM_InstanceCoercionDateTime DcmTagKey(0x0008, 0x0015) #define DCM_SOPClassUID DcmTagKey(0x0008, 0x0016) +#define DCM_AcquisitionUID DcmTagKey(0x0008, 0x0017) #define DCM_SOPInstanceUID DcmTagKey(0x0008, 0x0018) +#define DCM_PyramidUID DcmTagKey(0x0008, 0x0019) #define DCM_RelatedGeneralSOPClassUID DcmTagKey(0x0008, 0x001a) #define DCM_OriginalSpecializedSOPClassUID DcmTagKey(0x0008, 0x001b) #define DCM_StudyDate DcmTagKey(0x0008, 0x0020) @@ -234,6 +236,7 @@ #define DCM_OperatorIdentificationSequence DcmTagKey(0x0008, 0x1072) #define DCM_AdmittingDiagnosesDescription DcmTagKey(0x0008, 0x1080) #define DCM_AdmittingDiagnosesCodeSequence DcmTagKey(0x0008, 0x1084) +#define DCM_PyramidDescription DcmTagKey(0x0008, 0x1088) #define DCM_ManufacturerModelName DcmTagKey(0x0008, 0x1090) #define DCM_RETIRED_ReferencedResultsSequence DcmTagKey(0x0008, 0x1100) #define DCM_ReferencedStudySequence DcmTagKey(0x0008, 0x1110) @@ -504,6 +507,8 @@ #define DCM_TimeOfGainCalibration DcmTagKey(0x0014, 0x3077) #define DCM_BadPixelImage DcmTagKey(0x0014, 0x3080) #define DCM_CalibrationNotes DcmTagKey(0x0014, 0x3099) +#define DCM_LinearityCorrectionTechnique DcmTagKey(0x0014, 0x3100) +#define DCM_BeamHardeningCorrectionTechnique DcmTagKey(0x0014, 0x3101) #define DCM_PulserEquipmentSequence DcmTagKey(0x0014, 0x4002) #define DCM_PulserType DcmTagKey(0x0014, 0x4004) #define DCM_PulserNotes DcmTagKey(0x0014, 0x4006) @@ -902,9 +907,28 @@ #define DCM_CompressionPressure DcmTagKey(0x0018, 0x11a3) #define DCM_PaddleDescription DcmTagKey(0x0018, 0x11a4) #define DCM_CompressionContactArea DcmTagKey(0x0018, 0x11a5) +#define DCM_AcquisitionMode DcmTagKey(0x0018, 0x11b0) +#define DCM_DoseModeName DcmTagKey(0x0018, 0x11b1) +#define DCM_AcquiredSubtractionMaskFlag DcmTagKey(0x0018, 0x11b2) +#define DCM_FluoroscopyPersistenceFlag DcmTagKey(0x0018, 0x11b3) +#define DCM_FluoroscopyLastImageHoldPersistenceFlag DcmTagKey(0x0018, 0x11b4) +#define DCM_UpperLimitNumberOfPersistentFluoroscopyFrames DcmTagKey(0x0018, 0x11b5) +#define DCM_ContrastBolusAutoInjectionTriggerFlag DcmTagKey(0x0018, 0x11b6) +#define DCM_ContrastBolusInjectionDelay DcmTagKey(0x0018, 0x11b7) +#define DCM_XAAcquisitionPhaseDetailsSequence DcmTagKey(0x0018, 0x11b8) +#define DCM_XAAcquisitionFrameRate DcmTagKey(0x0018, 0x11b9) +#define DCM_XAPlaneDetailsSequence DcmTagKey(0x0018, 0x11ba) +#define DCM_AcquisitionFieldOfViewLabel DcmTagKey(0x0018, 0x11bb) +#define DCM_XRayFilterDetailsSequence DcmTagKey(0x0018, 0x11bc) +#define DCM_XAAcquisitionDuration DcmTagKey(0x0018, 0x11bd) +#define DCM_ReconstructionPipelineType DcmTagKey(0x0018, 0x11be) +#define DCM_ImageFilterDetailsSequence DcmTagKey(0x0018, 0x11bf) +#define DCM_AppliedMaskSubtractionFlag DcmTagKey(0x0018, 0x11c0) +#define DCM_RequestedSeriesDescriptionCodeSequence DcmTagKey(0x0018, 0x11c1) #define DCM_DateOfLastCalibration DcmTagKey(0x0018, 0x1200) #define DCM_TimeOfLastCalibration DcmTagKey(0x0018, 0x1201) #define DCM_DateTimeOfLastCalibration DcmTagKey(0x0018, 0x1202) +#define DCM_CalibrationDateTime DcmTagKey(0x0018, 0x1203) #define DCM_ConvolutionKernel DcmTagKey(0x0018, 0x1210) #define DCM_RETIRED_UpperLowerPixelValues DcmTagKey(0x0018, 0x1240) #define DCM_ActualFrameDuration DcmTagKey(0x0018, 0x1242) @@ -1071,6 +1095,7 @@ #define DCM_TableOfPixelValues DcmTagKey(0x0018, 0x6058) #define DCM_TableOfParameterValues DcmTagKey(0x0018, 0x605a) #define DCM_RWaveTimeVector DcmTagKey(0x0018, 0x6060) +#define DCM_ActiveImageAreaOverlayGroup DcmTagKey(0x0018, 0x6070) #define DCM_DetectorConditionsNominalFlag DcmTagKey(0x0018, 0x7000) #define DCM_DetectorTemperature DcmTagKey(0x0018, 0x7001) #define DCM_DetectorType DcmTagKey(0x0018, 0x7004) @@ -1300,7 +1325,7 @@ #define DCM_CTExposureSequence DcmTagKey(0x0018, 0x9321) #define DCM_ReconstructionPixelSpacing DcmTagKey(0x0018, 0x9322) #define DCM_ExposureModulationType DcmTagKey(0x0018, 0x9323) -#define DCM_EstimatedDoseSaving DcmTagKey(0x0018, 0x9324) +#define DCM_RETIRED_EstimatedDoseSaving DcmTagKey(0x0018, 0x9324) #define DCM_CTXRayDetailsSequence DcmTagKey(0x0018, 0x9325) #define DCM_CTPositionSequence DcmTagKey(0x0018, 0x9326) #define DCM_TablePosition DcmTagKey(0x0018, 0x9327) @@ -1599,6 +1624,7 @@ #define DCM_RETIRED_OverlayNumber DcmTagKey(0x0020, 0x0022) #define DCM_RETIRED_CurveNumber DcmTagKey(0x0020, 0x0024) #define DCM_RETIRED_LUTNumber DcmTagKey(0x0020, 0x0026) +#define DCM_PyramidLabel DcmTagKey(0x0020, 0x0027) #define DCM_RETIRED_ImagePosition DcmTagKey(0x0020, 0x0030) #define DCM_ImagePositionPatient DcmTagKey(0x0020, 0x0032) #define DCM_RETIRED_ImageOrientation DcmTagKey(0x0020, 0x0035) @@ -1870,7 +1896,7 @@ #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_NumberOfBscansPerFrame DcmTagKey(0x0022, 0x1642) #define DCM_BscanSlabThickness DcmTagKey(0x0022, 0x1643) #define DCM_DistanceBetweenBscanSlabs DcmTagKey(0x0022, 0x1644) #define DCM_BscanCycleTime DcmTagKey(0x0022, 0x1645) @@ -2250,6 +2276,7 @@ #define DCM_RETIRED_StudyComponentStatusID DcmTagKey(0x0032, 0x1055) #define DCM_RequestedProcedureDescription DcmTagKey(0x0032, 0x1060) #define DCM_RequestedProcedureCodeSequence DcmTagKey(0x0032, 0x1064) +#define DCM_RequestedLateralityCodeSequence DcmTagKey(0x0032, 0x1065) #define DCM_ReasonForVisit DcmTagKey(0x0032, 0x1066) #define DCM_ReasonForVisitCodeSequence DcmTagKey(0x0032, 0x1067) #define DCM_RequestedContrastAgent DcmTagKey(0x0032, 0x1070) @@ -2542,6 +2569,7 @@ #define DCM_RETIRED_DocumentingOrganizationIdentifierCodeSequenceTrial DcmTagKey(0x0040, 0xa028) #define DCM_VerificationDateTime DcmTagKey(0x0040, 0xa030) #define DCM_ObservationDateTime DcmTagKey(0x0040, 0xa032) +#define DCM_ObservationStartDateTime DcmTagKey(0x0040, 0xa033) #define DCM_ValueType DcmTagKey(0x0040, 0xa040) #define DCM_ConceptNameCodeSequence DcmTagKey(0x0040, 0xa043) #define DCM_RETIRED_MeasurementPrecisionDescriptionTrial DcmTagKey(0x0040, 0xa047) @@ -2639,7 +2667,7 @@ #define DCM_RETIRED_LanguageCodeSequenceTrial DcmTagKey(0x0040, 0xa744) #define DCM_TabulatedValuesSequence DcmTagKey(0x0040, 0xa801) #define DCM_NumberOfTableRows DcmTagKey(0x0040, 0xa802) -#define DCM_NumbeOfTableColumns DcmTagKey(0x0040, 0xa803) +#define DCM_NumberOfTableColumns DcmTagKey(0x0040, 0xa803) #define DCM_TableRowNumber DcmTagKey(0x0040, 0xa804) #define DCM_TableColumnNumber DcmTagKey(0x0040, 0xa805) #define DCM_TableRowDefinitionSequence DcmTagKey(0x0040, 0xa806) @@ -2811,9 +2839,9 @@ #define DCM_ObjectiveLensPower DcmTagKey(0x0048, 0x0112) #define DCM_ObjectiveLensNumericalAperture DcmTagKey(0x0048, 0x0113) #define DCM_PaletteColorLookupTableSequence DcmTagKey(0x0048, 0x0120) -#define DCM_ReferencedImageNavigationSequence DcmTagKey(0x0048, 0x0200) -#define DCM_TopLeftHandCornerOfLocalizerArea DcmTagKey(0x0048, 0x0201) -#define DCM_BottomRightHandCornerOfLocalizerArea DcmTagKey(0x0048, 0x0202) +#define DCM_RETIRED_ReferencedImageNavigationSequence DcmTagKey(0x0048, 0x0200) +#define DCM_RETIRED_TopLeftHandCornerOfLocalizerArea DcmTagKey(0x0048, 0x0201) +#define DCM_RETIRED_BottomRightHandCornerOfLocalizerArea DcmTagKey(0x0048, 0x0202) #define DCM_OpticalPathIdentificationSequence DcmTagKey(0x0048, 0x0207) #define DCM_PlanePositionSlideSequence DcmTagKey(0x0048, 0x021a) #define DCM_ColumnPositionInTotalImagePixelMatrix DcmTagKey(0x0048, 0x021e) @@ -3007,6 +3035,7 @@ #define DCM_VectorDimensionality DcmTagKey(0x0066, 0x001f) #define DCM_VectorAccuracy DcmTagKey(0x0066, 0x0020) #define DCM_VectorCoordinateData DcmTagKey(0x0066, 0x0021) +#define DCM_DoublePointCoordinatesData DcmTagKey(0x0066, 0x0022) #define DCM_RETIRED_TrianglePointIndexList DcmTagKey(0x0066, 0x0023) #define DCM_RETIRED_EdgePointIndexList DcmTagKey(0x0066, 0x0024) #define DCM_RETIRED_VertexPointIndexList DcmTagKey(0x0066, 0x0025) @@ -3123,6 +3152,22 @@ #define DCM_ModelUsageCodeSequence DcmTagKey(0x0068, 0x7003) #define DCM_ModelGroupUID DcmTagKey(0x0068, 0x7004) #define DCM_RelativeURIReferenceWithinEncapsulatedDocument DcmTagKey(0x0068, 0x7005) +#define DCM_AnnotationCoordinateType DcmTagKey(0x006a, 0x0001) +#define DCM_AnnotationGroupSequence DcmTagKey(0x006a, 0x0002) +#define DCM_AnnotationGroupUID DcmTagKey(0x006a, 0x0003) +#define DCM_AnnotationGroupLabel DcmTagKey(0x006a, 0x0005) +#define DCM_AnnotationGroupDescription DcmTagKey(0x006a, 0x0006) +#define DCM_AnnotationGroupGenerationType DcmTagKey(0x006a, 0x0007) +#define DCM_AnnotationGroupAlgorithmIdentificationSequence DcmTagKey(0x006a, 0x0008) +#define DCM_AnnotationPropertyCategoryCodeSequence DcmTagKey(0x006a, 0x0009) +#define DCM_AnnotationPropertyTypeCodeSequence DcmTagKey(0x006a, 0x000a) +#define DCM_AnnotationPropertyTypeModifierCodeSequence DcmTagKey(0x006a, 0x000b) +#define DCM_NumberOfAnnotations DcmTagKey(0x006a, 0x000c) +#define DCM_AnnotationAppliesToAllOpticalPaths DcmTagKey(0x006a, 0x000d) +#define DCM_ReferencedOpticalPathIdentifier DcmTagKey(0x006a, 0x000e) +#define DCM_AnnotationAppliesToAllZPlanes DcmTagKey(0x006a, 0x000f) +#define DCM_CommonZCoordinateValue DcmTagKey(0x006a, 0x0010) +#define DCM_AnnotationIndexList DcmTagKey(0x006a, 0x0011) #define DCM_GraphicAnnotationSequence DcmTagKey(0x0070, 0x0001) #define DCM_GraphicLayer DcmTagKey(0x0070, 0x0002) #define DCM_BoundingBoxAnnotationUnits DcmTagKey(0x0070, 0x0003) @@ -3730,8 +3775,8 @@ #define DCM_RETIRED_AnnotationContentSequence DcmTagKey(0x2130, 0x0050) #define DCM_RETIRED_ImageOverlayBoxContentSequence DcmTagKey(0x2130, 0x0060) #define DCM_RETIRED_PresentationLUTContentSequence DcmTagKey(0x2130, 0x0080) -#define DCM_RETIRED_ProposedStudySequence DcmTagKey(0x2130, 0x00a0) -#define DCM_RETIRED_OriginalImageSequence DcmTagKey(0x2130, 0x00c0) +#define DCM_ProposedStudySequence DcmTagKey(0x2130, 0x00a0) +#define DCM_OriginalImageSequence DcmTagKey(0x2130, 0x00c0) #define DCM_LabelUsingInformationExtractedFromInstances DcmTagKey(0x2200, 0x0001) #define DCM_LabelText DcmTagKey(0x2200, 0x0002) #define DCM_LabelStyleSelection DcmTagKey(0x2200, 0x0003) @@ -3822,11 +3867,12 @@ #define DCM_ROIContourSequence DcmTagKey(0x3006, 0x0039) #define DCM_ContourSequence DcmTagKey(0x3006, 0x0040) #define DCM_ContourGeometricType DcmTagKey(0x3006, 0x0042) -#define DCM_ContourSlabThickness DcmTagKey(0x3006, 0x0044) -#define DCM_ContourOffsetVector DcmTagKey(0x3006, 0x0045) +#define DCM_RETIRED_ContourSlabThickness DcmTagKey(0x3006, 0x0044) +#define DCM_RETIRED_ContourOffsetVector DcmTagKey(0x3006, 0x0045) #define DCM_NumberOfContourPoints DcmTagKey(0x3006, 0x0046) #define DCM_ContourNumber DcmTagKey(0x3006, 0x0048) -#define DCM_AttachedContours DcmTagKey(0x3006, 0x0049) +#define DCM_RETIRED_AttachedContours DcmTagKey(0x3006, 0x0049) +#define DCM_SourcePixelPlanesCharacteristicsSequence DcmTagKey(0x3006, 0x004a) #define DCM_ContourData DcmTagKey(0x3006, 0x0050) #define DCM_RTROIObservationsSequence DcmTagKey(0x3006, 0x0080) #define DCM_ObservationNumber DcmTagKey(0x3006, 0x0082) @@ -3908,6 +3954,7 @@ #define DCM_RecordedWedgeSequence DcmTagKey(0x3008, 0x00b0) #define DCM_RecordedCompensatorSequence DcmTagKey(0x3008, 0x00c0) #define DCM_RecordedBlockSequence DcmTagKey(0x3008, 0x00d0) +#define DCM_RecordedBlockSlabSequence DcmTagKey(0x3008, 0x00d1) #define DCM_TreatmentSummaryMeasuredDoseReferenceSequence DcmTagKey(0x3008, 0x00e0) #define DCM_RecordedSnoutSequence DcmTagKey(0x3008, 0x00f0) #define DCM_RecordedRangeShifterSequence DcmTagKey(0x3008, 0x00f2) @@ -3954,7 +4001,7 @@ #define DCM_RTPlanTime DcmTagKey(0x300a, 0x0007) #define DCM_TreatmentProtocols DcmTagKey(0x300a, 0x0009) #define DCM_PlanIntent DcmTagKey(0x300a, 0x000a) -#define DCM_TreatmentSites DcmTagKey(0x300a, 0x000b) +#define DCM_RETIRED_TreatmentSites DcmTagKey(0x300a, 0x000b) #define DCM_RTPlanGeometry DcmTagKey(0x300a, 0x000c) #define DCM_PrescriptionDescription DcmTagKey(0x300a, 0x000e) #define DCM_DoseReferenceSequence DcmTagKey(0x300a, 0x0010) @@ -4221,6 +4268,7 @@ #define DCM_SourceApplicatorWallNominalThickness DcmTagKey(0x300a, 0x029c) #define DCM_SourceApplicatorWallNominalTransmission DcmTagKey(0x300a, 0x029e) #define DCM_SourceApplicatorStepSize DcmTagKey(0x300a, 0x02a0) +#define DCM_ApplicatorShapeReferencedROINumber DcmTagKey(0x300a, 0x02a1) #define DCM_TransferTubeNumber DcmTagKey(0x300a, 0x02a2) #define DCM_TransferTubeLength DcmTagKey(0x300a, 0x02a4) #define DCM_ChannelShieldSequence DcmTagKey(0x300a, 0x02b0) @@ -4399,7 +4447,7 @@ #define DCM_CArmPhotonElectronControlPointSequence DcmTagKey(0x300a, 0x062f) #define DCM_ReferencedRTRadiationSequence DcmTagKey(0x300a, 0x0630) #define DCM_ReferencedRTInstanceSequence DcmTagKey(0x300a, 0x0631) -#define DCM_ReferencedRTPatientSetupSequence DcmTagKey(0x300a, 0x0632) +#define DCM_RETIRED_ReferencedRTPatientSetupSequence DcmTagKey(0x300a, 0x0632) #define DCM_SourceToPatientSurfaceDistance DcmTagKey(0x300a, 0x0634) #define DCM_TreatmentMachineSpecialModeCodeSequence DcmTagKey(0x300a, 0x0635) #define DCM_IntendedNumberOfFractions DcmTagKey(0x300a, 0x0636) @@ -4428,7 +4476,7 @@ #define DCM_RTBeamLimitingDeviceDefinitionSequence DcmTagKey(0x300a, 0x064d) #define DCM_ParallelRTBeamDelimiterOpeningMode DcmTagKey(0x300a, 0x064e) #define DCM_ParallelRTBeamDelimiterLeafMountingSide DcmTagKey(0x300a, 0x064f) -#define DCM_PatientSetupUID DcmTagKey(0x300a, 0x0650) +#define DCM_RETIRED_PatientSetupUID DcmTagKey(0x300a, 0x0650) #define DCM_WedgeDefinitionSequence DcmTagKey(0x300a, 0x0651) #define DCM_RadiationBeamWedgeAngle DcmTagKey(0x300a, 0x0652) #define DCM_RadiationBeamWedgeThinEdgeDistance DcmTagKey(0x300a, 0x0653) @@ -4528,6 +4576,33 @@ #define DCM_DoseMeasurementDeviceCodeSequence DcmTagKey(0x300a, 0x0774) #define DCM_AdditionalParameterRecordingInstanceSequence DcmTagKey(0x300a, 0x0780) #define DCM_InterlockOriginDescription DcmTagKey(0x300a, 0x0783) +#define DCM_RTPatientPositionScopeSequence DcmTagKey(0x300a, 0x0784) +#define DCM_ReferencedTreatmentPositionGroupUID DcmTagKey(0x300a, 0x0785) +#define DCM_RadiationOrderIndex DcmTagKey(0x300a, 0x0786) +#define DCM_OmittedRadiationSequence DcmTagKey(0x300a, 0x0787) +#define DCM_ReasonForOmissionCodeSequence DcmTagKey(0x300a, 0x0788) +#define DCM_RTDeliveryStartPatientPositionSequence DcmTagKey(0x300a, 0x0789) +#define DCM_RTTreatmentPreparationPatientPositionSequence DcmTagKey(0x300a, 0x078a) +#define DCM_ReferencedRTTreatmentPreparationSequence DcmTagKey(0x300a, 0x078b) +#define DCM_ReferencedPatientSetupPhotoSequence DcmTagKey(0x300a, 0x078c) +#define DCM_PatientTreatmentPreparationMethodCodeSequence DcmTagKey(0x300a, 0x078d) +#define DCM_PatientTreatmentPreparationProcedureParameterDescription DcmTagKey(0x300a, 0x078e) +#define DCM_PatientTreatmentPreparationDeviceSequence DcmTagKey(0x300a, 0x078f) +#define DCM_PatientTreatmentPreparationProcedureSequence DcmTagKey(0x300a, 0x0790) +#define DCM_PatientTreatmentPreparationProcedureCodeSequence DcmTagKey(0x300a, 0x0791) +#define DCM_PatientTreatmentPreparationMethodDescription DcmTagKey(0x300a, 0x0792) +#define DCM_PatientTreatmentPreparationProcedureParameterSequence DcmTagKey(0x300a, 0x0793) +#define DCM_PatientSetupPhotoDescription DcmTagKey(0x300a, 0x0794) +#define DCM_PatientTreatmentPreparationProcedureIndex DcmTagKey(0x300a, 0x0795) +#define DCM_ReferencedPatientSetupProcedureIndex DcmTagKey(0x300a, 0x0796) +#define DCM_RTRadiationTaskSequence DcmTagKey(0x300a, 0x0797) +#define DCM_RTPatientPositionDisplacementSequence DcmTagKey(0x300a, 0x0798) +#define DCM_RTPatientPositionSequence DcmTagKey(0x300a, 0x0799) +#define DCM_DisplacementReferenceLabel DcmTagKey(0x300a, 0x079a) +#define DCM_DisplacementMatrix DcmTagKey(0x300a, 0x079b) +#define DCM_PatientSupportDisplacementSequence DcmTagKey(0x300a, 0x079c) +#define DCM_DisplacementReferenceLocationCodeSequence DcmTagKey(0x300a, 0x079d) +#define DCM_RTRadiationSetDeliveryUsage DcmTagKey(0x300a, 0x079e) #define DCM_ReferencedRTPlanSequence DcmTagKey(0x300c, 0x0002) #define DCM_ReferencedBeamSequence DcmTagKey(0x300c, 0x0004) #define DCM_ReferencedBeamNumber DcmTagKey(0x300c, 0x0006) @@ -4562,6 +4637,21 @@ #define DCM_OmittedBeamTaskSequence DcmTagKey(0x300c, 0x0111) #define DCM_ReasonForOmission DcmTagKey(0x300c, 0x0112) #define DCM_ReasonForOmissionDescription DcmTagKey(0x300c, 0x0113) +#define DCM_PrescriptionOverviewSequence DcmTagKey(0x300c, 0x0114) +#define DCM_TotalPrescriptionDose DcmTagKey(0x300c, 0x0115) +#define DCM_PlanOverviewSequence DcmTagKey(0x300c, 0x0116) +#define DCM_PlanOverviewIndex DcmTagKey(0x300c, 0x0117) +#define DCM_ReferencedPlanOverviewIndex DcmTagKey(0x300c, 0x0118) +#define DCM_NumberOfFractionsIncluded DcmTagKey(0x300c, 0x0119) +#define DCM_DoseCalibrationConditionsSequence DcmTagKey(0x300c, 0x0120) +#define DCM_AbsorbedDoseToMetersetRatio DcmTagKey(0x300c, 0x0121) +#define DCM_DelineatedRadiationFieldSize DcmTagKey(0x300c, 0x0122) +#define DCM_DoseCalibrationConditionsVerifiedFlag DcmTagKey(0x300c, 0x0123) +#define DCM_CalibrationReferencePointDepth DcmTagKey(0x300c, 0x0124) +#define DCM_GatingBeamHoldTransitionSequence DcmTagKey(0x300c, 0x0125) +#define DCM_BeamHoldTransition DcmTagKey(0x300c, 0x0126) +#define DCM_BeamHoldTransitionDateTime DcmTagKey(0x300c, 0x0127) +#define DCM_BeamHoldOriginatingDeviceSequence DcmTagKey(0x300c, 0x0128) #define DCM_ApprovalStatus DcmTagKey(0x300e, 0x0002) #define DCM_ReviewDate DcmTagKey(0x300e, 0x0004) #define DCM_ReviewTime DcmTagKey(0x300e, 0x0005) diff -Nru dcmtk-3.6.6/dcmdata/include/dcmtk/dcmdata/dcdicdir.h dcmtk-3.6.7/dcmdata/include/dcmtk/dcmdata/dcdicdir.h --- dcmtk-3.6.6/dcmdata/include/dcmtk/dcmdata/dcdicdir.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/include/dcmtk/dcmdata/dcdicdir.h 2022-04-28 13:47:25.000000000 +0000 @@ -100,12 +100,14 @@ virtual DcmSequenceOfItems& getMRDRSequence(); /** look up directory record for the given referenced file ID (not OS file path) + * @param filename the file to take the id from * @return directory record if found, NULL otherwise */ virtual DcmDirectoryRecord* matchFilename( const char *filename ); /** look up MRDR for the given referenced file ID (not OS file path). * If there is none yet, create one. + * @param filename the file to take the id from * @return MRDR for given referenced file ID */ virtual DcmDirectoryRecord* matchOrCreateMRDR( const char *filename ); @@ -189,7 +191,9 @@ /// private undefined copy assignment operator DcmDicomDir &operator=(const DcmDicomDir &); - /// private undefined copy constructor + /** private undefined copy constructor + * @param newDir documented to avoid doxygen warnings + */ DcmDicomDir( const DcmDicomDir &newDir ); /// condition flag diff -Nru dcmtk-3.6.6/dcmdata/include/dcmtk/dcmdata/dcdicent.h dcmtk-3.6.7/dcmdata/include/dcmtk/dcmdata/dcdicent.h --- dcmtk-3.6.6/dcmdata/include/dcmtk/dcmdata/dcdicent.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/include/dcmtk/dcmdata/dcdicent.h 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1994-2011, OFFIS e.V. + * Copyright (C) 1994-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -26,9 +26,6 @@ #include "dcmtk/dcmdata/dctagkey.h" #include "dcmtk/dcmdata/dcvr.h" -#define INCLUDE_CSTRING /* for strcmp() */ -#include "dcmtk/ofstd/ofstdinc.h" - /// constant describing an unlimited VM #define DcmVariableVM -1 @@ -93,7 +90,9 @@ const char* vers, OFBool doCopyStrings, const char* pcreator); - /// copy constructor + /** copy constructor + * @param e the entry to copy + */ DcmDictEntry(const DcmDictEntry& e); /// destructor @@ -262,7 +261,9 @@ return groupRangeRestriction; } - /// sets group range restriction + /** sets group range restriction + * @param rr the new range restriction + */ void setGroupRangeRestriction(DcmDictRangeRestriction rr) { groupRangeRestriction = rr; @@ -274,7 +275,9 @@ return elementRangeRestriction; } - /// sets element range restriction + /** sets element range restriction + * @param rr the new range restriction + */ void setElementRangeRestriction(DcmDictRangeRestriction rr) { elementRangeRestriction = rr; @@ -356,7 +359,11 @@ ); } - /// friend operator<< + /** friend operator<< + * @param s the ostream to append upon + * @param e the dictionary entry + * @return the appended on ostream + */ friend DCMTK_DCMDATA_EXPORT STD_NAMESPACE ostream& operator<<(STD_NAMESPACE ostream& s, const DcmDictEntry& e); private: diff -Nru dcmtk-3.6.6/dcmdata/include/dcmtk/dcmdata/dcdict.h dcmtk-3.6.7/dcmdata/include/dcmtk/dcmdata/dcdict.h --- dcmtk-3.6.6/dcmdata/include/dcmtk/dcmdata/dcdict.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/include/dcmtk/dcmdata/dcdict.h 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1994-2018, OFFIS e.V. + * Copyright (C) 1994-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -49,6 +49,16 @@ #define ENVIRONMENT_PATH_SEPARATOR '\n' /* at least define something unlikely */ #endif +/* +** Loading of default dictionary: +** DCM_DICT_DEFAULT_USE_NONE: Do not load any default dictionary on startup +** DCM_DICT_DEFAULT_USE_BUILTIN: Load builtin dictionary on startup +** DCM_DICT_DEFAULT_USE_EXTERNAL: Load external (i.e. file-based) dictionary on startup +*/ +#define DCM_DICT_DEFAULT_USE_NONE 0 +#define DCM_DICT_DEFAULT_USE_BUILTIN 1 +#define DCM_DICT_DEFAULT_USE_EXTERNAL 2 + /** this class implements a loadable DICOM Data Dictionary */ @@ -179,11 +189,13 @@ OFBool loadSkeletonDictionary(); /** looks up the given directory entry in the two dictionaries. + * @param entry the entry to look up * @return pointer to entry if found, NULL otherwise */ const DcmDictEntry* findEntry(const DcmDictEntry& entry) const; /** deletes the given entry from either dictionary + * @param entry the entry to delete */ void deleteEntry(const DcmDictEntry& entry); diff -Nru dcmtk-3.6.6/dcmdata/include/dcmtk/dcmdata/dcdirrec.h dcmtk-3.6.7/dcmdata/include/dcmtk/dcmdata/dcdirrec.h --- dcmtk-3.6.6/dcmdata/include/dcmtk/dcmdata/dcdirrec.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/include/dcmtk/dcmdata/dcdirrec.h 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1994-2019, OFFIS e.V. + * Copyright (C) 1994-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -128,7 +128,9 @@ /// assessment ERT_Assessment = 47, /// radiotherapy - ERT_Radiotherapy = 48 + ERT_Radiotherapy = 48, + /// annotation + ERT_Annotation = 49 } E_DirRecType; diff -Nru dcmtk-3.6.6/dcmdata/include/dcmtk/dcmdata/dcelem.h dcmtk-3.6.7/dcmdata/include/dcmtk/dcmdata/dcelem.h --- dcmtk-3.6.6/dcmdata/include/dcmtk/dcmdata/dcelem.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/include/dcmtk/dcmdata/dcelem.h 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1994-2020, OFFIS e.V. + * Copyright (C) 1994-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -123,8 +123,14 @@ * @param enctype sequence encoding type for length calculation * @return value length of DICOM element */ - virtual Uint32 getLength(const E_TransferSyntax /*xfer*/ = EXS_LittleEndianImplicit, - const E_EncodingType /*enctype*/ = EET_UndefinedLength) + +#ifdef DOXYGEN + virtual Uint32 getLength(const E_TransferSyntax xfer = EXS_LittleEndianImplicit, + const E_EncodingType enctype = EET_UndefinedLength) +#else + virtual Uint32 getLength(const E_TransferSyntax /* xfer */ = EXS_LittleEndianImplicit, + const E_EncodingType /* enctype */ = EET_UndefinedLength) +#endif { return getLengthField(); } @@ -668,7 +674,7 @@ E_ByteOrder byteOrder = gLocalByteOrder); /** create an empty Uint8 array of given number of bytes and set it. - * All array elements are initialized with a value of 0 (using 'memzero'). + * All array elements are initialized with a value of 0 (using 'memset'). * This method is only applicable to certain VRs, e.g. OB. * @param numBytes number of bytes (8 bit) to be created * @param bytes stores the pointer to the resulting buffer @@ -677,7 +683,7 @@ virtual OFCondition createUint8Array(const Uint32 numBytes, Uint8 *&bytes); /** create an empty Uint16 array of given number of words and set it. - * All array elements are initialized with a value of 0 (using 'memzero'). + * All array elements are initialized with a value of 0 (using 'memset'). * This method is only applicable to OW data. * @param numWords number of words (16 bit) to be created * @param words stores the pointer to the resulting buffer diff -Nru dcmtk-3.6.6/dcmdata/include/dcmtk/dcmdata/dcencdoc.h dcmtk-3.6.7/dcmdata/include/dcmtk/dcmdata/dcencdoc.h --- dcmtk-3.6.6/dcmdata/include/dcmtk/dcmdata/dcencdoc.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/include/dcmtk/dcmdata/dcencdoc.h 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2018-2019, OFFIS e.V. + * Copyright (C) 2018-2021, 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/dcmdata/dcfilefo.h" /* for class DcmFileFormat */ #include "dcmtk/ofstd/ofcmdln.h" /* for OFCmdUnsignedInt */ -class XMLNode; +struct XMLNode; class OFCommandLine; class OFConsoleApplication; class OFLogger; diff -Nru dcmtk-3.6.6/dcmdata/include/dcmtk/dcmdata/dcerror.h dcmtk-3.6.7/dcmdata/include/dcmtk/dcmdata/dcerror.h --- dcmtk-3.6.6/dcmdata/include/dcmtk/dcmdata/dcerror.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/include/dcmtk/dcmdata/dcerror.h 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1994-2020, OFFIS e.V. + * Copyright (C) 1994-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -175,6 +175,14 @@ extern DCMTK_DCMDATA_EXPORT const OFConditionConst EC_CannotWriteJsonNumber; /// Cannot write compressed pixel data JSON InlineBinary extern DCMTK_DCMDATA_EXPORT const OFConditionConst EC_CannotWriteJsonInlineBinary; +/// XML parse error +extern DCMTK_DCMDATA_EXPORT const OFConditionConst EC_XMLParseError; +/// XML validation failure +extern DCMTK_DCMDATA_EXPORT const OFConditionConst EC_XMLValidationFailure; +/// SOP class mismatch +extern DCMTK_DCMDATA_EXPORT const OFConditionConst EC_SOPClassMismatch; +/// Unknown UID name: No mapping to UID value defined +extern DCMTK_DCMDATA_EXPORT const OFConditionConst EC_UnknownUIDName; //@} diff -Nru dcmtk-3.6.6/dcmdata/include/dcmtk/dcmdata/dcfcache.h dcmtk-3.6.7/dcmdata/include/dcmtk/dcmdata/dcfcache.h --- dcmtk-3.6.6/dcmdata/include/dcmtk/dcmdata/dcfcache.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/include/dcmtk/dcmdata/dcfcache.h 2022-04-28 13:47:25.000000000 +0000 @@ -92,10 +92,14 @@ private: - /// private undefined copy constructor + /** private undefined copy constructor + * @param arg documented to avoid doxygen warnings + */ DcmFileCache(const DcmFileCache& arg); - /// private undefined copy assignment operator + /** private undefined copy assignment operator + * @param arg the cache to copy + */ DcmFileCache& operator=(const DcmFileCache& arg); /// input stream, may be NULL diff -Nru dcmtk-3.6.6/dcmdata/include/dcmtk/dcmdata/dchashdi.h dcmtk-3.6.7/dcmdata/include/dcmtk/dcmdata/dchashdi.h --- dcmtk-3.6.6/dcmdata/include/dcmtk/dcmdata/dchashdi.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/include/dcmtk/dcmdata/dchashdi.h 2022-04-28 13:47:25.000000000 +0000 @@ -130,21 +130,29 @@ : dict(NULL), hindex(0), iterating(OFFalse), iter() { init(d, atEnd); } - /// copy constructor + /** copy constructor + * @param i the iterator to copy + */ DcmHashDictIterator(const DcmHashDictIterator& i) : dict(i.dict), hindex(i.hindex), iterating(i.iterating), iter(i.iter) { } - /// copy assignment operator + /** copy assignment operator + * @param i the Iterator to copy and assign + */ DcmHashDictIterator& operator=(const DcmHashDictIterator& i) { dict = i.dict; hindex = i.hindex; iterating = i.iterating; iter = i.iter; return *this; } - /// comparison equality + /** comparison equality + * @param x the iterator to compare against + */ OFBool operator==(const DcmHashDictIterator& x) const { return iterating ? x.iterating && (hindex == x.hindex) && (iter == x.iter) : !x.iterating; } - /// comparison non-equality + /** comparison non-equality + * @param x the iterator to compare against + */ OFBool operator!=(const DcmHashDictIterator& x) const { return !(*this == x); } @@ -238,7 +246,9 @@ DcmHashDictIterator end() const { DcmHashDictIterator iter(this, OFTrue); return iter; } - /// prints some information about hash table bucket utilization + /** prints some information about hash table bucket utilization + * @param out the stream to print into + */ STD_NAMESPACE ostream& loadSummary(STD_NAMESPACE ostream& out); private: diff -Nru dcmtk-3.6.6/dcmdata/include/dcmtk/dcmdata/dcistrmf.h dcmtk-3.6.7/dcmdata/include/dcmtk/dcmdata/dcistrmf.h --- dcmtk-3.6.6/dcmdata/include/dcmtk/dcmdata/dcistrmf.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/include/dcmtk/dcmdata/dcistrmf.h 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1994-2018, OFFIS e.V. + * Copyright (C) 1994-2020, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -26,7 +26,6 @@ #include "dcmtk/config/osconfig.h" #include "dcmtk/dcmdata/dcistrma.h" - /** producer class that reads data from a plain file. */ class DCMTK_DCMDATA_EXPORT DcmFileProducer: public DcmProducer @@ -119,7 +118,9 @@ */ DcmInputFileStreamFactory(const OFFilename &filename, offile_off_t offset); - /// copy constructor + /** copy constructor + * @param arg the factory to copy + */ DcmInputFileStreamFactory(const DcmInputFileStreamFactory &arg); /// destructor @@ -296,7 +297,9 @@ */ DcmInputTempFileStreamFactory(DcmTempFileHandler *handler); - /// copy constructor + /** copy constructor + * @param arg the factory to copy + */ DcmInputTempFileStreamFactory(const DcmInputTempFileStreamFactory &arg); /// destructor, decreases reference counter of temporary file handler @@ -328,5 +331,4 @@ DcmTempFileHandler *fileHandler_; }; - #endif diff -Nru dcmtk-3.6.6/dcmdata/include/dcmtk/dcmdata/dcistrms.h dcmtk-3.6.7/dcmdata/include/dcmtk/dcmdata/dcistrms.h --- dcmtk-3.6.6/dcmdata/include/dcmtk/dcmdata/dcistrms.h 1970-01-01 00:00:00.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/include/dcmtk/dcmdata/dcistrms.h 2022-04-28 13:47:25.000000000 +0000 @@ -0,0 +1,74 @@ +/* + * + * Copyright (C) 1994-2020, 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: Jasper den Otter, Marco Eichelberg + * + * Purpose: DcmStdinStream and related classes, + * implements streamed input from stdin. + * + */ + +#ifndef DCISTRMS_H +#define DCISTRMS_H + +#include "dcmtk/config/osconfig.h" +#include "dcmtk/dcmdata/dcistrma.h" +#include "dcmtk/dcmdata/dcistrmb.h" + +/** input stream that reads from standard input + */ +class DCMTK_DCMDATA_EXPORT DcmStdinStream: public DcmInputStream +{ +public: + /// constructor + DcmStdinStream(); + + /// destructor + virtual ~DcmStdinStream(); + + /** creates a new factory object for the current stream + * and stream position. When activated, the factory will be + * able to create new DcmInputStream delivering the same + * data as the current stream. Used to defer loading of + * value fields until accessed. + * If no factory object can be created (e.g. because the + * stream is not seekable), returns NULL. + * @return pointer to new factory object if successful, NULL otherwise. + */ + virtual DcmInputStreamFactory *newFactory() const; + + /** fill the read buffer from stdin. After a call to this method, + * the read()-method for the DcmDataset or DcmFileFormat should + * be called, and the sequence repeated as long as the read() + * method returns EC_StreamNotifyClient. + */ + virtual void fillBuffer(); + +private: + + /// private unimplemented copy constructor + DcmStdinStream(const DcmStdinStream&); + + /// private unimplemented copy assignment operator + DcmStdinStream& operator=(const DcmStdinStream&); + + /// the final producer of the filter chain + DcmBufferProducer producer_; + + /// a buffer + unsigned char *buf_; +}; + +#endif diff -Nru dcmtk-3.6.6/dcmdata/include/dcmtk/dcmdata/dcitem.h dcmtk-3.6.7/dcmdata/include/dcmtk/dcmdata/dcitem.h --- dcmtk-3.6.6/dcmdata/include/dcmtk/dcmdata/dcitem.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/include/dcmtk/dcmdata/dcitem.h 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1994-2020, OFFIS e.V. + * Copyright (C) 1994-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -1059,7 +1059,8 @@ * Applicable to the following VRs: AE, AS, AT, CS, DA, DS, DT, FL, FD, IS, LO, LT, OB, OD, OF, * OL, OV, OW, PN, SH, SL, SS, ST, SV, TM, UC, UI, UL, UR, US, UT, UV. * @param tag DICOM tag specifying the attribute to be created - * @param value string value to be set for the new element (might be empty or NULL) + * @param value string value to be set for the new element (might be empty or NULL). The format + * of the string value is specified by the putString() method of the corresponding VR class. * @param replaceOld flag indicating whether to replace an existing element or not * @return EC_Normal upon success, an error code otherwise. */ @@ -1073,7 +1074,8 @@ * Please note that since the length of the string has to be specified explicitly, the string * can contain more than one NULL byte. * @param tag DICOM tag specifying the attribute to be created - * @param value string value to be set for the new element (might be empty or NULL) + * @param value string value to be set for the new element (might be empty or NULL). The format + * of the string value is specified by the putString() method of the corresponding VR class. * @param length length of the string (number of characters without the trailing NULL byte) * @param replaceOld flag indicating whether to replace an existing element or not * @return EC_Normal upon success, an error code otherwise. @@ -1087,7 +1089,8 @@ * Applicable to the following VRs: AE, AS, AT, CS, DA, DS, DT, FL, FD, IS, LO, LT, OB, OD, OF, * OL, OV, OW, PN, SH, SL, SS, ST, SV, TM, UC, UI, UL, UR, US, UT, UV. * @param tag DICOM tag specifying the attribute to be created - * @param value value to be set for the new element (might be empty) + * @param value string value to be set for the new element (might be empty). The format of the + * string value is specified by the putOFStringArray() method of the corresponding VR class. * @param replaceOld flag indicating whether to replace an existing element or not * @return EC_Normal upon success, an error code otherwise. */ diff -Nru dcmtk-3.6.6/dcmdata/include/dcmtk/dcmdata/dcjson.h dcmtk-3.6.7/dcmdata/include/dcmtk/dcmdata/dcjson.h --- dcmtk-3.6.6/dcmdata/include/dcmtk/dcmdata/dcjson.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/include/dcmtk/dcmdata/dcjson.h 2022-04-28 13:47:25.000000000 +0000 @@ -114,13 +114,17 @@ /// allow DcmJsonFormat to use this class' private members friend class DcmJsonFormat; - /// private constructor, used by DcmJsonFormat + /** private constructor, used by DcmJsonFormat + * @param format the format + */ inline Indention(DcmJsonFormat& format) : m_Format(format) { } - /// prints the current indention using the parent formatter + /** prints the current indention using the parent formatter + * @param out the stream to print to + */ inline void printIndention(STD_NAMESPACE ostream& out) const { m_Format.printIndention(out); diff -Nru dcmtk-3.6.6/dcmdata/include/dcmtk/dcmdata/dclist.h dcmtk-3.6.7/dcmdata/include/dcmtk/dcmdata/dclist.h --- dcmtk-3.6.6/dcmdata/include/dcmtk/dcmdata/dclist.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/include/dcmtk/dcmdata/dclist.h 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1994-2011, OFFIS e.V. + * Copyright (C) 1994-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -27,9 +27,6 @@ #include "dcmtk/ofstd/ofcast.h" #include "dcmtk/ofstd/oftypes.h" -#define INCLUDE_CSTDDEF -#define INCLUDE_CSTDLIB -#include "dcmtk/ofstd/ofstdinc.h" #include "dcmtk/dcmdata/dcobject.h" /// index indicating "end of list" @@ -180,7 +177,9 @@ /// private undefined copy constructor DcmList &operator=(const DcmList &); - /// private undefined copy assignment operator + /** private undefined copy assignment operator + * @param newList documented to avoid doxygen warnings + */ DcmList(const DcmList &newList); }; diff -Nru dcmtk-3.6.6/dcmdata/include/dcmtk/dcmdata/dcobject.h dcmtk-3.6.7/dcmdata/include/dcmtk/dcmdata/dcobject.h --- dcmtk-3.6.6/dcmdata/include/dcmtk/dcmdata/dcobject.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/include/dcmtk/dcmdata/dcobject.h 2022-04-28 13:47:25.000000000 +0000 @@ -409,7 +409,14 @@ * @param vr value representation * @return EC_Normal if successful, an error code otherwise */ - virtual OFCondition setVR(DcmEVR /*vr*/) { return EC_IllegalCall; } +#ifdef DOXYGEN + virtual OFCondition setVR(DcmEVR vr) +#else + virtual OFCondition setVR(DcmEVR /* vr */) +#endif + { + return EC_IllegalCall; + } /** get value multiplicity of this object. * Please note that depending on the Value Representation (VR), subclasses diff -Nru dcmtk-3.6.6/dcmdata/include/dcmtk/dcmdata/dcostrmf.h dcmtk-3.6.7/dcmdata/include/dcmtk/dcmdata/dcostrmf.h --- dcmtk-3.6.6/dcmdata/include/dcmtk/dcmdata/dcostrmf.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/include/dcmtk/dcmdata/dcostrmf.h 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1994-2012, OFFIS e.V. + * Copyright (C) 1994-2021, 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" #include "dcmtk/dcmdata/dcostrma.h" -#define INCLUDE_CSTDIO -#include "dcmtk/ofstd/ofstdinc.h" - - /** consumer class that stores data in a plain file. */ class DCMTK_DCMDATA_EXPORT DcmFileConsumer: public DcmConsumer @@ -138,5 +134,4 @@ DcmFileConsumer consumer_; }; - #endif diff -Nru dcmtk-3.6.6/dcmdata/include/dcmtk/dcmdata/dcostrms.h dcmtk-3.6.7/dcmdata/include/dcmtk/dcmdata/dcostrms.h --- dcmtk-3.6.6/dcmdata/include/dcmtk/dcmdata/dcostrms.h 1970-01-01 00:00:00.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/include/dcmtk/dcmdata/dcostrms.h 2022-04-28 13:47:25.000000000 +0000 @@ -0,0 +1,137 @@ +/* + * + * Copyright (C) 1994-2021, 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: Jasper den Otter, Marco Eichelberg + * + * Purpose: DcmStdoutStream and related classes, + * implements streamed output to stdout. + * + */ + +#ifndef DCOSTRMS_H +#define DCOSTRMS_H + +#include "dcmtk/config/osconfig.h" +#include "dcmtk/dcmdata/dcostrma.h" + +/** consumer class that writes to standard output. + */ +class DCMTK_DCMDATA_EXPORT DcmStdoutConsumer: public DcmConsumer +{ +public: + /** constructor + * @param filename name of file to be created (may contain wide chars + * if support enabled) + */ + DcmStdoutConsumer(const OFFilename &filename); + + /** constructor + * @param file structure, file must already be open for writing + */ + DcmStdoutConsumer(FILE *file); + + /// destructor + virtual ~DcmStdoutConsumer(); + + /** returns the status of the consumer. Unless the status is good, + * the consumer will not permit any operation. + * @return status, true if good + */ + virtual OFBool good() const; + + /** returns the status of the consumer as an OFCondition object. + * Unless the status is good, the consumer will not permit any operation. + * @return status, EC_Normal if good + */ + virtual OFCondition status() const; + + /** returns true if the consumer is flushed, i.e. has no more data + * pending in it's internal state that needs to be flushed before + * the stream is closed. + * @return true if consumer is flushed, false otherwise + */ + virtual OFBool isFlushed() const; + + /** returns the minimum number of bytes that can be written with the + * next call to write(). The DcmObject write methods rely on avail + * to return a value > 0 if there is no I/O suspension since certain + * data such as tag and length are only written "en bloc", i.e. all + * or nothing. + * @return minimum of space available in consumer + */ + virtual offile_off_t avail() const; + + /** processes as many bytes as possible from the given input block. + * @param buf pointer to memory block, must not be NULL + * @param buflen length of memory block + * @return number of bytes actually processed. + */ + virtual offile_off_t write(const void *buf, offile_off_t buflen); + + /** instructs the consumer to flush its internal content until + * either the consumer becomes "flushed" or I/O suspension occurs. + * After a call to flush(), a call to write() will produce undefined + * behaviour. + */ + virtual void flush(); + +private: + + /// private unimplemented copy constructor + DcmStdoutConsumer(const DcmStdoutConsumer&); + + /// private unimplemented copy assignment operator + DcmStdoutConsumer& operator=(const DcmStdoutConsumer&); + + /// the file we're actually writing to + OFFile file_; + + /// status + OFCondition status_; +}; + + +/** output stream that writes to standard output + */ +class DCMTK_DCMDATA_EXPORT DcmStdoutStream: public DcmOutputStream +{ +public: + /** constructor + * @param filename name of file to be created (may contain wide chars + * if support enabled) + */ + DcmStdoutStream(const OFFilename &filename); + + /** constructor + * @param file structure, file must already be open for writing + */ + DcmStdoutStream(FILE *file); + + /// destructor + virtual ~DcmStdoutStream(); + +private: + + /// private unimplemented copy constructor + DcmStdoutStream(const DcmStdoutStream&); + + /// private unimplemented copy assignment operator + DcmStdoutStream& operator=(const DcmStdoutStream&); + + /// the final consumer of the filter chain + DcmStdoutConsumer consumer_; +}; + +#endif diff -Nru dcmtk-3.6.6/dcmdata/include/dcmtk/dcmdata/dcpcache.h dcmtk-3.6.7/dcmdata/include/dcmtk/dcmdata/dcpcache.h --- dcmtk-3.6.6/dcmdata/include/dcmtk/dcmdata/dcpcache.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/include/dcmtk/dcmdata/dcpcache.h 2022-04-28 13:47:25.000000000 +0000 @@ -97,6 +97,7 @@ * If the object points to a private creator element, * the tag key and creator code are added to the cache. * Otherwise, the cache remains unmodified. + * @param dobj the given object */ void updateCache(DcmObject *dobj); diff -Nru dcmtk-3.6.6/dcmdata/include/dcmtk/dcmdata/dcpixel.h dcmtk-3.6.7/dcmdata/include/dcmtk/dcmdata/dcpixel.h --- dcmtk-3.6.6/dcmdata/include/dcmtk/dcmdata/dcpixel.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/include/dcmtk/dcmdata/dcpixel.h 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1994-2020, OFFIS e.V. + * Copyright (C) 1994-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -210,17 +210,29 @@ * if such an entry is found or EC_RepresentationNotFound. The pixSeq * attribute in findEntry can be NULL, it is not needed for the find * operation! + * @param findEntry the entry to find + * @param result the found entry + * @return EC_Normal if entry is found, EC_RepresentationNotFound otherwise. */ OFCondition findRepresentationEntry( const DcmRepresentationEntry & findEntry, DcmRepresentationListIterator & result); /** insert or replace a representation entry in the list + * @param repEntry the DcmRepresentationEntry to be inserted + * @return the inserted entry */ DcmRepresentationListIterator insertRepresentationEntry( DcmRepresentationEntry * repEntry); /** decode representation to unencapsulated format + * @param fromType transfer syntax to decode from + * @param fromParam representation parameter of current compressed + * representation, may be NULL. + * @param fromPixSeq compressed pixel sequence + * @param pixelStack stack pointing to the location of the pixel data + * element in the current dataset. + * @return EC_Normal if successful, an error code otherwise. */ OFCondition decode( const DcmXfer & fromType, @@ -229,6 +241,15 @@ DcmStack & pixelStack); /** encode to encapsulated format + * @param fromType current transfer syntax of the compressed image + * @param fromParam current representation parameter of compressed data, may be NULL + * @param fromPixSeq compressed pixel sequence + * @param toType transfer syntax to compress to + * @param toParam representation parameter describing the desired + * new compressed representation (e.g. JPEG quality) + * @param pixelStack stack pointing to the location of the pixel data + * element in the current dataset. + * @return EC_Normal if successful, an error code otherwise. */ OFCondition encode( const DcmXfer & fromType, @@ -337,6 +358,7 @@ /** tests if it is possible to write a specific representation * Only existing representations are considered, since this * method does not create a representation. + * @param newXfer the syntax to be checked */ virtual OFBool canWriteXfer(const E_TransferSyntax newXfer, const E_TransferSyntax oldXfer); @@ -346,7 +368,10 @@ virtual Uint32 calcElementLength(const E_TransferSyntax xfer, const E_EncodingType enctype); - /** returns length of representation value field conforming to + /** returns length of representation conforming to the transfer syntax + * @param xfer the transfer syntax + * @param enctype the encoding type + * @return returns length of representation value field conforming to * given transfer syntax. It does not create a representation. * If no conforming representation exists, an error code is set * and 0 returned. @@ -382,6 +407,11 @@ * It does not create a representation. If no conforming * representation exists, an error code is returned. * The written representation is the new current representation + * @param outStream the output stream + * @param oxfer the transfer syntax that should be used + * @param enctype encoding types (undefined or explicit length) + * @param pointer to write cache object, may be NULL + * @return EC_Normal on success, the error otherwise */ virtual OFCondition write( DcmOutputStream &outStream, @@ -434,47 +464,62 @@ virtual void transferEnd(); /** test if it is possible to choose the representation in the parameters + * @param repType the representation type + * @param repParam the representation parameters */ OFBool canChooseRepresentation( const E_TransferSyntax repType, const DcmRepresentationParameter * repParam); - /** choose a specific representation. if representation does not exist - * it is created (if possible). - * if repParam is zero, a representation is chosen or created that - * is equal to the default representation parameters + /** choose a specific representation. + * @remarks if representation does not exist it is created (if possible). + * if repParam is zero, a representation is chosen or created that + * is equal to the default representation parameters + * @deprecated The direct call of this method by user code is deprecated. + * Use DcmDataset::chooseRepresentation() instead. + * @repType the representation type + * @repParam the representation parameters + * @stack the object stack */ OFCondition chooseRepresentation( const E_TransferSyntax repType, const DcmRepresentationParameter * repParam, DcmStack & stack); - /** Inserts an original encapsulated representation. current and original - * representations are changed, all old representations are deleted + /** Inserts an original encapsulated representation. + * @remarks current and original representations are changed, + * all old representations are deleted + * @param repType the representation type + * @param repParam the representation parameters + * @param pixSeq the pixel sequence */ void putOriginalRepresentation( const E_TransferSyntax repType, const DcmRepresentationParameter * repParam, DcmPixelSequence * pixSeq); - /**insert an original unencapsulated - * representation. current and original representations are changed, + /** insert an original unencapsulated representation. + * @remarks current and original representations are changed, * all old representations are deleted. The array data is copied. + * @param byteValue used to check for corrupted data + * @param length the length of the element to put */ virtual OFCondition putUint8Array( const Uint8 * byteValue, const unsigned long length); - /** insert an original unencapsulated - * representation. current and original representations are changed, + /** insert an original unencapsulated representation. + * @remarks current and original representations are changed, * all old representations are deleted. The array data is copied. + * @param wordValue new attribute value + * @param length number of values in array vals */ virtual OFCondition putUint16Array( const Uint16 * wordValue, const unsigned long length); /** create an empty Uint8 array of given number of bytes and set it. - * All array elements are initialized with a value of 0 (using 'memzero'). + * All array elements are initialized with a value of 0 (using 'memset'). * This method is only applicable to certain VRs, e.g. OB. * @param numBytes number of bytes (8 bit) to be created * @param bytes stores the pointer to the resulting buffer @@ -485,7 +530,7 @@ Uint8 * & bytes); /** create an empty Uint16 array of given number of words and set it. - * All array elements are initialized with a value of 0 (using 'memzero'). + * All array elements are initialized with a value of 0 (using 'memset'). * This method is only applicable to OW data. * @param numWords number of words (16 bit) to be created * @param words stores the pointer to the resulting buffer @@ -514,6 +559,9 @@ /** get a specific existing Representation, creates no representation * if repParam is NULL, then the representation conforming to the default * representationParameters (defined with the codec) is returned. + * @param repType the transfer syntax + * @param repParam representation parameters + * @param pixSeq the found representation */ OFCondition getEncapsulatedRepresentation( const E_TransferSyntax repType, @@ -522,6 +570,8 @@ /** returns the representation identification (key) consisting of * representation type and parameter of the original representation + * @param repType the transfer syntax + * @param the representations parameters */ void getOriginalRepresentationKey( E_TransferSyntax & repType, @@ -529,25 +579,34 @@ /** returns the representation identification (key) consisting of * representation type and parameter of the current representation + * @param repType the transfer Syntax + * @param repParam the DcmRepresentationParameter */ void getCurrentRepresentationKey( E_TransferSyntax & repType, const DcmRepresentationParameter * & repParam); - /** sets the representation identification parameter of the current - * representation + /** sets the representation identification parameter of the current representation + * @param repParam the representation Parameter + * @return EC_Normal on success, EC_RepresentationNotFound if the representation was not found */ OFCondition setCurrentRepresentationParameter( const DcmRepresentationParameter * repParam); - /** returns if a specific conforming representation exists. + /** checks if a specific conforming representation exists. + * @param repType the representation Type + * @param repParam the representation Parameter + * @return OFTrue if a specific conforming representation exists, OFFalse otherwise */ OFBool hasRepresentation( const E_TransferSyntax repType, const DcmRepresentationParameter * repParam = NULL); - /** delete a representation. It is not possible to delete the - * original representation with this method + /** deletes a representation. + * @remark It is not possible to delete the original representation with this method + * @param repType the representation Type + * @param repParam the representation Parameter + * @return EC_NORMAL on success, the error otherwise */ OFCondition removeRepresentation( const E_TransferSyntax repType, @@ -565,6 +624,9 @@ /** delete original representation and set new original representation. * If the new representation does not exist, the original one is not * deleted and an error code returns + * @param repType the representation type + * @param repParam the representation parameter + * @return EC_Normal on success, the error code otherwise */ OFCondition removeOriginalRepresentation( const E_TransferSyntax repType, diff -Nru dcmtk-3.6.6/dcmdata/include/dcmtk/dcmdata/dcrleenc.h dcmtk-3.6.7/dcmdata/include/dcmtk/dcmdata/dcrleenc.h --- dcmtk-3.6.6/dcmdata/include/dcmtk/dcmdata/dcrleenc.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/include/dcmtk/dcmdata/dcrleenc.h 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2002-2011, OFFIS e.V. + * Copyright (C) 2002-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -24,10 +24,6 @@ #include "dcmtk/config/osconfig.h" #include "dcmtk/ofstd/oflist.h" /* for class OFList<> */ - -#define INCLUDE_CSTRING -#include "dcmtk/ofstd/ofstdinc.h" - #include "dcmtk/dcmdata/dcdefine.h" #define DcmRLEEncoder_BLOCKSIZE 16384 diff -Nru dcmtk-3.6.6/dcmdata/include/dcmtk/dcmdata/dcstack.h dcmtk-3.6.7/dcmdata/include/dcmtk/dcmdata/dcstack.h --- dcmtk-3.6.6/dcmdata/include/dcmtk/dcmdata/dcstack.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/include/dcmtk/dcmdata/dcstack.h 2022-04-28 13:47:25.000000000 +0000 @@ -122,6 +122,7 @@ DcmObject* top() const; /** returns n-th element from stack without removing it. + * @param number the number of the element * @return n-th element from stack */ DcmObject* elem(const unsigned long number) const; diff -Nru dcmtk-3.6.6/dcmdata/include/dcmtk/dcmdata/dctagkey.h dcmtk-3.6.7/dcmdata/include/dcmtk/dcmdata/dctagkey.h --- dcmtk-3.6.6/dcmdata/include/dcmtk/dcmdata/dctagkey.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/include/dcmtk/dcmdata/dctagkey.h 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1994-2018, OFFIS e.V. + * Copyright (C) 1994-2022, 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/ofstream.h" #include "dcmtk/ofstd/ofstring.h" +#include "dcmtk/ofstd/ofdiag.h" #include "dcmtk/dcmdata/dcdefine.h" /* @@ -191,22 +192,34 @@ protected: - /// less-than operation comparing only group numbers + /** less-than operation comparing only group numbers + * @param key the object to compare to + */ int groupLT(const DcmTagKey& key) const; - /// greater-than operation comparing only group numbers + /** greater-than operation comparing only group numbers + * @param key the object to compare to + */ int groupGT(const DcmTagKey& key) const; - /// comparison operation comparing only group numbers + /** comparison operation comparing only group numbers + * @param key the object to compare to + */ int groupEQ(const DcmTagKey& key) const; - /// less-than operation comparing only element numbers + /** less-than operation comparing only element numbers + * @param key the object to compare to + */ int elementLT(const DcmTagKey& key) const; - /// greater-than operation comparing only element numbers + /** greater-than operation comparing only element numbers + * @param key the object to compare to + */ int elementGT(const DcmTagKey& key) const; - /// comparison operation comparing only element numbers + /** comparison operation comparing only element numbers + * @param key the object to compare to + */ int elementEQ(const DcmTagKey& key) const; private: @@ -344,6 +357,9 @@ /* Comparisons */ +#include DCMTK_DIAGNOSTIC_PUSH +#include DCMTK_DIAGNOSTIC_IGNORE_ATTRIBUTE_REDECLARATION + inline int DcmTagKey::groupLT(const DcmTagKey& key) const { @@ -416,4 +432,6 @@ return (*this > key) || (*this == key); } +#include DCMTK_DIAGNOSTIC_POP + #endif diff -Nru dcmtk-3.6.6/dcmdata/include/dcmtk/dcmdata/dctypes.h dcmtk-3.6.7/dcmdata/include/dcmtk/dcmdata/dctypes.h --- dcmtk-3.6.6/dcmdata/include/dcmtk/dcmdata/dctypes.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/include/dcmtk/dcmdata/dctypes.h 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1994-2016, OFFIS e.V. + * Copyright (C) 1994-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -27,9 +27,6 @@ #include "dcmtk/oflog/oflog.h" #include "dcmtk/dcmdata/dcdefine.h" -#define INCLUDE_CSTDLIB -#include "dcmtk/ofstd/ofstdinc.h" - BEGIN_EXTERN_C #ifdef HAVE_SYS_TYPES_H /* needed e.g. on Solaris for definition of size_t */ diff -Nru dcmtk-3.6.6/dcmdata/include/dcmtk/dcmdata/dcuid.h dcmtk-3.6.7/dcmdata/include/dcmtk/dcmdata/dcuid.h --- dcmtk-3.6.6/dcmdata/include/dcmtk/dcmdata/dcuid.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/include/dcmtk/dcmdata/dcuid.h 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1994-2020, OFFIS e.V. + * Copyright (C) 1994-2022, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -29,10 +29,6 @@ #include "dcmtk/ofstd/oftypes.h" #include "dcmtk/dcmdata/dcdefine.h" -#define INCLUDE_CSTDLIB -#define INCLUDE_UNISTD -#include "dcmtk/ofstd/ofstdinc.h" - // include this file in doxygen documentation /** @file dcuid.h @@ -531,7 +527,9 @@ #define UID_PatientRadiationDoseSRStorage "1.2.840.10008.5.1.4.1.1.88.73" #define UID_PlannedImagingAgentAdministrationSRStorage "1.2.840.10008.5.1.4.1.1.88.74" #define UID_PerformedImagingAgentAdministrationSRStorage "1.2.840.10008.5.1.4.1.1.88.75" +#define UID_EnhancedXRayRadiationDoseSRStorage "1.2.840.10008.5.1.4.1.1.88.76" #define UID_ContentAssessmentResultsStorage "1.2.840.10008.5.1.4.1.1.90.1" +#define UID_MicroscopyBulkSimpleAnnotationsStorage "1.2.840.10008.5.1.4.1.1.91.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" #define UID_EncapsulatedSTLStorage "1.2.840.10008.5.1.4.1.1.104.3" @@ -545,6 +543,8 @@ #define UID_CTDefinedProcedureProtocolStorage "1.2.840.10008.5.1.4.1.1.200.1" #define UID_CTPerformedProcedureProtocolStorage "1.2.840.10008.5.1.4.1.1.200.2" #define UID_ProtocolApprovalStorage "1.2.840.10008.5.1.4.1.1.200.3" +#define UID_XADefinedProcedureProtocolStorage "1.2.840.10008.5.1.4.1.1.200.7" +#define UID_XAPerformedProcedureProtocolStorage "1.2.840.10008.5.1.4.1.1.200.8" #define UID_RTImageStorage "1.2.840.10008.5.1.4.1.1.481.1" #define UID_RTDoseStorage "1.2.840.10008.5.1.4.1.1.481.2" #define UID_RTStructureSetStorage "1.2.840.10008.5.1.4.1.1.481.3" @@ -565,6 +565,8 @@ #define UID_TomotherapeuticRadiationRecordStorage "1.2.840.10008.5.1.4.1.1.481.18" #define UID_CArmPhotonElectronRadiationRecordStorage "1.2.840.10008.5.1.4.1.1.481.19" #define UID_RoboticRadiationRecordStorage "1.2.840.10008.5.1.4.1.1.481.20" +#define UID_RTRadiationSetDeliveryInstructionStorage "1.2.840.10008.5.1.4.1.1.481.21" +#define UID_RTTreatmentPreparationStorage "1.2.840.10008.5.1.4.1.1.481.22" #define UID_RTBeamsDeliveryInstructionStorage "1.2.840.10008.5.1.4.34.7" #define UID_RTBrachyApplicationSetupDeliveryInstructionStorage "1.2.840.10008.5.1.4.34.10" #define UID_HangingProtocolStorage "1.2.840.10008.5.1.4.38.1" @@ -824,6 +826,7 @@ #define UID_ICBMSingleSubjectMRIFrameOfReference "1.2.840.10008.1.4.2.2" #define UID_IEC61217FixedCoordinateSystemFrameOfReference "1.2.840.10008.1.4.3.1" #define UID_StandardRoboticCoordinateSystemFrameOfReference "1.2.840.10008.1.4.3.2" +#define UID_IEC61217TableTopCoordinateSystemFrameOfReference "1.2.840.10008.1.4.3.3" #define UID_SRI24FrameOfReference "1.2.840.10008.1.4.4.1" #define UID_Colin27FrameOfReference "1.2.840.10008.1.4.5.1" #define UID_LPBA40AIRFrameOfReference "1.2.840.10008.1.4.6.1" diff -Nru dcmtk-3.6.6/dcmdata/include/dcmtk/dcmdata/dcvrae.h dcmtk-3.6.7/dcmdata/include/dcmtk/dcmdata/dcvrae.h --- dcmtk-3.6.6/dcmdata/include/dcmtk/dcmdata/dcvrae.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/include/dcmtk/dcmdata/dcvrae.h 2022-04-28 13:47:25.000000000 +0000 @@ -108,7 +108,7 @@ // ensure inherited overloads of matches take part in overload resolution using DcmByteString::matches; - /// @copydoc DcmByteString::matches(OFString,OFString,OFBool) + /// @copydoc DcmByteString::matches(const OFString&,const OFString&,const OFBool) const virtual OFBool matches(const OFString& key, const OFString& candidate, const OFBool enableWildCardMatching = OFTrue) const; diff -Nru dcmtk-3.6.6/dcmdata/include/dcmtk/dcmdata/dcvrcs.h dcmtk-3.6.7/dcmdata/include/dcmtk/dcmdata/dcvrcs.h --- dcmtk-3.6.6/dcmdata/include/dcmtk/dcmdata/dcvrcs.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/include/dcmtk/dcmdata/dcvrcs.h 2022-04-28 13:47:25.000000000 +0000 @@ -108,7 +108,7 @@ // ensure inherited overloads of matches take part in overload resolution using DcmByteString::matches; - /// @copydoc DcmByteString::matches(OFString,OFString,OFBool) + /// @copydoc DcmByteString::matches(const OFString&,const OFString&,const OFBool) const virtual OFBool matches(const OFString& key, const OFString& candidate, const OFBool enableWildCardMatching = OFTrue) const; diff -Nru dcmtk-3.6.6/dcmdata/include/dcmtk/dcmdata/dcvrda.h dcmtk-3.6.7/dcmdata/include/dcmtk/dcmdata/dcvrda.h --- dcmtk-3.6.6/dcmdata/include/dcmtk/dcmdata/dcvrda.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/include/dcmtk/dcmdata/dcvrda.h 2022-04-28 13:47:25.000000000 +0000 @@ -150,7 +150,7 @@ // ensure inherited overloads of matches take part in overload resolution using DcmByteString::matches; - /// @copydoc DcmByteString::matches(OFString,OFString,OFBool) + /// @copydoc DcmByteString::matches(const OFString&,const OFString&,const OFBool) const virtual OFBool matches(const OFString& key, const OFString& candidate, const OFBool enableWildCardMatching = OFTrue) const; diff -Nru dcmtk-3.6.6/dcmdata/include/dcmtk/dcmdata/dcvrdt.h dcmtk-3.6.7/dcmdata/include/dcmtk/dcmdata/dcvrdt.h --- dcmtk-3.6.6/dcmdata/include/dcmtk/dcmdata/dcvrdt.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/include/dcmtk/dcmdata/dcvrdt.h 2022-04-28 13:47:25.000000000 +0000 @@ -173,7 +173,7 @@ // ensure inherited overloads of matches take part in overload resolution using DcmByteString::matches; - /// @copydoc DcmByteString::matches(OFString,OFString,OFBool) + /// @copydoc DcmByteString::matches(const OFString&,const OFString&,const OFBool) const virtual OFBool matches(const OFString& key, const OFString& candidate, const OFBool enableWildCardMatching = OFTrue) const; diff -Nru dcmtk-3.6.6/dcmdata/include/dcmtk/dcmdata/dcvrlo.h dcmtk-3.6.7/dcmdata/include/dcmtk/dcmdata/dcvrlo.h --- dcmtk-3.6.6/dcmdata/include/dcmtk/dcmdata/dcvrlo.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/include/dcmtk/dcmdata/dcvrlo.h 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1994-2017, OFFIS e.V. + * Copyright (C) 1994-2022, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -118,7 +118,6 @@ virtual OFCondition writeJson(STD_NAMESPACE ostream &out, DcmJsonFormat &format); - /* --- static helper functions --- */ /** check whether given string value conforms to the VR "LO" (Long String) @@ -135,12 +134,6 @@ static OFCondition checkStringValue(const OFString &value, const OFString &vm = "1-n", const OFString &charset = ""); - -protected: - - /** @copydoc DcmCharString::getDelimiterChars() - */ - virtual const OFString& getDelimiterChars() const; }; diff -Nru dcmtk-3.6.6/dcmdata/include/dcmtk/dcmdata/dcvrobow.h dcmtk-3.6.7/dcmdata/include/dcmtk/dcmdata/dcvrobow.h --- dcmtk-3.6.6/dcmdata/include/dcmtk/dcmdata/dcvrobow.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/include/dcmtk/dcmdata/dcvrobow.h 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1994-2019, OFFIS e.V. + * Copyright (C) 1994-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -280,7 +280,7 @@ const unsigned long numWords); /** create an empty Uint8 array of given number of bytes and set it. - * All array elements are initialized with a value of 0 (using 'memzero'). + * All array elements are initialized with a value of 0 (using 'memset'). * This method is only applicable to non-OW data, e.g. OB. * @param numBytes number of bytes (8 bit) to be created * @param bytes stores the pointer to the resulting buffer @@ -290,7 +290,7 @@ Uint8 *&bytes); /** create an empty Uint16 array of given number of words and set it. - * All array elements are initialized with a value of 0 (using 'memzero'). + * All array elements are initialized with a value of 0 (using 'memset'). * This method is only applicable to OW data. * @param numWords number of words (16 bit) to be created * @param words stores the pointer to the resulting buffer diff -Nru dcmtk-3.6.6/dcmdata/include/dcmtk/dcmdata/dcvrod.h dcmtk-3.6.7/dcmdata/include/dcmtk/dcmdata/dcvrod.h --- dcmtk-3.6.6/dcmdata/include/dcmtk/dcmdata/dcvrod.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/include/dcmtk/dcmdata/dcvrod.h 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2013-2019, OFFIS e.V. + * Copyright (C) 2013-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -120,7 +120,7 @@ DcmJsonFormat &format); /** create an empty Float64 array of given number of double values and set it. - * All array elements are initialized with a value of 0 (using 'memzero'). + * All array elements are initialized with a value of 0 (using 'memset'). * @param numDoubles number of double values (64 bit) to be created * @param doubleVals stores the pointer to the resulting Float64 array * (set to NULL in case of error) diff -Nru dcmtk-3.6.6/dcmdata/include/dcmtk/dcmdata/dcvrof.h dcmtk-3.6.7/dcmdata/include/dcmtk/dcmdata/dcvrof.h --- dcmtk-3.6.6/dcmdata/include/dcmtk/dcmdata/dcvrof.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/include/dcmtk/dcmdata/dcvrof.h 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2002-2019, OFFIS e.V. + * Copyright (C) 2002-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -120,7 +120,7 @@ DcmJsonFormat &format); /** create an empty Float32 array of given number of float values and set it. - * All array elements are initialized with a value of 0 (using 'memzero'). + * All array elements are initialized with a value of 0 (using 'memset'). * @param numFloats number of float values (32 bit) to be created * @param floatVals stores the pointer to the resulting Float32 array * (set to NULL in case of error) diff -Nru dcmtk-3.6.6/dcmdata/include/dcmtk/dcmdata/dcvrol.h dcmtk-3.6.7/dcmdata/include/dcmtk/dcmdata/dcvrol.h --- dcmtk-3.6.6/dcmdata/include/dcmtk/dcmdata/dcvrol.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/include/dcmtk/dcmdata/dcvrol.h 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2016-2019, OFFIS e.V. + * Copyright (C) 2016-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -122,7 +122,7 @@ DcmJsonFormat &format); /** create an empty Uint32 array of given number of double-words and set it. - * All array elements are initialized with a value of 0 (using 'memzero'). + * All array elements are initialized with a value of 0 (using 'memset'). * @param numDoubleWords number of double-words (32 bit) to be created * @param doubleWords stores the pointer to the resulting Uint32 array * (set to NULL in case of error) diff -Nru dcmtk-3.6.6/dcmdata/include/dcmtk/dcmdata/dcvrov.h dcmtk-3.6.7/dcmdata/include/dcmtk/dcmdata/dcvrov.h --- dcmtk-3.6.6/dcmdata/include/dcmtk/dcmdata/dcvrov.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/include/dcmtk/dcmdata/dcvrov.h 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2019, OFFIS e.V. + * Copyright (C) 2019-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -122,7 +122,7 @@ DcmJsonFormat &format); /** create an empty Uint64 array of given number of quad-words and set it. - * All array elements are initialized with a value of 0 (using 'memzero'). + * All array elements are initialized with a value of 0 (using 'memset'). * @param numQuadWords number of quad-words (64 bit) to be created * @param quadWords stores the pointer to the resulting Uint64 array * (set to NULL in case of error) diff -Nru dcmtk-3.6.6/dcmdata/include/dcmtk/dcmdata/dcvrpn.h dcmtk-3.6.7/dcmdata/include/dcmtk/dcmdata/dcvrpn.h --- dcmtk-3.6.6/dcmdata/include/dcmtk/dcmdata/dcvrpn.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/include/dcmtk/dcmdata/dcvrpn.h 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1994-2020, OFFIS e.V. + * Copyright (C) 1994-2022, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -303,12 +303,6 @@ const OFString &vm = "1-n", const OFString &charset = ""); -protected: - - /** @copydoc DcmCharString::getDelimiterChars() - */ - virtual const OFString& getDelimiterChars() const; - private: /** an array containing the component group names, for XML and JSON output. diff -Nru dcmtk-3.6.6/dcmdata/include/dcmtk/dcmdata/dcvrpobw.h dcmtk-3.6.7/dcmdata/include/dcmtk/dcmdata/dcvrpobw.h --- dcmtk-3.6.6/dcmdata/include/dcmtk/dcmdata/dcvrpobw.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/include/dcmtk/dcmdata/dcvrpobw.h 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1994-2019, OFFIS e.V. + * Copyright (C) 1994-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -43,7 +43,9 @@ const DcmTag & tag, const Uint32 len = 0); - /// copy constructor + /** copy constructor + * @param old the OBOW to copy + */ DcmPolymorphOBOW( const DcmPolymorphOBOW & old); @@ -208,7 +210,7 @@ virtual OFCondition putUint16Array(const Uint16 *vals, const unsigned long num); /** create an empty Uint8 array of given number of bytes and set it. - * All array elements are initialized with a value of 0 (using 'memzero'). + * All array elements are initialized with a value of 0 (using 'memset'). * This method is only applicable to certain VRs, e.g. OB. * @param numBytes number of bytes (8 bit) to be created * @param bytes stores the pointer to the resulting buffer @@ -220,7 +222,7 @@ /** create an empty Uint16 array of given number of words and set it. - * All array elements are initialized with a value of 0 (using 'memzero'). + * All array elements are initialized with a value of 0 (using 'memset'). * This method is only applicable to OW data. * @param numWords number of words (16 bit) to be created * @param words stores the pointer to the resulting buffer diff -Nru dcmtk-3.6.6/dcmdata/include/dcmtk/dcmdata/dcvrsh.h dcmtk-3.6.7/dcmdata/include/dcmtk/dcmdata/dcvrsh.h --- dcmtk-3.6.6/dcmdata/include/dcmtk/dcmdata/dcvrsh.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/include/dcmtk/dcmdata/dcvrsh.h 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1994-2017, OFFIS e.V. + * Copyright (C) 1994-2022, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -135,12 +135,6 @@ static OFCondition checkStringValue(const OFString &value, const OFString &vm = "1-n", const OFString &charset = ""); - -protected: - - /** @copydoc DcmCharString::getDelimiterChars() - */ - virtual const OFString& getDelimiterChars() const; }; diff -Nru dcmtk-3.6.6/dcmdata/include/dcmtk/dcmdata/dcvrtm.h dcmtk-3.6.7/dcmdata/include/dcmtk/dcmdata/dcvrtm.h --- dcmtk-3.6.6/dcmdata/include/dcmtk/dcmdata/dcvrtm.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/include/dcmtk/dcmdata/dcvrtm.h 2022-04-28 13:47:25.000000000 +0000 @@ -170,7 +170,7 @@ // ensure inherited overloads of matches take part in overload resolution using DcmByteString::matches; - /// @copydoc DcmByteString::matches(OFString,OFString,OFBool) + /// @copydoc DcmByteString::matches(const OFString&,const OFString&,const OFBool) const virtual OFBool matches(const OFString& key, const OFString& candidate, const OFBool enableWildCardMatching = OFTrue) const; diff -Nru dcmtk-3.6.6/dcmdata/include/dcmtk/dcmdata/dcvrui.h dcmtk-3.6.7/dcmdata/include/dcmtk/dcmdata/dcvrui.h --- dcmtk-3.6.6/dcmdata/include/dcmtk/dcmdata/dcvrui.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/include/dcmtk/dcmdata/dcvrui.h 2022-04-28 13:47:25.000000000 +0000 @@ -96,8 +96,8 @@ /** print element to a stream. * The output format of the value is a backslash separated sequence of string - * components. In case of a single component the UID number is mapped to the - * corresponding UID name (using "dcmFindNameOfUID()") if available. A "=" is + * components. In case of a single component, the UID number is mapped to the + * corresponding UID name (using dcmFindNameOfUID()) if available. A "=" is * used as a prefix to distinguish the UID name from the UID number. * NB: This mapping of UID names only works for single-valued strings. * @param out output stream @@ -123,9 +123,9 @@ OFBool normalize = OFTrue); /** set element value from the given character string. - * If the string starts with a "=" the subsequent characters are interpreted as a - * UID name and mapped to the corresponding UID number (using "dcmFindUIDFromName()") - * if possible. Otherwise the leading "=" is removed. + * If the string starts with a "=", the subsequent characters are interpreted as a + * UID name and mapped to the corresponding UID number (using dcmFindUIDFromName()) + * if possible. Otherwise, an error (EC_UnknownUIDName) is returned. * NB: This mapping of UID names only works for single-valued input strings. * @param stringVal input character string (possibly multi-valued) * @return status, EC_Normal if successful, an error code otherwise @@ -133,9 +133,9 @@ virtual OFCondition putString(const char *stringVal); /** set element value from the given character string. - * If the string starts with a "=" the subsequent characters are interpreted as a - * UID name and mapped to the corresponding UID number (using "dcmFindUIDFromName()") - * if possible. Otherwise the leading "=" is removed. + * If the string starts with a "=", the subsequent characters are interpreted as a + * UID name and mapped to the corresponding UID number (using dcmFindUIDFromName()) + * if possible. Otherwise, an error (EC_UnknownUIDName) is returned. * NB: This mapping of UID names only works for single-valued input strings. * The length of the string has to be specified explicitly. The string can, therefore, * also contain more than one NULL byte. diff -Nru dcmtk-3.6.6/dcmdata/include/dcmtk/dcmdata/dcvrur.h dcmtk-3.6.7/dcmdata/include/dcmtk/dcmdata/dcvrur.h --- dcmtk-3.6.6/dcmdata/include/dcmtk/dcmdata/dcvrur.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/include/dcmtk/dcmdata/dcvrur.h 2022-04-28 13:47:25.000000000 +0000 @@ -144,7 +144,7 @@ // ensure inherited overloads of matches take part in overload resolution using DcmByteString::matches; - /// @copydoc DcmByteString::matches(OFString,OFString,OFBool) + /// @copydoc DcmByteString::matches(const OFString&,const OFString&,const OFBool) const virtual OFBool matches(const OFString& key, const OFString& candidate, const OFBool enableWildCardMatching = OFTrue) const; diff -Nru dcmtk-3.6.6/dcmdata/include/dcmtk/dcmdata/libi2d/i2dbmps.h dcmtk-3.6.7/dcmdata/include/dcmtk/dcmdata/libi2d/i2dbmps.h --- dcmtk-3.6.6/dcmdata/include/dcmtk/dcmdata/libi2d/i2dbmps.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/include/dcmtk/dcmdata/libi2d/i2dbmps.h 2022-04-28 13:47:25.000000000 +0000 @@ -87,8 +87,13 @@ * @param srcLossyComprMethod - [out] Unused parameter * @return EC_Normal if information is available, error otherwise */ +#ifdef DOXYGEN virtual OFCondition getLossyComprInfo(OFBool& srcEncodingLossy, - OFString& /* srcLossyComprMethod */) const + OFString& srcLossyComprMethod) const +#else + virtual OFCondition getLossyComprInfo(OFBool& srcEncodingLossy, + OFString& /* srcLossyComprMethod */ ) const +#endif { srcEncodingLossy = OFFalse; return EC_Normal; @@ -137,10 +142,12 @@ /** Read the color palette from the file. * @param colors - [in] number of colors to read + * @param isMonochrome - [out] true if the palette is monochrome * @param palette - [out] the read color palette is stored here * @return EC_Normal, if successful, error otherwise */ OFCondition readColorPalette(Uint16 colors, + OFBool& isMonochrome, Uint32*& palette); /** Read the bitmap data. @@ -149,6 +156,7 @@ * @param height - [in] height of the image in pixel * @param bpp - [in] Image's bits per pixel. * @param isTopDown - [in] If true, this is a top down bitmap + * @param isMonochrome - [in] If true, this is a monochrome palette color image * @param colors - [in] Number of color palette entries * @param palette - [in] Color palette * @param pixData - [out] Image data @@ -159,6 +167,7 @@ const Uint16 height, const Uint16 bpp, const OFBool isTopDown, + const OFBool isMonochrome, const Uint16 colors, const Uint32* palette, char*& pixData /*out*/, @@ -192,6 +201,7 @@ * @param bpp - [in] The number of bits per pixel. * @param colors - [in] The number of entries in the color palette. * @param palette - [in] The color palette to use. + * @param isMonochrome - [in] If true, this is a monochrome palette color image * @param pixData - [out] The buffer to write the data to (in "RGB" format). * @return EC_Normal, if successful, error otherwise */ @@ -200,6 +210,7 @@ const int bpp, const Uint16 colors, const Uint32* palette, + const OFBool isMonochrome, char *pixData /*out*/) const; /** Read 4 bytes from the byte stream and interpret it as a signed integer. diff -Nru dcmtk-3.6.6/dcmdata/include/dcmtk/dcmdata/libi2d/i2d.h dcmtk-3.6.7/dcmdata/include/dcmtk/dcmdata/libi2d/i2d.h --- dcmtk-3.6.6/dcmdata/include/dcmtk/dcmdata/libi2d/i2d.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/include/dcmtk/dcmdata/libi2d/i2d.h 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2001-2019, OFFIS e.V. + * Copyright (C) 2001-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -26,6 +26,9 @@ #include "dcmtk/dcmdata/libi2d/i2doutpl.h" #include "dcmtk/dcmdata/libi2d/i2dimgs.h" #include "dcmtk/dcmdata/dcpixel.h" +#include "dcmtk/dcmdata/dcofsetl.h" + +class DcmPixelItem; class DCMTK_I2D_EXPORT Image2Dcm { @@ -33,34 +36,87 @@ public: /** Constructor, initializes command line options - * @return none */ Image2Dcm(); + /** Destructor, frees plugin memory + */ + ~Image2Dcm(); + /** Start the conversion. Needs a fully configured input plugin * and a fully configured output plugin to operate. Returns * a dataset with the resulting DICOM object. * @param inputPlug - [in] The input plugin to read pixel data * @param outPlug - [in] The output plugin for specific SOP class output + * @param numberOfFrames - [in] The number of frames to be written * @param resultDset - [out] The DICOM object resulting from the conversion * The dataset is allocated in this method and must be freed by the * caller. * @param proposedTS - [out] The proposed transfer syntax (needed e. g. * by JPEG input plugin) - * @return EC_Normal, if successfull, error otherwise + * @return EC_Normal, if successful, error otherwise */ - OFCondition convert(I2DImgSource *inputPlug, - I2DOutputPlug *outPlug, - DcmDataset*& resultDset, - E_TransferSyntax& proposedTS); + OFCondition convertFirstFrame( + I2DImgSource *inputPlug, + I2DOutputPlug *outPlug, + size_t numberOfFrames, + DcmDataset*& resultDset, + E_TransferSyntax& proposedTS); - /** Sets a DICOM file that should serve as a template for the resulting + + /** Start the conversion. Needs a fully configured input plugin + * to operate. Updates the pixel data element created by convertFirstFrame(). + * @param inputPlug - [in] The input plugin to read pixel data + * @param frameNumber - [in] The number of the current frame, must be larger than 1 + * and smaller or equal to the numberOfFrames value passed to convertFirstFrame(). + * @return EC_Normal, if successful, error otherwise + */ + OFCondition convertNextFrame( + I2DImgSource *inputPlug, + size_t frameNumber); + + /** Update the offset table in the case of an encapsulated image + */ + OFCondition updateOffsetTable(); + + /** Finalizes the conversion after the last call to convertNextFrame() + * by writing the attributes related to lossy image compression. + * @param inputPlug - [in] The input plugin to read pixel data + * @param numberOfFrames - [in] The number of frames to be written + * @param dset - [in/out] The DICOM object resulting from the conversion + * @return EC_Normal, if successful, error otherwise + */ + OFCondition updateLossyCompressionInfo( + I2DImgSource *inputPlug, + size_t numberOfFrames, + DcmDataset *dset); + + /** Sets a file that should serve as a template for the resulting * DICOM object. Only the dataset of the given file is imported. - * @param file - [in] The filename of the template DICOM file + * @param file - [in] The filename of the template file, + * which is either in DICOM or XML format. * @return none */ void setTemplateFile(const OFString& file); + /** Sets the format of the template file. + * @param isXML - [in] true for XML, false for DICOM format + * @return none + */ + void setTemplateFileIsXML(OFBool isXML); + + /** activates or deactivates XML validation + * @param enabled - [in] true to enable validation + * @return none + */ + void setXMLvalidation(OFBool enabled); + + /** activates or deactivates an XML namespace check + * @param enabled - [in] true to enable namespace check + * @return none + */ + void setXMLnamespaceCheck(OFBool enabled); + /** Set file from which patient/study/series data should be imported from. * @param file - [in] The DICOM file to read from * @return none @@ -81,17 +137,12 @@ */ void setIncrementInstanceNumber(OFBool incInstNo); - /** Enables/disables autotmatic insertion of the value "ISO_IR100" as - * a value for the Specific Character Set attribute. If disabled, - * no value is inserted for Specifific Character Set but instead - * must be provided by other means (see setTemplateFile(), setSeriesFrom(), - * setStudyFrom(), setOverrideKeys()). The insertion is applied after - * loading the (optional) template file; the value might be overwritten - * by the value copied by setStudy/Series/OverrideKeys. - * @param insertLatin1 - [in] Enable/disable insertion of Iso Latin 1 - * @return none; - */ - void setISOLatin1(OFBool insertLatin1); + /** Sets the conversion flags for character set conversion of + * the study/series file + * @param conversionFlags - [in] conversion flags + * @return none; + */ + void setConversionFlags(size_t conversionFlags); /** Specifies some attributes that should be inserted after conversion. * They will override any identical attributes already existing in the @@ -120,11 +171,6 @@ OFBool insertMissingType2 = OFTrue, OFBool inventMissingType1 = OFTrue); - /** Destructor, frees plugin memory - * @return none - */ - ~Image2Dcm(); - protected: /** Cleans up template for future insertion of pixel data information, ie @@ -157,13 +203,29 @@ /** Reads pixel data and corresponding attributes like rows etc. from image * file and inserts them into dataset. * @param imageSource - [in] The input plugin that actually reads the pixel data + * @param numberOfFrames - [in] The number of frames to be written * @param dset - [out] The dataset to export the pixel data attributes to * @param outputTS - [out] The proposed transfex syntax of the dataset + * @param compressionRatio - [out] compression ratio of the pixel data, 1.0 for uncompressed + * @return EC_Normal, if successful, error otherwise + */ + OFCondition readAndInsertPixelDataFirstFrame( + I2DImgSource* imageSource, + size_t numberOfFrames, + DcmDataset* dset, + E_TransferSyntax& outputTS, + double& compressionRatio); + + /** Reads pixel data and corresponding attributes like rows etc. from image + * file and inserts them into dataset as an additional frame. + * @param imageSource - [in] The input plugin that actually reads the pixel data + * @param frameNumber - [in] The number of the current frame, must be larger than 1 + * and smaller or equal to the numberOfFrames value passed to convertFirstFrame(). * @return EC_Normal, if successful, error otherwise */ - OFCondition readAndInsertPixelData( I2DImgSource* imageSource, - DcmDataset* dset, - E_TransferSyntax& outputTS); + OFCondition readAndInsertPixelDataNextFrame( + I2DImgSource* imageSource, + size_t frameNumber); /** Do some completeness / validity checks. Should be called when * dataset is completed and is about to be saved. @@ -181,7 +243,7 @@ /** Inserts "ISO_IR100" in the attribute "Specific Character Set". * Overwrites any existing value. * @param outputDset - [out] The dataset to write to - * @return EC_Normal if insertion is successfull, error code otherwise + * @return EC_Normal if insertion is successful, error code otherwise */ OFCondition insertLatin1(DcmDataset *outputDset); @@ -209,17 +271,27 @@ private: - /** Correctly inserts encapsulated pixel data. + /** Inserts encapsulated pixel data for the first frame * @param dset [in] - The dataset to which we should add this. * @param pixData [in] - The data to add. * @param length [in] - The length of pixData. * @param outputTS [in] - The output transfer syntax to be used - * @return EC_Normal, if successfull, error otherwise. + * @return EC_Normal, if successful, error otherwise. + */ + OFCondition insertEncapsulatedPixelDataFirstFrame( + DcmDataset* dset, + char *pixData, + Uint32 length, + E_TransferSyntax outputTS); + + /** Inserts encapsulated pixel data for another frame + * @param pixData [in] - The data to add. + * @param length [in] - The length of pixData. + * @return EC_Normal, if successful, error otherwise. */ - OFCondition insertEncapsulatedPixelData(DcmDataset* dset, - char *pixData, - Uint32 length, - const E_TransferSyntax& outputTS) const; + OFCondition insertEncapsulatedPixelDataNextFrame( + char *pixData, + Uint32 length); /* Attributes for writing DICOM dataset */ @@ -227,11 +299,20 @@ /// (and are not checked by the isValid() function) OFList m_overrideKeys; - /// If not empty, the DICOM file specified in this variable is used + /// If not empty, the DICOM or XML file specified in this variable is used /// as a base for the DICOM image file to be created, ie. all attributes /// are taken over from this template file OFString m_templateFile; + /// if true, the template file is in XML format, otherwise DICOM + OFBool m_templateFileIsXML; + + /// if true, an XML validation will be performed while parsing + OFBool m_XMLvalidation; + + /// if true, an XML namespace check will be performed while parsing + OFBool m_XMLnamespaceCheck; + /// If true, patient and study data is read from file OFBool m_readStudyLevel; @@ -260,6 +341,60 @@ /// for attribute "Specific Character Set". Insertion takes place after /// loading (optional) template file. OFBool m_insertLatin1; + + /// number of rows + Uint16 m_rows; + + /// number of columns + Uint16 m_cols; + + /// samples per pixel + Uint16 m_samplesPerPixel; + + /// bits allocated + Uint16 m_bitsAllocated; + + /// bits stored + Uint16 m_bitsStored; + + /// high bit + Uint16 m_highBit; + + /// pixel representation + Uint16 m_pixelRepresentation; + + /// planar configuration + Uint16 m_planarConfiguration; + + /// pixel aspect ratio, horizontal + Uint16 m_pixelAspectRatioH; + + /// pixel aspect ratio, vertical + Uint16 m_pixelAspectRatioV; + + /// frame length in bytes + Uint32 m_frameLength; + + /// photometric interpretation + OFString m_photometricInterpretation; + + /// compression ratio per frame accumulated in this variable + double m_compressionRatio; + + /// flags for character set conversion + size_t m_conversionFlags; + + /// buffer into which uncompressed pixel data is written + char *m_output_buffer; + + /// offset list object used for the creation of encapsulated datasets + DcmOffsetList m_offsetList; + + /// pixel sequence object used for the creation of encapsulated datasets + DcmPixelSequence *m_pixelSequence; + + /// offset table object used for the creation of encapsulated datasets + DcmPixelItem *m_offsetTable; }; #endif // I2D_H diff -Nru dcmtk-3.6.6/dcmdata/include/dcmtk/dcmdata/libi2d/i2djpgs.h dcmtk-3.6.7/dcmdata/include/dcmtk/dcmdata/libi2d/i2djpgs.h --- dcmtk-3.6.6/dcmdata/include/dcmtk/dcmdata/libi2d/i2djpgs.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/include/dcmtk/dcmdata/libi2d/i2djpgs.h 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2007-2014, OFFIS e.V. + * Copyright (C) 2007-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -23,9 +23,9 @@ #define I2DJPGS_H #include "dcmtk/config/osconfig.h" +#include "dcmtk/dcmdata/libi2d/i2dimgs.h" #include "dcmtk/ofstd/offile.h" #include "dcmtk/ofstd/oflist.h" -#include "dcmtk/dcmdata/libi2d/i2dimgs.h" /** * JPEG markers consist of one or more 0xFF bytes, followed by a marker code byte @@ -33,42 +33,88 @@ * @note RESn markers are not fully listed, but only the first (RES0) and the * last (RESN) */ -enum E_JPGMARKER { E_JPGMARKER_SOF0 = 0xC0, E_JPGMARKER_SOF1 = 0xC1, E_JPGMARKER_SOF2 = 0xC2, - E_JPGMARKER_SOF3 = 0xC3, /*C4 and CC are not SOF markers,*/ E_JPGMARKER_SOF5 = 0xC5, - E_JPGMARKER_SOF6 = 0xC6, E_JPGMARKER_SOF7 = 0xC7, E_JPGMARKER_JPG = 0xC8, - E_JPGMARKER_SOF9 = 0xC9, E_JPGMARKER_SOF10 = 0xCA, E_JPGMARKER_SOF11 = 0xCB, - E_JPGMARKER_SOF13 = 0xCD, E_JPGMARKER_SOF14 = 0xCE, E_JPGMARKER_SOF15 = 0xCF, - E_JPGMARKER_DHT = 0xC4, E_JPGMARKER_DAC = 0xCC, E_JPGMARKER_RST0 = 0xD0, - E_JPGMARKER_RST1 = 0xD1, E_JPGMARKER_RST2 = 0xD2, E_JPGMARKER_RST3 = 0xD3, - E_JPGMARKER_RST4 = 0xD4, E_JPGMARKER_RST5 = 0xD5, E_JPGMARKER_RST6 = 0xD6, - E_JPGMARKER_RST7 = 0xD7, E_JPGMARKER_SOI = 0xD8, E_JPGMARKER_EOI = 0xD9, - E_JPGMARKER_SOS = 0xDA, E_JPGMARKER_DQT = 0xDB, E_JPGMARKER_DNL = 0xDC, - E_JPGMARKER_DRI = 0xDD, E_JPGMARKER_DHP = 0xDE, E_JPGMARKER_EXP = 0xDF, - E_JPGMARKER_APP0 = 0xE0, E_JPGMARKER_APP1 = 0xE1, E_JPGMARKER_APP2 = 0xE2, - E_JPGMARKER_APP3 = 0xE3, E_JPGMARKER_APP4 = 0xE4, E_JPGMARKER_APP5 = 0xE5, - E_JPGMARKER_APP6 = 0xE6, E_JPGMARKER_APP7 = 0xE7, E_JPGMARKER_APP8 = 0xE8, - E_JPGMARKER_APP9 = 0xE9, E_JPGMARKER_APP10 = 0xEA, E_JPGMARKER_APP11 = 0xEB, - E_JPGMARKER_APP12 = 0xEC, E_JPGMARKER_APP13 = 0xED, E_JPGMARKER_APP14 = 0xEE, - E_JPGMARKER_APP15 = 0xEF, E_JPGMARKER_JPGN0 = 0xF0, E_JPGMARKER_JPGN1 = 0xF1, - E_JPGMARKER_JPGN2 = 0xF2, E_JPGMARKER_JPGN3 = 0xF3, E_JPGMARKER_JPGN4 = 0xF4, - E_JPGMARKER_JPGN5 = 0xF5, E_JPGMARKER_JPGN6 = 0xF6, E_JPGMARKER_JPGN7 = 0xF7, - E_JPGMARKER_JPGN8 = 0xF8, E_JPGMARKER_JPGN9 = 0xF9, E_JPGMARKER_JPGN10 = 0xFA, - E_JPGMARKER_JPGN11 = 0xFB, E_JPGMARKER_JPGN12 = 0xFC, E_JPGMARKER_JPGN13 = 0xFD, - E_JPGMARKER_COM = 0xFE, E_JPGMARKER_TEM = 0x01, E_JPGMARKER_RES0 = 0x02, - E_JPGMARKER_RESN = 0xBF }; +enum E_JPGMARKER +{ + E_JPGMARKER_SOF0 = 0xC0, + E_JPGMARKER_SOF1 = 0xC1, + E_JPGMARKER_SOF2 = 0xC2, + E_JPGMARKER_SOF3 = 0xC3, + /*C4 and CC are not SOF markers,*/ E_JPGMARKER_SOF5 = 0xC5, + E_JPGMARKER_SOF6 = 0xC6, + E_JPGMARKER_SOF7 = 0xC7, + E_JPGMARKER_JPG = 0xC8, + E_JPGMARKER_SOF9 = 0xC9, + E_JPGMARKER_SOF10 = 0xCA, + E_JPGMARKER_SOF11 = 0xCB, + E_JPGMARKER_SOF13 = 0xCD, + E_JPGMARKER_SOF14 = 0xCE, + E_JPGMARKER_SOF15 = 0xCF, + E_JPGMARKER_DHT = 0xC4, + E_JPGMARKER_DAC = 0xCC, + E_JPGMARKER_RST0 = 0xD0, + E_JPGMARKER_RST1 = 0xD1, + E_JPGMARKER_RST2 = 0xD2, + E_JPGMARKER_RST3 = 0xD3, + E_JPGMARKER_RST4 = 0xD4, + E_JPGMARKER_RST5 = 0xD5, + E_JPGMARKER_RST6 = 0xD6, + E_JPGMARKER_RST7 = 0xD7, + E_JPGMARKER_SOI = 0xD8, + E_JPGMARKER_EOI = 0xD9, + E_JPGMARKER_SOS = 0xDA, + E_JPGMARKER_DQT = 0xDB, + E_JPGMARKER_DNL = 0xDC, + E_JPGMARKER_DRI = 0xDD, + E_JPGMARKER_DHP = 0xDE, + E_JPGMARKER_EXP = 0xDF, + E_JPGMARKER_APP0 = 0xE0, + E_JPGMARKER_APP1 = 0xE1, + E_JPGMARKER_APP2 = 0xE2, + E_JPGMARKER_APP3 = 0xE3, + E_JPGMARKER_APP4 = 0xE4, + E_JPGMARKER_APP5 = 0xE5, + E_JPGMARKER_APP6 = 0xE6, + E_JPGMARKER_APP7 = 0xE7, + E_JPGMARKER_APP8 = 0xE8, + E_JPGMARKER_APP9 = 0xE9, + E_JPGMARKER_APP10 = 0xEA, + E_JPGMARKER_APP11 = 0xEB, + E_JPGMARKER_APP12 = 0xEC, + E_JPGMARKER_APP13 = 0xED, + E_JPGMARKER_APP14 = 0xEE, + E_JPGMARKER_APP15 = 0xEF, + E_JPGMARKER_JPGN0 = 0xF0, + E_JPGMARKER_JPGN1 = 0xF1, + E_JPGMARKER_JPGN2 = 0xF2, + E_JPGMARKER_JPGN3 = 0xF3, + E_JPGMARKER_JPGN4 = 0xF4, + E_JPGMARKER_JPGN5 = 0xF5, + E_JPGMARKER_JPGN6 = 0xF6, + E_JPGMARKER_JPGN7 = 0xF7, + E_JPGMARKER_JPGN8 = 0xF8, + E_JPGMARKER_JPGN9 = 0xF9, + E_JPGMARKER_JPGN10 = 0xFA, + E_JPGMARKER_JPGN11 = 0xFB, + E_JPGMARKER_JPGN12 = 0xFC, + E_JPGMARKER_JPGN13 = 0xFD, + E_JPGMARKER_COM = 0xFE, + E_JPGMARKER_TEM = 0x01, + E_JPGMARKER_RES0 = 0x02, + E_JPGMARKER_RESN = 0xBF +}; /** * Struct that represents a marker in a JPEG file, i.e. it consists * of the byte position of the marker and the marker code itself */ -struct DCMTK_I2D_EXPORT JPEGFileMapEntry { - /// The byte position of the marker - offile_off_t bytePos; - /// The marker byte itself - E_JPGMARKER marker; +struct DCMTK_I2D_EXPORT JPEGFileMapEntry +{ + /// The byte position of the marker + offile_off_t bytePos; + /// The marker byte itself + E_JPGMARKER marker; }; - /** This is a I2DImgSource implementation that can parse JPEG files and convert * them into DICOM images. */ @@ -76,278 +122,268 @@ { public: - - /** Constructor, initializes member variables - * @return none - */ - I2DJpegSource(); - - /** Returns format of input image. For this class "JPEG" is returned. - * @return Returns format of input image, i.e. "JPEG". - */ - OFString inputFormat() const; - - /** Extracts the raw JPEG pixel data stream from a JPEG file and returns some - * further information about this pixel data. Raw means here that all APP - * markers (e.g. JFIF information) are removed from the JPEG stream. - * The pixel data returned is a JPEG stream in JPEG interchange format. - * This function allocates memory for the pixel data returned to the user. - * The caller of this function is responsible for deleting the memory buffer. - * @param rows - [out] Rows of image - * @param cols - [out] Columns of image - * @param samplesPerPixel - [out] Number of components per pixel - * @param photoMetrInt - [out] The DICOM color model used for the compressed data - * @param bitsAlloc - [out] Bits Allocated for one sample - * @param bitsStored - [out] Bits Stored, Number of bits actually stored within - * Bits Allocated - * @param highBit - [out] High Bit, Highest stored in bit within Bits Allocated - * @param pixelRepr - [out] Pixel Representation (0=unsigned, 1=signed) - * @param planConf - [out] Planar Configuration - * @param pixAspectH - [out] Horizontal value of pixel aspect ratio - * @param pixAspectV - [out] Vertical value of pixel aspect ratio - * @param pixData - [out] Pointer to the pixel data in JPEG Interchange Format - * (but without APPx markers). - * @param length - [out] Length of pixel data - * @param ts - [out] The transfer syntax imposed by the imported pixel pixel - * data. This is necessary for the JPEG importer that needs - * to report which TS must be used for the imported JPEG data - * (ie. baseline, progressive, ...). - * @return EC_Normal, if successful, error otherwise - */ - OFCondition readPixelData( Uint16& rows, - Uint16& cols, - Uint16& samplesPerPixel, - OFString& photoMetrInt, - Uint16& bitsAlloc, - Uint16& bitsStored, - Uint16& highBit, - Uint16& pixelRepr, - Uint16& planConf, - Uint16& pixAspectH, - Uint16& pixAspectV, - char*& pixData, - Uint32& length, - E_TransferSyntax& ts); - - /** After reading of pixel data, this function can be used for getting - * information about lossy compression parameters. - * @param srcEncodingLossy - [out] Denotes, whether the encoding of the pixel - * data read was lossy (OFTrue) or lossless (OFFalse) - * @param srcLossyComprMethod - [out] Denotes the lossy compression method used - * in source if there is one (srcEncodingLossy = OFTrue). - * Should use defined terms of attribute Lossy - * Compression Method. - * @return EC_Normal if information is available, error otherwise - */ - OFCondition getLossyComprInfo(OFBool& srcEncodingLossy, - OFString& srcLossyComprMethod) const; - - /** Enable/Disable support for Extended Sequential JPEG Coding - * @param enabled - [in] OFTrue: support Extended Sequential, - * OFFalse: do not support - * @return none - */ - void setExtSeqSupport(const OFBool enabled); - - /** Enable/Disable support for Progressive JPEG Coding - * @param enabled - [in] OFTrue: support Extended Sequential, - * OFFalse: do not support - * @return none - */ - void setProgrSupport(const OFBool enabled); - - /** If enabled, conversion will only take place if JFIF data could be found - * and evaluated. Many digital cameras do not provide a JFIF header, so this - * is disabled by default. - */ - void setInsistOnJFIF(const OFBool enabled); - - /** If enabled, APPn markers (except JFIF!) are also copied to the output file. - * This can cause a huge speedup because instead of parsing the whole - * JPEG file (for finding any APPn markers) the parsing stops after finding - * the SOFn marker (which is relevant for extracting width/height and so on. - * Default: false - * @param enabled - [in] OFTrue: copy APPn, OFFalse: cut off APPn info - * @return none - */ - void setKeepAPPn(const OFBool enabled); - - /** Returns a string representation of a JPEG marker code. - * @param marker - [in] The marker to be converted - * @return A string representation of the marker - */ - static OFString jpegMarkerToString(const E_JPGMARKER& marker); - - /** Destructor, frees some memory. - * @return none - */ - ~I2DJpegSource(); + /** Constructor, initializes member variables + * @return none + */ + I2DJpegSource(); + + /** Returns format of input image. For this class "JPEG" is returned. + * @return Returns format of input image, i.e. "JPEG". + */ + OFString inputFormat() const; + + /** Extracts the raw JPEG pixel data stream from a JPEG file and returns some + * further information about this pixel data. Raw means here that all APP + * markers (e.g. JFIF information) are removed from the JPEG stream. + * The pixel data returned is a JPEG stream in JPEG interchange format. + * This function allocates memory for the pixel data returned to the user. + * The caller of this function is responsible for deleting the memory buffer. + * @param rows - [out] Rows of image + * @param cols - [out] Columns of image + * @param samplesPerPixel - [out] Number of components per pixel + * @param photoMetrInt - [out] The DICOM color model used for the compressed data + * @param bitsAlloc - [out] Bits Allocated for one sample + * @param bitsStored - [out] Bits Stored, Number of bits actually stored within + * Bits Allocated + * @param highBit - [out] High Bit, Highest stored in bit within Bits Allocated + * @param pixelRepr - [out] Pixel Representation (0=unsigned, 1=signed) + * @param planConf - [out] Planar Configuration + * @param pixAspectH - [out] Horizontal value of pixel aspect ratio + * @param pixAspectV - [out] Vertical value of pixel aspect ratio + * @param pixData - [out] Pointer to the pixel data in JPEG Interchange Format + * (but without APPx markers). + * @param length - [out] Length of pixel data + * @param ts - [out] The transfer syntax imposed by the imported pixel pixel + * data. This is necessary for the JPEG importer that needs + * to report which TS must be used for the imported JPEG data + * (ie. baseline, progressive, ...). + * @return EC_Normal, if successful, error otherwise + */ + OFCondition readPixelData(Uint16& rows, + Uint16& cols, + Uint16& samplesPerPixel, + OFString& photoMetrInt, + Uint16& bitsAlloc, + Uint16& bitsStored, + Uint16& highBit, + Uint16& pixelRepr, + Uint16& planConf, + Uint16& pixAspectH, + Uint16& pixAspectV, + char*& pixData, + Uint32& length, + E_TransferSyntax& ts); + + /** After reading of pixel data, this function can be used for getting + * information about lossy compression parameters. + * @param srcEncodingLossy - [out] Denotes, whether the encoding of the pixel + * data read was lossy (OFTrue) or lossless (OFFalse) + * @param srcLossyComprMethod - [out] Denotes the lossy compression method used + * in source if there is one (srcEncodingLossy = OFTrue). + * Should use defined terms of attribute Lossy + * Compression Method. + * @return EC_Normal if information is available, error otherwise + */ + OFCondition getLossyComprInfo(OFBool& srcEncodingLossy, OFString& srcLossyComprMethod) const; + + /** Enable/Disable support for Extended Sequential JPEG Coding + * @param enabled - [in] OFTrue: support Extended Sequential, + * OFFalse: do not support + * @return none + */ + void setExtSeqSupport(const OFBool enabled); + + /** Enable/Disable support for Progressive JPEG Coding + * @param enabled - [in] OFTrue: support Extended Sequential, + * OFFalse: do not support + * @return none + */ + void setProgrSupport(const OFBool enabled); + + /** If enabled, conversion will only take place if JFIF data could be found + * and evaluated. Many digital cameras do not provide a JFIF header, so this + * is disabled by default. + */ + void setInsistOnJFIF(const OFBool enabled); + + /** If enabled, APPn markers (except JFIF!) are also copied to the output file. + * Default: false + * @param enabled - [in] OFTrue: copy APPn, OFFalse: cut off APPn info + * @return none + */ + void setKeepAPPn(const OFBool enabled); + + /** If enabled, COM marker is also copied to the output file. + * Default: true + * @param enabled - [in] OFTrue: copy COM, OFFalse: cut off COM segment + * @return none + */ + void setKeepCOM(const OFBool enabled); + + /** Returns a string representation of a JPEG marker code. + * @param marker - [in] The marker to be converted + * @return A string representation of the marker + */ + static OFString jpegMarkerToString(const E_JPGMARKER& marker); + + /** Destructor, frees some memory. + * @return none + */ + ~I2DJpegSource(); protected: - - /** Opens the JPEG file specified by the given filename. - * @param filename - [in] The file to be opened - * @return EC_Normal, if successful, error otherwise - */ - OFCondition openFile(const OFString& filename); - - /** Closes JPEG file. - * @return A string representation of the marker - */ - void closeFile(); - - /** Function that scans a JPEG file and creates a "file map" which - * includes all JPEG markers and their byte positions in the file. - * @return EC_Normal, if successful, error otherwise - */ - OFCondition createJPEGFileMap(); - - /** Dump the internal JPEG file map to a given stream. The file map - * lists JPEG markers and their position in the bitstream found in the JPEG - * file - * @return none - */ - void debugDumpJPEGFileMap() const; - - /** Get image parameters as found at given SOF marker of the JPEG image. - * @param entry - [in] This specifies the marker and the byte position of the - * SOF marker - * @param imageWidth - [out] The width of the image - * @param imageHeight - [out] The height of the image - * @param samplesPerPixel - [out] Number of components per pixel - * @param bitsPerSample - [out] Number of bits per pixel component - * @return EC_Normal, if successful, error otherwise - */ - OFCondition getSOFImageParameters( const JPEGFileMapEntry& entry, - Uint16& imageWidth, - Uint16& imageHeight, - Uint16& samplesPerPixel, - Uint16& bitsPerSample); - - /** Get JPEG parameters as found at given JFIF marker of the JPEG image. - * @param entry - [in] This specifies the marker and the byte position of the - * JFIF marker - * @param jfifVersion - [out] The JFIF version of the JFIF data - * @param pixelAspectH - [out] The horizontal pixel aspect ratio - * @param pixelAspectV - [out] The vertical pixel aspect ratio - * @param unit - [out] The contents of the pixel aspect ratio unit field - * @return EC_Normal, if successful, error otherwise - */ - OFCondition getJFIFImageParameters( const JPEGFileMapEntry& entry, - Uint16& jfifVersion, - Uint16& pixelAspectH, - Uint16& pixelAspectV, - Uint16& unit); - - /** Check, whether a given JPEG image marker (SOFn) is supported by - * this plugin - * @param jpegEncoding - [in] Image marker that should be tested - * @return EC_Normal, marker is supported, error otherwise - */ - OFCondition isJPEGEncodingSupported(const E_JPGMARKER& jpegEncoding) const; - - - /** Returns if possible the DICOM transfer syntax matching the coding of the - * JPEG data. - * @param jpegEncoding - [in] Image marker that should be tested - * @return EC_Normal, marker is supported, error otherwise - */ - static E_TransferSyntax associatedTS(const E_JPGMARKER& jpegEncoding); - - /** Returns true if marker is one of the RST0 to RST7 markers - * @param jpegEncoding - [in] Image marker that should be tested - * @return OFTrue, if marker is RST0 to RST7, OFFalse otherwise - */ - static OFBool isRSTMarker(const E_JPGMARKER& jpegEncoding); - - /** Returns true if marker is one of the SOF0 to SOF15 markers - * @param jpegEncoding - [in] Image marker that should be tested - * @return OFTrue, if marker is SOF0 to SOF15, OFFalse otherwise - */ - static OFBool isSOFMarker(const E_JPGMARKER& jpegEncoding); - - - /** Extract raw JPEG stream (i.e. without APPn markers) from JPEG file. - * @param pixelData - [out] The resulting JPEG stream - * @param pixLength - [out] The length of the resulting stream - * @return EC_Normal, if successful, error otherwise - */ - OFCondition extractRawJPEGStream(char*& pixelData, - Uint32& pixLength); - - /** Copies JPEG stream (with APPn markers, excluding JFIF) from JPEG file. - * @param pixelData - [out] The resulting JPEG stream - * @param pixLength - [out] The length of the resulting stream - * @return EC_Normal, if successful, error otherwise - */ - OFCondition copyJPEGStream(char*& pixelData, - Uint32& pixLength); - - /** Skips one marker while scanning through the JPEG file stream. - * @return EC_Normal, if successful, error otherwise - */ - OFCondition skipVariable(); - - /** Tries to read the SOI marker. - * @param result - [out] The code of the SOI marker if successful (0xD8) - * @return EC_Normal, if successful, error otherwise - */ - OFCondition firstMarker(E_JPGMARKER& result); - - /** Tries to find the next JPEG marker in underlying file stream. - * @param lastWasSOSMarker - [in] Denotes, whether the last marker read - * before was the SOS (start of scan) marker. This is needed to - * ignore non-marker 0xFF occurrences in the compressed data. - * @param result - [out] The result marker - * @return EC_Normal, if successful, error otherwise - */ - OFCondition nextMarker(const OFBool& lastWasSOSMarker, - E_JPGMARKER& result); - - /** Read 2 bytes from the byte stream. - * @param result - [out] The result - * @return 0, if successful, EOF if rest of stream does not contain enough bytes - */ - inline int read2Bytes(Uint16& result); - - /** Read 1 byte from the byte stream. - * @param result - [out] The result - * @return 0, if successful, EOF if rest of stream does not contain enough bytes - */ - inline int read1Byte(Uint8& result); - - /** Deletes internal JPEG file map and frees memory. - * @return none - */ - void clearMap(); - - /// JPEG file map. This map includes all JPEG markers and their byte positions - /// in the JPEG file. - OFList m_jpegFileMap; - - /// The JPEG file, if opened - OFFile jpegFile; - - /// If true, JPEGs with progressive coding are not supported - OFBool m_disableProgrTs; - - /// If true, JPEGs with extended sequential coding are not supported - OFBool m_disableExtSeqTs; - - /// If true, conversion will only work if JFIF header can be found. - /// Default: false - OFBool m_insistOnJFIF; - - /// If true, APPn markers (except JFIF!) are also copied to the output file. - /// This can cause a huge speedup because instead of parsing the whole - /// JPEG file (for finding any APPn markers) the parsing stops after finding - /// the SOFn marker (which is relevant for extracting width/height and so on. - /// Default: false - OFBool m_keepAPPn; - - /// After reading pixel data, this denotes whether the source - /// data is already lossy compressed - OFBool m_lossyCompressed; + /** Opens the JPEG file specified by the given filename. + * @param filename - [in] The file to be opened + * @return EC_Normal, if successful, error otherwise + */ + OFCondition openFile(const OFString& filename); + + /** Closes JPEG file. + * @return A string representation of the marker + */ + void closeFile(); + + /** Function that scans a JPEG file and creates a "file map" which + * includes all JPEG markers and their byte positions in the file. + * @return EC_Normal, if successful, error otherwise + */ + OFCondition createJPEGFileMap(); + + /** Dump the internal JPEG file map to a given stream. The file map + * lists JPEG markers and their position in the bitstream found in the JPEG + * file + * @return none + */ + void debugDumpJPEGFileMap() const; + + /** Get image parameters as found at given SOF marker of the JPEG image. + * @param entry - [in] This specifies the marker and the byte position of the + * SOF marker + * @param imageWidth - [out] The width of the image + * @param imageHeight - [out] The height of the image + * @param samplesPerPixel - [out] Number of components per pixel + * @param bitsPerSample - [out] Number of bits per pixel component + * @return EC_Normal, if successful, error otherwise + */ + OFCondition getSOFImageParameters(const JPEGFileMapEntry& entry, + Uint16& imageWidth, + Uint16& imageHeight, + Uint16& samplesPerPixel, + Uint16& bitsPerSample); + + /** Get JPEG parameters as found at given JFIF marker of the JPEG image. + * @param entry - [in] This specifies the marker and the byte position of the + * JFIF marker + * @param jfifVersion - [out] The JFIF version of the JFIF data + * @param pixelAspectH - [out] The horizontal pixel aspect ratio + * @param pixelAspectV - [out] The vertical pixel aspect ratio + * @param unit - [out] The contents of the pixel aspect ratio unit field + * @return EC_Normal, if successful, error otherwise + */ + OFCondition getJFIFImageParameters( + const JPEGFileMapEntry& entry, Uint16& jfifVersion, Uint16& pixelAspectH, Uint16& pixelAspectV, Uint16& unit); + + /** Check, whether a given JPEG image marker (SOFn) is supported by + * this plugin + * @param jpegEncoding - [in] Image marker that should be tested + * @return EC_Normal, marker is supported, error otherwise + */ + OFCondition isJPEGEncodingSupported(const E_JPGMARKER& jpegEncoding) const; + + /** Returns if possible the DICOM transfer syntax matching the coding of the + * JPEG data. + * @param jpegEncoding - [in] Image marker that should be tested + * @return EC_Normal, marker is supported, error otherwise + */ + static E_TransferSyntax associatedTS(const E_JPGMARKER& jpegEncoding); + + /** Returns true if marker is one of the RST0 to RST7 markers + * @param jpegEncoding - [in] Image marker that should be tested + * @return OFTrue, if marker is RST0 to RST7, OFFalse otherwise + */ + static OFBool isRSTMarker(const E_JPGMARKER& jpegEncoding); + + /** Returns true if marker is one of the SOF0 to SOF15 markers + * @param jpegEncoding - [in] Image marker that should be tested + * @return OFTrue, if marker is SOF0 to SOF15, OFFalse otherwise + */ + static OFBool isSOFMarker(const E_JPGMARKER& jpegEncoding); + + /** Extract raw JPEG stream (i.e. without APPn markers) from JPEG file. + * @param pixelData - [out] The resulting JPEG stream + * @param pixLength - [out] The length of the resulting stream + * @return EC_Normal, if successful, error otherwise + */ + OFCondition extractRawJPEGStream(char*& pixelData, Uint32& pixLength); + + /** Skips one marker while scanning through the JPEG file stream. + * @return EC_Normal, if successful, error otherwise + */ + OFCondition skipVariable(); + + /** Tries to read the SOI marker. + * @param result - [out] The code of the SOI marker if successful (0xD8) + * @return EC_Normal, if successful, error otherwise + */ + OFCondition firstMarker(E_JPGMARKER& result); + + /** Tries to find the next JPEG marker in underlying file stream. + * @param lastWasSOSMarker - [in] Denotes, whether the last marker read + * before was the SOS (start of scan) marker. This is needed to + * ignore non-marker 0xFF occurrences in the compressed data. + * @param result - [out] The result marker + * @return EC_Normal, if successful, error otherwise + */ + OFCondition nextMarker(const OFBool& lastWasSOSMarker, E_JPGMARKER& result); + + /** Read 2 bytes from the byte stream. + * @param result - [out] The result + * @return 0, if successful, EOF if rest of stream does not contain enough bytes + */ + inline int read2Bytes(Uint16& result); + + /** Read 1 byte from the byte stream. + * @param result - [out] The result + * @return 0, if successful, EOF if rest of stream does not contain enough bytes + */ + inline int read1Byte(Uint8& result); + + /** Deletes internal JPEG file map and frees memory. + * @return none + */ + void clearMap(); + + /// JPEG file map. This map includes all JPEG markers and their byte positions + /// in the JPEG file. + OFList m_jpegFileMap; + + /// The JPEG file, if opened + OFFile jpegFile; + + /// If true, JPEGs with progressive coding are not supported + OFBool m_disableProgrTs; + + /// If true, JPEGs with extended sequential coding are not supported + OFBool m_disableExtSeqTs; + + /// If true, conversion will only work if JFIF header can be found. + /// Default: false + OFBool m_insistOnJFIF; + + /// If true, APPn markers (except JFIF!) are also copied to the output file. + /// This can cause a huge speedup because instead of parsing the whole + /// JPEG file (for finding any APPn markers) the parsing stops after finding + /// the SOFn marker (which is relevant for extracting width/height and so on. + /// Default: false + OFBool m_keepAPPn; + + /// If true, COM segment is also copied to the output file. + /// Default: true + OFBool m_keepCOM; + + /// After reading pixel data, this denotes whether the source + /// data is already lossy compressed + OFBool m_lossyCompressed; }; #endif // I2DJPGS_H diff -Nru dcmtk-3.6.6/dcmdata/include/dcmtk/dcmdata/libi2d/i2doutpl.h dcmtk-3.6.7/dcmdata/include/dcmtk/dcmdata/libi2d/i2doutpl.h --- dcmtk-3.6.6/dcmdata/include/dcmtk/dcmdata/libi2d/i2doutpl.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/include/dcmtk/dcmdata/libi2d/i2doutpl.h 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2001-2017, OFFIS e.V. + * Copyright (C) 2001-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -24,11 +24,10 @@ #include "dcmtk/config/osconfig.h" #include "dcmtk/oflog/oflog.h" -#include "dcmtk/dcmdata/dcdatset.h" -#include "dcmtk/dcmdata/dcelem.h" +#include "dcmtk/ofstd/oflist.h" +#include "dcmtk/ofstd/ofcond.h" #include "dcmtk/dcmdata/libi2d/i2define.h" - extern DCMTK_I2D_EXPORT OFLogger DCM_dcmdataLibi2dLogger; #define DCMDATA_LIBI2D_TRACE(msg) OFLOG_TRACE(DCM_dcmdataLibi2dLogger, msg) @@ -38,6 +37,11 @@ #define DCMDATA_LIBI2D_ERROR(msg) OFLOG_ERROR(DCM_dcmdataLibi2dLogger, msg) #define DCMDATA_LIBI2D_FATAL(msg) OFLOG_FATAL(DCM_dcmdataLibi2dLogger, msg) +/// default value for the FrameTime attribute when creating multiframe images +#define DCMTK_I2D_Default_Frame_Time 1000 + +class DcmDataset; +class DcmTagKey; class DCMTK_I2D_EXPORT I2DOutputPlug { @@ -45,28 +49,29 @@ public: /** Constructor, initializes member variables - * @return none */ - I2DOutputPlug() : m_doAttribChecking(OFTrue), m_inventMissingType2Attribs(OFTrue), - m_inventMissingType1Attribs(OFTrue) - {}; + I2DOutputPlug(); + + /** Destructor + */ + virtual ~I2DOutputPlug(); /** Virtual function that returns a short name of the plugin. * @return The name of the plugin */ - virtual OFString ident() =0; + virtual OFString ident() = 0; /** Virtual function that returns the Storage SOP class UID, the plugin writes. * @param suppSOPs - [out] List containing supported output SOP classes * @return String containing the Storage SOP class UID */ - virtual void supportedSOPClassUIDs(OFList& suppSOPs) =0; + virtual void supportedSOPClassUIDs(OFList& suppSOPs) = 0; /** Outputs SOP class specific information into dataset * @param dataset - [in/out] Dataset to write to * @return EC_Normal if successful, error otherwise */ - virtual OFCondition convert(DcmDataset &dataset) const =0; + virtual OFCondition convert(DcmDataset &dataset) const = 0; /** Do some completeness / validity checks. Should be called when * dataset is completed and is about to be saved. @@ -75,10 +80,20 @@ */ virtual OFString isValid(DcmDataset& dataset) const = 0; - /** Destructor - * @return none - */ - virtual ~I2DOutputPlug() {}; + /** check if the output format supported by this plugin can write + * multi-frame images. + * @return true if multiframe is supported, false otherwise + */ + virtual OFBool supportsMultiframe() const = 0; + + /** Add multiframe specific attributes + * @param datset pointer to DICOM dataset, must not be NULL + * @param numberOfFrames number of frames in this dataset + * @return EC_Normal if successful, an error code otherwise + */ + virtual OFCondition insertMultiFrameAttributes( + DcmDataset* targetDataset, + size_t numberOfFrames) const = 0; /** Enable/Disable basic validity checks for output dataset * @param doChecks - [in] OFTrue enables checking, OFFalse turns it off. @@ -92,15 +107,19 @@ */ virtual void setValidityChecking(OFBool doChecks, OFBool insertMissingType2 = OFTrue, - OFBool inventMissingType1 = OFTrue) - { - m_doAttribChecking = doChecks; - m_inventMissingType2Attribs = insertMissingType2; - m_inventMissingType1Attribs = inventMissingType1; - }; + OFBool inventMissingType1 = OFTrue); protected: + /** Checks whether a given tag exists in a dataset and is non-empty, + * otherwise returns an error string. + * @param key - [in] The tag to be checked/inserted + * @param targetDset - [in/out] The dataset to search (and insert) in + * @return Error string, which is empty if no error occurs. + */ + virtual OFString checkType1Attrib(const DcmTagKey& key, + DcmDataset* targetDset) const; + /** Checks whether a given tag exists in a dataset and provides a non-empty * value. If not, the tag is inserted (if enabled) and a default value is * inserted. @@ -111,50 +130,22 @@ */ virtual OFString checkAndInventType1Attrib(const DcmTagKey& key, DcmDataset* targetDset, - const OFString& defaultValue ="") const - { - OFBool exists = targetDset->tagExists(key); - if (!exists && !m_inventMissingType1Attribs) - { - OFString err = "I2DOutputPlug: Missing type 1 attribute: "; err += DcmTag(key).getTagName(); err += "\n"; - return err; - } - DcmElement *elem; - OFCondition cond = targetDset->findAndGetElement(key, elem); - if (cond.bad() || !elem || (elem->getLength() == 0)) - { - if (!m_inventMissingType1Attribs) - { - OFString err; - err += "I2DOutputPlug: Empty value for type 1 attribute: "; - err += DcmTag(key).getTagName(); - err += "\n"; - return err; - } - //holds element to insert in item - elem = NULL; - DcmTag tag(key); OFBool wasError = OFFalse; - //if dicom element could be created, insert in to item and modify to value - if ( DcmItem::newDicomElement(elem, tag).good()) - { - if (targetDset->insert(elem, OFTrue).good()) - { - if (elem->putString(defaultValue.c_str()).good()) - { - DCMDATA_LIBI2D_DEBUG("I2DOutputPlug: Inserting missing type 1 attribute: " << tag.getTagName() << " with value " << defaultValue); - } else wasError = OFTrue; - } else wasError = OFTrue; - } else wasError = OFTrue; - if (wasError) - { - OFString err = "Unable to insert type 1 attribute "; - err += tag.getTagName(); err += " with value "; err += defaultValue; err += "\n"; - return err; - } - } - return ""; - }; + const OFString& defaultValue ="") const; + /** Checks whether a given code sequence exists in a dataset and contains + * an item with the required attributes. If not, the sequence is inserted + * (if enabled) and default values are inserted. + * @param key - [in] The code sequence tag to be checked/inserted + * @param targetDset - [in/out] The dataset to search (and insert) in + * @param defaultValue - [in] The default value to set + * @return Error string, which is empty if no error occurs. + */ + virtual OFString checkAndInventType1CodeSQ( + const DcmTagKey& key, + DcmDataset* targetDset, + const OFString& codeValue, + const OFString& codeMeaning, + const OFString& codingSchemeDesignator) const; /** Checks whether a given tag exists in a dataset (can be empty) * If not, the tag is inserted (if enabled) with empty value. @@ -164,46 +155,7 @@ */ virtual OFString checkAndInventType2Attrib(const DcmTagKey& key, DcmDataset* targetDset, - const OFString& defaultValue ="") const - { - OFString err; - OFBool exists = targetDset->tagExists(key); - if (!exists) - { - if (m_inventMissingType2Attribs) - { - //holds element to insert in item - DcmElement *elem = NULL; - DcmTag tag(key); OFBool wasError = OFFalse; - //if dicom element could be created, insert in to item and modify to value - if ( DcmItem::newDicomElement(elem, tag).good()) - { - if (targetDset->insert(elem, OFTrue).good()) - { - OFCondition result; - if (!defaultValue.empty()) // only insert value if not empty(e. g. empty type 2 sequences) - { - result = elem->putString(defaultValue.c_str()); - } - if (result.good()) - { - DCMDATA_LIBI2D_DEBUG("I2DOutputPlug: Inserting missing type 2 attribute: " << tag.getTagName() << " with value " << (defaultValue.empty() ? "" : defaultValue)); - } else wasError = OFTrue; - } else wasError = OFTrue; - } else wasError = OFTrue; - if (wasError) - { - err += "Unable to insert type 2 attribute "; err += tag.getTagName(); err += " with value "; err += defaultValue; err += "\n"; - } - } - else - { - err = "Image2Dcm: Missing type 2 attribute: "; err += DcmTag(key).getTagName(); err += "\n"; - return err; - } - } - return err; - }; + const OFString& defaultValue ="") const; /// if enabled, some simple attribute checking is performed /// default: enabled (OFTrue) diff -Nru dcmtk-3.6.6/dcmdata/include/dcmtk/dcmdata/libi2d/i2dplnsc.h dcmtk-3.6.7/dcmdata/include/dcmtk/dcmdata/libi2d/i2dplnsc.h --- dcmtk-3.6.6/dcmdata/include/dcmtk/dcmdata/libi2d/i2dplnsc.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/include/dcmtk/dcmdata/libi2d/i2dplnsc.h 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2001-2011, OFFIS e.V. + * Copyright (C) 2001-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -31,10 +31,13 @@ public: /** Constructor, initializes member variables with standard values - * @return none */ I2DOutputPlugNewSC(); + /** Virtual Destructor, clean up memory + */ + virtual ~I2DOutputPlugNewSC(); + /** Virtual function that returns a short name of the plugin. * @return The name of the plugin */ @@ -42,7 +45,7 @@ /** Overwrites function from base class. Returns the Storage SOP class * written by this plugin - * @param suppSOPs - [out] List of UIDs representing the supported SOP + * @param suppSOPs - [out] List of UIDs representing the supported SOP * classes supported by this plugin. * @return none */ @@ -61,25 +64,29 @@ */ virtual OFString isValid(DcmDataset& dataset) const; - /** Virtual Destructor, clean up memory - * @return none - */ - virtual ~I2DOutputPlugNewSC(); + /** check if the output format supported by this plugin can write + * multi-frame images. + * @return true if multiframe is supported, false otherwise + */ + virtual OFBool supportsMultiframe() const; + + /** Add multiframe specific attributes + * @param datset pointer to DICOM dataset, must not be NULL + * @param numberOfFrames number of frames in this dataset + * @return EC_Normal if successful, an error code otherwise + */ + virtual OFCondition insertMultiFrameAttributes( + DcmDataset* targetDataset, + size_t numberOfFrames) const; protected: - /** Inserts attributes for Multi-frame Module - * @param targetDataset - [in/out] The dataset to write to - * @return EC_Normal if insertion was successfull, error code otherwise - */ - virtual OFCondition insertMultiFrameAttribs(DcmDataset* targetDataset) const; - /** Inserts attributes Rescale Slope/Intercept/Type, which have to be * written (1C) if color model is MONOCHROME2 and BitsStored > 1. * @param targetDataset - [out] The dataset to write to * @return EC_Normal if insertion was successfull, error code otherwise */ - virtual OFCondition insertSCMultiFrameAttribs(DcmDataset *targetDataset) const; + virtual OFCondition insertMonochromeAttribs(DcmDataset *targetDataset) const; /** Checks whether Image Pixel module attributes conform to the * specification of a a 1 bit Secondary Capture object. diff -Nru dcmtk-3.6.6/dcmdata/include/dcmtk/dcmdata/libi2d/i2dplop.h dcmtk-3.6.7/dcmdata/include/dcmtk/dcmdata/libi2d/i2dplop.h --- dcmtk-3.6.6/dcmdata/include/dcmtk/dcmdata/libi2d/i2dplop.h 1970-01-01 00:00:00.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/include/dcmtk/dcmdata/libi2d/i2dplop.h 2022-04-28 13:47:25.000000000 +0000 @@ -0,0 +1,98 @@ +/* + * + * Copyright (C) 2001-2021, 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: Class for conversion of image file into Ophthalmic Photography 8 Bit Image IOD + * + */ + +#ifndef I2DPLOP8_H +#define I2DPLOP8_H + +#include "dcmtk/config/osconfig.h" +#include "dcmtk/dcmdata/libi2d/i2doutpl.h" + +class DCMTK_I2D_EXPORT I2DOutputPlugOphthalmicPhotography : public I2DOutputPlug +{ + +public: + + /** Constructor, initializes member variables with standard values + */ + I2DOutputPlugOphthalmicPhotography(); + + /** Virtual Destructor, clean up memory + */ + virtual ~I2DOutputPlugOphthalmicPhotography(); + + /** Virtual function that returns a short name of the plugin. + * @return The name of the plugin + */ + virtual OFString ident(); + + /** Overwrites function from base class. Returns the Storage SOP class + * written by this plugin + * @param suppSOPs - [out] List of UIDs representing the supported SOP + * classes supported by this plugin. + * @return none + */ + virtual void supportedSOPClassUIDs(OFList& suppSOPs); + + /** Outputs SOP class specific information into dataset + * @param dataset - [in/out] Dataset to write to + * @return EC_Normal if successful, error otherwise + */ + virtual OFCondition convert(DcmDataset &dataset) const; + + /** Do some completeness / validity checks. Should be called when + * dataset is completed and is about to be saved. + * @param dataset - [in] The dataset to check + * @return Error string if error occurs, empty string otherwise + */ + virtual OFString isValid(DcmDataset& dataset) const; + + /** check if the output format supported by this plugin can write + * multi-frame images. + * @return true if multiframe is supported, false otherwise + */ + virtual OFBool supportsMultiframe() const; + + /** Add multiframe specific attributes + * @param datset pointer to DICOM dataset, must not be NULL + * @param numberOfFrames number of frames in this dataset + * @return EC_Normal if successful, an error code otherwise + */ + virtual OFCondition insertMultiFrameAttributes( + DcmDataset* targetDataset, + size_t numberOfFrames) const; + +private: + + /** Handle 8-bit image dataset. Used internally in convert() method. + * @param datset pointer to DICOM dataset, must not be NULL + * @return EC_Normal if successful, an error code otherwise + */ + virtual OFCondition handle8BitImage(DcmDataset *dataset) const; + + /** Handle 16-bit image dataset. Used internally in convert() method. + * @param datset pointer to DICOM dataset, must not be NULL + * @return EC_Normal if successful, an error code otherwise + */ + virtual OFCondition handle16BitImage(DcmDataset *dataset) const; + +}; + +#endif // I2DPLOP8_H diff -Nru dcmtk-3.6.6/dcmdata/include/dcmtk/dcmdata/libi2d/i2dplsc.h dcmtk-3.6.7/dcmdata/include/dcmtk/dcmdata/libi2d/i2dplsc.h --- dcmtk-3.6.6/dcmdata/include/dcmtk/dcmdata/libi2d/i2dplsc.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/include/dcmtk/dcmdata/libi2d/i2dplsc.h 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2001-2011, OFFIS e.V. + * Copyright (C) 2001-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -31,10 +31,13 @@ public: /** Constructor, initializes member variables with standard values - * @return none */ I2DOutputPlugSC(); + /** Virtual Destructor, clean up memory + */ + virtual ~I2DOutputPlugSC(); + /** Virtual function that returns a short name of the plugin. * @return The name of the plugin */ @@ -61,10 +64,20 @@ */ virtual OFString isValid(DcmDataset& dataset) const; - /** Virtual Destructor, clean up memory - * @return none - */ - virtual ~I2DOutputPlugSC(); + /** check if the output format supported by this plugin can write + * multi-frame images. + * @return true if multiframe is supported, false otherwise + */ + virtual OFBool supportsMultiframe() const; + + /** Add multiframe specific attributes + * @param datset pointer to DICOM dataset, must not be NULL + * @param numberOfFrames number of frames in this dataset + * @return EC_Normal if successful, an error code otherwise + */ + virtual OFCondition insertMultiFrameAttributes( + DcmDataset* targetDataset, + size_t numberOfFrames) const; }; diff -Nru dcmtk-3.6.6/dcmdata/include/dcmtk/dcmdata/libi2d/i2dplvlp.h dcmtk-3.6.7/dcmdata/include/dcmtk/dcmdata/libi2d/i2dplvlp.h --- dcmtk-3.6.6/dcmdata/include/dcmtk/dcmdata/libi2d/i2dplvlp.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/include/dcmtk/dcmdata/libi2d/i2dplvlp.h 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2001-2011, OFFIS e.V. + * Copyright (C) 2001-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -31,10 +31,13 @@ public: /** Constructor, initializes member variables with standard values - * @return none */ I2DOutputPlugVLP(); + /** Virtual Destructor, clean up memory + */ + virtual ~I2DOutputPlugVLP(); + /** Virtual function that returns a short name of the plugin. * @return The name of the plugin */ @@ -61,10 +64,20 @@ */ virtual OFString isValid(DcmDataset& dataset) const; - /** Virtual Destructor, clean up memory - * @return none - */ - virtual ~I2DOutputPlugVLP(); + /** check if the output format supported by this plugin can write + * multi-frame images. + * @return true if multiframe is supported, false otherwise + */ + virtual OFBool supportsMultiframe() const; + + /** Add multiframe specific attributes + * @param datset pointer to DICOM dataset, must not be NULL + * @param numberOfFrames number of frames in this dataset + * @return EC_Normal if successful, an error code otherwise + */ + virtual OFCondition insertMultiFrameAttributes( + DcmDataset* targetDataset, + size_t numberOfFrames) const; }; diff -Nru dcmtk-3.6.6/dcmdata/include/dcmtk/dcmdata/xml2dcm.h dcmtk-3.6.7/dcmdata/include/dcmtk/dcmdata/xml2dcm.h --- dcmtk-3.6.6/dcmdata/include/dcmtk/dcmdata/xml2dcm.h 1970-01-01 00:00:00.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/include/dcmtk/dcmdata/xml2dcm.h 2022-04-28 13:47:25.000000000 +0000 @@ -0,0 +1,226 @@ +/* + * + * Copyright (C) 2003-2021, 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: Joerg Riesmeier + * + * Purpose: Helper class for converting an XML document to DICOM file or data set + * + */ + +#ifndef XML2DCM_H +#define XML2DCM_H + +#include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ + +#ifdef WITH_LIBXML + +#include "dcmtk/ofstd/ofcond.h" +#include "dcmtk/ofstd/oftypes.h" +#include "dcmtk/dcmdata/dcxfer.h" + +#ifdef __ibmxl__ +// IBM xlC defines __GNUC__ but does not support the GNUC extension +// __attribute__ ((format (printf, 2, 3))). +// This avoids a compiler warning in . +#define LIBXML_ATTR_FORMAT(fmt,args) +#endif + +// The libxml library also uses unicode. So we have to reuse some +// workarounds for the ICU library here as well. +// The type char16_t is only supported since C++11. +#ifndef HAVE_CHAR16_T +#define UCHAR_TYPE uint16_t +#endif + +//If U_NOEXCEPT is not defined, ICU falls back to NOEXCEPT. +#ifndef HAVE_CXX11 +#define U_NOEXCEPT +#endif + +// forward declarations to minimize the libxml2 header files needed here +typedef struct _xmlCharEncodingHandler xmlCharEncodingHandler; +typedef xmlCharEncodingHandler *xmlCharEncodingHandlerPtr; +typedef struct _xmlNode xmlNode; +typedef xmlNode *xmlNodePtr; +typedef struct _xmlDoc xmlDoc; +typedef xmlDoc *xmlDocPtr; + +#include + +class DcmElement; +class DcmItem; +class DcmSequenceOfItems; +class DcmPixelSequence; +class DcmMetaInfo; +class DcmFileFormat; + +/** Helper class that provides methods for parsing an XML document in the format + * produced by dcm2xml into a DICOM dataset. + */ +class DCMTK_DCMDATA_EXPORT DcmXMLParseHelper +{ +public: + /// constructor; + DcmXMLParseHelper(); + + /// destructor; + virtual ~DcmXMLParseHelper(); + + /** initialize XML parser library. This function should be called once + * before any libxml2 code is used. This function is not re-entrant. + */ + static void initLibrary(); + + /** cleanup internal memory used by the XML parser library. + * This function should be called once before the application + * terminates. It is not re-entrant. + */ + static void cleanupLibrary(); + + /** read an XML file containing a DICOM dataset in the format produced + * by dcm2xml, and convert it into a DICOM file + * @param ifname name of the XML file to be read + * @param fileformat DcmFileFormat instance to be populated with the parsed XML content + * @param xfer output parameter indicating the transfer syntax to which the XML file was parsed + * @param metaInfo if true, metaheader attributes are read from the XML file, otherwise they are ignored + * @param checkNamespace if true, check XML namespace in document root + * @param validateDocument if true, validate the XML document after parsing + * @param stopOnError if true, stop parsing and return an error code upon encountering a parse error, + * otherwise ignore parse errors and continue + * @return EC_Normal upon success, an error code otherwise + */ + OFCondition readXmlFile( + const char *ifname, + DcmFileFormat &fileformat, + E_TransferSyntax &xfer, + const OFBool metaInfo, + const OFBool checkNamespace, + const OFBool validateDocument, + const OFBool stopOnError); + +private: + + /** convert from UTF-8 to the current DICOM character set + * @param fromString input string + * @param toString output string + * @return EC_Normal upon success, an error code otherwise + */ + OFBool convertUtf8ToCharset( + const xmlChar *fromString, + OFString &toString); + + /** check the type of the current XML node, report an error if there is a mismatch + * @param current pointer to current XML node + * @param name expected name of the current XML node + * @return EC_Normal upon success, an error code otherwise + */ + OFCondition checkNode( + xmlNodePtr current, + const char *name); + + /** create a new, empty DICOM element corresponding to the given XML node pointer + * @param current pointer to current XML node + * @param newElem + * @return EC_Normal upon success, an error code otherwise + */ + OFCondition createNewElement( + xmlNodePtr current, + DcmElement *&newElem); + + /** parse an attribute value and store it in the given DICOM element + * @param current pointer to current XML node + * @param element attribute value stored in this element + * @return EC_Normal upon success, an error code otherwise + */ + OFCondition putElementContent( + xmlNodePtr current, + DcmElement *element); + + /** parse a DICOM element that is not a sequence + * @param dataset + * @param current pointer to current XML node + * @return EC_Normal upon success, an error code otherwise + */ + OFCondition parseElement( + DcmItem *dataset, + xmlNodePtr current); + + /** parse a DICOM sequence + * @param sequence + * @param current pointer to current XML node + * @param xfer transfer syntax in which the XML file is read + * @param stopOnError if true, stop parsing and return an error code upon encountering a parse error, + * otherwise ignore parse errors and continue + * @return EC_Normal upon success, an error code otherwise + */ + OFCondition parseSequence( + DcmSequenceOfItems *sequence, + xmlNodePtr current, + E_TransferSyntax xfer, + const OFBool stopOnError); + + /** parse a DICOM pixel sequence of a compressed image files + * @param sequence + * @param current pointer to current XML node + * @param stopOnError if true, stop parsing and return an error code upon encountering a parse error, + * otherwise ignore parse errors and continue + * @return EC_Normal upon success, an error code otherwise + */ + OFCondition parsePixelSequence( + DcmPixelSequence *sequence, + xmlNodePtr current, + const OFBool stopOnError); + + /** parse the metaheader part of an XML file containing a DICOM file. + * @param metainfo metaheader stored in this parameter + * @param current pointer to current XML node + * @param parse if true, parse the metaheader, otherwise just skip it + * @param stopOnError if true, stop parsing and return an error code upon encountering a parse error, + * otherwise ignore parse errors and continue + * @return EC_Normal upon success, an error code otherwise + */ + OFCondition parseMetaHeader( + DcmMetaInfo *metainfo, + xmlNodePtr current, + const OFBool parse, + const OFBool stopOnError); + + /** parse the dataset part of an XML file containing a DICOM file or a DICOM dataset. + * @param dataset dataset stored in this parameter + * @param current pointer to current XML node + * @param xfer transfer syntax in which the XML file is read + * @param stopOnError if true, stop parsing and return an error code upon encountering a parse error, + * otherwise ignore parse errors and continue + * @return EC_Normal upon success, an error code otherwise + */ + OFCondition parseDataSet( + DcmItem *dataset, + xmlNodePtr current, + E_TransferSyntax xfer, + const OFBool stopOnError); + + /** validate the given XML document and print error output if the validation fails + * @param doc pointer to XML document + * @return EC_Normal upon successful validation, an error code otherwise + */ + OFCondition validateXmlDocument(xmlDocPtr doc); + + /// stores pointer to character encoding handler + xmlCharEncodingHandlerPtr EncodingHandler; + +}; + +#endif /* WITH_LIBXML */ +#endif /* XML2DCM_H */ diff -Nru dcmtk-3.6.6/dcmdata/libi2d/CMakeLists.txt dcmtk-3.6.7/dcmdata/libi2d/CMakeLists.txt --- dcmtk-3.6.6/dcmdata/libi2d/CMakeLists.txt 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/libi2d/CMakeLists.txt 2022-04-28 13:47:25.000000000 +0000 @@ -1,4 +1,16 @@ +# declare additional include directories +include_directories(${LIBXML_INCDIR}) + # create library from source files -DCMTK_ADD_LIBRARY(i2d i2d i2dplvlp i2djpgs i2dbmps i2dplsc i2dplnsc) +DCMTK_ADD_LIBRARY(i2d + i2d.cc + i2dplvlp.cc + i2djpgs.cc + i2dbmps.cc + i2dplsc.cc + i2dplnsc.cc + i2dplop.cc + i2doutpl.cc +) DCMTK_TARGET_LINK_MODULES(i2d dcmdata) diff -Nru dcmtk-3.6.6/dcmdata/libi2d/i2dbmps.cc dcmtk-3.6.7/dcmdata/libi2d/i2dbmps.cc --- dcmtk-3.6.6/dcmdata/libi2d/i2dbmps.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/libi2d/i2dbmps.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2009-2017, OFFIS e.V. + * Copyright (C) 2009-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -100,8 +100,9 @@ return cond; } + OFBool isMonochrome = OFFalse; Uint32 *palette = NULL; - cond = readColorPalette(colors, palette); + cond = readColorPalette(colors, isMonochrome, palette); if (cond.bad()) { closeFile(); @@ -115,7 +116,7 @@ /* ...and read the "real" image data */ char *data; Uint32 data_length; - cond = readBitmapData(width, height, bpp, isTopDown, colors, palette, data, data_length); + cond = readBitmapData(width, height, bpp, isTopDown, isMonochrome, colors, palette, data, data_length); if (palette) delete[] palette; @@ -130,12 +131,19 @@ rows = height; cols = width; - samplesPerPixel = 3; /* 24 bpp */ - + if (isMonochrome) + { + samplesPerPixel = 1; + photoMetrInt = "MONOCHROME2"; + } + else + { + samplesPerPixel = 3; /* 24 bpp */ + photoMetrInt = "RGB"; + } bitsAlloc = 8; bitsStored = 8; highBit = 7; - photoMetrInt = "RGB"; planConf = 0; /* For each pixel we save rgb in that order */ pixData = data; length = data_length; @@ -201,7 +209,7 @@ // Check if we got a valid value here which fits into a Uint16 // (height < 0 can happen because -(INT_MIN) == INT_MIN). - if (tmp_height <= 0 || tmp_height > UINT16_MAX) + if (tmp_height <= 0 || tmp_height > OFstatic_cast(Sint32, UINT16_MAX)) return makeOFCondition(OFM_dcmdata, 18, OF_error, "Unsupported BMP file - height too large or zero"); if (tmp_width < 0) /* Width also can be signed, but no semantic */ @@ -209,7 +217,7 @@ tmp_width = -tmp_width; } width = OFstatic_cast(Uint16, tmp_width); - if (tmp_width <= 0 || tmp_width > UINT16_MAX) + if (tmp_width <= 0 || tmp_width > OFstatic_cast(Sint32, UINT16_MAX)) return makeOFCondition(OFM_dcmdata, 18, OF_error, "Unsupported BMP file - width too large or zero"); /* Some older standards used this, always 1 for BMP (number of planes) */ @@ -278,8 +286,10 @@ } -OFCondition I2DBmpSource::readColorPalette(Uint16 colors, - Uint32*& palette) +OFCondition I2DBmpSource::readColorPalette( + Uint16 colors, + OFBool& isMonochrome, + Uint32*& palette) { if (colors == 0) // Nothing to do; @@ -289,11 +299,13 @@ // BMPs can not have more than 256 color table entries return EC_IllegalCall; + isMonochrome = OFTrue; + Uint8 r, g, b; + // Read the color palette palette = new Uint32[colors]; + Uint32 tmp; for (int i = 0; i < colors; i++) { - Uint32 tmp; - // Each item is 32-bit BGRx entry, this function reads that data if (readDWord(tmp) != 0) { delete[] palette; @@ -303,20 +315,28 @@ // Converting this BGRx into RGB is done elsewhere palette[i] = tmp; + + // check if the value is grayscale, set monochrome flag to false otherwise + r = OFstatic_cast(Uint8, tmp >> 16); + g = OFstatic_cast(Uint8, tmp >> 8); + b = OFstatic_cast(Uint8, tmp >> 0); + if ((r != g) || (r != b)) isMonochrome = OFFalse; } return EC_Normal; } -OFCondition I2DBmpSource::readBitmapData(const Uint16 width, - const Uint16 height, - const Uint16 bpp, - const OFBool isTopDown, - const Uint16 colors, - const Uint32* palette, - char*& pixData, - Uint32& length) +OFCondition I2DBmpSource::readBitmapData( + const Uint16 width, + const Uint16 height, + const Uint16 bpp, + const OFBool isTopDown, + const OFBool isMonochrome, + const Uint16 colors, + const Uint32* palette, + char*& pixData, + Uint32& length) { /* row_length = width * bits_per_pixel / 8 bits_per_byte. row_length must be rounded *up* to a 4-byte boundary: @@ -328,6 +348,7 @@ Uint32 y; OFBool positive_direction; Uint32 max; + Uint16 samplesPerPixel = isMonochrome ? 1 : 3; // "palette" may only be NULL if colors is 0 and vice versa if ((palette == NULL) != (colors == 0)) @@ -352,7 +373,7 @@ max = 0; } - length = width * height * 3; + length = width * height * samplesPerPixel; DCMDATA_LIBI2D_DEBUG("I2DBmpSource: Starting to read bitmap data"); @@ -372,7 +393,7 @@ /* Calculate posData for this line, it is the index of the first byte for * this line. ( -1 because we start at index 1, but C at index 0) */ - Uint32 posData = (y - 1) * width * 3; + Uint32 posData = (y - 1) * width * samplesPerPixel; if (bmpFile.fread(row_data, 1, row_length) < row_length) { @@ -387,7 +408,7 @@ case 1: case 4: case 8: - cond = parseIndexedColorRow(row_data, width, bpp, colors, palette, &pixData[posData]); + cond = parseIndexedColorRow(row_data, width, bpp, colors, palette, isMonochrome, &pixData[posData]); break; case 16: cond = parse16BppRow(row_data, width, &pixData[posData]); @@ -486,12 +507,14 @@ } -OFCondition I2DBmpSource::parseIndexedColorRow(const Uint8 *row, - const Uint16 width, - const int bpp, - const Uint16 colors, - const Uint32* palette, - char *pixData /*out*/) const +OFCondition I2DBmpSource::parseIndexedColorRow( + const Uint8 *row, + const Uint16 width, + const int bpp, + const Uint16 colors, + const Uint32* palette, + const OFBool isMonochrome, + char *pixData /*out*/) const { // data that is still left from reading the last pixel Uint8 data = 0; @@ -528,10 +551,16 @@ // And save it in the resulting image, this implicitly converts the BGR we // got from the color table into RGB. pixData[pos] = OFstatic_cast(Uint8, pixel >> 16); - pixData[pos + 1] = OFstatic_cast(Uint8, pixel >> 8); - pixData[pos + 2] = OFstatic_cast(Uint8, pixel >> 0); - - pos += 3; + if (isMonochrome) + { + pos++; + } + else + { + pixData[pos + 1] = OFstatic_cast(Uint8, pixel >> 8); + pixData[pos + 2] = OFstatic_cast(Uint8, pixel >> 0); + pos += 3; + } } return EC_Normal; } diff -Nru dcmtk-3.6.6/dcmdata/libi2d/i2d.cc dcmtk-3.6.7/dcmdata/libi2d/i2d.cc --- dcmtk-3.6.6/dcmdata/libi2d/i2d.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/libi2d/i2d.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2007-2017, OFFIS e.V. + * Copyright (C) 2007-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -29,27 +29,59 @@ #include "dcmtk/dcmdata/dcuid.h" /* for SITE_SERIES_UID_ROOT */ #include "dcmtk/dcmdata/dcpixseq.h" /* for DcmPixelSequence */ #include "dcmtk/dcmdata/dcpath.h" /* for override keys */ +#include "dcmtk/dcmdata/xml2dcm.h" /* for DcmXMLParseHelper */ OFLogger DCM_dcmdataLibi2dLogger = OFLog::getLogger("dcmtk.dcmdata.libi2d"); -Image2Dcm::Image2Dcm() : m_overrideKeys(), m_templateFile(""), - m_readStudyLevel(OFFalse), m_readSeriesLevel(OFFalse), m_studySeriesFile(), - m_incInstNoFromFile(OFFalse), m_disableAttribChecks(OFFalse), - m_inventMissingType2Attribs(OFTrue), m_inventMissingType1Attribs(OFFalse), - m_insertLatin1(OFTrue) +Image2Dcm::Image2Dcm() +: m_overrideKeys() +, m_templateFile("") +, m_templateFileIsXML(OFFalse) +, m_XMLvalidation(OFFalse) +, m_XMLnamespaceCheck(OFFalse) +, m_readStudyLevel(OFFalse) +, m_readSeriesLevel(OFFalse) +, m_studySeriesFile() +, m_incInstNoFromFile(OFFalse) +, m_disableAttribChecks(OFFalse) +, m_inventMissingType2Attribs(OFTrue) +, m_inventMissingType1Attribs(OFFalse) +, m_rows(0) +, m_cols(0) +, m_samplesPerPixel(0) +, m_bitsAllocated(0) +, m_bitsStored(0) +, m_highBit(0) +, m_pixelRepresentation(0) +, m_planarConfiguration(0) +, m_pixelAspectRatioH(0) +, m_pixelAspectRatioV(0) +, m_frameLength(0) +, m_photometricInterpretation() +, m_compressionRatio(1.0) +, m_conversionFlags(0) +, m_output_buffer(NULL) +, m_offsetList() +, m_pixelSequence(NULL) +, m_offsetTable(NULL) { - } -OFCondition Image2Dcm::convert(I2DImgSource *inputPlug, - I2DOutputPlug *outPlug, - DcmDataset*& resultDset, - E_TransferSyntax& proposedTS) +Image2Dcm::~Image2Dcm() +{ +} + +OFCondition Image2Dcm::convertFirstFrame( + I2DImgSource *inputPlug, + I2DOutputPlug *outPlug, + size_t numberOfFrames, + DcmDataset*& resultDset, + E_TransferSyntax& proposedTS) { - if (!inputPlug || !outPlug) + if (!inputPlug || !outPlug || (numberOfFrames < 1)) return EC_IllegalParameter; OFCondition cond; @@ -61,9 +93,24 @@ if (!m_templateFile.empty()) { DcmFileFormat dcmff; + +#ifdef WITH_LIBXML + if (m_templateFileIsXML) + { + DcmXMLParseHelper parser; + E_TransferSyntax xfer; + cond = parser.readXmlFile(m_templateFile.c_str(), dcmff, xfer, OFFalse /* ignore metaheader */, m_XMLnamespaceCheck, m_XMLvalidation, OFTrue /* stop on errors */); + } + else + { + cond = dcmff.loadFile(m_templateFile.c_str()); + } +#else cond = dcmff.loadFile(m_templateFile.c_str()); +#endif if (cond.bad()) return cond; + // remove problematic attributes from dataset cleanupTemplate(dcmff.getDataset()); // copy from input file @@ -94,39 +141,26 @@ } } - // Insert Latin 1 as standard character set if desired - if (m_insertLatin1) - cond = insertLatin1(tempDataset.get()); - if (cond.bad()) - return cond; - // Generate and insert UIDs as necessary generateUIDs(tempDataset.get()); // Read and insert pixel data - cond = readAndInsertPixelData(inputPlug, tempDataset.get(), proposedTS); + m_compressionRatio = 1.0; + cond = readAndInsertPixelDataFirstFrame(inputPlug, numberOfFrames, tempDataset.get(), proposedTS, m_compressionRatio); if (cond.bad()) { return cond; } - // Insert Lossy Image Compression and Lossy Image Compression Method attributes if necessary - OFBool srcIsLossy = OFFalse; OFString comprMethod; - if (inputPlug->getLossyComprInfo(srcIsLossy, comprMethod).good()) //TODO) + // Insert SOP Class specific attributes (and values) + cond = outPlug->convert(*tempDataset); + if (cond.bad()) { - if (srcIsLossy) - { - cond = tempDataset->putAndInsertOFStringArray(DCM_LossyImageCompression, "01"); - if (cond.good() && !comprMethod.empty()) - 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"); - } + return cond; } - else - DCMDATA_LIBI2D_DEBUG("Image2Dcm: No information regarding lossy compression available"); // Insert SOP Class specific attributes (and values) - cond = outPlug->convert(*tempDataset); + cond = outPlug->insertMultiFrameAttributes(tempDataset.get(), numberOfFrames); if (cond.bad()) { return cond; @@ -155,12 +189,55 @@ return EC_Normal; } +OFCondition Image2Dcm::updateLossyCompressionInfo( + I2DImgSource *inputPlug, + size_t numberOfFrames, + DcmDataset *dset) +{ + // Insert Lossy Image Compression and Lossy Image Compression Method attributes if necessary + OFBool srcIsLossy = OFFalse; + OFString comprMethod; + OFCondition cond; + if (inputPlug->getLossyComprInfo(srcIsLossy, comprMethod).good()) + { + if (srcIsLossy) + { + double compressionRatio = m_compressionRatio; + if (numberOfFrames > 0) compressionRatio = m_compressionRatio / OFstatic_cast(double, numberOfFrames); + cond = dset->putAndInsertOFStringArray(DCM_LossyImageCompression, "01"); + if (cond.good() && !comprMethod.empty()) + cond = dset->putAndInsertOFStringArray(DCM_LossyImageCompressionMethod, comprMethod); + if (cond.good()) + { + char buf[64]; + OFStandard::ftoa(buf, sizeof(buf), compressionRatio, OFStandard::ftoa_uppercase, 0, 5); + cond = dset->putAndInsertOFStringArray(DCM_LossyImageCompressionRatio, buf); + } + 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"); + } + } + else + DCMDATA_LIBI2D_DEBUG("Image2Dcm: No information regarding lossy compression available"); + return EC_Normal; +} -OFCondition Image2Dcm::insertLatin1(DcmDataset *outputDset) +OFCondition Image2Dcm::convertNextFrame( + I2DImgSource *inputPlug, + size_t frameNumber) { - if (outputDset == NULL) + if (!inputPlug || (frameNumber < 2)) return EC_IllegalParameter; - return outputDset->putAndInsertString(DCM_SpecificCharacterSet, "ISO_IR 100"); + + DCMDATA_LIBI2D_DEBUG("Image2Dcm: Starting conversion of file: " << inputPlug->getImageFile()); + + // Read and insert pixel data + return readAndInsertPixelDataNextFrame(inputPlug, frameNumber); +} + + +void Image2Dcm::setConversionFlags(size_t conversionFlags) +{ + m_conversionFlags = conversionFlags; } @@ -202,6 +279,7 @@ DCMDATA_LIBI2D_DEBUG("Image2Dcm: Applying study and/or series information from file"); if ( (!m_readSeriesLevel && !m_readStudyLevel) || m_studySeriesFile.empty() ) return EC_IllegalCall; + DcmFileFormat dcmff; OFString errMsg; OFCondition cond; @@ -219,8 +297,48 @@ if (srcDset == NULL) return EC_IllegalCall; - // Patient level attributes (type 2 - if value cannot be read, insert empty value + // Determine the specific character set of the target dataset OFString value; + OFString targetCharSet; + (void) targetDset->findAndGetOFString(DCM_SpecificCharacterSet, targetCharSet); + + // Determine the specific character set of the target dataset of the Study/Series file + (void) srcDset->findAndGetOFString(DCM_SpecificCharacterSet, value); + + if (targetCharSet == value) + { + // case 1: character sets are identical (or both empty), nothing to do. + } + else if (value.empty()) + { + // case 2: target dataset uses an extended character set, + // while the study/series file uses ASCII. Nothing to do. + } + else if (targetCharSet.empty()) + { + // case 3: the target dataset uses ASCII, while the + // study/series file uses an extended character set. + // Use the character set from the study/series file. + cond = targetDset->putAndInsertOFStringArray(DCM_SpecificCharacterSet, value); + if (cond.bad()) + return makeOFCondition(OFM_dcmdata, 18, OF_error, "Unable to write Specific Character Set to file"); + } + else + { + // case 4: target dataset and study/series files use different + // extended character sets. We will try to convert the study/series file + // to the character set used in the target dataset and fail if this + // does not succeed. + DCMDATA_LIBI2D_DEBUG("Image2Dcm: target charset: " << targetCharSet << ", study/series file charset: " << value); + cond = dcmff.convertCharacterSet(targetCharSet, m_conversionFlags); + if (cond.bad()) + { + return makeOFCondition(OFM_dcmdata, 18, OF_error, "Character set mismatch between template and study/series file"); + } + } + + // Patient level attributes (type 2 - if value cannot be read, insert empty value + value.clear(); srcDset->findAndGetOFString(DCM_PatientName, value); cond = targetDset->putAndInsertOFStringArray(DCM_PatientName, value); if (cond.bad()) @@ -245,12 +363,6 @@ return makeOFCondition(OFM_dcmdata, 18, OF_error, "Unable to write Patient's Birth Date to file"); value.clear(); - srcDset->findAndGetOFString(DCM_SpecificCharacterSet, value); - cond = targetDset->putAndInsertOFStringArray(DCM_SpecificCharacterSet, value); - if (cond.bad()) - return makeOFCondition(OFM_dcmdata, 18, OF_error, "Unable to write Specific Character Set to file"); - value.clear(); - // Study level attributes (type 2 except Study Instance UID) cond = srcDset->findAndGetOFString(DCM_StudyInstanceUID, value); if (cond.bad()) @@ -316,6 +428,17 @@ value.clear(); } + // We need to copy Instance Number if we are supposed to increase it + if (m_incInstNoFromFile) + { + cond = srcDset->findAndGetOFString(DCM_InstanceNumber, value); + if (cond.bad()) + value = "1"; + cond = targetDset->putAndInsertOFStringArray(DCM_InstanceNumber, value); + if (cond.bad()) + return makeOFCondition(OFM_dcmdata, 18, OF_error, "Unable to write Instance Number to file"); + } + return EC_Normal; } @@ -394,66 +517,50 @@ } -void Image2Dcm::setISOLatin1(OFBool insLatin1) -{ - m_insertLatin1 = insLatin1; -} - - -OFCondition Image2Dcm::insertEncapsulatedPixelData(DcmDataset* dset, - char *pixData, - Uint32 length, - const E_TransferSyntax& outputTS) const +OFCondition Image2Dcm::insertEncapsulatedPixelDataFirstFrame( + DcmDataset* dset, + char *pixData, + Uint32 length, + E_TransferSyntax outputTS) { OFCondition cond; DCMDATA_LIBI2D_DEBUG("Image2Dcm: Storing imported pixel data to DICOM file"); + // create initial pixel sequence - DcmPixelSequence* pixelSequence = new DcmPixelSequence(DCM_PixelSequenceTag); - if (pixelSequence == NULL) - return EC_MemoryExhausted; + delete m_pixelSequence; + m_pixelSequence = new DcmPixelSequence(DCM_PixelSequenceTag); // insert empty offset table into sequence - DcmPixelItem *offsetTable = new DcmPixelItem(DCM_PixelItemTag); - if (offsetTable == NULL) - { - delete pixelSequence; pixelSequence = NULL; - return EC_MemoryExhausted; - } - cond = pixelSequence->insert(offsetTable); + delete m_offsetTable; + m_offsetTable = new DcmPixelItem(DCM_PixelItemTag); + cond = m_pixelSequence->insert(m_offsetTable); if (cond.bad()) { - delete offsetTable; offsetTable = NULL; - delete pixelSequence; pixelSequence = NULL; + delete m_offsetTable; m_offsetTable = NULL; + delete m_pixelSequence; m_pixelSequence = NULL; return cond; } // store compressed frame into pixel sequence - DcmOffsetList dummyList; - cond = pixelSequence->storeCompressedFrame(dummyList, OFreinterpret_cast(Uint8*,pixData), length, 0); - // storeCompressedFrame(..) does a deep copy, so the pixData memory can be freed now - delete[] pixData; + cond = m_pixelSequence->storeCompressedFrame(m_offsetList, OFreinterpret_cast(Uint8*,pixData), length, 0); if (cond.bad()) { - delete pixelSequence; pixelSequence = NULL; + delete m_pixelSequence; m_pixelSequence = NULL; return cond; } // insert pixel data attribute incorporating pixel sequence into dataset DcmPixelData *pixelData = new DcmPixelData(DCM_PixelData); - if (pixelData == NULL) - { - delete pixelSequence; pixelSequence = NULL; - return EC_MemoryExhausted; - } + /* tell pixel data element that this is the original presentation of the pixel data * pixel data and how it compressed */ - pixelData->putOriginalRepresentation(outputTS, NULL, pixelSequence); + pixelData->putOriginalRepresentation(outputTS, NULL, m_pixelSequence); cond = dset->insert(pixelData); if (cond.bad()) { - delete pixelData; pixelData = NULL; // also deletes contained pixel sequence + delete m_pixelSequence; m_pixelSequence = NULL; // also deletes contained pixel sequence return cond; } @@ -461,83 +568,263 @@ } -OFCondition Image2Dcm::readAndInsertPixelData(I2DImgSource* imgSource, - DcmDataset* dset, - E_TransferSyntax& outputTS) -{ - Uint16 samplesPerPixel, rows, cols, bitsAlloc, bitsStored, highBit, pixelRepr, planConf; - Uint16 pixAspectH =1; Uint16 pixAspectV = 1; - OFString photoMetrInt; +OFCondition Image2Dcm::insertEncapsulatedPixelDataNextFrame( + char *pixData, + Uint32 length) +{ + if (m_pixelSequence == NULL || m_offsetTable == NULL) return EC_IllegalCall; + + DCMDATA_LIBI2D_DEBUG("Image2Dcm: Storing imported pixel data to DICOM file"); + + // store compressed frame into pixel sequence + return m_pixelSequence->storeCompressedFrame(m_offsetList, OFreinterpret_cast(Uint8*,pixData), length, 0); +} + + +OFCondition Image2Dcm::readAndInsertPixelDataFirstFrame( + I2DImgSource* imgSource, + size_t numberOfFrames, + DcmDataset* dset, + E_TransferSyntax& outputTS, + double& compressionRatio) +{ + m_pixelAspectRatioH =1; + m_pixelAspectRatioV = 1; outputTS = EXS_Unknown; char* pixData = NULL; - Uint32 length; - OFCondition cond = imgSource->readPixelData(rows, cols, - samplesPerPixel, photoMetrInt, bitsAlloc, bitsStored, highBit, pixelRepr, - planConf, pixAspectH, pixAspectV, pixData, length, outputTS); + OFCondition cond = imgSource->readPixelData(m_rows, m_cols, + m_samplesPerPixel, m_photometricInterpretation, m_bitsAllocated, m_bitsStored, m_highBit, m_pixelRepresentation, + m_planarConfiguration, m_pixelAspectRatioH, m_pixelAspectRatioV, pixData, m_frameLength, outputTS); if (cond.bad()) return cond; + // compute compression ratio for this frame + compressionRatio = 1.0; + double uncompressedSize = m_cols * m_rows; + uncompressedSize = uncompressedSize * m_bitsStored * m_samplesPerPixel / 8.0; + if (m_frameLength > 0) compressionRatio = uncompressedSize / m_frameLength; + DcmXfer transport(outputTS); if (transport.isEncapsulated()) - insertEncapsulatedPixelData(dset, pixData, length, outputTS); + { + m_offsetList.clear(); + insertEncapsulatedPixelDataFirstFrame(dset, pixData, m_frameLength, outputTS); + delete[] pixData; + } else { /* Not encapsulated */ - dset->putAndInsertUint8Array(DCM_PixelData, OFreinterpret_cast(Uint8*, pixData), length); + DcmPixelData *pixelData = new DcmPixelData(DCM_PixelData); + if (pixelData == NULL) + { + delete[] pixData; + return EC_MemoryExhausted; + } + + cond = dset->insert(pixelData); + if (cond.bad()) + { + delete[] pixData; + delete pixelData; + return cond; + } + + DCMDATA_LIBI2D_DEBUG("Image2Dcm: frame size=" << m_frameLength << ", number of frames=" << numberOfFrames << ", length of pixel data array=" << ((m_frameLength * numberOfFrames + 1)/2)*2); + Uint16 *array = NULL; + size_t arraySize = (m_frameLength * numberOfFrames + 1)/2; + cond = pixelData->createUint16Array(OFstatic_cast(Uint32, arraySize), array); + if (cond.bad()) + { + delete[] pixData; + return cond; + } + m_output_buffer = OFreinterpret_cast(char *, array); + memcpy(array, pixData, m_frameLength); delete[] pixData; } DCMDATA_LIBI2D_DEBUG("Image2Dcm: Inserting Image Pixel module information"); - cond = dset->putAndInsertUint16(DCM_SamplesPerPixel, samplesPerPixel); + cond = dset->putAndInsertUint16(DCM_SamplesPerPixel, m_samplesPerPixel); if (cond.bad()) return cond; - cond = dset->putAndInsertOFStringArray(DCM_PhotometricInterpretation, photoMetrInt); + cond = dset->putAndInsertOFStringArray(DCM_PhotometricInterpretation, m_photometricInterpretation); if (cond.bad()) return cond; // Should only be written if Samples per Pixel > 1 - if (samplesPerPixel > 1) + if (m_samplesPerPixel > 1) { - cond = dset->putAndInsertUint16(DCM_PlanarConfiguration, planConf); + cond = dset->putAndInsertUint16(DCM_PlanarConfiguration, m_planarConfiguration); if (cond.bad()) return cond; } - cond = dset->putAndInsertUint16(DCM_Rows, rows); + cond = dset->putAndInsertUint16(DCM_Rows, m_rows); if (cond.bad()) return cond; - cond = dset->putAndInsertUint16(DCM_Columns, cols); + cond = dset->putAndInsertUint16(DCM_Columns, m_cols); if (cond.bad()) return cond; - cond = dset->putAndInsertUint16(DCM_BitsAllocated, bitsAlloc); + cond = dset->putAndInsertUint16(DCM_BitsAllocated, m_bitsAllocated); if (cond.bad()) return cond; - cond = dset->putAndInsertUint16(DCM_BitsStored, bitsStored); + cond = dset->putAndInsertUint16(DCM_BitsStored, m_bitsStored); if (cond.bad()) return cond; - cond = dset->putAndInsertUint16(DCM_HighBit, highBit); + cond = dset->putAndInsertUint16(DCM_HighBit, m_highBit); if (cond.bad()) return cond; - if ( pixAspectH != pixAspectV ) + if ( m_pixelAspectRatioH != m_pixelAspectRatioV ) { char buf[200]; - int err = sprintf(buf, "%u\\%u", pixAspectV, pixAspectH); + int err = sprintf(buf, "%u\\%u", m_pixelAspectRatioV, m_pixelAspectRatioH); if (err == -1) return EC_IllegalCall; cond = dset->putAndInsertOFStringArray(DCM_PixelAspectRatio, buf); if (cond.bad()) return cond; } - return dset->putAndInsertUint16(DCM_PixelRepresentation, pixelRepr); + return dset->putAndInsertUint16(DCM_PixelRepresentation, m_pixelRepresentation); +} + + +OFCondition Image2Dcm::readAndInsertPixelDataNextFrame( + I2DImgSource* imageSource, + size_t frameNumber) +{ + + Uint16 next_pixelAspectRatioH = 1; + Uint16 next_pixelAspectRatioV = 1; + Uint16 next_rows = 0; + Uint16 next_cols = 0; + Uint16 next_samplesPerPixel = 0; + Uint16 next_bitsAllocated = 0; + Uint16 next_bitsStored = 0; + Uint16 next_highBit = 0; + Uint16 next_pixelRepresentation = 0; + Uint16 next_planarConfiguration = 0; + Uint32 next_frameLength = 0; + OFString next_photometricInterpretation; + + char *pixData = NULL; + E_TransferSyntax outputTS; + + OFCondition cond = imageSource->readPixelData(next_rows, next_cols, + next_samplesPerPixel, next_photometricInterpretation, next_bitsAllocated, next_bitsStored, next_highBit, next_pixelRepresentation, + next_planarConfiguration, next_pixelAspectRatioH, next_pixelAspectRatioV, pixData, next_frameLength, outputTS); + + if (cond.bad()) + return cond; + + // create a transfer syntax object for the output transfer syntax + DcmXfer transport(outputTS); + + // check consistency between current frame and first frame + if (next_rows != m_rows) + { + cond = makeOFCondition(OFM_dcmdata, 18, OF_error, "Image2Dcm: value of Rows not equal for all frames of the multi-frame image"); + return cond; + } + if (next_cols != m_cols) + { + cond = makeOFCondition(OFM_dcmdata, 18, OF_error, "Image2Dcm: value of Columns not equal for all frames of the multi-frame image"); + return cond; + } + + if (next_samplesPerPixel != m_samplesPerPixel) + { + cond = makeOFCondition(OFM_dcmdata, 18, OF_error, "Image2Dcm: value of SamplesPerPixel not equal for all frames of the multi-frame image"); + return cond; + } + if (next_photometricInterpretation != m_photometricInterpretation) + { + cond = makeOFCondition(OFM_dcmdata, 18, OF_error, "Image2Dcm: value of PhotometricInterpretation not equal for all frames of the multi-frame image"); + return cond; + } + if (next_bitsAllocated != m_bitsAllocated) + { + cond = makeOFCondition(OFM_dcmdata, 18, OF_error, "Image2Dcm: value of BitsAllocated not equal for all frames of the multi-frame image"); + return cond; + } + if (next_bitsStored != m_bitsStored) + { + cond = makeOFCondition(OFM_dcmdata, 18, OF_error, "Image2Dcm: value of BitsStored not equal for all frames of the multi-frame image"); + return cond; + } + if (next_highBit != m_highBit) + { + cond = makeOFCondition(OFM_dcmdata, 18, OF_error, "Image2Dcm: value of HighBit not equal for all frames of the multi-frame image"); + return cond; + } + if (next_pixelRepresentation != m_pixelRepresentation) + { + cond = makeOFCondition(OFM_dcmdata, 18, OF_error, "Image2Dcm: value of PixelRepresentation not equal for all frames of the multi-frame image"); + return cond; + } + if (next_planarConfiguration != m_planarConfiguration) + { + cond = makeOFCondition(OFM_dcmdata, 18, OF_error, "Image2Dcm: value of PlanarConfiguration not equal for all frames of the multi-frame image"); + return cond; + } + if (next_pixelAspectRatioH != m_pixelAspectRatioH) + { + cond = makeOFCondition(OFM_dcmdata, 18, OF_error, "Image2Dcm: value of horizontal PixelAspectRatio not equal for all frames of the multi-frame image"); + return cond; + } + if (next_pixelAspectRatioV != m_pixelAspectRatioV) + { + cond = makeOFCondition(OFM_dcmdata, 18, OF_error, "Image2Dcm: value of vertical PixelAspectRatio not equal for all frames of the multi-frame image"); + return cond; + } + if ((!transport.isEncapsulated()) && (next_frameLength != m_frameLength)) + { + // in the case of uncompressed images, all frames must have exactly the same size. + // for compressed images, where we store the compressed bitstream as a pixel item, this does not matter. + cond = makeOFCondition(OFM_dcmdata, 18, OF_error, "Image2Dcm: frame size not equal for all frames of the multi-frame image"); + return cond; + } + + // compute compression ratio for this frame + double compressionRatio = 1.0; + double uncompressedSize = next_cols * next_rows; + uncompressedSize = uncompressedSize * next_bitsStored * next_samplesPerPixel / 8.0; + if (next_frameLength > 0) compressionRatio = uncompressedSize / next_frameLength; + + // accumulate compression ratio in m_compressionRatio. + // We will divide this by the number of frames later. + m_compressionRatio += compressionRatio; + + if (transport.isEncapsulated()) + { + cond = insertEncapsulatedPixelDataNextFrame(pixData, next_frameLength); + delete[] pixData; + return cond; + } + else + { + /* Not encapsulated */ + if (m_output_buffer == NULL) + { + cond = makeOFCondition(OFM_dcmdata, 18, OF_error, "Image2Dcm: output buffer not allocated"); + delete[] pixData; + return cond; + } + + char *array = m_output_buffer + m_frameLength * (frameNumber - 1); + memcpy(array, pixData, m_frameLength); + delete[] pixData; + } + + return EC_Normal; } @@ -619,6 +906,23 @@ } +void Image2Dcm::setTemplateFileIsXML(OFBool isXML) +{ + m_templateFileIsXML = isXML; +} + + +void Image2Dcm::setXMLvalidation(OFBool enabled) +{ + m_XMLvalidation = enabled; +} + + +void Image2Dcm::setXMLnamespaceCheck(OFBool enabled) +{ + m_XMLnamespaceCheck = enabled; +} + void Image2Dcm::setIncrementInstanceNumber(OFBool incInstNo) { @@ -729,7 +1033,9 @@ } -Image2Dcm::~Image2Dcm() +OFCondition Image2Dcm::updateOffsetTable() { - DCMDATA_LIBI2D_DEBUG("Freeing memory"); + OFCondition result = EC_Normal; + if (m_offsetTable) result = m_offsetTable->createOffsetTable(m_offsetList); + return result; } diff -Nru dcmtk-3.6.6/dcmdata/libi2d/i2djpgs.cc dcmtk-3.6.7/dcmdata/libi2d/i2djpgs.cc --- dcmtk-3.6.6/dcmdata/libi2d/i2djpgs.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/libi2d/i2djpgs.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2007-2019, OFFIS e.V. + * Copyright (C) 2007-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -19,63 +19,67 @@ * */ - -#include "dcmtk/config/osconfig.h" #include "dcmtk/dcmdata/libi2d/i2djpgs.h" -#include "dcmtk/dcmdata/libi2d/i2doutpl.h" +#include "dcmtk/config/osconfig.h" #include "dcmtk/dcmdata/dcerror.h" +#include "dcmtk/dcmdata/libi2d/i2doutpl.h" -I2DJpegSource::I2DJpegSource() : m_jpegFileMap(), jpegFile(), - m_disableProgrTs(OFFalse), m_disableExtSeqTs(OFFalse), m_insistOnJFIF(OFFalse), - m_keepAPPn(OFFalse), m_lossyCompressed(OFTrue) +I2DJpegSource::I2DJpegSource() + : m_jpegFileMap() + , jpegFile() + , m_disableProgrTs(OFFalse) + , m_disableExtSeqTs(OFFalse) + , m_insistOnJFIF(OFFalse) + , m_keepAPPn(OFFalse) + , m_keepCOM(OFTrue) + , m_lossyCompressed(OFTrue) { - DCMDATA_LIBI2D_DEBUG("I2DJpegSource: Plugin instantiated"); + DCMDATA_LIBI2D_DEBUG("I2DJpegSource: Plugin instantiated"); } - OFString I2DJpegSource::inputFormat() const { - return "JPEG"; + return "JPEG"; } -OFCondition I2DJpegSource::openFile(const OFString &filename) +OFCondition I2DJpegSource::openFile(const OFString& filename) { - DCMDATA_LIBI2D_DEBUG("I2DJpegSource: Opening JPEG file: " << filename); - OFCondition cond; - if (filename.empty()) - return makeOFCondition(OFM_dcmdata, 18, OF_error, "No JPEG filename specified"); + DCMDATA_LIBI2D_DEBUG("I2DJpegSource: Opening JPEG file: " << filename); + OFCondition cond; + if (filename.empty()) + return makeOFCondition(OFM_dcmdata, 18, OF_error, "No JPEG filename specified"); - // Try to open JPEG file - if ((jpegFile.fopen(filename.c_str(), "rb")) == OFFalse) - return makeOFCondition(OFM_dcmdata, 18, OF_error, "Unable to open JPEG file"); + // Try to open JPEG file + if ((jpegFile.fopen(filename.c_str(), "rb")) == OFFalse) + return makeOFCondition(OFM_dcmdata, 18, OF_error, "Unable to open JPEG file"); - return cond; + return cond; } - void I2DJpegSource::setExtSeqSupport(const OFBool enabled) { - m_disableExtSeqTs = !enabled; + m_disableExtSeqTs = !enabled; } - void I2DJpegSource::setProgrSupport(const OFBool enabled) { - m_disableProgrTs = !enabled; + m_disableProgrTs = !enabled; } - void I2DJpegSource::setInsistOnJFIF(const OFBool enabled) { - m_insistOnJFIF = enabled; + m_insistOnJFIF = enabled; } - void I2DJpegSource::setKeepAPPn(const OFBool enabled) { - m_keepAPPn = enabled; + m_keepAPPn = enabled; } +void I2DJpegSource::setKeepCOM(const OFBool enabled) +{ + m_keepCOM = enabled; +} OFCondition I2DJpegSource::readPixelData(Uint16& rows, Uint16& cols, @@ -88,648 +92,641 @@ Uint16& planConf, Uint16& pixAspectH, Uint16& pixAspectV, - char*& pixData, + char*& pixData, Uint32& length, - E_TransferSyntax &ts) + E_TransferSyntax& ts) { - DCMDATA_LIBI2D_DEBUG("I2DJpegSource: Importing JPEG pixel data"); - OFCondition cond = openFile(m_imageFile); - // return error if file is not open - if (cond.bad()) - { - closeFile(); - return cond; - } - // Create "map" with byte positions of all JPEG markers in JPEG file - cond = createJPEGFileMap(); - if (cond.bad()) - { - clearMap(); - closeFile(); - return cond; - } + DCMDATA_LIBI2D_DEBUG("I2DJpegSource: Importing JPEG pixel data"); + OFCondition cond = openFile(m_imageFile); + // return error if file is not open + if (cond.bad()) + { + closeFile(); + return cond; + } + // Create "map" with byte positions of all JPEG markers in JPEG file + cond = createJPEGFileMap(); + if (cond.bad()) + { + clearMap(); + closeFile(); + return cond; + } - // Check for image data in file (look for SOF marker) - E_JPGMARKER jpegEncoding; - OFListIterator(JPEGFileMapEntry*) entry = m_jpegFileMap.begin(); - while (entry != m_jpegFileMap.end()) - { - if ( isSOFMarker((*entry)->marker) ) - { - jpegEncoding = OFstatic_cast(E_JPGMARKER, (*entry)->marker); - break; - } - entry++; - } - if (entry == m_jpegFileMap.end()) - { - closeFile(); - return makeOFCondition(OFM_dcmdata, 18, OF_error, "No image data found in JPEG file"); - } + // Check for image data in file (look for SOF marker) + E_JPGMARKER jpegEncoding; + OFListIterator(JPEGFileMapEntry*) entry = m_jpegFileMap.begin(); + while (entry != m_jpegFileMap.end()) + { + if (isSOFMarker((*entry)->marker)) + { + jpegEncoding = OFstatic_cast(E_JPGMARKER, (*entry)->marker); + break; + } + entry++; + } + if (entry == m_jpegFileMap.end()) + { + closeFile(); + return makeOFCondition(OFM_dcmdata, 18, OF_error, "No image data found in JPEG file"); + } - // Reject arithmetic and hierarchical (differential) encodings (not supported) - cond = isJPEGEncodingSupported(jpegEncoding); - if (cond.bad()) - { - closeFile(); - return cond; - } + // Reject arithmetic and hierarchical (differential) encodings (not supported) + cond = isJPEGEncodingSupported(jpegEncoding); + if (cond.bad()) + { + closeFile(); + return cond; + } - // Get transfer syntax associated with the given JPEG encoding - ts = associatedTS(jpegEncoding); + // Get transfer syntax associated with the given JPEG encoding + ts = associatedTS(jpegEncoding); - // Extract width, height, samples per pixel, bits per sample - Uint16 width, height, spp, bps; - cond = getSOFImageParameters(**entry, width, height, spp, bps); - if (cond.bad()) - { - closeFile(); - return cond; - } + // Extract width, height, samples per pixel, bits per sample + Uint16 width, height, spp, bps; + cond = getSOFImageParameters(**entry, width, height, spp, bps); + if (cond.bad()) + { + closeFile(); + return cond; + } - // Return error if invalid image attributes were found - if (height == 0 || width == 0) - { - closeFile(); - return makeOFCondition(OFM_dcmdata, 18, OF_error, "Invalid image size (width or height = 0)"); - } + // Return error if invalid image attributes were found + if (height == 0 || width == 0) + { + closeFile(); + return makeOFCondition(OFM_dcmdata, 18, OF_error, "Invalid image size (width or height = 0)"); + } - // Examine JFIF information (version, horizontal and vertical aspect ratio, aspect ratio units. - Uint16 jfifVersion, unit; - Uint16 aspectH = 1; - Uint16 aspectV = 1; - entry = m_jpegFileMap.begin(); - while (entry != m_jpegFileMap.end()) - { - if ( (*entry)->marker == E_JPGMARKER_APP0 ) - break; - entry++; - } - if ( entry == m_jpegFileMap.end()) - { - if (!m_insistOnJFIF) + // Examine JFIF information (version, horizontal and vertical aspect ratio, aspect ratio units. + Uint16 jfifVersion, unit; + Uint16 aspectH = 1; + Uint16 aspectV = 1; + entry = m_jpegFileMap.begin(); + while (entry != m_jpegFileMap.end()) + { + if ((*entry)->marker == E_JPGMARKER_APP0) + break; + entry++; + } + if (entry == m_jpegFileMap.end()) + { + if (!m_insistOnJFIF) + { + DCMDATA_LIBI2D_DEBUG("I2DJpegSource: Ignoring missing JFIF header"); + } + else + { + closeFile(); + return makeOFCondition(OFM_dcmdata, 18, OF_error, "No JFIF information found in JPEG file"); + } + } + else + cond = getJFIFImageParameters(**entry, jfifVersion, aspectH, aspectV, unit); + if (cond.bad()) { - DCMDATA_LIBI2D_DEBUG("I2DJpegSource: Ignoring missing JFIF header"); + if (!m_insistOnJFIF) + { + DCMDATA_LIBI2D_DEBUG("I2DJpegSource: Ignoring errors while evaluating JFIF data"); + } + else + { + closeFile(); + return cond; + } } + pixAspectH = aspectH; + pixAspectV = aspectV; + + // Collect information needed for image pixel module + rows = height; + cols = width; + samplesPerPixel = spp; + bitsStored = bps; + bitsAlloc = bps; + + // When BitsStored = 12, we use BitsAllocated = 16 + if (bitsAlloc == 12) + { + bitsAlloc = 16; + } + + // HighBit is always BitsStored - 1. + highBit = bitsStored; + highBit--; + + if (samplesPerPixel == 1) + photoMetrInt = "MONOCHROME2"; + else if (samplesPerPixel == 3) + photoMetrInt = "YBR_FULL_422"; else + return makeOFCondition(OFM_dcmdata, 18, OF_error, "For JPEG data, Samples per Pixel must be 1 or 3"); + // Planar Configuration and Pixel Representation is always 0 for JPEG data + planConf = 0; + pixelRepr = 0; + + Uint32 tLength = 0; + char* tPixelData = NULL; + cond = extractRawJPEGStream(tPixelData, tLength); + if (cond.bad()) { - closeFile(); - return makeOFCondition(OFM_dcmdata, 18, OF_error, "No JFIF information found in JPEG file"); + closeFile(); + return cond; } - } - else - cond = getJFIFImageParameters(**entry, jfifVersion, aspectH, aspectV, unit); - if (cond.bad()) - { - if (!m_insistOnJFIF) + length = tLength; + pixData = tPixelData; + return cond; +} + +OFCondition I2DJpegSource::getLossyComprInfo(OFBool& srcEncodingLossy, OFString& srcLossyComprMethod) const +{ + if (m_lossyCompressed) { - DCMDATA_LIBI2D_DEBUG("I2DJpegSource: Ignoring errors while evaluating JFIF data"); + srcEncodingLossy = OFTrue; + srcLossyComprMethod = "ISO_10918_1"; // Defined term for JPEG Lossy Compression } else { - closeFile(); - return cond; + // (will never get here, no lossless input supported so far) + srcEncodingLossy = OFFalse; } - } - pixAspectH = aspectH; - pixAspectV = aspectV; - - // Collect information needed for image pixel module - rows = height; - cols = width; - samplesPerPixel = spp; - bitsAlloc = bps; - // Some output formats do not allow 12 bit at all, so it is more safe to - // use 16 bit for Bits Allocated (and therefore for Bits Stored, see below) - if (bitsAlloc == 12) - { - bitsAlloc = 16; - } - bitsStored = bitsAlloc; - highBit = OFstatic_cast(Uint16, bitsStored - 1); - if (samplesPerPixel == 1) - photoMetrInt = "MONOCHROME2"; - else if (samplesPerPixel == 3) - photoMetrInt = "YBR_FULL_422"; - else - return makeOFCondition(OFM_dcmdata, 18, OF_error, "For JPEG data, Samples per Pixel must be 1 or 3"); - // Planar Configuration and Pixel Representation is always 0 for JPEG data - planConf = 0; - pixelRepr = 0; - - Uint32 tLength = 0; - char* tPixelData = NULL; - // Keep all APPx info (however, JFIF is always removed) - if (m_keepAPPn) - cond = copyJPEGStream(tPixelData, tLength); - // Cut off all APPx information from JPEG and get raw JPEG bit stream into memory - else - cond = extractRawJPEGStream(tPixelData, tLength); - if (cond.bad()) - { - closeFile(); - return cond; - } - length = tLength; - pixData = tPixelData; - return cond; -} - - -OFCondition I2DJpegSource::getLossyComprInfo(OFBool& srcEncodingLossy, - OFString& srcLossyComprMethod) const -{ - if (m_lossyCompressed) - { - srcEncodingLossy = OFTrue; - srcLossyComprMethod = "ISO_10918_1"; // Defined term for JPEG Lossy Compression - } - else - { - // (will never get here, no lossless input supported so far) - srcEncodingLossy = OFFalse; - } - return EC_Normal; -} - - -OFCondition I2DJpegSource::getSOFImageParameters( const JPEGFileMapEntry& entry, - Uint16& imageWidth, - Uint16& imageHeight, - Uint16& samplesPerPixel, - Uint16& bitsPerSample) -{ - DCMDATA_LIBI2D_DEBUG("I2DJpegSource: Examining JPEG SOF image parameters"); - if ( (entry.marker < E_JPGMARKER_SOF0) || (entry.marker > E_JPGMARKER_SOF15) ) - return EC_IllegalCall; - Uint16 length; - Uint16 image_height, image_width; - Uint8 data_precision, num_components; - int result; - - // seek to the given SOFn marker - - jpegFile.fseek(entry.bytePos, SEEK_SET); - result = read2Bytes(length); /* usual parameter length count */ - if (result == EOF) - return makeOFCondition(OFM_dcmdata, 18, OF_error, "Premature EOF in JPEG file"); - - // read values - - result = read1Byte(data_precision); - if (result == EOF) - return makeOFCondition(OFM_dcmdata, 18, OF_error, "Premature EOF in JPEG file"); - - result = read2Bytes(image_height); - if (result == EOF) - return makeOFCondition(OFM_dcmdata, 18, OF_error, "Premature EOF in JPEG file"); - - result = read2Bytes(image_width); - if (result == EOF) - return makeOFCondition(OFM_dcmdata, 18, OF_error, "Premature EOF in JPEG file"); - - result = read1Byte(num_components); - if (result == EOF) - return makeOFCondition(OFM_dcmdata, 18, OF_error, "Premature EOF in JPEG file"); - - imageWidth = image_width; - imageHeight = image_height; - samplesPerPixel = num_components; - bitsPerSample = data_precision; - - DCMDATA_LIBI2D_DEBUG("I2DJpegSource: Dumping JPEG SOF image parameters:"); - DCMDATA_LIBI2D_DEBUG("I2DJpegSource: Image Width: " << image_width); - DCMDATA_LIBI2D_DEBUG("I2DJpegSource: Image Height: " << image_height); - DCMDATA_LIBI2D_DEBUG("I2DJpegSource: Number of Components: " << OFstatic_cast(unsigned int, num_components)); - DCMDATA_LIBI2D_DEBUG("I2DJpegSource: Data Precision: " << OFstatic_cast(unsigned int, data_precision)); + return EC_Normal; +} - if (length != OFstatic_cast(unsigned int, 8 + num_components * 3)) - return makeOFCondition(OFM_dcmdata, 18, OF_error, "Bogus SOF marker length"); +OFCondition I2DJpegSource::getSOFImageParameters(const JPEGFileMapEntry& entry, + Uint16& imageWidth, + Uint16& imageHeight, + Uint16& samplesPerPixel, + Uint16& bitsPerSample) +{ + DCMDATA_LIBI2D_DEBUG("I2DJpegSource: Examining JPEG SOF image parameters"); + if ((entry.marker < E_JPGMARKER_SOF0) || (entry.marker > E_JPGMARKER_SOF15)) + return EC_IllegalCall; + Uint16 length; + Uint16 image_height, image_width; + Uint8 data_precision, num_components; + int result; + + // seek to the given SOFn marker + + jpegFile.fseek(entry.bytePos, SEEK_SET); + result = read2Bytes(length); /* usual parameter length count */ + if (result == EOF) + return makeOFCondition(OFM_dcmdata, 18, OF_error, "Premature EOF in JPEG file"); - return EC_Normal; -} + // read values + result = read1Byte(data_precision); + if (result == EOF) + return makeOFCondition(OFM_dcmdata, 18, OF_error, "Premature EOF in JPEG file"); -// ignores thumbnail data -OFCondition I2DJpegSource::getJFIFImageParameters( const JPEGFileMapEntry& entry, - Uint16& jfifVersion, - Uint16& pixelAspectH, - Uint16& pixelAspectV, - Uint16& unit) -{ - DCMDATA_LIBI2D_DEBUG("I2DJpegSource: Examining JFIF information"); - if (entry.marker != E_JPGMARKER_APP0) - return EC_IllegalCall; - Uint16 jv, pah, pav, unt; - - // go to specified byte position and read on to value field - Uint16 length; - jpegFile.fseek(entry.bytePos, SEEK_SET); - int result = read2Bytes(length); /* usual parameter length count */ - if (result == EOF) - return makeOFCondition(OFM_dcmdata, 18, OF_error, "Premature EOF in JPEG file"); - - // read and check the 5 byte "JFIF" marker value (X'4A', X'46', X'49', X'46', X'00') - Uint16 twoBytes; - result = read2Bytes(twoBytes); - if ( (result == EOF) || (twoBytes != 0x4a46) ) - return makeOFCondition(OFM_dcmdata, 18, OF_error, "Invalid JFIF marker or JFIF marker not found"); - result = read2Bytes(twoBytes); - if ( (result == EOF) || (twoBytes != 0x4946) ) - return makeOFCondition(OFM_dcmdata, 18, OF_error, "Invalid JFIF marker or JFIF marker not found"); - Uint8 oneByte; - result = read1Byte(oneByte); - if ( (result == EOF)|| (oneByte != 0x00) ) - return makeOFCondition(OFM_dcmdata, 18, OF_error, "Invalid JFIF marker or JFIF marker not found"); - - // read JFIF version - result = read2Bytes(twoBytes); - if (result == EOF) - return makeOFCondition(OFM_dcmdata, 18, OF_error, "Premature EOF in JPEG file"); - jv = twoBytes; - - // read pixel aspect ratio unit - result = read1Byte(oneByte); - if ( (result == EOF) || (oneByte > 2) ) - return makeOFCondition(OFM_dcmdata, 18, OF_error, "Premature EOF in JPEG file"); - unt = oneByte; - - // read horizontal aspect ratio (XDensity) - result = read2Bytes(twoBytes); - if (result == EOF) - return makeOFCondition(OFM_dcmdata, 18, OF_error, "Premature EOF in JPEG file"); - pah = twoBytes; - - // read vertical aspect ratio (YDensity) - result = read2Bytes(twoBytes); - if (result == EOF) - return makeOFCondition(OFM_dcmdata, 18, OF_error, "Premature EOF in JPEG file"); - pav = twoBytes; - - // prepare return values and return - jfifVersion = jv; - pixelAspectH = pah; - pixelAspectV = pav; - unit = unt; - - DCMDATA_LIBI2D_DEBUG("I2DJpegSource: Dumping some JFIF image parameters:"); - DCMDATA_LIBI2D_DEBUG("I2DJpegSource: JFIF version: " << jfifVersion); - DCMDATA_LIBI2D_DEBUG("I2DJpegSource: Horizontal Pixel Aspect Ratio " << pixelAspectH); - DCMDATA_LIBI2D_DEBUG("I2DJpegSource: Vertical Pixel Aspect Ratio: " << pixelAspectV); - DCMDATA_LIBI2D_DEBUG("I2DJpegSource: Units: " << unit); - - return EC_Normal; -} - - -OFCondition I2DJpegSource::copyJPEGStream(char*& pixelData, - Uint32& pixLength) -{ - DCMDATA_LIBI2D_DEBUG("I2DJpegSource: Copying JPEG data from JPEG file"); - /* Calculate length of total stream as found in the file - * Therefore, look at byte positions from SOI and EOI marker */ - - offile_off_t bytePosJFIF = 0; - offile_off_t bytePosAfterJFIF = 0; - int marker = 0; - - // determine file size - offile_off_t result = jpegFile.fseek(0, SEEK_END); - if (result != 0) - return EC_IllegalParameter; - offile_off_t filesize = jpegFile.ftell(); - - // 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, -1) ) ) - { - DCMDATA_LIBI2D_ERROR("I2DJpegSource: JPEG file length longer than 2^32 bytes (or larger than size_t capacity), aborting"); - return EC_MemoryExhausted; - } - - // get position of JFIF section and SOI marker - OFListIterator(JPEGFileMapEntry*) entry = m_jpegFileMap.begin(); - while (entry != m_jpegFileMap.end()) - { - marker = (*entry)->marker; - if ( marker == E_JPGMARKER_APP0 ) - { - DCMDATA_LIBI2D_DEBUG("I2DJpegSource: Skipping application segment APP0"); - bytePosJFIF = (*entry)->bytePos - 1; // include first byte of marker (FF) - entry++; - bytePosAfterJFIF = (*entry)->bytePos - 1; // include first byte (FF) of marker after APPn - break; - } - entry++; - } - - // Go to starting position (SOI marker) of JPEG stream data - jpegFile.fseek(0, SEEK_SET); - - // Allocate buffer for raw JPEG data - pixLength = OFstatic_cast(Uint32, filesize - (bytePosAfterJFIF - bytePosJFIF)); - pixelData = new char[pixLength]; - char *currBufferPos = pixelData; - - // exclude JFIF if present - if (bytePosJFIF != 0) - { - // read from SOI to JFIF - result = jpegFile.fread (currBufferPos, 1, 2); - if (result != 2) - return EC_IllegalCall; - currBufferPos += 2; - // read from end of JFIF to end of file - jpegFile.fseek(bytePosAfterJFIF - 1, SEEK_SET); // -1 because offsets start with 0 - result = jpegFile.fread (currBufferPos, 1, OFstatic_cast(size_t, filesize - bytePosAfterJFIF + 1)); - if (result != filesize - bytePosAfterJFIF + 1) - return EC_IllegalCall; - } - else // otherwise copy everything starting with SOI marker - { - result = jpegFile.fread (currBufferPos, 1, OFstatic_cast(size_t, filesize)); - if (result != filesize) - return EC_IllegalCall; - } - return EC_Normal; + result = read2Bytes(image_height); + if (result == EOF) + return makeOFCondition(OFM_dcmdata, 18, OF_error, "Premature EOF in JPEG file"); + + result = read2Bytes(image_width); + if (result == EOF) + return makeOFCondition(OFM_dcmdata, 18, OF_error, "Premature EOF in JPEG file"); + + result = read1Byte(num_components); + if (result == EOF) + return makeOFCondition(OFM_dcmdata, 18, OF_error, "Premature EOF in JPEG file"); + + imageWidth = image_width; + imageHeight = image_height; + samplesPerPixel = num_components; + bitsPerSample = data_precision; + + DCMDATA_LIBI2D_DEBUG("I2DJpegSource: Dumping JPEG SOF image parameters:"); + DCMDATA_LIBI2D_DEBUG("I2DJpegSource: Image Width: " << image_width); + DCMDATA_LIBI2D_DEBUG("I2DJpegSource: Image Height: " << image_height); + DCMDATA_LIBI2D_DEBUG("I2DJpegSource: Number of Components: " << OFstatic_cast(unsigned int, num_components)); + DCMDATA_LIBI2D_DEBUG("I2DJpegSource: Data Precision: " << OFstatic_cast(unsigned int, data_precision)); + + if (length != OFstatic_cast(unsigned int, 8 + num_components * 3)) + return makeOFCondition(OFM_dcmdata, 18, OF_error, "Bogus SOF marker length"); + + return EC_Normal; } +// ignores thumbnail data +OFCondition I2DJpegSource::getJFIFImageParameters( + const JPEGFileMapEntry& entry, Uint16& jfifVersion, Uint16& pixelAspectH, Uint16& pixelAspectV, Uint16& unit) +{ + DCMDATA_LIBI2D_DEBUG("I2DJpegSource: Examining JFIF information"); + if (entry.marker != E_JPGMARKER_APP0) + return EC_IllegalCall; + Uint16 jv, pah, pav, unt; + + // go to specified byte position and read on to value field + Uint16 length; + jpegFile.fseek(entry.bytePos, SEEK_SET); + int result = read2Bytes(length); /* usual parameter length count */ + if (result == EOF) + return makeOFCondition(OFM_dcmdata, 18, OF_error, "Premature EOF in JPEG file"); + + // read and check the 5 byte "JFIF" marker value (X'4A', X'46', X'49', X'46', X'00') + Uint16 twoBytes; + result = read2Bytes(twoBytes); + if ((result == EOF) || (twoBytes != 0x4a46)) + return makeOFCondition(OFM_dcmdata, 18, OF_error, "Invalid JFIF marker or JFIF marker not found"); + result = read2Bytes(twoBytes); + if ((result == EOF) || (twoBytes != 0x4946)) + return makeOFCondition(OFM_dcmdata, 18, OF_error, "Invalid JFIF marker or JFIF marker not found"); + Uint8 oneByte; + result = read1Byte(oneByte); + if ((result == EOF) || (oneByte != 0x00)) + return makeOFCondition(OFM_dcmdata, 18, OF_error, "Invalid JFIF marker or JFIF marker not found"); + + // read JFIF version + result = read2Bytes(twoBytes); + if (result == EOF) + return makeOFCondition(OFM_dcmdata, 18, OF_error, "Premature EOF in JPEG file"); + jv = twoBytes; + + // read pixel aspect ratio unit + result = read1Byte(oneByte); + if ((result == EOF) || (oneByte > 2)) + return makeOFCondition(OFM_dcmdata, 18, OF_error, "Premature EOF in JPEG file"); + unt = oneByte; + + // read horizontal aspect ratio (XDensity) + result = read2Bytes(twoBytes); + if (result == EOF) + return makeOFCondition(OFM_dcmdata, 18, OF_error, "Premature EOF in JPEG file"); + pah = twoBytes; + + // read vertical aspect ratio (YDensity) + result = read2Bytes(twoBytes); + if (result == EOF) + return makeOFCondition(OFM_dcmdata, 18, OF_error, "Premature EOF in JPEG file"); + pav = twoBytes; + + // prepare return values and return + jfifVersion = jv; + pixelAspectH = pah; + pixelAspectV = pav; + unit = unt; + + DCMDATA_LIBI2D_DEBUG("I2DJpegSource: Dumping some JFIF image parameters:"); + DCMDATA_LIBI2D_DEBUG("I2DJpegSource: JFIF version: " << jfifVersion); + DCMDATA_LIBI2D_DEBUG("I2DJpegSource: Horizontal Pixel Aspect Ratio " << pixelAspectH); + DCMDATA_LIBI2D_DEBUG("I2DJpegSource: Vertical Pixel Aspect Ratio: " << pixelAspectV); + DCMDATA_LIBI2D_DEBUG("I2DJpegSource: Units: " << unit); + + return EC_Normal; +} // expects valid JPEG stream (especially exactly one SOI and one EOI marker) -OFCondition I2DJpegSource::extractRawJPEGStream(char*& pixelData, - Uint32& pixLength) +OFCondition I2DJpegSource::extractRawJPEGStream(char*& pixelData, Uint32& pixLength) { - DCMDATA_LIBI2D_DEBUG("I2DJpegSource: Extracting JPEG data from JPEG file"); - OFCondition cond; - int marker = 0; - Uint16 length; - - /* Calculate length of total stream as found in the file - * Therefore, look at byte positions from SOI and EOI marker and - * and exclude all APPn markers in calculation - */ - - offile_off_t bytePosSOI = 0; - offile_off_t bytePosEOI = 0; - offile_off_t totalAPPSize = 0; - OFList appPosAndLengths; - - OFListIterator(JPEGFileMapEntry*) entry = m_jpegFileMap.begin(); - while (entry != m_jpegFileMap.end()) - { - marker = (*entry)->marker; - - if (marker == E_JPGMARKER_SOI) - { - bytePosSOI = (*entry)->bytePos; - // Subtract one byte for the preceding 0xFF of the SOI-Marker - bytePosSOI -= 1; - } - else if (marker == E_JPGMARKER_EOI) - { - bytePosEOI = (*entry)->bytePos; - // No need to subtract / add bytes - break; - } - else if (marker >= E_JPGMARKER_APP0 && marker <= E_JPGMARKER_APP15) - { - DCMDATA_LIBI2D_DEBUG("I2DJpegSource: Skipping application segment APP" << (marker - E_JPGMARKER_APP0)); - jpegFile.fseek((*entry)->bytePos - jpegFile.ftell(), SEEK_CUR); - int result = read2Bytes( length); - if (result == EOF) - { - jpegFile.fclose(); - return makeOFCondition(OFM_dcmdata, 18, OF_error, "Premature EOF in JPEG file"); - } - // remember pos and length of APP data so we don't need a second "scan" for that - appPosAndLengths.push_back( (*entry)->bytePos - 1 ); // -1 for FF of marker - appPosAndLengths.push_back( length ); - // add length of marker value to total APP size - totalAPPSize += length; - // add the marker length itself to total APP size - totalAPPSize += 2; - } - // Advance to next segment - entry++; - } - - if ( (entry == m_jpegFileMap.end()) || (bytePosSOI == 0) || (bytePosEOI == 0)) // at least end marker was not found - return EC_IllegalCall; - - offile_off_t rawStreamSize = bytePosEOI - bytePosSOI - totalAPPSize; - // Start position n and endpos. m results in a total amount of m-n+1 bytes - rawStreamSize++; - - // 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, -1) ) ) - { - DCMDATA_LIBI2D_ERROR("I2DJpegSource: Raw JPEG stream length longer than 2^32 bytes (or larger than size_t capacity), aborting"); - return EC_MemoryExhausted; - } - pixelData = new char[OFstatic_cast(size_t, rawStreamSize)]; - // keep track of current write position in memory buffer - char *currBufferPos = pixelData; - - // Go to starting position (SOI marker) of JPEG stream data - jpegFile.fseek(bytePosSOI-1, SEEK_SET); - - /* Copy everything but leave out APP segments - */ - OFBool finished = OFFalse; - offile_off_t endOfBlock = 0; offile_off_t startOfNextBlock = 0; - while (!finished) - { - // determine position of the next block to be read - if ( appPosAndLengths.size() != 0) - { - // we have some APP blocks left - endOfBlock = appPosAndLengths.front() - 1; - appPosAndLengths.pop_front(); - startOfNextBlock = endOfBlock + appPosAndLengths.front() + 2; // +2 for marker - appPosAndLengths.pop_front(); - } - else // we can read to the end - { - endOfBlock = bytePosEOI; - finished = OFTrue; - } - // read block - offile_off_t blockSize = endOfBlock - jpegFile.ftell(); - if (blockSize < 0) - { - DCMDATA_LIBI2D_ERROR("Length field in JPEG data bigger than remaining file"); - cond = makeOFCondition(OFM_dcmdata, 18, OF_error, "Length field in JPEG data bigger than remaining file"); - } - if (cond.good()) - { - size_t result = jpegFile.fread (currBufferPos, 1, OFstatic_cast(size_t, blockSize)); - if (result != OFstatic_cast(size_t, blockSize)) - cond = EC_IllegalCall; - else if (!finished) - { - jpegFile.fseek(startOfNextBlock, SEEK_SET); - currBufferPos += blockSize; - } - } - } - // update result variable - pixLength = OFstatic_cast(Uint32, rawStreamSize); - if (cond.bad()) - { - delete[] pixelData; - } - return cond; -} + DCMDATA_LIBI2D_DEBUG("I2DJpegSource: Extracting JPEG data from JPEG file"); + OFCondition cond; + int marker = 0; + Uint16 length; + + /* Calculate length of total stream as found in the file + * Therefore, look at byte positions from SOI and EOI marker and + * and exclude all APPn markers and COM markers in calculation + */ + offile_off_t bytePosSOI = 0; + offile_off_t bytePosEOI = 0; + offile_off_t totalSkipSize = 0; + OFList appPosAndLengths; + + OFListIterator(JPEGFileMapEntry*) entry = m_jpegFileMap.begin(); + while (entry != m_jpegFileMap.end()) + { + marker = (*entry)->marker; + + if (marker == E_JPGMARKER_SOI) + { + bytePosSOI = (*entry)->bytePos; + // Subtract one byte for the preceding 0xFF of the SOI-Marker + bytePosSOI -= 1; + } + else if (marker == E_JPGMARKER_EOI) + { + bytePosEOI = (*entry)->bytePos; + // No need to subtract / add bytes + break; + } + else if (!m_keepAPPn && (marker >= E_JPGMARKER_APP0 && marker <= E_JPGMARKER_APP15)) + { + DCMDATA_LIBI2D_DEBUG("I2DJpegSource: Skipping application segment APP" << (marker - E_JPGMARKER_APP0)); + jpegFile.fseek((*entry)->bytePos - jpegFile.ftell(), SEEK_CUR); + int result = read2Bytes(length); + if (result == EOF) + { + jpegFile.fclose(); + return makeOFCondition(OFM_dcmdata, 18, OF_error, "Premature EOF in JPEG file"); + } + // remember pos and length of APP data so we don't need a second "scan" for that + appPosAndLengths.push_back((*entry)->bytePos - 1); // -1 for FF of marker + appPosAndLengths.push_back(length); + // add length of marker value to total APP size + totalSkipSize += length; + // add the marker length itself to total APP size + totalSkipSize += 2; + } + else if (!m_keepCOM && marker == E_JPGMARKER_COM) + { + DCMDATA_LIBI2D_DEBUG("I2DJpegSource: Skipping segment COM"); + jpegFile.fseek((*entry)->bytePos - jpegFile.ftell(), SEEK_CUR); + int result = read2Bytes(length); + if (result == EOF) + { + jpegFile.fclose(); + return makeOFCondition(OFM_dcmdata, 18, OF_error, "Premature EOF in JPEG file"); + } + // remember pos and length of COM data so we don't need a second "scan" for that + appPosAndLengths.push_back((*entry)->bytePos - 1); // -1 for FF of marker + appPosAndLengths.push_back(length); + // add length of marker value to total APP size + totalSkipSize += length; + // add the marker length itself to total APP size + totalSkipSize += 2; + } + // Advance to next segment + entry++; + } + + if ((entry == m_jpegFileMap.end()) || (bytePosSOI == 0) || (bytePosEOI == 0)) // at least end marker was not found + return EC_IllegalCall; + + offile_off_t rawStreamSize = bytePosEOI - bytePosSOI - totalSkipSize; + // Start position n and endpos. m results in a total amount of m-n+1 bytes + rawStreamSize++; + + // Allocate buffer for raw JPEG data + // Only up to 2^32-2 bytes can be stored in one pixel data fragment in DICOM + if ((rawStreamSize < 0) || + ((rawStreamSize >> 32) > 0) || + (OFstatic_cast(Uint32, rawStreamSize) > (OFstatic_cast(Uint32, 4294967294UL)))) + { + DCMDATA_LIBI2D_ERROR( + "I2DJpegSource: Raw JPEG stream length longer than 2^32 bytes (or larger than size_t capacity), aborting"); + return EC_MemoryExhausted; + } + pixelData = new char[OFstatic_cast(size_t, rawStreamSize)]; + // keep track of current write position in memory buffer + char* currBufferPos = pixelData; + + // Go to starting position (SOI marker) of JPEG stream data + jpegFile.fseek(bytePosSOI - 1, SEEK_SET); + + /* Copy everything but leave out APP segments + */ + OFBool finished = OFFalse; + offile_off_t endOfBlock = 0; + offile_off_t startOfNextBlock = 0; + while (!finished) + { + // determine position of the next block to be read + if (appPosAndLengths.size() != 0) + { + // we have some APP blocks left + endOfBlock = appPosAndLengths.front() - 1; + appPosAndLengths.pop_front(); + startOfNextBlock = endOfBlock + appPosAndLengths.front() + 2; // +2 for marker + appPosAndLengths.pop_front(); + } + else // we can read to the end + { + endOfBlock = bytePosEOI; + finished = OFTrue; + } + // read block + offile_off_t blockSize = endOfBlock - jpegFile.ftell(); + if (blockSize < 0) + { + DCMDATA_LIBI2D_ERROR("Length field in JPEG data bigger than remaining file"); + cond = makeOFCondition(OFM_dcmdata, 18, OF_error, "Length field in JPEG data bigger than remaining file"); + } + if (cond.good()) + { + size_t result = jpegFile.fread(currBufferPos, 1, OFstatic_cast(size_t, blockSize)); + if (result != OFstatic_cast(size_t, blockSize)) + cond = EC_IllegalCall; + else if (!finished) + { + jpegFile.fseek(startOfNextBlock, SEEK_SET); + currBufferPos += blockSize; + } + } + } + // update result variable + pixLength = OFstatic_cast(Uint32, rawStreamSize); + if (cond.bad()) + { + delete[] pixelData; + } + return cond; +} OFCondition I2DJpegSource::createJPEGFileMap() { - DCMDATA_LIBI2D_DEBUG("I2DJpegSource: Examing JPEG file and creating map of JPEG markers"); - // clear any old data - clearMap(); - E_JPGMARKER marker; - JPEGFileMapEntry *entry = NULL; - OFBool lastWasSOSMarker = OFFalse; - OFCondition cond; - - /* Expect SOI at start of file */ - E_JPGMARKER first = E_JPGMARKER(); - cond = firstMarker(first); - if (cond.bad()) + DCMDATA_LIBI2D_DEBUG("I2DJpegSource: Examing JPEG file and creating map of JPEG markers"); + // clear any old data + clearMap(); + E_JPGMARKER marker; + JPEGFileMapEntry* entry = NULL; + OFBool lastWasSOSMarker = OFFalse; + OFCondition cond; + + /* Expect SOI at start of file */ + E_JPGMARKER first = E_JPGMARKER(); + cond = firstMarker(first); + if (cond.bad()) + return cond; + entry = new JPEGFileMapEntry(); + entry->bytePos = jpegFile.ftell(); + entry->marker = first; + m_jpegFileMap.push_back(entry); + + if (first != E_JPGMARKER_SOI) + return makeOFCondition( + OFM_dcmdata, 18, OF_error, "I2DJpegSource: SOI marker not found at beginning of JPEG stream"); + + /* Scan miscellaneous markers until we reach EOI */ + while (cond.good()) + { + cond = nextMarker(lastWasSOSMarker, marker); + if (cond.good()) + { + entry = new JPEGFileMapEntry(); + entry->bytePos = jpegFile.ftell(); + entry->marker = marker; + m_jpegFileMap.push_back(entry); + if (marker == E_JPGMARKER_SOS) + { + // FIXME: reset this to OFFalse after the next marker? + lastWasSOSMarker = OFTrue; + } + else if (marker == E_JPGMARKER_EOI) + { + // End of file reached + cond = EC_Normal; + break; + } + if (!isRSTMarker(marker)) // RST marker does not have a length that could be used for skipping + skipVariable(); + } + } /* end loop */ + debugDumpJPEGFileMap(); return cond; - entry = new JPEGFileMapEntry(); - entry->bytePos = jpegFile.ftell(); - entry->marker = first; - m_jpegFileMap.push_back(entry); - - if (first != E_JPGMARKER_SOI) - return makeOFCondition(OFM_dcmdata, 18, OF_error, "I2DJpegSource: SOI marker not found at beginning of JPEG stream"); - - /* Scan miscellaneous markers until we reach EOI */ - while (cond.good()) - { - cond = nextMarker(lastWasSOSMarker, marker); - if (cond.good()) - { - entry = new JPEGFileMapEntry(); - entry->bytePos = jpegFile.ftell(); - entry->marker = marker; - m_jpegFileMap.push_back(entry); - if (marker == E_JPGMARKER_SOS) - { - // FIXME: reset this to OFFalse after the next marker? - lastWasSOSMarker = OFTrue; - } - else if (marker == E_JPGMARKER_EOI) - { - // End of file reached - cond = EC_Normal; - break; - } - else if ( isSOFMarker(marker) && m_keepAPPn ) - { - cond = EC_Normal; - break; - } - if ( !isRSTMarker(marker) ) // RST marker does not have a length that could be used for skipping - skipVariable(); - } - } /* end loop */ - debugDumpJPEGFileMap(); - return cond; } - OFBool I2DJpegSource::isRSTMarker(const E_JPGMARKER& marker) { - return ((marker >= E_JPGMARKER_RST0) && (marker <= E_JPGMARKER_RST7)); + return ((marker >= E_JPGMARKER_RST0) && (marker <= E_JPGMARKER_RST7)); } - OFBool I2DJpegSource::isSOFMarker(const E_JPGMARKER& marker) { - return ( (marker >= E_JPGMARKER_SOF0) && (marker <= E_JPGMARKER_SOF15) - && (marker != E_JPGMARKER_DHT) && (marker != E_JPGMARKER_DAC)); + return ((marker >= E_JPGMARKER_SOF0) && (marker <= E_JPGMARKER_SOF15) && (marker != E_JPGMARKER_DHT) + && (marker != E_JPGMARKER_DAC)); } - OFString I2DJpegSource::jpegMarkerToString(const E_JPGMARKER& marker) { - switch (marker) - { - case(E_JPGMARKER_SOF0) : return "SOF0: Baseline DCT"; break; - case(E_JPGMARKER_SOF1) : return "SOF1: Extended sequential DCT"; break; - case(E_JPGMARKER_SOF2) : return "SOF2: Progressive DCT"; break; - case(E_JPGMARKER_SOF3) : return "SOF3: Lossless (sequential)"; break; - case(E_JPGMARKER_SOF5) : return "SOF5: Differential sequential DCT"; break; - case(E_JPGMARKER_SOF6) : return "SOF6: Differential progressive DCT"; break; - case(E_JPGMARKER_SOF7) : return "SOF7: Differential lossless (sequential)"; break; - case(E_JPGMARKER_JPG) : return "JPG: JPEG extension"; break; - case(E_JPGMARKER_SOF9) : return "SOF9: Extended sequential DCT"; break; - case(E_JPGMARKER_SOF10) : return "SOF10: Progressive DCT"; break; - case(E_JPGMARKER_SOF11) : return "SOF11: Lossless (sequential)"; break; - case(E_JPGMARKER_SOF13) : return "SOF13: Differential sequential DCT"; break; - case(E_JPGMARKER_SOF14) : return "SOF14: Differential progressive DCT"; break; - case(E_JPGMARKER_SOF15) : return "SOF15: Differential lossless (sequential)"; break; - case(E_JPGMARKER_DHT) : return "DHT: Huffman table(s)"; break; - case(E_JPGMARKER_DAC) : return "DAC: Arithmetic coding conditioning(s)"; break; - case(E_JPGMARKER_SOI) : return "SOI: Start of image"; break; - case(E_JPGMARKER_EOI) : return "EOI: End of image"; break; - case(E_JPGMARKER_SOS) : return "SOS: Start of scan"; break; - case(E_JPGMARKER_DQT) : return "DQT: Quantization table(s)"; break; - case(E_JPGMARKER_DNL) : return "DNL: Number of lines"; break; - case(E_JPGMARKER_DRI) : return "DRI: Define restart interval"; break; - case(E_JPGMARKER_DHP) : return "DHP: Hierarchical progression"; break; - case(E_JPGMARKER_EXP) : return "EXP: Expand reference component(s)"; break; - case(E_JPGMARKER_COM) : return "COM: Comment"; break; - case(E_JPGMARKER_TEM) : return "TEM: For temporary private use in arithmetic coding"; break; - - default: - if ((marker >= E_JPGMARKER_RST0) && (marker <= E_JPGMARKER_RST7)) {return "RSTn: Restart interval termination"; break;} - if ((marker >= E_JPGMARKER_APP0) && (marker <= E_JPGMARKER_APP15)) {return "APPn: Application segment"; break;} - if ((marker >= E_JPGMARKER_JPGN0) && (marker <= E_JPGMARKER_JPGN13)) {return "JPGn: JPEG extension"; break;} - if ((marker >= E_JPGMARKER_RES0) && (marker <= E_JPGMARKER_RESN)) {return "RESn"; break;} - } - OFString msg = "UNKNOWN MARKER :"; - char hexNo[10]; - sprintf(hexNo,"%x2", marker); - msg += hexNo; - return msg; + switch (marker) + { + case (E_JPGMARKER_SOF0): + return "SOF0: Baseline DCT"; + break; + case (E_JPGMARKER_SOF1): + return "SOF1: Extended sequential DCT"; + break; + case (E_JPGMARKER_SOF2): + return "SOF2: Progressive DCT"; + break; + case (E_JPGMARKER_SOF3): + return "SOF3: Lossless (sequential)"; + break; + case (E_JPGMARKER_SOF5): + return "SOF5: Differential sequential DCT"; + break; + case (E_JPGMARKER_SOF6): + return "SOF6: Differential progressive DCT"; + break; + case (E_JPGMARKER_SOF7): + return "SOF7: Differential lossless (sequential)"; + break; + case (E_JPGMARKER_JPG): + return "JPG: JPEG extension"; + break; + case (E_JPGMARKER_SOF9): + return "SOF9: Extended sequential DCT"; + break; + case (E_JPGMARKER_SOF10): + return "SOF10: Progressive DCT"; + break; + case (E_JPGMARKER_SOF11): + return "SOF11: Lossless (sequential)"; + break; + case (E_JPGMARKER_SOF13): + return "SOF13: Differential sequential DCT"; + break; + case (E_JPGMARKER_SOF14): + return "SOF14: Differential progressive DCT"; + break; + case (E_JPGMARKER_SOF15): + return "SOF15: Differential lossless (sequential)"; + break; + case (E_JPGMARKER_DHT): + return "DHT: Huffman table(s)"; + break; + case (E_JPGMARKER_DAC): + return "DAC: Arithmetic coding conditioning(s)"; + break; + case (E_JPGMARKER_SOI): + return "SOI: Start of image"; + break; + case (E_JPGMARKER_EOI): + return "EOI: End of image"; + break; + case (E_JPGMARKER_SOS): + return "SOS: Start of scan"; + break; + case (E_JPGMARKER_DQT): + return "DQT: Quantization table(s)"; + break; + case (E_JPGMARKER_DNL): + return "DNL: Number of lines"; + break; + case (E_JPGMARKER_DRI): + return "DRI: Define restart interval"; + break; + case (E_JPGMARKER_DHP): + return "DHP: Hierarchical progression"; + break; + case (E_JPGMARKER_EXP): + return "EXP: Expand reference component(s)"; + break; + case (E_JPGMARKER_COM): + return "COM: Comment"; + break; + case (E_JPGMARKER_TEM): + return "TEM: For temporary private use in arithmetic coding"; + break; + + default: + if ((marker >= E_JPGMARKER_RST0) && (marker <= E_JPGMARKER_RST7)) + { + return "RSTn: Restart interval termination"; + break; + } + if ((marker >= E_JPGMARKER_APP0) && (marker <= E_JPGMARKER_APP15)) + { + return "APPn: Application segment"; + break; + } + if ((marker >= E_JPGMARKER_JPGN0) && (marker <= E_JPGMARKER_JPGN13)) + { + return "JPGn: JPEG extension"; + break; + } + if ((marker >= E_JPGMARKER_RES0) && (marker <= E_JPGMARKER_RESN)) + { + return "RESn"; + break; + } + } + OFString msg = "UNKNOWN MARKER :"; + char hexNo[10]; + sprintf(hexNo, "%x2", marker); + msg += hexNo; + return msg; } - /* Read one byte, testing for EOF */ int I2DJpegSource::read1Byte(Uint8& result) { - int c; - c = jpegFile.fgetc(); - if (c == EOF) - return EOF; - result = OFstatic_cast(Uint8, c); - return 0; + int c; + c = jpegFile.fgetc(); + if (c == EOF) + return EOF; + result = OFstatic_cast(Uint8, c); + return 0; } - /* Read 2 bytes, convert to unsigned int */ /* All 2-byte quantities in JPEG markers are MSB first */ int I2DJpegSource::read2Bytes(Uint16& result) { - int c1, c2; - c1 = jpegFile.fgetc(); - if (c1 == EOF) - return EOF; - c2 = jpegFile.fgetc(); - if (c2 == EOF) - return EOF; - result = OFstatic_cast(Uint16, ((OFstatic_cast(Uint16, c1)) << 8) + OFstatic_cast(Uint16, c2)); - return 0; + int c1, c2; + c1 = jpegFile.fgetc(); + if (c1 == EOF) + return EOF; + c2 = jpegFile.fgetc(); + if (c2 == EOF) + return EOF; + result = OFstatic_cast(Uint16, ((OFstatic_cast(Uint16, c1)) << 8) + OFstatic_cast(Uint16, c2)); + return 0; } - - /* * Find the next JPEG marker and return its marker code. * We expect at least one FF byte, possibly more if the compressor used FFs @@ -738,45 +735,46 @@ * garbage is unspecified; we choose to skip over it but emit a warning msg. */ -OFCondition I2DJpegSource::nextMarker(const OFBool& lastWasSOSMarker, - E_JPGMARKER& result) +OFCondition I2DJpegSource::nextMarker(const OFBool& lastWasSOSMarker, E_JPGMARKER& result) { - Uint8 c; - int discarded_bytes = 0; - int oneByte; + Uint8 c; + int discarded_bytes = 0; + int oneByte; - do { - /* Find 0xFF byte; count and skip any non-FFs. */ - oneByte = read1Byte(c); - if (oneByte == EOF) - return makeOFCondition(OFM_dcmdata, 18, OF_error, "Premature EOF in JPEG file"); + do + { + /* Find 0xFF byte; count and skip any non-FFs. */ + oneByte = read1Byte(c); + if (oneByte == EOF) + return makeOFCondition(OFM_dcmdata, 18, OF_error, "Premature EOF in JPEG file"); - while (c != 0xFF) + while (c != 0xFF) + { + if (!lastWasSOSMarker) + discarded_bytes++; + oneByte = read1Byte(c); + if (oneByte == EOF) + return makeOFCondition(OFM_dcmdata, 18, OF_error, "Premature EOF in JPEG file"); + } + /* Get marker code byte, swallowing any duplicate FF bytes. Extra FFs + * are legal as pad bytes, so don't count them in discarded_bytes. + */ + do + { + oneByte = read1Byte(c); + if (oneByte == EOF) + return makeOFCondition(OFM_dcmdata, 18, OF_error, "Premature EOF in JPEG file"); + } while (c == 0xFF); + } while (lastWasSOSMarker && c == 0x00); + + if (discarded_bytes != 0) { - if (!lastWasSOSMarker) - discarded_bytes++; - oneByte = read1Byte(c); - if (oneByte == EOF) - return makeOFCondition(OFM_dcmdata, 18, OF_error, "Premature EOF in JPEG file"); + DCMDATA_LIBI2D_WARN("garbage data found in JPEG file"); } - /* Get marker code byte, swallowing any duplicate FF bytes. Extra FFs - * are legal as pad bytes, so don't count them in discarded_bytes. - */ - do { - oneByte = read1Byte(c); - if (oneByte == EOF) - return makeOFCondition(OFM_dcmdata, 18, OF_error, "Premature EOF in JPEG file"); - } while (c == 0xFF); - } while (lastWasSOSMarker && c == 0x00); - - if (discarded_bytes != 0) { - DCMDATA_LIBI2D_WARN("garbage data found in JPEG file"); - } - result = OFstatic_cast(E_JPGMARKER, c); - return EC_Normal; + result = OFstatic_cast(E_JPGMARKER, c); + return EC_Normal; } - /* * Read the initial marker, which should be SOI. * For a JFIF file, the first two bytes of the file should be literally @@ -785,15 +783,16 @@ OFCondition I2DJpegSource::firstMarker(E_JPGMARKER& result) { - Uint8 c1, c2; + Uint8 c1, c2; - c1 = OFstatic_cast(Uint8, jpegFile.fgetc()); - c2 = OFstatic_cast(Uint8, jpegFile.fgetc()); - if (c1 != 0xFF || c2 != E_JPGMARKER_SOI) { - return makeOFCondition(OFM_dcmdata, 18, OF_error, "Not a JPEG file"); - } - result = OFstatic_cast(E_JPGMARKER, c2); - return EC_Normal; + c1 = OFstatic_cast(Uint8, jpegFile.fgetc()); + c2 = OFstatic_cast(Uint8, jpegFile.fgetc()); + if (c1 != 0xFF || c2 != E_JPGMARKER_SOI) + { + return makeOFCondition(OFM_dcmdata, 18, OF_error, "Not a JPEG file"); + } + result = OFstatic_cast(E_JPGMARKER, c2); + return EC_Normal; } /* @@ -808,112 +807,118 @@ OFCondition I2DJpegSource::skipVariable() /* Skip over an unknown or uninteresting variable-length marker */ { - Uint16 length; + Uint16 length; - /* Get the marker parameter length count */ - int result = read2Bytes(length); - if (result == EOF) - return makeOFCondition(OFM_dcmdata, 18, OF_error, "Premature EOF in JPEG file"); - /* Length includes itself, so must be at least 2 */ - if (length < 2) - return makeOFCondition(OFM_dcmdata, 18, OF_error, "Erroneous JPEG marker length"); - length = OFstatic_cast(Uint16, length - 2); - /* Skip over the remaining bytes */ - jpegFile.fseek(length, SEEK_CUR); - return EC_Normal; + /* Get the marker parameter length count */ + int result = read2Bytes(length); + if (result == EOF) + return makeOFCondition(OFM_dcmdata, 18, OF_error, "Premature EOF in JPEG file"); + /* Length includes itself, so must be at least 2 */ + if (length < 2) + return makeOFCondition(OFM_dcmdata, 18, OF_error, "Erroneous JPEG marker length"); + length = OFstatic_cast(Uint16, length - 2); + /* Skip over the remaining bytes */ + jpegFile.fseek(length, SEEK_CUR); + return EC_Normal; } - OFCondition I2DJpegSource::isJPEGEncodingSupported(const E_JPGMARKER& jpegEncoding) const { - OFCondition result; - DCMDATA_LIBI2D_DEBUG("I2DJpegSource: Checking whether JPEG encoding is supported"); - DCMDATA_LIBI2D_DEBUG("I2DJpegSource: Encoding: " << jpegMarkerToString(jpegEncoding)); - switch (jpegEncoding) - { - case E_JPGMARKER_SOF0: // Baseline - result = EC_Normal; - break; - case E_JPGMARKER_SOF1: // Extended sequential - if (!m_disableExtSeqTs) - result = EC_Normal; - else - result = makeOFCondition(OFM_dcmdata, 18, OF_error, "Unable to convert: Extended sequential JPEG coding found but support disabled"); - break; - case E_JPGMARKER_SOF2: // Progressive - if (!m_disableProgrTs) - result = EC_Normal; - else - result = makeOFCondition(OFM_dcmdata, 18, OF_error, "Unable to convert: Progressive JPEG coding found but disabled"); - break; - // SOF3: Lossless, SOF5-7: Hierarchical (differential), SOF9-15: Arithmetic coding, all other - default: - OFString errMsg("JPEG data with encoding: '"); - errMsg += jpegMarkerToString(jpegEncoding); - errMsg += "' not supported"; - result = makeOFCondition(OFM_dcmdata, 18, OF_error, errMsg.c_str()); - } - return result; + OFCondition result; + DCMDATA_LIBI2D_DEBUG("I2DJpegSource: Checking whether JPEG encoding is supported"); + DCMDATA_LIBI2D_DEBUG("I2DJpegSource: Encoding: " << jpegMarkerToString(jpegEncoding)); + switch (jpegEncoding) + { + case E_JPGMARKER_SOF0: // Baseline + result = EC_Normal; + break; + case E_JPGMARKER_SOF1: // Extended sequential + if (!m_disableExtSeqTs) + result = EC_Normal; + else + result + = makeOFCondition(OFM_dcmdata, + 18, + OF_error, + "Unable to convert: Extended sequential JPEG coding found but support disabled"); + break; + case E_JPGMARKER_SOF2: // Progressive + if (!m_disableProgrTs) + result = EC_Normal; + else + result = makeOFCondition( + OFM_dcmdata, 18, OF_error, "Unable to convert: Progressive JPEG coding found but disabled"); + break; + // SOF3: Lossless, SOF5-7: Hierarchical (differential), SOF9-15: Arithmetic coding, all other + default: + OFString errMsg("JPEG data with encoding: '"); + errMsg += jpegMarkerToString(jpegEncoding); + errMsg += "' not supported"; + result = makeOFCondition(OFM_dcmdata, 18, OF_error, errMsg.c_str()); + } + return result; } - E_TransferSyntax I2DJpegSource::associatedTS(const E_JPGMARKER& jpegEncoding) { - switch (jpegEncoding) - { - case E_JPGMARKER_SOF0: // Baseline - return EXS_JPEGProcess1; - case E_JPGMARKER_SOF1: // Extended Sequential - return EXS_JPEGProcess2_4; - case E_JPGMARKER_SOF2: // Progressive - return EXS_JPEGProcess10_12; - default: - return EXS_Unknown; - } + switch (jpegEncoding) + { + case E_JPGMARKER_SOF0: // Baseline + return EXS_JPEGProcess1; + case E_JPGMARKER_SOF1: // Extended Sequential + return EXS_JPEGProcess2_4; + case E_JPGMARKER_SOF2: // Progressive + return EXS_JPEGProcess10_12; + default: + return EXS_Unknown; + } } - void I2DJpegSource::debugDumpJPEGFileMap() const { - if (!DCM_dcmdataLibi2dLogger.isEnabledFor(OFLogger::DEBUG_LOG_LEVEL)) - return; + if (!DCM_dcmdataLibi2dLogger.isEnabledFor(OFLogger::DEBUG_LOG_LEVEL)) + return; - DCMDATA_LIBI2D_DEBUG("I2DJpegSource: Dumping JPEG marker file map:"); - if (m_keepAPPn) - DCMDATA_LIBI2D_DEBUG("I2DJpegSource: Keep APPn option enabled, any markers after SOFn marker will not be dumped"); - OFListConstIterator(JPEGFileMapEntry*) it= m_jpegFileMap.begin(); - while (it != m_jpegFileMap.end()) - { - DCMDATA_LIBI2D_DEBUG("I2DJpegSource: Byte Position: 0x" - << STD_NAMESPACE hex << STD_NAMESPACE setw(8) << STD_NAMESPACE setfill('0') - /* need to cast bytePos to unsigned long to keep VC6 happy */ - << OFstatic_cast(unsigned long, (*it)->bytePos) <<" | Marker: " << jpegMarkerToString( (*it)->marker)); - it++; - } + DCMDATA_LIBI2D_DEBUG("I2DJpegSource: Dumping JPEG marker file map:"); + if (m_keepAPPn) + DCMDATA_LIBI2D_DEBUG( + "I2DJpegSource: Keep APPn option enabled, any markers after SOFn marker will not be dumped"); + OFListConstIterator(JPEGFileMapEntry*) it = m_jpegFileMap.begin(); + while (it != m_jpegFileMap.end()) + { + DCMDATA_LIBI2D_DEBUG("I2DJpegSource: Byte Position: 0x" + << STD_NAMESPACE hex << STD_NAMESPACE setw(8) + << STD_NAMESPACE setfill('0') + /* need to cast bytePos to unsigned long to keep VC6 happy */ + << OFstatic_cast(unsigned long, (*it)->bytePos) + << " | Marker: " << jpegMarkerToString((*it)->marker)); + it++; + } } void I2DJpegSource::clearMap() { - // free memory of each map entry and remove them all from list - JPEGFileMapEntry *entry = NULL; - while (m_jpegFileMap.size() != 0) - { - entry = m_jpegFileMap.front(); - m_jpegFileMap.pop_front(); - delete entry; entry = NULL; - } + // free memory of each map entry and remove them all from list + JPEGFileMapEntry* entry = NULL; + while (m_jpegFileMap.size() != 0) + { + entry = m_jpegFileMap.front(); + m_jpegFileMap.pop_front(); + delete entry; + entry = NULL; + } } // closes underlying JPEG file void I2DJpegSource::closeFile() { - jpegFile.fclose(); + jpegFile.fclose(); } // close file and free dynamically allocated memory I2DJpegSource::~I2DJpegSource() { - DCMDATA_LIBI2D_DEBUG("I2DJpegSource: Closing JPEG file and cleaning up memory"); - closeFile(); - clearMap(); + DCMDATA_LIBI2D_DEBUG("I2DJpegSource: Closing JPEG file and cleaning up memory"); + closeFile(); + clearMap(); } diff -Nru dcmtk-3.6.6/dcmdata/libi2d/i2doutpl.cc dcmtk-3.6.7/dcmdata/libi2d/i2doutpl.cc --- dcmtk-3.6.6/dcmdata/libi2d/i2doutpl.cc 1970-01-01 00:00:00.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/libi2d/i2doutpl.cc 2022-04-28 13:47:25.000000000 +0000 @@ -0,0 +1,219 @@ +/* + * + * Copyright (C) 2001-2021, 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: Michael Onken + * + * Purpose: Base class for converter from image file to DICOM + * + */ + +#include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ + +#include "dcmtk/dcmdata/libi2d/i2doutpl.h" +#include "dcmtk/dcmdata/dcdatset.h" +#include "dcmtk/dcmdata/dcelem.h" +#include "dcmtk/dcmdata/dcdeftag.h" + +I2DOutputPlug::I2DOutputPlug() +: m_doAttribChecking(OFTrue) +, m_inventMissingType2Attribs(OFTrue) +, m_inventMissingType1Attribs(OFTrue) +{ +} + + +I2DOutputPlug::~I2DOutputPlug() +{ +} + + +void I2DOutputPlug::setValidityChecking( + OFBool doChecks, + OFBool insertMissingType2, + OFBool inventMissingType1) +{ + m_doAttribChecking = doChecks; + m_inventMissingType2Attribs = insertMissingType2; + m_inventMissingType1Attribs = inventMissingType1; +} + +OFString I2DOutputPlug::checkType1Attrib( + const DcmTagKey& key, + DcmDataset* targetDset) const +{ + OFString err; + if (targetDset->tagExists(key)) + { + DcmElement *elem = NULL; + if (targetDset->findAndGetElement(key, elem).bad() || !elem || (elem->getLength() == 0)) + { + err = "I2DOutputPlug: Empty value for type 1 attribute: "; + err += DcmTag(key).getTagName(); + err += "\n"; + } + } + else + { + err = "I2DOutputPlug: Missing type 1 attribute: "; + err += DcmTag(key).getTagName(); + err += "\n"; + } + return err; +} + +OFString I2DOutputPlug::checkAndInventType1Attrib( + const DcmTagKey& key, + DcmDataset* targetDset, + const OFString& defaultValue) const +{ + OFBool exists = targetDset->tagExists(key); + if (!exists && !m_inventMissingType1Attribs) + { + OFString err = "I2DOutputPlug: Missing type 1 attribute: "; err += DcmTag(key).getTagName(); err += "\n"; + return err; + } + DcmElement *elem; + OFCondition cond = targetDset->findAndGetElement(key, elem); + if (cond.bad() || !elem || (elem->getLength() == 0)) + { + if (!m_inventMissingType1Attribs) + { + OFString err; + err += "I2DOutputPlug: Empty value for type 1 attribute: "; + err += DcmTag(key).getTagName(); + err += "\n"; + return err; + } + //holds element to insert in item + elem = NULL; + DcmTag tag(key); OFBool wasError = OFFalse; + //if dicom element could be created, insert in to item and modify to value + if ( DcmItem::newDicomElement(elem, tag).good()) + { + if (targetDset->insert(elem, OFTrue).good()) + { + if (elem->putString(defaultValue.c_str()).good()) + { + DCMDATA_LIBI2D_DEBUG("I2DOutputPlug: Inserting missing type 1 attribute: " << tag.getTagName() << " with value '" << defaultValue << "'"); + } else wasError = OFTrue; + } else wasError = OFTrue; + } else wasError = OFTrue; + if (wasError) + { + OFString err = "Unable to insert type 1 attribute "; + err += tag.getTagName(); err += " with value '"; err += defaultValue; err += "'\n"; + return err; + } + } + return ""; +}; + + +OFString I2DOutputPlug::checkAndInventType1CodeSQ( + const DcmTagKey& key, + DcmDataset* targetDset, + const OFString& codeValue, + const OFString& codeMeaning, + const OFString& codingSchemeDesignator) const +{ + OFString err; + if (! targetDset->tagExists(key) && ! m_inventMissingType1Attribs) + { + err = "I2DOutputPlug: Missing type 1 code sequence attribute: "; err += DcmTag(key).getTagName(); err += "\n"; + return err; + } + + if (m_inventMissingType1Attribs) + { + DcmTag tag(key); + DcmItem *ditem = NULL; + OFCondition cond = targetDset->findOrCreateSequenceItem(key, ditem, 0); + if (cond.good() || ditem ) + { + // add these attributes to the given sequence item only if they are not present already + if (cond.good() && (! ditem->tagExists(DCM_CodeValue))) + { + DCMDATA_LIBI2D_DEBUG("I2DOutputPlug: Inserting missing type 1 attribute: " << DcmTag(DCM_CodeValue).getTagName() << " with value '" << codeValue << "' into " << tag.getTagName()); + cond = ditem->putAndInsertOFStringArray(DCM_CodeValue, codeValue, OFFalse); + } + + if (cond.good() && (! ditem->tagExists(DCM_CodeMeaning))) + { + DCMDATA_LIBI2D_DEBUG("I2DOutputPlug: Inserting missing type 1 attribute: " << DcmTag(DCM_CodeMeaning).getTagName() << " with value '" << codeMeaning << "' into " << tag.getTagName()); + cond = ditem->putAndInsertOFStringArray(DCM_CodeMeaning, codeMeaning, OFFalse); + } + + if (cond.good() && (! ditem->tagExists(DCM_CodingSchemeDesignator))) + { + DCMDATA_LIBI2D_DEBUG("I2DOutputPlug: Inserting missing type 1 attribute: " << DcmTag(DCM_CodingSchemeDesignator).getTagName() << " with value '" << codingSchemeDesignator << "' into " << tag.getTagName()); + cond = ditem->putAndInsertOFStringArray(DCM_CodingSchemeDesignator, codingSchemeDesignator, OFFalse); + } + + if (cond.bad()) + { + err = "Unable to insert type 1 code sequence attribute "; + err += tag.getTagName(); err += " with value ("; err += codeValue; err += ", "; err += codeMeaning; err += ", "; err += codingSchemeDesignator; err += ")\n"; + } + } + } + + return err; +} + + +OFString I2DOutputPlug::checkAndInventType2Attrib( + const DcmTagKey& key, + DcmDataset* targetDset, + const OFString& defaultValue) const +{ + OFString err; + OFBool exists = targetDset->tagExists(key); + if (!exists) + { + if (m_inventMissingType2Attribs) + { + //holds element to insert in item + DcmElement *elem = NULL; + DcmTag tag(key); OFBool wasError = OFFalse; + //if dicom element could be created, insert in to item and modify to value + if ( DcmItem::newDicomElement(elem, tag).good()) + { + if (targetDset->insert(elem, OFTrue).good()) + { + OFCondition result; + if (!defaultValue.empty()) // only insert value if not empty(e. g. empty type 2 sequences) + { + result = elem->putString(defaultValue.c_str()); + } + if (result.good()) + { + DCMDATA_LIBI2D_DEBUG("I2DOutputPlug: Inserting missing type 2 attribute: " << tag.getTagName() << " with value '" << (defaultValue.empty() ? "" : defaultValue) << "'"); + } else wasError = OFTrue; + } else wasError = OFTrue; + } else wasError = OFTrue; + if (wasError) + { + err += "Unable to insert type 2 attribute "; err += tag.getTagName(); err += " with value '"; err += defaultValue; err += "'\n"; + } + } + else + { + err = "Image2Dcm: Missing type 2 attribute: "; err += DcmTag(key).getTagName(); err += "\n"; + return err; + } + } + return err; +}; + diff -Nru dcmtk-3.6.6/dcmdata/libi2d/i2dplnsc.cc dcmtk-3.6.7/dcmdata/libi2d/i2dplnsc.cc --- dcmtk-3.6.6/dcmdata/libi2d/i2dplnsc.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/libi2d/i2dplnsc.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2001-2010, OFFIS e.V. + * Copyright (C) 2001-2022, 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/dcdeftag.h" /* for DCM_ defines */ #include "dcmtk/dcmdata/dcuid.h" /* for UID_ defines */ #include "dcmtk/dcmdata/libi2d/i2doutpl.h" +#include "dcmtk/dcmdata/dcdatset.h" I2DOutputPlugNewSC::I2DOutputPlugNewSC() @@ -33,6 +34,11 @@ } +I2DOutputPlugNewSC::~I2DOutputPlugNewSC() +{ +} + + OFString I2DOutputPlugNewSC::ident() { return "New Secondary Capture Image SOP Classes"; @@ -48,7 +54,6 @@ } - OFCondition I2DOutputPlugNewSC::convert(DcmDataset &dataset) const { DCMDATA_LIBI2D_DEBUG("I2DOutputPlugNewSC: Inserting new Multiframe SC specific attributes"); @@ -69,10 +74,10 @@ else cond = makeOFCondition(OFM_dcmdata, 18, OF_error, "I2DOutputPlugNewSC: Bits Allocated needs a value of 1, 8 or 16 for conversion"); - cond = insertMultiFrameAttribs(&dataset); return cond; } + OFString I2DOutputPlugNewSC::isValid(DcmDataset& dataset) const { OFString err; @@ -90,17 +95,6 @@ } -OFCondition I2DOutputPlugNewSC::insertMultiFrameAttribs(DcmDataset* targetDataset) const -{ - if (!targetDataset) - return EC_IllegalParameter; - - // We only support 1 image Multi-frames so far - return targetDataset->putAndInsertOFStringArray(DCM_NumberOfFrames, "1"); - // Frame Increment pointer is set later in the more specific SC Multi-frame Image context -} - - OFCondition I2DOutputPlugNewSC::handle1BitSC(DcmDataset *dataset) const { if (!dataset) @@ -109,7 +103,7 @@ OFCondition cond; Uint16 u16 = 0; OFString str; cond = dataset->findAndGetOFStringArray(DCM_PhotometricInterpretation, str); if (cond.bad() || (str != "MONOCHROME2")) - return makeOFCondition(OFM_dcmdata, 18, OF_error, "I2DOutputPlugNewSC: Photometric interpretation does not fit SOP class"); + return makeOFCondition(OFM_dcmdata, 18, OF_error, "I2DOutputPlugNewSC: Photometric Interpretation does not fit SOP class"); cond = dataset->findAndGetUint16(DCM_SamplesPerPixel, u16); if (cond.bad() || (u16 != 1)) @@ -140,7 +134,7 @@ OFCondition cond; Uint16 u16 = 0; OFString str; cond = dataset->findAndGetOFStringArray(DCM_PhotometricInterpretation, str); if (cond.bad()) - return makeOFCondition(OFM_dcmdata, 18, OF_error, "I2DOutputPlugNewSC: Photometric interpretation not set for Pixel Data"); + return makeOFCondition(OFM_dcmdata, 18, OF_error, "I2DOutputPlugNewSC: Photometric Interpretation not set for Pixel Data"); if (str == "MONOCHROME2") // Mult-Frame Grayscale Byte SC Image { cond = dataset->findAndGetUint16(DCM_SamplesPerPixel, u16); @@ -158,8 +152,10 @@ cond = dataset->findAndGetUint16(DCM_PixelRepresentation, u16); if (cond.bad() || (u16 != 0)) return makeOFCondition(OFM_dcmdata, 18, OF_error, "I2DOutputPlugNewSC: Pixel Representation does not fit SOP class"); + // For MONOCHROME2 and Bits Stored > 1, rescale slope/intercept/type have to be inserted - cond = insertSCMultiFrameAttribs(dataset); + cond = insertMonochromeAttribs(dataset); + // Insert SOP Class UID if (cond.good()) cond = dataset->putAndInsertOFStringArray(DCM_SOPClassUID, UID_MultiframeGrayscaleByteSecondaryCaptureImageStorage); @@ -193,7 +189,7 @@ cond = dataset->putAndInsertOFStringArray(DCM_SOPClassUID, UID_MultiframeTrueColorSecondaryCaptureImageStorage); } else - return makeOFCondition(OFM_dcmdata, 18, OF_error, "I2DOutputPlugNewSC: Photometric interpretation does not fit SOP class"); + return makeOFCondition(OFM_dcmdata, 18, OF_error, "I2DOutputPlugNewSC: Photometric Interpretation does not fit SOP class"); return cond; } @@ -207,7 +203,7 @@ OFCondition cond; Uint16 u16 = 0; OFString str; cond = dataset->findAndGetOFStringArray(DCM_PhotometricInterpretation, str); if (cond.bad() || (str != "MONOCHROME2")) - return makeOFCondition(OFM_dcmdata, 18, OF_error, "I2DOutputPlugNewSC: Photometric interpretation does not fit SOP class"); + return makeOFCondition(OFM_dcmdata, 18, OF_error, "I2DOutputPlugNewSC: Photometric Interpretation does not fit SOP class"); cond = dataset->findAndGetUint16(DCM_SamplesPerPixel, u16); if (cond.bad() || (u16 != 1)) @@ -228,14 +224,16 @@ // Insert SOP Class UID cond = dataset->putAndInsertOFStringArray(DCM_SOPClassUID, UID_MultiframeGrayscaleWordSecondaryCaptureImageStorage); + // For MONOCHROME2 and Bits Stored > 1, rescale slope/intercept/type have to be inserted if (cond.good()) - cond = insertSCMultiFrameAttribs(dataset); + cond = insertMonochromeAttribs(dataset); + return cond; } -OFCondition I2DOutputPlugNewSC::insertSCMultiFrameAttribs(DcmDataset *targetDataset) const +OFCondition I2DOutputPlugNewSC::insertMonochromeAttribs(DcmDataset *targetDataset) const { OFCondition cond; // Rescale Intercept, set to 0 (constant enumerated value) @@ -255,6 +253,36 @@ } -I2DOutputPlugNewSC::~I2DOutputPlugNewSC() +OFBool I2DOutputPlugNewSC::supportsMultiframe() const +{ + return OFTrue; +} + + +OFCondition I2DOutputPlugNewSC::insertMultiFrameAttributes( + DcmDataset* targetDataset, + size_t numberOfFrames) const { + if ((!targetDataset) || (numberOfFrames == 0)) + return EC_IllegalParameter; + + // Note: Instead of FrameTime and FrameTimeVector, Multiframe Secondary Capture + // also supports (0018,2001) PageNumberVector as an attribute to which the FrameIncrementPointer + // may point. This might be useful for single-bit images, which are most likely scanned documents. + // Currently we always generate a FrameTime. + + char numFrames[30]; + OFStandard::snprintf(numFrames, 30, "%lu", numberOfFrames); + OFCondition cond = targetDataset->putAndInsertOFStringArray(DCM_NumberOfFrames, numFrames); + + // Secondary Capture permits FrameTime and FrameIncrementPointer only when multiple frames are present. + if (numberOfFrames > 1) + { + char frameTime[30]; + size_t fTime = (numberOfFrames > 1) ? DCMTK_I2D_Default_Frame_Time : 0; + OFStandard::snprintf(frameTime, 30, "%lu", fTime); + if (cond.good()) cond = targetDataset->putAndInsertOFStringArray(DCM_FrameTime, frameTime); + if (cond.good()) cond = targetDataset->putAndInsertTagKey(DCM_FrameIncrementPointer, DCM_FrameTime); + } + return cond; } diff -Nru dcmtk-3.6.6/dcmdata/libi2d/i2dplop.cc dcmtk-3.6.7/dcmdata/libi2d/i2dplop.cc --- dcmtk-3.6.6/dcmdata/libi2d/i2dplop.cc 1970-01-01 00:00:00.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/libi2d/i2dplop.cc 2022-04-28 13:47:25.000000000 +0000 @@ -0,0 +1,297 @@ +/* + * + * Copyright (C) 2001-2022, 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: Michael Onken + * + * Purpose: Implements conversion from image into Ophthalmic Photography IODs + * + */ + +#include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ + +#include "dcmtk/dcmdata/libi2d/i2dplop.h" +#include "dcmtk/dcmdata/dcdeftag.h" /* for DCM_ defines */ +#include "dcmtk/dcmdata/dcuid.h" /* for UID_ defines */ +#include "dcmtk/ofstd/ofdatime.h" /* for OFDateTime */ +#include "dcmtk/dcmdata/dcdatset.h" + + +I2DOutputPlugOphthalmicPhotography::I2DOutputPlugOphthalmicPhotography() +{ + DCMDATA_LIBI2D_DEBUG("I2DOutputPlugOphthalmicPhotography: Output plugin for Ophthalmic Photography IODs initialized"); +} + + +I2DOutputPlugOphthalmicPhotography::~I2DOutputPlugOphthalmicPhotography() +{ +} + + +OFString I2DOutputPlugOphthalmicPhotography::ident() +{ + return "Ophthalmic Photography SOP Classes"; +} + + +void I2DOutputPlugOphthalmicPhotography::supportedSOPClassUIDs(OFList& suppSOPs) +{ + suppSOPs.push_back(UID_OphthalmicPhotography8BitImageStorage); + suppSOPs.push_back(UID_OphthalmicPhotography16BitImageStorage); +} + + +OFCondition I2DOutputPlugOphthalmicPhotography::convert(DcmDataset &dataset) const +{ + DCMDATA_LIBI2D_DEBUG("I2DOutputPlugOphthalmicPhotography: Inserting Ophthalmic Photography specific attributes"); + + // Find out which of the Ophthalmic Photography SOP Classes to use + Uint16 bitsAllocated; + OFCondition cond = dataset.findAndGetUint16(DCM_BitsAllocated, bitsAllocated); + if (cond.bad()) + return makeOFCondition(OFM_dcmdata, 18, OF_error, "I2DOutputPlugOphthalmicPhotography: Unable to determine correct SOP class due to missing Image Pixel module information"); + + if (bitsAllocated == 8) + cond = handle8BitImage(&dataset); + else if (bitsAllocated == 16) + cond = handle16BitImage(&dataset); + else + cond = makeOFCondition(OFM_dcmdata, 18, OF_error, "I2DOutputPlugOphthalmicPhotography: Bits Allocated needs a value of 8 or 16 for conversion"); + + return cond; +} + + +OFString I2DOutputPlugOphthalmicPhotography::isValid(DcmDataset& dataset) const +{ + OFString err; + // Just return if checking was disabled + if (!m_doAttribChecking) + return err; + + DCMDATA_LIBI2D_DEBUG("I2DOutputPlugOphthalmicPhotography: Checking Ophthalmic Photography specific attributes"); + + // compute defaults for some type 1 attributes + char newUID[70]; + dcmGenerateUniqueIdentifier(newUID); + OFDateTime now = OFDateTime::getCurrentDateTime(); + OFString contentDate; + OFString contentTime; + OFString acquisitionDateTime; + now.getDate().getISOFormattedDate(contentDate, OFFalse); + now.getTime().getISOFormattedTime(contentTime, OFFalse, OFFalse, OFFalse, OFFalse); + now.getISOFormattedDateTime(acquisitionDateTime, OFFalse, OFFalse, OFFalse, OFFalse); + + // check and, if necessary, "invent" type 1 attributes + err += checkAndInventType1Attrib(DCM_Modality, &dataset, "OP"); + err += checkAndInventType1Attrib(DCM_SynchronizationTrigger, &dataset, "NO TRIGGER"); + err += checkAndInventType1Attrib(DCM_AcquisitionTimeSynchronized, &dataset, "N"); + err += checkAndInventType1Attrib(DCM_InstanceNumber, &dataset, "1"); + err += checkAndInventType1Attrib(DCM_ImageType, &dataset, "ORIGINAL\\PRIMARY"); + err += checkAndInventType1Attrib(DCM_SynchronizationFrameOfReferenceUID, &dataset, newUID); + err += checkAndInventType1Attrib(DCM_ContentDate, &dataset, contentDate.c_str()); + err += checkAndInventType1Attrib(DCM_ContentTime, &dataset, contentTime.c_str()); + err += checkAndInventType1Attrib(DCM_AcquisitionDateTime, &dataset, acquisitionDateTime.c_str()); + err += checkAndInventType1Attrib(DCM_BurnedInAnnotation, &dataset, "NO"); + err += checkAndInventType1CodeSQ(DCM_AnatomicRegionSequence, &dataset, "Eye", "81745001", "SCT"); + + // check type 1 attributes that we cannot "invent" + err += checkType1Attrib(DCM_ImageLaterality, &dataset); + err += checkType1Attrib(DCM_AcquisitionDeviceTypeCodeSequence, &dataset); + + // check and, if necessary, add type 2 attributes + err += checkAndInventType2Attrib(DCM_Manufacturer, &dataset); + err += checkAndInventType2Attrib(DCM_PatientEyeMovementCommanded, &dataset); + err += checkAndInventType2Attrib(DCM_HorizontalFieldOfView, &dataset); + err += checkAndInventType2Attrib(DCM_RefractiveStateSequence, &dataset); + err += checkAndInventType2Attrib(DCM_EmmetropicMagnification, &dataset); + err += checkAndInventType2Attrib(DCM_IntraOcularPressure, &dataset); + err += checkAndInventType2Attrib(DCM_PupilDilated, &dataset); + err += checkAndInventType2Attrib(DCM_IlluminationTypeCodeSequence, &dataset); + err += checkAndInventType2Attrib(DCM_LightPathFilterTypeStackCodeSequence, &dataset); + err += checkAndInventType2Attrib(DCM_ImagePathFilterTypeStackCodeSequence, &dataset); + err += checkAndInventType2Attrib(DCM_LensesCodeSequence, &dataset); + err += checkAndInventType2Attrib(DCM_DetectorType, &dataset); + + return err; +} + + +OFCondition I2DOutputPlugOphthalmicPhotography::handle8BitImage(DcmDataset *dataset) const +{ + if (!dataset) + return EC_IllegalParameter; + + OFCondition cond; Uint16 u16 = 0; OFString str; + cond = dataset->findAndGetOFStringArray(DCM_PhotometricInterpretation, str); + if (cond.bad()) + return makeOFCondition(OFM_dcmdata, 18, OF_error, "I2DOutputPlugOphthalmicPhotography: Photometric Interpretation not set for Pixel Data"); + + if (str == "MONOCHROME2") + { + cond = dataset->findAndGetUint16(DCM_SamplesPerPixel, u16); + if (cond.bad() || (u16 != 1)) + return makeOFCondition(OFM_dcmdata, 18, OF_error, "I2DOutputPlugOphthalmicPhotography: Samples Per Pixel does not fit SOP class"); + + cond = dataset->findAndGetUint16(DCM_BitsStored, u16); + if (cond.bad() || (u16 != 8)) + return makeOFCondition(OFM_dcmdata, 18, OF_error, "I2DOutputPlugOphthalmicPhotography: Bits Stored does not fit SOP class"); + + cond = dataset->findAndGetUint16(DCM_HighBit, u16); + if (cond.bad() || (u16 != 7)) + return makeOFCondition(OFM_dcmdata, 18, OF_error, "I2DOutputPlugOphthalmicPhotography: High Bit does not fit SOP class"); + + cond = dataset->findAndGetUint16(DCM_PixelRepresentation, u16); + if (cond.bad() || (u16 != 0)) + return makeOFCondition(OFM_dcmdata, 18, OF_error, "I2DOutputPlugOphthalmicPhotography: Pixel Representation does not fit SOP class"); + + // Insert Presentation LUT Shape + if (cond.good()) + cond = dataset->putAndInsertString(DCM_PresentationLUTShape, "IDENTITY"); + + } + else if ((str == "YBR_FULL_422") || (str == "RGB")) + { + cond = dataset->findAndGetUint16(DCM_SamplesPerPixel, u16); + if (cond.bad() || (u16 != 3)) + return makeOFCondition(OFM_dcmdata, 18, OF_error, "I2DOutputPlugOphthalmicPhotography: Samples Per Pixel does not fit SOP class"); + + cond = dataset->findAndGetUint16(DCM_BitsStored, u16); + if (cond.bad() || (u16 != 8)) + return makeOFCondition(OFM_dcmdata, 18, OF_error, "I2DOutputPlugOphthalmicPhotography: Bits Stored does not fit SOP class"); + + cond = dataset->findAndGetUint16(DCM_HighBit, u16); + if (cond.bad() || (u16 != 7)) + return makeOFCondition(OFM_dcmdata, 18, OF_error, "I2DOutputPlugOphthalmicPhotography: High Bit does not fit SOP class"); + + cond = dataset->findAndGetUint16(DCM_PixelRepresentation, u16); + if (cond.bad() || (u16 != 0)) + return makeOFCondition(OFM_dcmdata, 18, OF_error, "I2DOutputPlugOphthalmicPhotography: Pixel Representation does not fit SOP class"); + + cond = dataset->findAndGetUint16(DCM_PlanarConfiguration, u16); + if (cond.bad() || (u16 != 0)) + return makeOFCondition(OFM_dcmdata, 18, OF_error, "I2DOutputPlugOphthalmicPhotography: Planar Configuration does not fit SOP class"); + } + else + return makeOFCondition(OFM_dcmdata, 18, OF_error, "I2DOutputPlugOphthalmicPhotography: Photometric Interpretation does not fit SOP class"); + + // Insert SOP Class UID + if (cond.good()) + cond = dataset->putAndInsertString(DCM_SOPClassUID, UID_OphthalmicPhotography8BitImageStorage); + + // Lossy Image Compression is Type 1 for this SOP Class. If it is not yet present (i.e. the image was + // not converted from a lossy input format such as JPEG), mark it as not lossy compressed. + if (cond.good() && (! dataset->tagExists(DCM_LossyImageCompression))) + { + cond = dataset->putAndInsertString(DCM_LossyImageCompression, "00"); + } + + return cond; +} + + +OFCondition I2DOutputPlugOphthalmicPhotography::handle16BitImage(DcmDataset *dataset) const +{ + if (!dataset) + return EC_IllegalParameter; + + OFCondition cond; Uint16 u16 = 0; OFString str; + cond = dataset->findAndGetOFStringArray(DCM_PhotometricInterpretation, str); + if (cond.bad()) + return makeOFCondition(OFM_dcmdata, 18, OF_error, "I2DOutputPlugOphthalmicPhotography: Photometric Interpretation not set for Pixel Data"); + if (str == "MONOCHROME2") + { + cond = dataset->findAndGetUint16(DCM_SamplesPerPixel, u16); + if (cond.bad() || (u16 != 1)) + return makeOFCondition(OFM_dcmdata, 18, OF_error, "I2DOutputPlugOphthalmicPhotography: Samples Per Pixel does not fit SOP class"); + + cond = dataset->findAndGetUint16(DCM_BitsStored, u16); + if (cond.bad() || (u16 != 16)) + return makeOFCondition(OFM_dcmdata, 18, OF_error, "I2DOutputPlugOphthalmicPhotography: Bits Stored does not fit SOP class"); + + cond = dataset->findAndGetUint16(DCM_HighBit, u16); + if (cond.bad() || (u16 != 15)) + return makeOFCondition(OFM_dcmdata, 18, OF_error, "I2DOutputPlugOphthalmicPhotography: High Bit does not fit SOP class"); + + cond = dataset->findAndGetUint16(DCM_PixelRepresentation, u16); + if (cond.bad() || (u16 != 0)) + return makeOFCondition(OFM_dcmdata, 18, OF_error, "I2DOutputPlugOphthalmicPhotography: Pixel Representation does not fit SOP class"); + + // Insert Presentation LUT Shape + if (cond.good()) + cond = dataset->putAndInsertString(DCM_PresentationLUTShape, "IDENTITY"); + } + else if ((str == "YBR_FULL_422") || (str == "RGB")) + { + cond = dataset->findAndGetUint16(DCM_SamplesPerPixel, u16); + if (cond.bad() || (u16 != 3)) + return makeOFCondition(OFM_dcmdata, 18, OF_error, "I2DOutputPlugOphthalmicPhotography: Samples Per Pixel does not fit SOP class"); + + cond = dataset->findAndGetUint16(DCM_BitsStored, u16); + if (cond.bad() || (u16 != 16)) + return makeOFCondition(OFM_dcmdata, 18, OF_error, "I2DOutputPlugOphthalmicPhotography: Bits Stored does not fit SOP class"); + + cond = dataset->findAndGetUint16(DCM_HighBit, u16); + if (cond.bad() || (u16 != 15)) + return makeOFCondition(OFM_dcmdata, 18, OF_error, "I2DOutputPlugOphthalmicPhotography: High Bit does not fit SOP class"); + + cond = dataset->findAndGetUint16(DCM_PixelRepresentation, u16); + if (cond.bad() || (u16 != 0)) + return makeOFCondition(OFM_dcmdata, 18, OF_error, "I2DOutputPlugOphthalmicPhotography: Pixel Representation does not fit SOP class"); + + cond = dataset->findAndGetUint16(DCM_PlanarConfiguration, u16); + if (cond.bad() || (u16 != 0)) + return makeOFCondition(OFM_dcmdata, 18, OF_error, "I2DOutputPlugOphthalmicPhotography: Planar Configuration does not fit SOP class"); + } + else + return makeOFCondition(OFM_dcmdata, 18, OF_error, "I2DOutputPlugOphthalmicPhotography: Photometric Interpretation does not fit SOP class"); + + // Insert SOP Class UID + if (cond.good()) + cond = dataset->putAndInsertString(DCM_SOPClassUID, UID_OphthalmicPhotography16BitImageStorage); + + // Lossy Image Compression is Type 1 for this SOP Class. If it is not yet present (i.e. the image was + // not converted from a lossy input format such as JPEG), mark it as not lossy compressed. + if (cond.good() && (! dataset->tagExists(DCM_LossyImageCompression))) + { + cond = dataset->putAndInsertString(DCM_LossyImageCompression, "00"); + } + + return cond; +} + + +OFBool I2DOutputPlugOphthalmicPhotography::supportsMultiframe() const +{ + return OFTrue; +} + + +OFCondition I2DOutputPlugOphthalmicPhotography::insertMultiFrameAttributes( + DcmDataset* targetDataset, + size_t numberOfFrames) const +{ + if ((!targetDataset) || (numberOfFrames == 0)) + return EC_IllegalParameter; + + char numFrames[30]; + char frameTime[30]; + size_t fTime = (numberOfFrames > 1) ? DCMTK_I2D_Default_Frame_Time : 0; + OFStandard::snprintf(numFrames, 30, "%lu", numberOfFrames); + OFStandard::snprintf(frameTime, 30, "%lu", fTime); + OFCondition cond = targetDataset->putAndInsertOFStringArray(DCM_NumberOfFrames, numFrames); + if (cond.good()) cond = targetDataset->putAndInsertOFStringArray(DCM_FrameTime, frameTime); + if (cond.good()) cond = targetDataset->putAndInsertTagKey(DCM_FrameIncrementPointer, DCM_FrameTime); + return cond; +} diff -Nru dcmtk-3.6.6/dcmdata/libi2d/i2dplsc.cc dcmtk-3.6.7/dcmdata/libi2d/i2dplsc.cc --- dcmtk-3.6.6/dcmdata/libi2d/i2dplsc.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/libi2d/i2dplsc.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2001-2010, OFFIS e.V. + * Copyright (C) 2001-2021, 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/libi2d/i2doutpl.h" #include "dcmtk/dcmdata/dcdeftag.h" /* for DCM_ defines */ #include "dcmtk/dcmdata/dcuid.h" /* for UID_ defines */ +#include "dcmtk/dcmdata/dcdatset.h" I2DOutputPlugSC::I2DOutputPlugSC() @@ -32,11 +33,18 @@ DCMDATA_LIBI2D_DEBUG("I2DOutputPlugSC: Output plugin for Secondary Capture initialized"); } + +I2DOutputPlugSC::~I2DOutputPlugSC() +{ +} + + OFString I2DOutputPlugSC::ident() { return "Secondary Capture Image SOP Class"; } + void I2DOutputPlugSC::supportedSOPClassUIDs(OFList& suppSOPs) { suppSOPs.push_back(UID_SecondaryCaptureImageStorage); @@ -67,6 +75,15 @@ } -I2DOutputPlugSC::~I2DOutputPlugSC() +OFBool I2DOutputPlugSC::supportsMultiframe() const +{ + return OFFalse; +} + + +OFCondition I2DOutputPlugSC::insertMultiFrameAttributes( + DcmDataset* /* targetDataset */, + size_t /* numberOfFrames */) const { + return EC_Normal; } diff -Nru dcmtk-3.6.6/dcmdata/libi2d/i2dplvlp.cc dcmtk-3.6.7/dcmdata/libi2d/i2dplvlp.cc --- dcmtk-3.6.6/dcmdata/libi2d/i2dplvlp.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/libi2d/i2dplvlp.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2001-2010, OFFIS e.V. + * Copyright (C) 2001-2022, 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/libi2d/i2dplvlp.h" #include "dcmtk/dcmdata/dcdeftag.h" /* for DCM_ defines */ #include "dcmtk/dcmdata/dcuid.h" /* for UID_ defines */ +#include "dcmtk/dcmdata/dcdatset.h" I2DOutputPlugVLP::I2DOutputPlugVLP() @@ -31,11 +32,18 @@ DCMDATA_LIBI2D_DEBUG("I2DOutputPlugVLP: Output plugin for VLP initialized"); } + +I2DOutputPlugVLP::~I2DOutputPlugVLP() +{ +} + + OFString I2DOutputPlugVLP::ident() { return "Visible Light Photographic Image SOP Class"; } + void I2DOutputPlugVLP::supportedSOPClassUIDs(OFList& suppSOPs) { suppSOPs.push_back(UID_VLPhotographicImageStorage); @@ -45,7 +53,47 @@ OFCondition I2DOutputPlugVLP::convert(DcmDataset &dataset) const { DCMDATA_LIBI2D_DEBUG("I2DOutputPlugVLP: Inserting VLP specific attributes"); - OFCondition cond; + OFCondition cond; Uint16 u16 = 0; OFString str; + + cond = dataset.findAndGetUint16(DCM_BitsAllocated, u16); + if (cond.bad() || (u16 != 8)) + return makeOFCondition(OFM_dcmdata, 18, OF_error, "I2DOutputPlugVLP: Bits Allocated does not fit SOP class"); + + cond = dataset.findAndGetUint16(DCM_BitsStored, u16); + if (cond.bad() || (u16 != 8)) + return makeOFCondition(OFM_dcmdata, 18, OF_error, "I2DOutputPlugVLP: Bits Stored does not fit SOP class"); + + cond = dataset.findAndGetUint16(DCM_HighBit, u16); + if (cond.bad() || (u16 != 7)) + return makeOFCondition(OFM_dcmdata, 18, OF_error, "I2DOutputPlugVLP: High Bit does not fit SOP class"); + + cond = dataset.findAndGetUint16(DCM_PixelRepresentation, u16); + if (cond.bad() || (u16 != 0)) + return makeOFCondition(OFM_dcmdata, 18, OF_error, "I2DOutputPlugVLP: Pixel Representation does not fit SOP class"); + + cond = dataset.findAndGetOFStringArray(DCM_PhotometricInterpretation, str); + if (cond.bad()) + return makeOFCondition(OFM_dcmdata, 18, OF_error, "I2DOutputPlugVLP: Photometric Interpretation not set for Pixel Data"); + + if (str == "MONOCHROME2") + { + cond = dataset.findAndGetUint16(DCM_SamplesPerPixel, u16); + if (cond.bad() || (u16 != 1)) + return makeOFCondition(OFM_dcmdata, 18, OF_error, "I2DOutputPlugVLP: Samples Per Pixel does not fit SOP class"); + } + else if ((str == "YBR_FULL_422") || (str == "RGB")) + { + cond = dataset.findAndGetUint16(DCM_SamplesPerPixel, u16); + if (cond.bad() || (u16 != 3)) + return makeOFCondition(OFM_dcmdata, 18, OF_error, "I2DOutputPlugVLP: Samples Per Pixel does not fit SOP class"); + + cond = dataset.findAndGetUint16(DCM_PlanarConfiguration, u16); + if (cond.bad() || (u16 != 0)) + return makeOFCondition(OFM_dcmdata, 18, OF_error, "I2DOutputPlugVLP: Planar Configuration does not fit SOP class"); + } + else + return makeOFCondition(OFM_dcmdata, 18, OF_error, "I2DOutputPlugVLP: Photometric Interpretation does not fit SOP class"); + cond = dataset.putAndInsertOFStringArray(DCM_SOPClassUID, UID_VLPhotographicImageStorage); if (cond.bad()) return makeOFCondition(OFM_dcmdata, 18, OF_error, "Unable to insert SOP class into dataset"); @@ -80,6 +128,15 @@ } -I2DOutputPlugVLP::~I2DOutputPlugVLP() +OFBool I2DOutputPlugVLP::supportsMultiframe() const { + return OFFalse; +} + + +OFCondition I2DOutputPlugVLP::insertMultiFrameAttributes( + DcmDataset* /* targetDataset */, + size_t /* numberOfFrames */) const +{ + return EC_Normal; } diff -Nru dcmtk-3.6.6/dcmdata/libi2d/Makefile.dep dcmtk-3.6.7/dcmdata/libi2d/Makefile.dep --- dcmtk-3.6.6/dcmdata/libi2d/Makefile.dep 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/libi2d/Makefile.dep 2022-04-28 13:47:25.000000000 +0000 @@ -33,31 +33,31 @@ ../../oflog/include/dcmtk/oflog/logmacro.h \ ../../oflog/include/dcmtk/oflog/helpers/snprintf.h \ ../../oflog/include/dcmtk/oflog/tracelog.h \ - ../include/dcmtk/dcmdata/dcdatset.h ../include/dcmtk/dcmdata/dcitem.h \ - ../../ofstd/include/dcmtk/ofstd/offile.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 \ - ../../ofstd/include/dcmtk/ofstd/oferror.h \ - ../include/dcmtk/dcmdata/dctypes.h ../include/dcmtk/dcmdata/dcdefine.h \ - ../include/dcmtk/dcmdata/dcobject.h \ - ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ - ../../ofstd/include/dcmtk/ofstd/ofthread.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/libi2d/i2define.h \ ../include/dcmtk/dcmdata/libi2d/i2dimgs.h \ + ../include/dcmtk/dcmdata/dcxfer.h ../include/dcmtk/dcmdata/dctypes.h \ + ../include/dcmtk/dcmdata/dcdefine.h ../include/dcmtk/dcmdata/dcvr.h \ + ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ + ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../include/dcmtk/dcmdata/dcpixel.h ../include/dcmtk/dcmdata/dcvrpobw.h \ - ../include/dcmtk/dcmdata/dcvrobow.h ../include/dcmtk/dcmdata/dcpxitem.h \ - ../include/dcmtk/dcmdata/dcofsetl.h ../include/dcmtk/dcmdata/dcfilefo.h \ - ../include/dcmtk/dcmdata/dcsequen.h ../include/dcmtk/dcmdata/dcdeftag.h \ - ../include/dcmtk/dcmdata/dcuid.h ../include/dcmtk/dcmdata/dcpixseq.h \ - ../include/dcmtk/dcmdata/dcpath.h + ../include/dcmtk/dcmdata/dcvrobow.h ../include/dcmtk/dcmdata/dcelem.h \ + ../include/dcmtk/dcmdata/dcobject.h ../include/dcmtk/dcmdata/dcerror.h \ + ../include/dcmtk/dcmdata/dctag.h ../include/dcmtk/dcmdata/dctagkey.h \ + ../include/dcmtk/dcmdata/dcstack.h ../include/dcmtk/dcmdata/dcofsetl.h \ + ../include/dcmtk/dcmdata/dcpxitem.h ../include/dcmtk/dcmdata/dcfilefo.h \ + ../include/dcmtk/dcmdata/dcsequen.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 \ + ../include/dcmtk/dcmdata/dclist.h ../include/dcmtk/dcmdata/dcdatset.h \ + ../include/dcmtk/dcmdata/dcitem.h ../include/dcmtk/dcmdata/dcpcache.h \ + ../include/dcmtk/dcmdata/dcdeftag.h ../include/dcmtk/dcmdata/dcuid.h \ + ../include/dcmtk/dcmdata/dcpixseq.h ../include/dcmtk/dcmdata/dcpath.h \ + ../include/dcmtk/dcmdata/xml2dcm.h i2dbmps.o: i2dbmps.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmdata/libi2d/i2dbmps.h \ ../include/dcmtk/dcmdata/libi2d/i2dimgs.h \ @@ -106,15 +106,11 @@ ../../config/include/dcmtk/config/arith.h \ ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../include/dcmtk/dcmdata/dcerror.h \ - ../include/dcmtk/dcmdata/libi2d/i2doutpl.h \ - ../include/dcmtk/dcmdata/dcdatset.h ../include/dcmtk/dcmdata/dcitem.h \ - ../include/dcmtk/dcmdata/dcobject.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 -i2djpgs.o: i2djpgs.cc ../../config/include/dcmtk/config/osconfig.h \ - ../include/dcmtk/dcmdata/libi2d/i2djpgs.h \ - ../../ofstd/include/dcmtk/ofstd/offile.h \ + ../include/dcmtk/dcmdata/libi2d/i2doutpl.h +i2djpgs.o: i2djpgs.cc ../include/dcmtk/dcmdata/libi2d/i2djpgs.h \ + ../../config/include/dcmtk/config/osconfig.h \ + ../include/dcmtk/dcmdata/libi2d/i2dimgs.h \ + ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ @@ -122,14 +118,6 @@ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.h \ - ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oflist.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/libi2d/i2dimgs.h \ ../include/dcmtk/dcmdata/dcxfer.h ../include/dcmtk/dcmdata/dctypes.h \ ../../oflog/include/dcmtk/oflog/oflog.h \ ../../oflog/include/dcmtk/oflog/logger.h \ @@ -144,6 +132,7 @@ ../../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 \ @@ -159,12 +148,66 @@ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../include/dcmtk/dcmdata/libi2d/i2define.h \ + ../../ofstd/include/dcmtk/ofstd/offile.h \ + ../../ofstd/include/dcmtk/ofstd/ofstd.h \ + ../../ofstd/include/dcmtk/ofstd/oflist.h \ + ../../ofstd/include/dcmtk/ofstd/oflimits.h \ + ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ + ../include/dcmtk/dcmdata/dcerror.h \ + ../include/dcmtk/dcmdata/libi2d/i2doutpl.h +i2doutpl.o: i2doutpl.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmdata/libi2d/i2doutpl.h \ + ../../oflog/include/dcmtk/oflog/oflog.h \ + ../../oflog/include/dcmtk/oflog/logger.h \ + ../../oflog/include/dcmtk/oflog/config.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 \ + ../../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 \ + ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofstream.h \ + ../../oflog/include/dcmtk/oflog/tstring.h \ + ../../ofstd/include/dcmtk/ofstd/ofstring.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/oflist.h \ + ../../ofstd/include/dcmtk/ofstd/ofcond.h \ + ../include/dcmtk/dcmdata/libi2d/i2define.h \ ../include/dcmtk/dcmdata/dcdatset.h ../include/dcmtk/dcmdata/dcitem.h \ - ../include/dcmtk/dcmdata/dcobject.h ../include/dcmtk/dcmdata/dcerror.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 + ../../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 \ + ../include/dcmtk/dcmdata/dctypes.h ../include/dcmtk/dcmdata/dcdefine.h \ + ../include/dcmtk/dcmdata/dcobject.h \ + ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ + ../../ofstd/include/dcmtk/ofstd/ofthread.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/dcdeftag.h i2dplnsc.o: i2dplnsc.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmdata/libi2d/i2dplnsc.h \ ../include/dcmtk/dcmdata/libi2d/i2doutpl.h \ @@ -200,25 +243,80 @@ ../../oflog/include/dcmtk/oflog/logmacro.h \ ../../oflog/include/dcmtk/oflog/helpers/snprintf.h \ ../../oflog/include/dcmtk/oflog/tracelog.h \ + ../../ofstd/include/dcmtk/ofstd/oflist.h \ + ../../ofstd/include/dcmtk/ofstd/ofcond.h \ + ../include/dcmtk/dcmdata/libi2d/i2define.h \ + ../include/dcmtk/dcmdata/dcdeftag.h ../include/dcmtk/dcmdata/dctagkey.h \ + ../include/dcmtk/dcmdata/dcdefine.h ../include/dcmtk/dcmdata/dcuid.h \ ../include/dcmtk/dcmdata/dcdatset.h ../include/dcmtk/dcmdata/dcitem.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 \ + ../include/dcmtk/dcmdata/dctypes.h ../include/dcmtk/dcmdata/dcobject.h \ + ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ + ../../ofstd/include/dcmtk/ofstd/ofthread.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/dclist.h \ + ../include/dcmtk/dcmdata/dcpcache.h +i2dplop.o: i2dplop.cc ../../config/include/dcmtk/config/osconfig.h \ + ../include/dcmtk/dcmdata/libi2d/i2dplop.h \ + ../include/dcmtk/dcmdata/libi2d/i2doutpl.h \ + ../../oflog/include/dcmtk/oflog/oflog.h \ + ../../oflog/include/dcmtk/oflog/logger.h \ + ../../oflog/include/dcmtk/oflog/config.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 \ + ../../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 \ + ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofstream.h \ + ../../oflog/include/dcmtk/oflog/tstring.h \ + ../../ofstd/include/dcmtk/ofstd/ofstring.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/oflist.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ + ../include/dcmtk/dcmdata/libi2d/i2define.h \ + ../include/dcmtk/dcmdata/dcdeftag.h ../include/dcmtk/dcmdata/dctagkey.h \ + ../include/dcmtk/dcmdata/dcdefine.h ../include/dcmtk/dcmdata/dcuid.h \ + ../../ofstd/include/dcmtk/ofstd/ofdatime.h \ + ../../ofstd/include/dcmtk/ofstd/ofdate.h \ + ../../ofstd/include/dcmtk/ofstd/oftime.h \ + ../include/dcmtk/dcmdata/dcdatset.h ../include/dcmtk/dcmdata/dcitem.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 \ - ../include/dcmtk/dcmdata/dctypes.h ../include/dcmtk/dcmdata/dcdefine.h \ - ../include/dcmtk/dcmdata/dcobject.h \ + ../include/dcmtk/dcmdata/dctypes.h ../include/dcmtk/dcmdata/dcobject.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.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/libi2d/i2define.h \ - ../include/dcmtk/dcmdata/dcdeftag.h ../include/dcmtk/dcmdata/dcuid.h + ../include/dcmtk/dcmdata/dcstack.h ../include/dcmtk/dcmdata/dclist.h \ + ../include/dcmtk/dcmdata/dcpcache.h i2dplsc.o: i2dplsc.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmdata/libi2d/i2dplsc.h \ ../include/dcmtk/dcmdata/libi2d/i2doutpl.h \ @@ -254,25 +352,24 @@ ../../oflog/include/dcmtk/oflog/logmacro.h \ ../../oflog/include/dcmtk/oflog/helpers/snprintf.h \ ../../oflog/include/dcmtk/oflog/tracelog.h \ + ../../ofstd/include/dcmtk/ofstd/oflist.h \ + ../../ofstd/include/dcmtk/ofstd/ofcond.h \ + ../include/dcmtk/dcmdata/libi2d/i2define.h \ + ../include/dcmtk/dcmdata/dcdeftag.h ../include/dcmtk/dcmdata/dctagkey.h \ + ../include/dcmtk/dcmdata/dcdefine.h ../include/dcmtk/dcmdata/dcuid.h \ ../include/dcmtk/dcmdata/dcdatset.h ../include/dcmtk/dcmdata/dcitem.h \ ../../ofstd/include/dcmtk/ofstd/offile.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 \ ../../ofstd/include/dcmtk/ofstd/oferror.h \ - ../include/dcmtk/dcmdata/dctypes.h ../include/dcmtk/dcmdata/dcdefine.h \ - ../include/dcmtk/dcmdata/dcobject.h \ + ../include/dcmtk/dcmdata/dctypes.h ../include/dcmtk/dcmdata/dcobject.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.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/libi2d/i2define.h \ - ../include/dcmtk/dcmdata/dcdeftag.h ../include/dcmtk/dcmdata/dcuid.h + ../include/dcmtk/dcmdata/dcstack.h ../include/dcmtk/dcmdata/dclist.h \ + ../include/dcmtk/dcmdata/dcpcache.h i2dplvlp.o: i2dplvlp.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmdata/libi2d/i2dplvlp.h \ ../include/dcmtk/dcmdata/libi2d/i2doutpl.h \ @@ -308,22 +405,21 @@ ../../oflog/include/dcmtk/oflog/logmacro.h \ ../../oflog/include/dcmtk/oflog/helpers/snprintf.h \ ../../oflog/include/dcmtk/oflog/tracelog.h \ + ../../ofstd/include/dcmtk/ofstd/oflist.h \ + ../../ofstd/include/dcmtk/ofstd/ofcond.h \ + ../include/dcmtk/dcmdata/libi2d/i2define.h \ + ../include/dcmtk/dcmdata/dcdeftag.h ../include/dcmtk/dcmdata/dctagkey.h \ + ../include/dcmtk/dcmdata/dcdefine.h ../include/dcmtk/dcmdata/dcuid.h \ ../include/dcmtk/dcmdata/dcdatset.h ../include/dcmtk/dcmdata/dcitem.h \ ../../ofstd/include/dcmtk/ofstd/offile.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 \ ../../ofstd/include/dcmtk/ofstd/oferror.h \ - ../include/dcmtk/dcmdata/dctypes.h ../include/dcmtk/dcmdata/dcdefine.h \ - ../include/dcmtk/dcmdata/dcobject.h \ + ../include/dcmtk/dcmdata/dctypes.h ../include/dcmtk/dcmdata/dcobject.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.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/libi2d/i2define.h \ - ../include/dcmtk/dcmdata/dcdeftag.h ../include/dcmtk/dcmdata/dcuid.h + ../include/dcmtk/dcmdata/dcstack.h ../include/dcmtk/dcmdata/dclist.h \ + ../include/dcmtk/dcmdata/dcpcache.h diff -Nru dcmtk-3.6.6/dcmdata/libi2d/Makefile.in dcmtk-3.6.7/dcmdata/libi2d/Makefile.in --- dcmtk-3.6.6/dcmdata/libi2d/Makefile.in 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/libi2d/Makefile.in 2022-04-28 13:47:25.000000000 +0000 @@ -19,7 +19,7 @@ LOCALINCLUDES = -I$(ofstddir)/include -I$(dcmdatadir)/include -I$(oflogdir)/include LOCALDEFS = -objs = i2d.o i2dplvlp.o i2djpgs.o i2dbmps.o i2dplsc.o i2dplnsc.o +objs = i2d.o i2dplvlp.o i2djpgs.o i2dbmps.o i2dplsc.o i2dplnsc.o i2dplop.o i2doutpl.o library = libi2d.$(LIBEXT) diff -Nru dcmtk-3.6.6/dcmdata/libsrc/CMakeLists.txt dcmtk-3.6.7/dcmdata/libsrc/CMakeLists.txt --- dcmtk-3.6.6/dcmdata/libsrc/CMakeLists.txt 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/libsrc/CMakeLists.txt 2022-04-28 13:47:25.000000000 +0000 @@ -1,20 +1,105 @@ # create library from source files include_directories("${CMAKE_CURRENT_SOURCE_DIR}") +include_directories(${LIBXML_INCDIR}) DCMTK_ADD_LIBRARY(dcmdata - cmdlnarg dcbytstr dcchrstr dccodec dcdatset dcdatutl dcddirif dcdicdir dcdicent - dcdict dcdictbi dcdirrec dcelem dcencdoc dcerror dcfilefo dcfilter dchashdi dcistrma - dcistrmb dcistrmf dcistrmz dcitem dcjson dclist dcmatch dcmetinf dcobject dcostrma - dcostrmb dcostrmf dcostrmz dcpath dcpcache dcpixel dcpixseq dcpxitem dcrleccd - dcrlecce dcrlecp dcrledrg dcrleerg dcrlerp dcsequen dcspchrs dcstack dcswap dctag - dctagkey dctypes dcuid dcvr dcvrae dcvras dcvrat dcvrcs dcvrda dcvrds dcvrdt - dcvrfd dcvrfl dcvris dcvrlo dcvrlt dcvrobow dcvrod dcvrof dcvrol dcvrov dcvrpn - dcvrpobw dcvrsh dcvrsl dcvrss dcvrst dcvrsv dcvrtm dcvruc dcvrui dcvrul dcvrulup - dcvrur dcvrus dcvrut dcvruv dcwcache dcxfer vrscan vrscanl) + cmdlnarg.cc + dcbytstr.cc + dcchrstr.cc + dccodec.cc + dcdatset.cc + dcdatutl.cc + dcddirif.cc + dcdicdir.cc + dcdicent.cc + dcdict.cc + dcdictbi.cc + dcdirrec.cc + dcelem.cc + dcencdoc.cc + dcerror.cc + dcfilefo.cc + dcfilter.cc + dchashdi.cc + dcistrma.cc + dcistrmb.cc + dcistrmf.cc + dcistrms.cc + dcistrmz.cc + dcitem.cc + dcjson.cc + dclist.cc + dcmatch.cc + dcmetinf.cc + dcobject.cc + dcostrma.cc + dcostrmb.cc + dcostrmf.cc + dcostrms.cc + dcostrmz.cc + dcpath.cc + dcpcache.cc + dcpixel.cc + dcpixseq.cc + dcpxitem.cc + dcrleccd.cc + dcrlecce.cc + dcrlecp.cc + dcrledrg.cc + dcrleerg.cc + dcrlerp.cc + dcsequen.cc + dcspchrs.cc + dcstack.cc + dcswap.cc + dctag.cc + dctagkey.cc + dctypes.cc + dcuid.cc + dcvr.cc + dcvrae.cc + dcvras.cc + dcvrat.cc + dcvrcs.cc + dcvrda.cc + dcvrds.cc + dcvrdt.cc + dcvrfd.cc + dcvrfl.cc + dcvris.cc + dcvrlo.cc + dcvrlt.cc + dcvrobow.cc + dcvrod.cc + dcvrof.cc + dcvrol.cc + dcvrov.cc + dcvrpn.cc + dcvrpobw.cc + dcvrsh.cc + dcvrsl.cc + dcvrss.cc + dcvrst.cc + dcvrsv.cc + dcvrtm.cc + dcvruc.cc + dcvrui.cc + dcvrul.cc + dcvrulup.cc + dcvrur.cc + dcvrus.cc + dcvrut.cc + dcvruv.cc + dcwcache.cc + dcxfer.cc + vrscan.cc + vrscanl.c + xml2dcm.cc +) DCMTK_TARGET_LINK_MODULES(dcmdata ofstd oflog) -DCMTK_TARGET_LINK_LIBRARIES(dcmdata ${ZLIB_LIBS}) +DCMTK_TARGET_LINK_LIBRARIES(dcmdata ${ZLIB_LIBS} ${LIBXML_LIBS}) # Various dictionary-related commands set(DICOMDIC "${dcmdata_SOURCE_DIR}/data/dicom.dic") @@ -23,8 +108,26 @@ if(BUILD_APPS) # don't use DCMTK_ADD_EXECUTABLE() since we don't want to install the files - add_executable(mkdictbi EXCLUDE_FROM_ALL mkdictbi dctagkey dcdicent dcdict dcvr dchashdi cmdlnarg dctypes) - add_executable(mkdeftag EXCLUDE_FROM_ALL mkdeftag dctagkey dcdicent dcdict dcvr dchashdi cmdlnarg dctypes) + add_executable(mkdictbi EXCLUDE_FROM_ALL + cmdlnarg.cc + dcdicent.cc + dcdict.cc + dchashdi.cc + dctagkey.cc + dctypes.cc + dcvr.cc + mkdictbi.cc + ) + add_executable(mkdeftag EXCLUDE_FROM_ALL + cmdlnarg.cc + dcdicent.cc + dcdict.cc + dchashdi.cc + dctagkey.cc + dctypes.cc + dcvr.cc + mkdeftag.cc + ) # workaround for Visual Studio to disable dll storage specifiers when linking directly into the executable. # this is needed since the built-in dictionary code is created by the tools below and thus those tools # statically link the few required dcmdata source files instead of linking to dcmdata as a whole. diff -Nru dcmtk-3.6.6/dcmdata/libsrc/cmdlnarg.cc dcmtk-3.6.7/dcmdata/libsrc/cmdlnarg.cc --- dcmtk-3.6.6/dcmdata/libsrc/cmdlnarg.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/libsrc/cmdlnarg.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1996-2018, OFFIS e.V. + * Copyright (C) 1996-2021, 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/cmdlnarg.h" #include "dcmtk/dcmdata/dctypes.h" +#include "dcmtk/ofstd/ofconsol.h" /* ** prepareCmdLineArgs @@ -35,11 +36,6 @@ #ifdef HAVE_EMPTY_ARGC_ARGV -#define INCLUDE_CSTDLIB -#define INCLUDE_CSTDIO -#define INCLUDE_CSTRING -#include "dcmtk/ofstd/ofstdinc.h" - #include "dcmtk/ofstd/ofstream.h" #include "dcmtk/ofstd/ofstd.h" @@ -76,10 +72,10 @@ #else // HAVE_EMPTY_ARGC_ARGV -#define INCLUDE_CSTDLIB -#define INCLUDE_CSTDIO -#define INCLUDE_CSTRING -#include "dcmtk/ofstd/ofstdinc.h" +// #define INCLUDE_CSTDLIB +// #define INCLUDE_CSTDIO +// #define INCLUDE_CSTRING +// #include "dcmtk/ofstd/ofstdinc.h" #ifdef HAVE_IO_H #include @@ -100,53 +96,24 @@ #ifdef _WIN32 #ifndef DCMTK_GUI #ifndef __CYGWIN__ - /* Map stderr onto stdout (cannot redirect stderr under Windows). - * Remove any buffering (windows uses a 2k buffer for stdout when not - * writing to the console. since dcmtk uses mixed stdout, stderr - * cout and cerr, this results in _very_ mixed up output). - */ - /* first of all, check whether stderr and stdout file descriptors are - * already the same, e.g. from a previous call of this function +#ifdef DCMTK_MERGE_STDERR_TO_STDOUT + /* Map stderr onto stdout (cannot redirect stderr under Windows). + * We also remove any buffering since Windows by default uses buffered mode + * for stdout when not writing to the console. Since dcmtk uses mixed + * stdout, stderr, cout and cerr, this results in _very_ mixed up output). */ - if (fileno(stderr) != fileno(stdout)) - { - /* duplicate the stderr file descriptor to be the same as stdout */ - close(fileno(stderr)); - int fderr = dup(fileno(stdout)); - if (fderr != fileno(stderr)) - { - DCMDATA_ERROR("INTERNAL ERROR: cannot map stderr to stdout: " - << OFStandard::getLastSystemErrorCode().message()); - } - } - - /* make stdout the same as stderr */ - *stdout = *stderr; + OFConsole::mergeStderrStdout(); +#endif #ifdef USE_BINARY_MODE_FOR_STDOUT_ON_WINDOWS /* use binary mode for stdout in order to be more consistent with common Unix behavior */ setmode(fileno(stdout), O_BINARY); #endif -#ifndef __BORLANDC__ /* setvbuf on stdout/stderr does not work with Borland C++ */ - /* make sure the buffering is removed */ - if (setvbuf(stdout, NULL, _IONBF, 0 ) != 0 ) - { - DCMDATA_ERROR("INTERNAL ERROR: cannot unbuffer stdout: " - << OFStandard::getLastSystemErrorCode().message()); - } - if (setvbuf(stderr, NULL, _IONBF, 0 ) != 0 ) - { - DCMDATA_ERROR("INTERNAL ERROR: cannot unbuffer stderr: " - << OFStandard::getLastSystemErrorCode().message()); - } -#endif /* __BORLANDC__ */ #endif #endif #endif - - /* no need to process the arguments */ } diff -Nru dcmtk-3.6.6/dcmdata/libsrc/dcbytstr.cc dcmtk-3.6.7/dcmdata/libsrc/dcbytstr.cc --- dcmtk-3.6.6/dcmdata/libsrc/dcbytstr.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/libsrc/dcbytstr.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1994-2019, OFFIS e.V. + * Copyright (C) 1994-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -29,13 +29,6 @@ #include "dcmtk/dcmdata/dcvr.h" #include "dcmtk/dcmdata/dcmatch.h" -#define INCLUDE_CSTDLIB -#define INCLUDE_CSTDIO -#define INCLUDE_CSTRING -#define INCLUDE_NEW -#include "dcmtk/ofstd/ofstdinc.h" - - // global flags OFGlobal dcmEnableVRCheckerForStringValues(OFTrue); diff -Nru dcmtk-3.6.6/dcmdata/libsrc/dcchrstr.cc dcmtk-3.6.7/dcmdata/libsrc/dcchrstr.cc --- dcmtk-3.6.6/dcmdata/libsrc/dcchrstr.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/libsrc/dcchrstr.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1994-2019, OFFIS e.V. + * Copyright (C) 1994-2022, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -267,7 +267,8 @@ const OFString& DcmCharString::getDelimiterChars() const { - return DcmVR(EVR_UN).getDelimiterChars(); + /* use actual VR of this class (including derived ones) */ + return DcmVR(ident()).getDelimiterChars(); } diff -Nru dcmtk-3.6.6/dcmdata/libsrc/dcdatset.cc dcmtk-3.6.7/dcmdata/libsrc/dcdatset.cc --- dcmtk-3.6.6/dcmdata/libsrc/dcdatset.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/libsrc/dcdatset.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1994-2020, OFFIS e.V. + * Copyright (C) 1994-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -22,11 +22,6 @@ #include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ -#define INCLUDE_CSTDLIB -#define INCLUDE_CSTDIO -#define INCLUDE_CSTRING -#include "dcmtk/ofstd/ofstdinc.h" - #include "dcmtk/ofstd/ofstream.h" #include "dcmtk/ofstd/ofstack.h" #include "dcmtk/ofstd/ofstd.h" @@ -37,10 +32,12 @@ #include "dcmtk/dcmdata/dcvrus.h" #include "dcmtk/dcmdata/dcpixel.h" #include "dcmtk/dcmdata/dcdeftag.h" -#include "dcmtk/dcmdata/dcostrma.h" /* for class DcmOutputStream */ -#include "dcmtk/dcmdata/dcostrmf.h" /* for class DcmOutputFileStream */ #include "dcmtk/dcmdata/dcistrma.h" /* for class DcmInputStream */ #include "dcmtk/dcmdata/dcistrmf.h" /* for class DcmInputFileStream */ +#include "dcmtk/dcmdata/dcistrms.h" /* for class DcmStdinStream */ +#include "dcmtk/dcmdata/dcostrma.h" /* for class DcmOutputStream */ +#include "dcmtk/dcmdata/dcostrmf.h" /* for class DcmOutputFileStream */ +#include "dcmtk/dcmdata/dcostrms.h" /* for class DcmStdoutStream */ #include "dcmtk/dcmdata/dcwcache.h" /* for class DcmWriteCache */ @@ -647,23 +644,50 @@ /* check parameters first */ if (!fileName.isEmpty()) { - /* open file for input */ - DcmInputFileStream fileStream(fileName); - - /* check stream status */ - l_error = fileStream.status(); - - if (l_error.good()) + if (fileName.isStandardStream()) { + /* use stdin stream */ + DcmStdinStream inStream; + /* clear this object */ l_error = clear(); if (l_error.good()) { - /* read data from file */ + /* initialize transfer */ transferInit(); - l_error = readUntilTag(fileStream, readXfer, groupLength, maxReadLength, stopParsingAtElement); + + do + { + /* fill the buffer from stdin */ + inStream.fillBuffer(); + /* and read the buffer content into the DICOM dataset */ + l_error = readUntilTag(inStream, readXfer, groupLength, maxReadLength, stopParsingAtElement); + } while (l_error == EC_StreamNotifyClient); /* repeat until we're at the end of the stream, or an error occurs */ + + /* end transfer */ transferEnd(); } + + } else { + /* open file for input */ + DcmInputFileStream fileStream(fileName); + + /* check stream status */ + l_error = fileStream.status(); + + if (l_error.good()) + { + /* clear this object */ + l_error = clear(); + if (l_error.good()) + { + /* read data from file */ + transferInit(); + l_error = readUntilTag(fileStream, readXfer, groupLength, maxReadLength, stopParsingAtElement); + transferEnd(); + } + } + } } return l_error; @@ -683,18 +707,27 @@ if (!fileName.isEmpty()) { DcmWriteCache wcache; - /* open file for output */ - DcmOutputFileStream fileStream(fileName); + DcmOutputStream *fileStream; + + if (fileName.isStandardStream()) + { + /* use stdout stream */ + fileStream = new DcmStdoutStream(fileName); + } else { + /* open file for output */ + fileStream = new DcmOutputFileStream(fileName); + } /* check stream status */ - l_error = fileStream.status(); + l_error = fileStream->status(); if (l_error.good()) { /* write data to file */ transferInit(); - l_error = write(fileStream, writeXfer, encodingType, &wcache, groupLength, padEncoding, padLength, subPadLength); + l_error = write(*fileStream, writeXfer, encodingType, &wcache, groupLength, padEncoding, padLength, subPadLength); transferEnd(); } + delete fileStream; } return l_error; } diff -Nru dcmtk-3.6.6/dcmdata/libsrc/dcddirif.cc dcmtk-3.6.7/dcmdata/libsrc/dcddirif.cc --- dcmtk-3.6.6/dcmdata/libsrc/dcddirif.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/libsrc/dcddirif.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2002-2020, OFFIS e.V. + * Copyright (C) 2002-2022, 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 */ -#define INCLUDE_CSTDIO -#define INCLUDE_CCTYPE -#include "dcmtk/ofstd/ofstdinc.h" - #include "dcmtk/dcmdata/dcddirif.h" #include "dcmtk/dcmdata/dcdeftag.h" #include "dcmtk/dcmdata/dcuid.h" @@ -83,7 +79,12 @@ int count = (length > 0) ? 1 : 0; for (size_t i = 0; i < length; i++) { +#ifdef _WIN32 + // Windows accepts both backslash and forward slash as path separators. + if ((filename.at(i) == separator) || (filename.at(i) == '/')) +#else if (filename.at(i) == separator) +#endif count++; } return count; @@ -102,6 +103,11 @@ { size_t pos1 = 0; size_t pos2 = filename.find(separator); +#ifdef _WIN32 + // Windows accepts both backslash and forward slash as path separators. + size_t pos3 = filename.find('/'); + if ((pos2 == OFString_npos) || ((pos3 != OFString_npos) && (pos3 < pos2))) pos2 = pos3; +#endif while (pos2 != OFString_npos) { /* check whether component length is within limit */ @@ -112,6 +118,10 @@ } pos1 = pos2 + 1; pos2 = filename.find(separator, pos1); +#ifdef _WIN32 + pos3 = filename.find('/', pos1); + if ((pos2 == OFString_npos) || ((pos3 != OFString_npos) && (pos3 < pos2))) pos2 = pos3; +#endif } if (!result) { @@ -143,6 +153,10 @@ { c = filename.at(i); if ((c == '_') || isdigit(c) || (c == separator) || +#ifdef _WIN32 + /* Windows accepts both backslash and forward slash as path separators. */ + (c == '/') || +#endif (isalpha(c) && (isupper(c) || (islower(c) && mapFilenames)))) { /* all ok */ @@ -170,7 +184,12 @@ for (size_t i = 0; i < length; i++) { const unsigned char c = hostFilename.at(i); +#ifdef _WIN32 + // Windows accepts both backslash and forward slash as path separators. + if ((c == PATH_SEPARATOR) || (c == '/')) +#else if (c == PATH_SEPARATOR) +#endif { /* the PATH_SEPARATOR depends on the OS (see ) */ dicomFilename += '\\'; @@ -627,6 +646,12 @@ case ERT_Assessment: recordName = "Assessment"; break; + case ERT_Radiotherapy: + recordName = "Radiotherapy"; + break; + case ERT_Annotation: + recordName = "Annotation"; + break; default: recordName = "(unknown-directory-record-type)"; break; @@ -662,6 +687,7 @@ compare(sopClass, UID_ChestCADSRStorage) || compare(sopClass, UID_ColonCADSRStorage) || compare(sopClass, UID_XRayRadiationDoseSRStorage) || + compare(sopClass, UID_EnhancedXRayRadiationDoseSRStorage) || compare(sopClass, UID_RadiopharmaceuticalRadiationDoseSRStorage) || compare(sopClass, UID_SpectaclePrescriptionReportStorage) || compare(sopClass, UID_MacularGridThicknessAndVolumeReportStorage) || @@ -797,10 +823,14 @@ compare(sopClass, UID_RTRadiationSalvageRecordStorage) || compare(sopClass, UID_TomotherapeuticRadiationRecordStorage) || compare(sopClass, UID_CArmPhotonElectronRadiationRecordStorage) || - compare(sopClass, UID_RoboticRadiationRecordStorage)) + compare(sopClass, UID_RoboticRadiationRecordStorage) || + compare(sopClass, UID_RTRadiationSetDeliveryInstructionStorage) || + compare(sopClass, UID_RTTreatmentPreparationStorage)) { result = ERT_Radiotherapy; } + else if (compare(sopClass, UID_MicroscopyBulkSimpleAnnotationsStorage)) + result = ERT_Annotation; return result; } @@ -990,6 +1020,7 @@ case ERT_Tract: case ERT_Assessment: case ERT_Radiotherapy: + case ERT_Annotation: /* try to insert based on InstanceNumber */ result = insertWithISCriterion(parent, child, DCM_InstanceNumber); break; @@ -1220,32 +1251,40 @@ const OFString &filesetID) { OFCondition result = EC_IllegalParameter; - if (!filename.isEmpty() && checkFilesetID(filesetID)) + /* check parameters */ + if (!filename.isEmpty()) { - FilesetUpdateMode = OFFalse; - /* first remove any existing DICOMDIR from memory */ - cleanup(); - /* then create a backup if a DICOMDIR file already exists */ - if (OFStandard::fileExists(filename)) - { - if (BackupMode) - createDicomDirBackup(filename); - /* and delete it because otherwise DcmDicomDir will parse it - and try to append to existing records */ - OFStandard::deleteFile(filename); - } - /* select new application profile */ - result = selectApplicationProfile(profile); - if (result.good()) - { - DCMDATA_INFO("creating DICOMDIR file using " << getProfileName(ApplicationProfile) - << " profile: " << filename); - /* finally, create a new DICOMDIR object */ - DicomDir = new DcmDicomDir(filename, filesetID.c_str()); - if (DicomDir != NULL) - result = DicomDir->error(); - else - result = EC_MemoryExhausted; + /* remove leading and trailing spaces */ + OFString normalizedFilesetID(filesetID); + normalizeString(normalizedFilesetID, OFFalse /*multiPart*/, OFTrue /*leading*/, OFTrue /*trailing*/); + /* check for invalid characters and maximum length */ + if (checkFilesetID(normalizedFilesetID)) + { + FilesetUpdateMode = OFFalse; + /* first remove any existing DICOMDIR from memory */ + cleanup(); + /* then create a backup if a DICOMDIR file already exists */ + if (OFStandard::fileExists(filename)) + { + if (BackupMode) + createDicomDirBackup(filename); + /* and delete it because otherwise DcmDicomDir will parse it + and try to append to existing records */ + OFStandard::deleteFile(filename); + } + /* select new application profile */ + result = selectApplicationProfile(profile); + if (result.good()) + { + DCMDATA_INFO("creating DICOMDIR file using " << getProfileName(ApplicationProfile) + << " profile: " << filename); + /* finally, create a new DICOMDIR object */ + DicomDir = new DcmDicomDir(filename, normalizedFilesetID.c_str()); + if (DicomDir != NULL) + result = DicomDir->error(); + else + result = EC_MemoryExhausted; + } } } return result; @@ -1384,6 +1423,10 @@ size_t invalidChar = 0; /* check whether the file name path is ok and in local format */ if ((fname[0] == PATH_SEPARATOR) /* absolute path? */ || +#ifdef _WIN32 + /* Windows accepts both backslash and forward slash as path separators. */ + (fname[0] == '/') || +#endif locateInvalidFilenameChars(fname, invalidChar, MapFilenamesMode)) { DCMDATA_ERROR("invalid character(s) in filename: " << fname << OFendl @@ -1599,6 +1642,7 @@ compare(mediaSOPClassUID, UID_ChestCADSRStorage) || compare(mediaSOPClassUID, UID_ColonCADSRStorage) || compare(mediaSOPClassUID, UID_XRayRadiationDoseSRStorage) || + compare(mediaSOPClassUID, UID_EnhancedXRayRadiationDoseSRStorage) || compare(mediaSOPClassUID, UID_RadiopharmaceuticalRadiationDoseSRStorage) || compare(mediaSOPClassUID, UID_SpectaclePrescriptionReportStorage) || compare(mediaSOPClassUID, UID_MacularGridThicknessAndVolumeReportStorage) || @@ -1700,7 +1744,8 @@ compare(mediaSOPClassUID, UID_StereometricRelationshipStorage) || compare(mediaSOPClassUID, UID_ColorPaletteStorage) || compare(mediaSOPClassUID, UID_TractographyResultsStorage) || - compare(mediaSOPClassUID, UID_ContentAssessmentResultsStorage); + compare(mediaSOPClassUID, UID_ContentAssessmentResultsStorage) || + compare(mediaSOPClassUID, UID_MicroscopyBulkSimpleAnnotationsStorage); } /* the following SOP classes have been retired with previous editions of the DICOM standard */ if (!found && RetiredSOPClassSupport) @@ -2523,7 +2568,7 @@ result = EC_MissingAttribute; } /* StudyDescription is type 2 in DICOMDIR and type 3 in images. - We can create an empty attribute in the directory + We can create an empty attribute in the directory. */ /* StudyInstanceUID is type 1 in DICOMDIR and images */ if (!checkExistsWithValue(dataset, DCM_StudyInstanceUID, filename)) @@ -2534,10 +2579,11 @@ if (!checkExistsWithValue(dataset, DCM_StudyID, filename)) result = EC_MissingAttribute; } - /* AccessionNumber is type 2 in DICOMDIR and type 3 in images - We can create an empty attribute in the directory + /* AccessionNumber is type 2 in DICOMDIR and type 3 in images. + We can create an empty attribute in the directory. */ - /* Modality is type 1 in DICOMDIR and type 1 in images */ + /* Modality is type 1 in DICOMDIR and type 1 in images + * (apart from SC Equipment Module where it is type 3) */ if (!checkExistsWithValue(dataset, DCM_Modality, filename)) result = EC_MissingAttribute; /* SeriesInstanceUID is type 1 in DICOMDIR and type 1 in images */ @@ -2722,6 +2768,7 @@ case ERT_Surface: case ERT_Measurement: case ERT_Tract: + case ERT_Annotation: if (!checkExistsWithValue(dataset, DCM_InstanceNumber, filename)) result = EC_MissingAttribute; if (!checkExistsWithValue(dataset, DCM_ContentDate, filename)) @@ -3001,6 +3048,7 @@ case ERT_Tract: case ERT_Assessment: case ERT_Radiotherapy: + case ERT_Annotation: /* The attribute ReferencedSOPInstanceUID is automatically * put into a Directory Record when a filename is present. */ @@ -4164,7 +4212,7 @@ const OFString &referencedFileID, const OFFilename &sourceFilename) { - /* create new surface record */ + /* create new tract record */ if (record == NULL) record = new DcmDirectoryRecord(ERT_Tract, referencedFileID.c_str(), sourceFilename, fileformat); if (record != NULL) @@ -4198,7 +4246,7 @@ const OFString &referencedFileID, const OFFilename &sourceFilename) { - /* create new surface record */ + /* create new assessment record */ if (record == NULL) record = new DcmDirectoryRecord(ERT_Assessment, referencedFileID.c_str(), sourceFilename, fileformat); if (record != NULL) @@ -4229,7 +4277,7 @@ const OFString &referencedFileID, const OFFilename &sourceFilename) { - /* create new surface record */ + /* create new radiotherapy record */ if (record == NULL) record = new DcmDirectoryRecord(ERT_Radiotherapy, referencedFileID.c_str(), sourceFilename, fileformat); if (record != NULL) @@ -4256,6 +4304,39 @@ } +DcmDirectoryRecord *DicomDirInterface::buildAnnotationRecord(DcmDirectoryRecord *record, + DcmFileFormat *fileformat, + const OFString &referencedFileID, + const OFFilename &sourceFilename) +{ + /* create new annotation record */ + if (record == NULL) + record = new DcmDirectoryRecord(ERT_Annotation, referencedFileID.c_str(), sourceFilename, fileformat); + if (record != NULL) + { + /* check whether new record is ok */ + if (record->error().good()) + { + DcmDataset *dataset = fileformat->getDataset(); + /* copy attribute values from dataset to annotation record */ + copyElementType1(dataset, DCM_InstanceNumber, record, sourceFilename); + copyElementType1(dataset, DCM_ContentDate, record, sourceFilename); + copyElementType1(dataset, DCM_ContentTime, record, sourceFilename); + copyElementType1(dataset, DCM_ContentLabel, record, sourceFilename); + copyElementType2(dataset, DCM_ContentDescription, record, sourceFilename); + copyElementType2(dataset, DCM_ContentCreatorName, record, sourceFilename); + } else { + printRecordErrorMessage(record->error(), ERT_Annotation, "create"); + /* free memory */ + delete record; + record = NULL; + } + } else + printRecordErrorMessage(EC_MemoryExhausted, ERT_Annotation, "create"); + return record; +} + + // create or update image record and copy required values from dataset DcmDirectoryRecord *DicomDirInterface::buildImageRecord(DcmDirectoryRecord *record, DcmFileFormat *fileformat, @@ -4692,6 +4773,9 @@ case ERT_Radiotherapy: record = buildRadiotherapyRecord(record, fileformat, referencedFileID, sourceFilename); break; + case ERT_Annotation: + record = buildAnnotationRecord(record, fileformat, referencedFileID, sourceFilename); + break; default: /* it can only be an image */ record = buildImageRecord(record, fileformat, referencedFileID, sourceFilename); @@ -5465,7 +5549,8 @@ { size_t invalidChar = 0; /* are the characters ok? */ - if (!DcmCodeString::checkVR(filesetID, &invalidChar, OFFalse /*checkLength*/)) + if (!DcmCodeString::checkVR(filesetID, &invalidChar, OFFalse /*checkLength*/) || + ((invalidChar = filesetID.find_first_of(' ')) != OFString_npos) /* spaces not allowed */) { /* create error message */ DCMDATA_ERROR("invalid character(s) in file-set ID: " << filesetID << OFendl @@ -5859,7 +5944,8 @@ /* check parameters first */ if ((dataset != NULL) && (record != NULL)) { - DcmSequenceOfItems *seq1, *seq2; + DcmSequenceOfItems *seq1 = NULL; + DcmSequenceOfItems *seq2 = NULL; /* compare sequence value from dataset and record */ if (record->findAndGetSequence(key, seq1).good() && dataset->findAndGetSequence(key, seq2).good()) diff -Nru dcmtk-3.6.6/dcmdata/libsrc/dcdicdir.cc dcmtk-3.6.7/dcmdata/libsrc/dcdicdir.cc --- dcmtk-3.6.6/dcmdata/libsrc/dcdicdir.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/libsrc/dcdicdir.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1994-2019, OFFIS e.V. + * Copyright (C) 1994-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -22,12 +22,6 @@ #include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ -#define INCLUDE_CSTDLIB -#define INCLUDE_CSTDIO -#define INCLUDE_LIBC -#define INCLUDE_UNISTD -#include "dcmtk/ofstd/ofstdinc.h" - #ifdef HAVE_UNIX_H #if defined(macintosh) && defined (HAVE_WINSOCK_H) /* unix.h defines timeval incompatible with winsock.h */ @@ -1029,10 +1023,12 @@ DcmTag unresSeqTag(DCM_DirectoryRecordSequence); DcmSequenceOfItems localUnresRecs(unresSeqTag); - // insert Media Stored SOP Class UID + // insert Media Storage SOP Class UID insertMediaSOPUID(metainfo); - getDirFileFormat().validateMetaInfo(outxfer); + // add missing information such as Media Storage SOP Instance UID, + // but do not overwrite the value of Media Storage SOP Class UID + getDirFileFormat().validateMetaInfo(outxfer, EWM_fileformat); { // it is important that the cache object is destroyed before the file is renamed! diff -Nru dcmtk-3.6.6/dcmdata/libsrc/dcdicent.cc dcmtk-3.6.7/dcmdata/libsrc/dcdicent.cc --- dcmtk-3.6.6/dcmdata/libsrc/dcdicent.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/libsrc/dcdicent.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1994-2018, OFFIS e.V. + * Copyright (C) 1994-2021, 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 */ -#define INCLUDE_CSTDIO -#define INCLUDE_CSTRING -#include "dcmtk/ofstd/ofstdinc.h" - #include "dcmtk/dcmdata/dcdicent.h" #include "dcmtk/ofstd/ofstd.h" diff -Nru dcmtk-3.6.6/dcmdata/libsrc/dcdictbi.cc dcmtk-3.6.7/dcmdata/libsrc/dcdictbi.cc --- dcmtk-3.6.6/dcmdata/libsrc/dcdictbi.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/libsrc/dcdictbi.cc 2022-04-28 13:47:25.000000000 +0000 @@ -3,8 +3,8 @@ ** It was generated automatically by: ** ** User: joergr -** Host: thinkpad -** Date: 2020-11-24 14:49:53 +** Host: thinkpad2 +** Date: 2022-04-12 12:43:37 ** Prog: /home/joergr/Source/dcmtk-full/public/dcmdata/libsrc/mkdictbi ** ** From: ../data/dicom.dic @@ -13,7 +13,7 @@ */ #include "dcmtk/dcmdata/dcdict.h" -#ifdef ENABLE_BUILTIN_DICTIONARY +#if DCM_DICT_DEFAULT == DCM_DICT_DEFAULT_USE_BUILTIN #include "dcmtk/dcmdata/dcdicent.h" struct DBI_SimpleEntry { @@ -468,10 +468,18 @@ EVR_UI, "SOPClassUID", 1, 1, "DICOM", DcmDictRange_Unspecified, DcmDictRange_Unspecified, NULL } + , { 0x0008, 0x0017, 0x0008, 0x0017, + EVR_UI, "AcquisitionUID", 1, 1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } , { 0x0008, 0x0018, 0x0008, 0x0018, EVR_UI, "SOPInstanceUID", 1, 1, "DICOM", DcmDictRange_Unspecified, DcmDictRange_Unspecified, NULL } + , { 0x0008, 0x0019, 0x0008, 0x0019, + EVR_UI, "PyramidUID", 1, 1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } , { 0x0008, 0x001a, 0x0008, 0x001a, EVR_UI, "RelatedGeneralSOPClassUID", 1, -1, "DICOM", DcmDictRange_Unspecified, DcmDictRange_Unspecified, @@ -912,6 +920,10 @@ EVR_SQ, "AdmittingDiagnosesCodeSequence", 1, 1, "DICOM", DcmDictRange_Unspecified, DcmDictRange_Unspecified, NULL } + , { 0x0008, 0x1088, 0x0008, 0x1088, + EVR_LO, "PyramidDescription", 1, 1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } , { 0x0008, 0x1090, 0x0008, 0x1090, EVR_LO, "ManufacturerModelName", 1, 1, "DICOM", DcmDictRange_Unspecified, DcmDictRange_Unspecified, @@ -3342,6 +3354,14 @@ EVR_LT, "CalibrationNotes", 1, 1, "DICOM/DICONDE", DcmDictRange_Unspecified, DcmDictRange_Unspecified, NULL } + , { 0x0014, 0x3100, 0x0014, 0x3100, + EVR_LT, "LinearityCorrectionTechnique", 1, 1, "DICOM/DICONDE", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } + , { 0x0014, 0x3101, 0x0014, 0x3101, + EVR_LT, "BeamHardeningCorrectionTechnique", 1, 1, "DICOM/DICONDE", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } , { 0x0014, 0x4002, 0x0014, 0x4002, EVR_SQ, "PulserEquipmentSequence", 1, 1, "DICOM/DICONDE", DcmDictRange_Unspecified, DcmDictRange_Unspecified, @@ -3663,15 +3683,15 @@ DcmDictRange_Unspecified, DcmDictRange_Unspecified, NULL } , { 0x0014, 0x40a0, 0x0014, 0x40a0, - EVR_LO, "ImageQualityIndicatorType", 1, 1, "DICOM/DICONDE", + EVR_LO, "ImageQualityIndicatorType", 1, -1, "DICOM/DICONDE", DcmDictRange_Unspecified, DcmDictRange_Unspecified, NULL } , { 0x0014, 0x40a1, 0x0014, 0x40a1, - EVR_LO, "ImageQualityIndicatorMaterial", 1, 1, "DICOM/DICONDE", + EVR_LO, "ImageQualityIndicatorMaterial", 1, -1, "DICOM/DICONDE", DcmDictRange_Unspecified, DcmDictRange_Unspecified, NULL } , { 0x0014, 0x40a2, 0x0014, 0x40a2, - EVR_LO, "ImageQualityIndicatorSize", 1, 1, "DICOM/DICONDE", + EVR_LO, "ImageQualityIndicatorSize", 1, -1, "DICOM/DICONDE", DcmDictRange_Unspecified, DcmDictRange_Unspecified, NULL } , { 0x0014, 0x5002, 0x0014, 0x5002, @@ -4962,6 +4982,78 @@ EVR_DS, "CompressionContactArea", 1, 1, "DICOM", DcmDictRange_Unspecified, DcmDictRange_Unspecified, NULL } + , { 0x0018, 0x11b0, 0x0018, 0x11b0, + EVR_LO, "AcquisitionMode", 1, 1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } + , { 0x0018, 0x11b1, 0x0018, 0x11b1, + EVR_LO, "DoseModeName", 1, 1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } + , { 0x0018, 0x11b2, 0x0018, 0x11b2, + EVR_CS, "AcquiredSubtractionMaskFlag", 1, 1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } + , { 0x0018, 0x11b3, 0x0018, 0x11b3, + EVR_CS, "FluoroscopyPersistenceFlag", 1, 1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } + , { 0x0018, 0x11b4, 0x0018, 0x11b4, + EVR_CS, "FluoroscopyLastImageHoldPersistenceFlag", 1, 1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } + , { 0x0018, 0x11b5, 0x0018, 0x11b5, + EVR_IS, "UpperLimitNumberOfPersistentFluoroscopyFrames", 1, 1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } + , { 0x0018, 0x11b6, 0x0018, 0x11b6, + EVR_CS, "ContrastBolusAutoInjectionTriggerFlag", 1, 1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } + , { 0x0018, 0x11b7, 0x0018, 0x11b7, + EVR_FD, "ContrastBolusInjectionDelay", 1, 1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } + , { 0x0018, 0x11b8, 0x0018, 0x11b8, + EVR_SQ, "XAAcquisitionPhaseDetailsSequence", 1, 1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } + , { 0x0018, 0x11b9, 0x0018, 0x11b9, + EVR_FD, "XAAcquisitionFrameRate", 1, 1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } + , { 0x0018, 0x11ba, 0x0018, 0x11ba, + EVR_SQ, "XAPlaneDetailsSequence", 1, 1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } + , { 0x0018, 0x11bb, 0x0018, 0x11bb, + EVR_LO, "AcquisitionFieldOfViewLabel", 1, 1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } + , { 0x0018, 0x11bc, 0x0018, 0x11bc, + EVR_SQ, "XRayFilterDetailsSequence", 1, 1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } + , { 0x0018, 0x11bd, 0x0018, 0x11bd, + EVR_FD, "XAAcquisitionDuration", 1, 1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } + , { 0x0018, 0x11be, 0x0018, 0x11be, + EVR_CS, "ReconstructionPipelineType", 1, 1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } + , { 0x0018, 0x11bf, 0x0018, 0x11bf, + EVR_SQ, "ImageFilterDetailsSequence", 1, 1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } + , { 0x0018, 0x11c0, 0x0018, 0x11c0, + EVR_CS, "AppliedMaskSubtractionFlag", 1, 1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } + , { 0x0018, 0x11c1, 0x0018, 0x11c1, + EVR_SQ, "RequestedSeriesDescriptionCodeSequence", 1, 1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } , { 0x0018, 0x1200, 0x0018, 0x1200, EVR_DA, "DateOfLastCalibration", 1, -1, "DICOM", DcmDictRange_Unspecified, DcmDictRange_Unspecified, @@ -4974,6 +5066,10 @@ EVR_DT, "DateTimeOfLastCalibration", 1, 1, "DICOM", DcmDictRange_Unspecified, DcmDictRange_Unspecified, NULL } + , { 0x0018, 0x1203, 0x0018, 0x1203, + EVR_DT, "CalibrationDateTime", 1, 1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } , { 0x0018, 0x1210, 0x0018, 0x1210, EVR_SH, "ConvolutionKernel", 1, -1, "DICOM", DcmDictRange_Unspecified, DcmDictRange_Unspecified, @@ -5638,6 +5734,10 @@ EVR_FL, "RWaveTimeVector", 1, -1, "DICOM", DcmDictRange_Unspecified, DcmDictRange_Unspecified, NULL } + , { 0x0018, 0x6070, 0x0018, 0x6070, + EVR_US, "ActiveImageAreaOverlayGroup", 1, 1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } , { 0x0018, 0x7000, 0x0018, 0x7000, EVR_CS, "DetectorConditionsNominalFlag", 1, 1, "DICOM", DcmDictRange_Unspecified, DcmDictRange_Unspecified, @@ -6555,7 +6655,7 @@ DcmDictRange_Unspecified, DcmDictRange_Unspecified, NULL } , { 0x0018, 0x9324, 0x0018, 0x9324, - EVR_FD, "EstimatedDoseSaving", 1, 1, "DICOM", + EVR_FD, "RETIRED_EstimatedDoseSaving", 1, 1, "DICOM/retired", DcmDictRange_Unspecified, DcmDictRange_Unspecified, NULL } , { 0x0018, 0x9325, 0x0018, 0x9325, @@ -12004,6 +12104,10 @@ EVR_IS, "RETIRED_LUTNumber", 1, 1, "DICOM/retired", DcmDictRange_Unspecified, DcmDictRange_Unspecified, NULL } + , { 0x0020, 0x0027, 0x0020, 0x0027, + EVR_LO, "PyramidLabel", 1, 1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } , { 0x0020, 0x0030, 0x0020, 0x0030, EVR_DS, "RETIRED_ImagePosition", 3, 3, "DICOM/retired", DcmDictRange_Unspecified, DcmDictRange_Unspecified, @@ -14211,7 +14315,7 @@ DcmDictRange_Unspecified, DcmDictRange_Unspecified, NULL } , { 0x0022, 0x1642, 0x0022, 0x1642, - EVR_UL, "NumberofBscansPerFrame", 1, 1, "DICOM", + EVR_UL, "NumberOfBscansPerFrame", 1, 1, "DICOM", DcmDictRange_Unspecified, DcmDictRange_Unspecified, NULL } , { 0x0022, 0x1643, 0x0022, 0x1643, @@ -18220,6 +18324,10 @@ EVR_SQ, "RequestedProcedureCodeSequence", 1, 1, "DICOM", DcmDictRange_Unspecified, DcmDictRange_Unspecified, NULL } + , { 0x0032, 0x1065, 0x0032, 0x1065, + EVR_SQ, "RequestedLateralityCodeSequence", 1, 1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } , { 0x0032, 0x1066, 0x0032, 0x1066, EVR_UT, "ReasonForVisit", 1, 1, "DICOM", DcmDictRange_Unspecified, DcmDictRange_Unspecified, @@ -19462,6 +19570,10 @@ EVR_DT, "ObservationDateTime", 1, 1, "DICOM", DcmDictRange_Unspecified, DcmDictRange_Unspecified, NULL } + , { 0x0040, 0xa033, 0x0040, 0xa033, + EVR_DT, "ObservationStartDateTime", 1, 1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } , { 0x0040, 0xa040, 0x0040, 0xa040, EVR_CS, "ValueType", 1, 1, "DICOM", DcmDictRange_Unspecified, DcmDictRange_Unspecified, @@ -19851,7 +19963,7 @@ DcmDictRange_Unspecified, DcmDictRange_Unspecified, NULL } , { 0x0040, 0xa803, 0x0040, 0xa803, - EVR_UL, "NumbeOfTableColumns", 1, 1, "DICOM", + EVR_UL, "NumberOfTableColumns", 1, 1, "DICOM", DcmDictRange_Unspecified, DcmDictRange_Unspecified, NULL } , { 0x0040, 0xa804, 0x0040, 0xa804, @@ -21559,15 +21671,15 @@ DcmDictRange_Unspecified, DcmDictRange_Unspecified, NULL } , { 0x0048, 0x0200, 0x0048, 0x0200, - EVR_SQ, "ReferencedImageNavigationSequence", 1, 1, "DICOM", + EVR_SQ, "RETIRED_ReferencedImageNavigationSequence", 1, 1, "DICOM/retired", DcmDictRange_Unspecified, DcmDictRange_Unspecified, NULL } , { 0x0048, 0x0201, 0x0048, 0x0201, - EVR_US, "TopLeftHandCornerOfLocalizerArea", 2, 2, "DICOM", + EVR_US, "RETIRED_TopLeftHandCornerOfLocalizerArea", 2, 2, "DICOM/retired", DcmDictRange_Unspecified, DcmDictRange_Unspecified, NULL } , { 0x0048, 0x0202, 0x0048, 0x0202, - EVR_US, "BottomRightHandCornerOfLocalizerArea", 2, 2, "DICOM", + EVR_US, "RETIRED_BottomRightHandCornerOfLocalizerArea", 2, 2, "DICOM/retired", DcmDictRange_Unspecified, DcmDictRange_Unspecified, NULL } , { 0x0048, 0x0207, 0x0048, 0x0207, @@ -22167,7 +22279,7 @@ DcmDictRange_Unspecified, DcmDictRange_Unspecified, NULL } , { 0x0062, 0x0009, 0x0062, 0x0009, - EVR_LO, "SegmentAlgorithmName", 1, 1, "DICOM", + EVR_LO, "SegmentAlgorithmName", 1, -1, "DICOM", DcmDictRange_Unspecified, DcmDictRange_Unspecified, NULL } , { 0x0062, 0x000a, 0x0062, 0x000a, @@ -22354,6 +22466,10 @@ EVR_OF, "VectorCoordinateData", 1, 1, "DICOM", DcmDictRange_Unspecified, DcmDictRange_Unspecified, NULL } + , { 0x0066, 0x0022, 0x0066, 0x0022, + EVR_OD, "DoublePointCoordinatesData", 1, 1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } , { 0x0066, 0x0023, 0x0066, 0x0023, EVR_OW, "RETIRED_TrianglePointIndexList", 1, 1, "DICOM/retired", DcmDictRange_Unspecified, DcmDictRange_Unspecified, @@ -22818,6 +22934,70 @@ EVR_UR, "RelativeURIReferenceWithinEncapsulatedDocument", 1, 1, "DICOM", DcmDictRange_Unspecified, DcmDictRange_Unspecified, NULL } + , { 0x006a, 0x0001, 0x006a, 0x0001, + EVR_CS, "AnnotationCoordinateType", 1, 1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } + , { 0x006a, 0x0002, 0x006a, 0x0002, + EVR_SQ, "AnnotationGroupSequence", 1, 1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } + , { 0x006a, 0x0003, 0x006a, 0x0003, + EVR_UI, "AnnotationGroupUID", 1, 1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } + , { 0x006a, 0x0005, 0x006a, 0x0005, + EVR_LO, "AnnotationGroupLabel", 1, 1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } + , { 0x006a, 0x0006, 0x006a, 0x0006, + EVR_UT, "AnnotationGroupDescription", 1, 1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } + , { 0x006a, 0x0007, 0x006a, 0x0007, + EVR_CS, "AnnotationGroupGenerationType", 1, 1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } + , { 0x006a, 0x0008, 0x006a, 0x0008, + EVR_SQ, "AnnotationGroupAlgorithmIdentificationSequence", 1, 1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } + , { 0x006a, 0x0009, 0x006a, 0x0009, + EVR_SQ, "AnnotationPropertyCategoryCodeSequence", 1, 1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } + , { 0x006a, 0x000a, 0x006a, 0x000a, + EVR_SQ, "AnnotationPropertyTypeCodeSequence", 1, 1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } + , { 0x006a, 0x000b, 0x006a, 0x000b, + EVR_SQ, "AnnotationPropertyTypeModifierCodeSequence", 1, 1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } + , { 0x006a, 0x000c, 0x006a, 0x000c, + EVR_UL, "NumberOfAnnotations", 1, 1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } + , { 0x006a, 0x000d, 0x006a, 0x000d, + EVR_CS, "AnnotationAppliesToAllOpticalPaths", 1, 1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } + , { 0x006a, 0x000e, 0x006a, 0x000e, + EVR_SH, "ReferencedOpticalPathIdentifier", 1, -1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } + , { 0x006a, 0x000f, 0x006a, 0x000f, + EVR_CS, "AnnotationAppliesToAllZPlanes", 1, 1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } + , { 0x006a, 0x0010, 0x006a, 0x0010, + EVR_FD, "CommonZCoordinateValue", 1, -1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } + , { 0x006a, 0x0011, 0x006a, 0x0011, + EVR_OL, "AnnotationIndexList", 1, 1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } , { 0x0070, 0x0001, 0x0070, 0x0001, EVR_SQ, "GraphicAnnotationSequence", 1, 1, "DICOM", DcmDictRange_Unspecified, DcmDictRange_Unspecified, @@ -25917,11 +26097,11 @@ DcmDictRange_Unspecified, DcmDictRange_Unspecified, NULL } , { 0x2130, 0x00a0, 0x2130, 0x00a0, - EVR_SQ, "RETIRED_ProposedStudySequence", 1, 1, "DICOM/retired", + EVR_SQ, "ProposedStudySequence", 1, 1, "DICOM", DcmDictRange_Unspecified, DcmDictRange_Unspecified, NULL } , { 0x2130, 0x00c0, 0x2130, 0x00c0, - EVR_SQ, "RETIRED_OriginalImageSequence", 1, 1, "DICOM/retired", + EVR_SQ, "OriginalImageSequence", 1, 1, "DICOM", DcmDictRange_Unspecified, DcmDictRange_Unspecified, NULL } , { 0x2200, 0x0001, 0x2200, 0x0001, @@ -26285,11 +26465,11 @@ DcmDictRange_Unspecified, DcmDictRange_Unspecified, NULL } , { 0x3006, 0x0044, 0x3006, 0x0044, - EVR_DS, "ContourSlabThickness", 1, 1, "DICOM", + EVR_DS, "RETIRED_ContourSlabThickness", 1, 1, "DICOM/retired", DcmDictRange_Unspecified, DcmDictRange_Unspecified, NULL } , { 0x3006, 0x0045, 0x3006, 0x0045, - EVR_DS, "ContourOffsetVector", 3, 3, "DICOM", + EVR_DS, "RETIRED_ContourOffsetVector", 3, 3, "DICOM/retired", DcmDictRange_Unspecified, DcmDictRange_Unspecified, NULL } , { 0x3006, 0x0046, 0x3006, 0x0046, @@ -26301,7 +26481,11 @@ DcmDictRange_Unspecified, DcmDictRange_Unspecified, NULL } , { 0x3006, 0x0049, 0x3006, 0x0049, - EVR_IS, "AttachedContours", 1, -1, "DICOM", + EVR_IS, "RETIRED_AttachedContours", 1, -1, "DICOM/retired", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } + , { 0x3006, 0x004a, 0x3006, 0x004a, + EVR_SQ, "SourcePixelPlanesCharacteristicsSequence", 1, 1, "DICOM", DcmDictRange_Unspecified, DcmDictRange_Unspecified, NULL } , { 0x3006, 0x0050, 0x3006, 0x0050, @@ -26628,6 +26812,10 @@ EVR_SQ, "RecordedBlockSequence", 1, 1, "DICOM", DcmDictRange_Unspecified, DcmDictRange_Unspecified, NULL } + , { 0x3008, 0x00d1, 0x3008, 0x00d1, + EVR_SQ, "RecordedBlockSlabSequence", 1, 1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } , { 0x3008, 0x00e0, 0x3008, 0x00e0, EVR_SQ, "TreatmentSummaryMeasuredDoseReferenceSequence", 1, 1, "DICOM", DcmDictRange_Unspecified, DcmDictRange_Unspecified, @@ -26813,7 +27001,7 @@ DcmDictRange_Unspecified, DcmDictRange_Unspecified, NULL } , { 0x300a, 0x000b, 0x300a, 0x000b, - EVR_LO, "TreatmentSites", 1, -1, "DICOM", + EVR_LO, "RETIRED_TreatmentSites", 1, -1, "DICOM/retired", DcmDictRange_Unspecified, DcmDictRange_Unspecified, NULL } , { 0x300a, 0x000c, 0x300a, 0x000c, @@ -27880,6 +28068,10 @@ EVR_DS, "SourceApplicatorStepSize", 1, 1, "DICOM", DcmDictRange_Unspecified, DcmDictRange_Unspecified, NULL } + , { 0x300a, 0x02a1, 0x300a, 0x02a1, + EVR_IS, "ApplicatorShapeReferencedROINumber", 1, 1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } , { 0x300a, 0x02a2, 0x300a, 0x02a2, EVR_IS, "TransferTubeNumber", 1, 1, "DICOM", DcmDictRange_Unspecified, DcmDictRange_Unspecified, @@ -28593,7 +28785,7 @@ DcmDictRange_Unspecified, DcmDictRange_Unspecified, NULL } , { 0x300a, 0x0632, 0x300a, 0x0632, - EVR_SQ, "ReferencedRTPatientSetupSequence", 1, 1, "DICOM", + EVR_SQ, "RETIRED_ReferencedRTPatientSetupSequence", 1, 1, "DICOM/retired", DcmDictRange_Unspecified, DcmDictRange_Unspecified, NULL } , { 0x300a, 0x0634, 0x300a, 0x0634, @@ -28709,7 +28901,7 @@ DcmDictRange_Unspecified, DcmDictRange_Unspecified, NULL } , { 0x300a, 0x0650, 0x300a, 0x0650, - EVR_UI, "PatientSetupUID", 1, 1, "DICOM", + EVR_UI, "RETIRED_PatientSetupUID", 1, 1, "DICOM/retired", DcmDictRange_Unspecified, DcmDictRange_Unspecified, NULL } , { 0x300a, 0x0651, 0x300a, 0x0651, @@ -29108,6 +29300,114 @@ EVR_ST, "InterlockOriginDescription", 1, 1, "DICOM", DcmDictRange_Unspecified, DcmDictRange_Unspecified, NULL } + , { 0x300a, 0x0784, 0x300a, 0x0784, + EVR_SQ, "RTPatientPositionScopeSequence", 1, 1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } + , { 0x300a, 0x0785, 0x300a, 0x0785, + EVR_UI, "ReferencedTreatmentPositionGroupUID", 1, 1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } + , { 0x300a, 0x0786, 0x300a, 0x0786, + EVR_US, "RadiationOrderIndex", 1, 1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } + , { 0x300a, 0x0787, 0x300a, 0x0787, + EVR_SQ, "OmittedRadiationSequence", 1, 1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } + , { 0x300a, 0x0788, 0x300a, 0x0788, + EVR_SQ, "ReasonForOmissionCodeSequence", 1, 1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } + , { 0x300a, 0x0789, 0x300a, 0x0789, + EVR_SQ, "RTDeliveryStartPatientPositionSequence", 1, 1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } + , { 0x300a, 0x078a, 0x300a, 0x078a, + EVR_SQ, "RTTreatmentPreparationPatientPositionSequence", 1, 1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } + , { 0x300a, 0x078b, 0x300a, 0x078b, + EVR_SQ, "ReferencedRTTreatmentPreparationSequence", 1, 1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } + , { 0x300a, 0x078c, 0x300a, 0x078c, + EVR_SQ, "ReferencedPatientSetupPhotoSequence", 1, 1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } + , { 0x300a, 0x078d, 0x300a, 0x078d, + EVR_SQ, "PatientTreatmentPreparationMethodCodeSequence", 1, 1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } + , { 0x300a, 0x078e, 0x300a, 0x078e, + EVR_LT, "PatientTreatmentPreparationProcedureParameterDescription", 1, 1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } + , { 0x300a, 0x078f, 0x300a, 0x078f, + EVR_SQ, "PatientTreatmentPreparationDeviceSequence", 1, 1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } + , { 0x300a, 0x0790, 0x300a, 0x0790, + EVR_SQ, "PatientTreatmentPreparationProcedureSequence", 1, 1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } + , { 0x300a, 0x0791, 0x300a, 0x0791, + EVR_SQ, "PatientTreatmentPreparationProcedureCodeSequence", 1, 1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } + , { 0x300a, 0x0792, 0x300a, 0x0792, + EVR_LT, "PatientTreatmentPreparationMethodDescription", 1, 1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } + , { 0x300a, 0x0793, 0x300a, 0x0793, + EVR_SQ, "PatientTreatmentPreparationProcedureParameterSequence", 1, 1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } + , { 0x300a, 0x0794, 0x300a, 0x0794, + EVR_LT, "PatientSetupPhotoDescription", 1, 1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } + , { 0x300a, 0x0795, 0x300a, 0x0795, + EVR_US, "PatientTreatmentPreparationProcedureIndex", 1, 1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } + , { 0x300a, 0x0796, 0x300a, 0x0796, + EVR_US, "ReferencedPatientSetupProcedureIndex", 1, 1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } + , { 0x300a, 0x0797, 0x300a, 0x0797, + EVR_SQ, "RTRadiationTaskSequence", 1, 1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } + , { 0x300a, 0x0798, 0x300a, 0x0798, + EVR_SQ, "RTPatientPositionDisplacementSequence", 1, 1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } + , { 0x300a, 0x0799, 0x300a, 0x0799, + EVR_SQ, "RTPatientPositionSequence", 1, 1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } + , { 0x300a, 0x079a, 0x300a, 0x079a, + EVR_LO, "DisplacementReferenceLabel", 1, 1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } + , { 0x300a, 0x079b, 0x300a, 0x079b, + EVR_FD, "DisplacementMatrix", 16, 16, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } + , { 0x300a, 0x079c, 0x300a, 0x079c, + EVR_SQ, "PatientSupportDisplacementSequence", 1, 1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } + , { 0x300a, 0x079d, 0x300a, 0x079d, + EVR_SQ, "DisplacementReferenceLocationCodeSequence", 1, 1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } + , { 0x300a, 0x079e, 0x300a, 0x079e, + EVR_CS, "RTRadiationSetDeliveryUsage", 1, 1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } , { 0x300c, 0x0002, 0x300c, 0x0002, EVR_SQ, "ReferencedRTPlanSequence", 1, 1, "DICOM", DcmDictRange_Unspecified, DcmDictRange_Unspecified, @@ -29244,6 +29544,66 @@ EVR_LO, "ReasonForOmissionDescription", 1, 1, "DICOM", DcmDictRange_Unspecified, DcmDictRange_Unspecified, NULL } + , { 0x300c, 0x0114, 0x300c, 0x0114, + EVR_SQ, "PrescriptionOverviewSequence", 1, 1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } + , { 0x300c, 0x0115, 0x300c, 0x0115, + EVR_FL, "TotalPrescriptionDose", 1, 1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } + , { 0x300c, 0x0116, 0x300c, 0x0116, + EVR_SQ, "PlanOverviewSequence", 1, 1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } + , { 0x300c, 0x0117, 0x300c, 0x0117, + EVR_US, "PlanOverviewIndex", 1, 1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } + , { 0x300c, 0x0118, 0x300c, 0x0118, + EVR_US, "ReferencedPlanOverviewIndex", 1, 1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } + , { 0x300c, 0x0119, 0x300c, 0x0119, + EVR_US, "NumberOfFractionsIncluded", 1, 1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } + , { 0x300c, 0x0120, 0x300c, 0x0120, + EVR_SQ, "DoseCalibrationConditionsSequence", 1, 1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } + , { 0x300c, 0x0121, 0x300c, 0x0121, + EVR_FD, "AbsorbedDoseToMetersetRatio", 1, 1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } + , { 0x300c, 0x0122, 0x300c, 0x0122, + EVR_FD, "DelineatedRadiationFieldSize", 2, 2, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } + , { 0x300c, 0x0123, 0x300c, 0x0123, + EVR_CS, "DoseCalibrationConditionsVerifiedFlag", 1, 1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } + , { 0x300c, 0x0124, 0x300c, 0x0124, + EVR_FD, "CalibrationReferencePointDepth", 1, 1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } + , { 0x300c, 0x0125, 0x300c, 0x0125, + EVR_SQ, "GatingBeamHoldTransitionSequence", 1, 1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } + , { 0x300c, 0x0126, 0x300c, 0x0126, + EVR_CS, "BeamHoldTransition", 1, 1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } + , { 0x300c, 0x0127, 0x300c, 0x0127, + EVR_DT, "BeamHoldTransitionDateTime", 1, 1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } + , { 0x300c, 0x0128, 0x300c, 0x0128, + EVR_SQ, "BeamHoldOriginatingDeviceSequence", 1, 1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } , { 0x300e, 0x0002, 0x300e, 0x0002, EVR_CS, "ApprovalStatus", 1, 1, "DICOM", DcmDictRange_Unspecified, DcmDictRange_Unspecified, @@ -31081,7 +31441,7 @@ } -#else // WITH_BUILTIN_DICTIONARY +#else // DCM_DICT_DEFAULT == DCM_DICT_DEFAULT_USE_BUILTIN void DcmDataDictionary::loadBuiltinDictionary() { @@ -31089,10 +31449,11 @@ ** Empty Stub. ** ** We don't want a populated built-in data dictionary. In order to enable it, - ** define WITH_BUILTIN_DICTIONARY. To re-create the builtin dictionary from - ** a textfile like dicom.dic, use dcmdata/libsrc/mkdictbi. + ** define DCM_DICT_DEFAULT == DCM_DICT_DEFAULT_USE_BUILTIN (1). + ** To re-create the builtin dictionary from a textfile like dicom.dic, + ** use dcmdata/libsrc/mkdictbi. */ } -#endif // WITH_BUILTIN_DICTIONARY +#endif // DCM_DICT_DEFAULT == DCM_DICT_DEFAULT_USE_BUILTIN diff -Nru dcmtk-3.6.6/dcmdata/libsrc/dcdict.cc dcmtk-3.6.7/dcmdata/libsrc/dcdict.cc --- dcmtk-3.6.6/dcmdata/libsrc/dcdict.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/libsrc/dcdict.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1994-2019, OFFIS e.V. + * Copyright (C) 1994-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -30,12 +30,6 @@ #include "dcmtk/ofstd/ofstd.h" #include "dcmtk/ofstd/offile.h" -#define INCLUDE_CSTDLIB -#define INCLUDE_CSTDIO -#define INCLUDE_CSTRING -#define INCLUDE_CCTYPE -#include "dcmtk/ofstd/ofstdinc.h" - /* ** The separator character between fields in the data dictionary file(s) */ @@ -46,6 +40,7 @@ */ #define DCM_DICT_COMMENT_CHAR '#' + /* ** THE Global DICOM Data Dictionary */ @@ -116,15 +111,6 @@ skeletonCount(0), dictionaryLoaded(OFFalse) { - /* Make sure any DCMDICTPATH dictionary is loaded even if loading - * of external (default) dictionary is not enabled. - */ - if (!loadExternal) - { - const char* env = getenv(DCM_DICT_ENVIRONMENT_VARIABLE); - if ((env != NULL) && (strlen(env) != 0)) - loadExternal = OFTrue; - } reloadDictionaries(loadBuiltin, loadExternal); } @@ -152,7 +138,7 @@ unsigned char *t; unsigned char *p; t=p=OFreinterpret_cast(unsigned char *, s); - while ((c = *t++)) if (!isspace(c)) *p++ = c; + while ((c = *t++) != '\0') if (!isspace(c)) *p++ = c; *p = '\0'; } } @@ -180,7 +166,7 @@ unsigned char *p; t=p=OFreinterpret_cast(unsigned char *, s); while (isspace(*t)) t++; - while ((c = *t++)) *p++ = c; + while ((c = *t++) != '\0') *p++ = c; *p = '\0'; } } @@ -602,15 +588,25 @@ const char* env = NULL; size_t len; int sepCnt = 0; - OFBool msgIfDictAbsent = OFTrue; OFBool loadFailed = OFFalse; + /* if DCMDICTPATH environment variable should be considered, read it */ +#ifdef DCM_DICT_USE_DCMDICTPATH env = getenv(DCM_DICT_ENVIRONMENT_VARIABLE); +#endif + /* if DCMDICTPATH environment variable is not set or empty, + * and reading of external dictionary is generally permitted, + * try to read dictionary from default path + */ if ((env == NULL) || (strlen(env) == 0)) { +#if DCM_DICT_DEFAULT == DCM_DICT_DEFAULT_USE_EXTERNAL env = DCM_DICT_DEFAULT_PATH; - msgIfDictAbsent = OFFalse; +#endif } + /* if any mechanism for external dictionary (environment or default external) + * is actually provided it, parse env and load all dictionaries specified therein. + */ if ((env != NULL) && (strlen(env) != 0)) { len = strlen(env); for (size_t i = 0; i < len; ++i) { @@ -620,7 +616,7 @@ } if (sepCnt == 0) { - if (!loadDictionary(env, msgIfDictAbsent)) { + if (!loadDictionary(env, OFTrue)) { return OFFalse; } } else { @@ -633,7 +629,7 @@ for (int ii = 0; ii < ndicts; ii++) { if ((dictArray[ii] != NULL) && (strlen(dictArray[ii]) > 0)) { - if (!loadDictionary(dictArray[ii], msgIfDictAbsent)) { + if (!loadDictionary(dictArray[ii], OFTrue)) { loadFailed = OFTrue; } } @@ -818,11 +814,7 @@ dataDictLock.wrlock(); #endif -#ifdef DONT_LOAD_EXTERNAL_DICTIONARIES - #error "The macro DONT_LOAD_EXTERNAL_DICTIONARIES has been defined in older versions of DCMTK. Undefine ENABLE_EXTERNAL_DICTIONARY instead." -#endif - -#ifdef ENABLE_EXTERNAL_DICTIONARY +#if (DCM_DICT_DEFAULT == DCM_DICT_DEFAULT_USE_EXTERNAL) || defined(DCM_DICT_USE_DCMDICTPATH) const OFBool loadExternal = OFTrue; #else const OFBool loadExternal = OFFalse; diff -Nru dcmtk-3.6.6/dcmdata/libsrc/dcdirrec.cc dcmtk-3.6.7/dcmdata/libsrc/dcdirrec.cc --- dcmtk-3.6.6/dcmdata/libsrc/dcdirrec.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/libsrc/dcdirrec.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1994-2019, OFFIS e.V. + * Copyright (C) 1994-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -22,14 +22,6 @@ #include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ -#define INCLUDE_CSTDLIB -#define INCLUDE_CSTDIO -#define INCLUDE_CSTRING -#define INCLUDE_CCTYPE -#define INCLUDE_LIBC -#define INCLUDE_UNISTD -#include "dcmtk/ofstd/ofstdinc.h" - #include "dcmtk/ofstd/ofstream.h" #include "dcmtk/ofstd/ofcast.h" #include "dcmtk/ofstd/ofstd.h" @@ -104,7 +96,8 @@ "SURFACE SCAN", "TRACT", "ASSESSMENT", - "RADIOTHERAPY" + "RADIOTHERAPY", + "ANNOTATION" }; static const short DIM_OF_DRTypeNames = OFstatic_cast(short, (sizeof(DRTypeNames) / sizeof(DRTypeNames[0]))); @@ -438,6 +431,7 @@ case ERT_Tract: case ERT_Assessment: case ERT_Radiotherapy: + case ERT_Annotation: case ERT_Private: l_error = EC_Normal; break; @@ -535,6 +529,7 @@ case ERT_Tract: case ERT_Assessment: case ERT_Radiotherapy: + case ERT_Annotation: case ERT_Private: switch (lowerRecord) { diff -Nru dcmtk-3.6.6/dcmdata/libsrc/dcelem.cc dcmtk-3.6.7/dcmdata/libsrc/dcelem.cc --- dcmtk-3.6.6/dcmdata/libsrc/dcelem.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/libsrc/dcelem.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1994-2020, OFFIS e.V. + * Copyright (C) 1994-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -22,11 +22,6 @@ #include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ -#define INCLUDE_NEW -#define INCLUDE_CSTDLIB -#define INCLUDE_CSTRING -#include "dcmtk/ofstd/ofstdinc.h" - #include "dcmtk/ofstd/ofdefine.h" #include "dcmtk/ofstd/ofstd.h" @@ -44,6 +39,8 @@ #include "dcmtk/dcmdata/vrscan.h" #include "dcmtk/dcmdata/dcpath.h" +#include /* for memset() */ + #define SWAPBUFFER_SIZE 16 /* sufficient for all DICOM VRs as per the 2007 edition */ // @@ -1131,7 +1128,7 @@ // initialize bytes (which may be odd), not Length (which is always even) if (fValue) - memzero(fValue, size_t(length)); + memset(fValue, 0, size_t(length)); else errorFlag = EC_MemoryExhausted; } @@ -1816,14 +1813,21 @@ // initialize the cache with new stream if (!readStream) { + // create input stream object readStream = fLoadValue->create(); // check that read stream is non-NULL if (readStream == NULL) return EC_InvalidStream; // check that stream status is OK - if (readStream->status().bad()) return readStream->status(); + if (readStream->status().bad()) + { + OFCondition result = readStream->status(); + delete readStream; + return result; + } + // readStream will be deleted when the cache is deleted cache->init(readStream, this); } @@ -1851,7 +1855,7 @@ partialvalue = OFstatic_cast(Uint32, valueWidth - partialoffset); // we need to read a single data element into the swap buffer - if (valueWidth != OFstatic_cast(size_t, readStream->read(swapBuffer, valueWidth))) + if (valueWidth != OFstatic_cast(size_t, readStream->read(swapBuffer, OFstatic_cast(offile_off_t, valueWidth)))) return EC_InvalidStream; // swap to desired byte order. fByteOrder contains the byte order in file. @@ -1926,7 +1930,7 @@ } // we need to read a single data element into the swap buffer - if (partialBytesToRead != OFstatic_cast(size_t, readStream->read(swapBuffer, partialBytesToRead))) + if (partialBytesToRead != OFstatic_cast(size_t, readStream->read(swapBuffer, OFstatic_cast(offile_off_t, partialBytesToRead)))) return EC_InvalidStream; if (appendDuplicateByte) diff -Nru dcmtk-3.6.6/dcmdata/libsrc/dcencdoc.cc dcmtk-3.6.7/dcmdata/libsrc/dcencdoc.cc --- dcmtk-3.6.6/dcmdata/libsrc/dcencdoc.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/libsrc/dcencdoc.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2018-2020, OFFIS e.V. + * Copyright (C) 2018-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -274,7 +274,11 @@ OFLogger &appLogger) { #ifdef _XMLWIDECHAR +#ifdef _MSC_VER +#pragma message("DCMTK compiled with 'wide char XML parser'. cda2dcm will be unable to read and encapsulate CDA documents.") +#else #warning "DCMTK compiled with 'wide char XML parser'. cda2dcm will be unable to read and encapsulate CDA documents." +#endif OFLOG_ERROR(appLogger, "DCMTK compiled with \"wide char XML parser\". Cannot parse CDA data because of incompatible API."); return 99; #else diff -Nru dcmtk-3.6.6/dcmdata/libsrc/dcerror.cc dcmtk-3.6.7/dcmdata/libsrc/dcerror.cc --- dcmtk-3.6.6/dcmdata/libsrc/dcerror.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/libsrc/dcerror.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1994-2020, OFFIS e.V. + * Copyright (C) 1994-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -79,6 +79,10 @@ makeOFConditionConst(EC_ElemLengthExceeds32BitField, OFM_dcmdata, 54, OF_error, "Length of element value exceeds maximum of 32-bit length field" ); makeOFConditionConst(EC_CannotWriteJsonNumber, OFM_dcmdata, 55, OF_error, "Cannot write 'nan' or 'inf' as JSON number" ); makeOFConditionConst(EC_CannotWriteJsonInlineBinary, OFM_dcmdata, 56, OF_error, "JSON InlineBinary encoding not supported for compressed pixel data" ); +makeOFConditionConst(EC_XMLParseError, OFM_dcmdata, 57, OF_error, "XML parse error" ); +makeOFConditionConst(EC_XMLValidationFailure, OFM_dcmdata, 58, OF_error, "XML validation failure" ); +makeOFConditionConst(EC_SOPClassMismatch, OFM_dcmdata, 59, OF_error, "SOP class mismatch" ); +makeOFConditionConst(EC_UnknownUIDName, OFM_dcmdata, 60, OF_error, "Unknown UID name: No mapping to UID value defined" ); const unsigned short EC_CODE_CannotSelectCharacterSet = 35; const unsigned short EC_CODE_CannotConvertCharacterSet = 36; diff -Nru dcmtk-3.6.6/dcmdata/libsrc/dcfilefo.cc dcmtk-3.6.7/dcmdata/libsrc/dcfilefo.cc --- dcmtk-3.6.6/dcmdata/libsrc/dcfilefo.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/libsrc/dcfilefo.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1994-2020, OFFIS e.V. + * Copyright (C) 1994-2022, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -22,13 +22,6 @@ #include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ -#define INCLUDE_CSTDLIB -#define INCLUDE_CSTDIO -#define INCLUDE_CSTRING -#define INCLUDE_CTIME -#define INCLUDE_UNISTD -#include "dcmtk/ofstd/ofstdinc.h" - #include "dcmtk/ofstd/ofstream.h" #include "dcmtk/dcmdata/dcfilefo.h" #include "dcmtk/dcmdata/dcitem.h" @@ -44,10 +37,12 @@ #include "dcmtk/dcmdata/dcdeftag.h" #include "dcmtk/dcmdata/dcuid.h" -#include "dcmtk/dcmdata/dcostrma.h" /* for class DcmOutputStream */ -#include "dcmtk/dcmdata/dcostrmf.h" /* for class DcmOutputFileStream */ #include "dcmtk/dcmdata/dcistrma.h" /* for class DcmInputStream */ #include "dcmtk/dcmdata/dcistrmf.h" /* for class DcmInputFileStream */ +#include "dcmtk/dcmdata/dcistrms.h" /* for class DcmStdinStream */ +#include "dcmtk/dcmdata/dcostrma.h" /* for class DcmOutputStream */ +#include "dcmtk/dcmdata/dcostrmf.h" /* for class DcmOutputFileStream */ +#include "dcmtk/dcmdata/dcostrms.h" /* for class DcmStdoutStream */ #include "dcmtk/dcmdata/dcwcache.h" /* for class DcmWriteCache */ #include "dcmtk/dcmdata/dcjson.h" @@ -243,10 +238,10 @@ if (metinf) { status = metinf->writeJsonExt(out, format, OFFalse, OFFalse); - out << format.newline(); } if (dset && status.good()) { + if (metinf && (metinf->card() > 0) && (dset->card() > 0)) out << "," << format.newline(); status = dset->writeJsonExt(out, format, OFFalse, OFFalse); } out << format.newline() << format.indent() << "}" << format.newline(); @@ -736,6 +731,9 @@ errorFlag = metaInfo->read(inStream, EXS_Unknown, glenc, maxReadLength); } + // bail out if the meta-header is still incomplete or an error occurred + if (errorFlag.bad()) return errorFlag; + // determine xfer from tag (0002,0010) in the meta header newxfer = lookForXfer(metaInfo); if ((FileReadMode == ERM_fileOnly) || (FileReadMode == ERM_metaOnly)) @@ -909,12 +907,11 @@ /* check parameters first */ if (!fileName.isEmpty()) { - /* open file for input */ - DcmInputFileStream fileStream(fileName); - /* check stream status */ - l_error = fileStream.status(); - if (l_error.good()) + if (fileName.isStandardStream()) { + /* use stdin stream */ + DcmStdinStream inStream; + /* clear this object */ l_error = clear(); if (l_error.good()) @@ -922,13 +919,48 @@ /* save old value */ const E_FileReadMode oldMode = FileReadMode; FileReadMode = readMode; - /* read data from file */ + + /* initialize transfer */ transferInit(); - l_error = readUntilTag(fileStream, readXfer, groupLength, maxReadLength, stopParsingAtElement); + + do + { + /* fill the buffer from stdin */ + inStream.fillBuffer(); + /* and read the buffer content into the DICOM dataset */ + l_error = readUntilTag(inStream, readXfer, groupLength, maxReadLength, stopParsingAtElement); + } while (l_error == EC_StreamNotifyClient); /* repeat until we're at the end of the stream, or an error occurs */ + + /* end transfer */ transferEnd(); + /* restore old value */ FileReadMode = oldMode; } + + } else { + /* open file for output */ + DcmInputFileStream fileStream(fileName); + + /* check stream status */ + l_error = fileStream.status(); + if (l_error.good()) + { + /* clear this object */ + l_error = clear(); + if (l_error.good()) + { + /* save old value */ + const E_FileReadMode oldMode = FileReadMode; + FileReadMode = readMode; + /* read data from file */ + transferInit(); + l_error = readUntilTag(fileStream, readXfer, groupLength, maxReadLength, stopParsingAtElement); + transferEnd(); + /* restore old value */ + FileReadMode = oldMode; + } + } } } return l_error; @@ -954,20 +986,28 @@ if (!fileName.isEmpty()) { DcmWriteCache wcache; + DcmOutputStream *fileStream; - /* open file for output */ - DcmOutputFileStream fileStream(fileName); + if (fileName.isStandardStream()) + { + /* use stdout stream */ + fileStream = new DcmStdoutStream(fileName); + } else { + /* open file for output */ + fileStream = new DcmOutputFileStream(fileName); + } /* check stream status */ - l_error = fileStream.status(); + l_error = fileStream->status(); if (l_error.good()) { /* write data to file */ transferInit(); - l_error = write(fileStream, writeXfer, encodingType, &wcache, groupLength, + l_error = write(*fileStream, writeXfer, encodingType, &wcache, groupLength, padEncoding, padLength, subPadLength, 0 /*instanceLength*/, writeMode); transferEnd(); } + delete fileStream; } return l_error; } diff -Nru dcmtk-3.6.6/dcmdata/libsrc/dchashdi.cc dcmtk-3.6.7/dcmdata/libsrc/dchashdi.cc --- dcmtk-3.6.6/dcmdata/libsrc/dchashdi.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/libsrc/dchashdi.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1997-2011, OFFIS e.V. + * Copyright (C) 1997-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -24,10 +24,6 @@ #include "dcmtk/dcmdata/dcdicent.h" #include "dcmtk/dcmdata/dctypes.h" -#define INCLUDE_CSTDIO -#define INCLUDE_CASSERT -#include "dcmtk/ofstd/ofstdinc.h" - /* ** DcmDictEntryList */ diff -Nru dcmtk-3.6.6/dcmdata/libsrc/dcistrmf.cc dcmtk-3.6.7/dcmdata/libsrc/dcistrmf.cc --- dcmtk-3.6.6/dcmdata/libsrc/dcistrmf.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/libsrc/dcistrmf.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2002-2012, OFFIS e.V. + * Copyright (C) 2002-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -22,12 +22,17 @@ #include "dcmtk/config/osconfig.h" #include "dcmtk/dcmdata/dcistrmf.h" +#include "dcmtk/dcmdata/dcistrmb.h" #include "dcmtk/dcmdata/dcerror.h" -#define INCLUDE_CSTDIO -#define INCLUDE_CERRNO -#include "dcmtk/ofstd/ofstdinc.h" - +BEGIN_EXTERN_C +#ifdef HAVE_FCNTL_H +#include +#endif +#ifdef HAVE_IO_H +#include +#endif +END_EXTERN_C DcmFileProducer::DcmFileProducer(const OFFilename &filename, offile_off_t offset) : DcmProducer() @@ -88,7 +93,7 @@ offile_off_t result = 0; if (status_.good() && file_.open() && buf && buflen) { - result = file_.fread(buf, 1, OFstatic_cast(size_t, buflen)); + result = OFstatic_cast(offile_off_t, file_.fread(buf, 1, OFstatic_cast(size_t, buflen))); } return result; } diff -Nru dcmtk-3.6.6/dcmdata/libsrc/dcistrms.cc dcmtk-3.6.7/dcmdata/libsrc/dcistrms.cc --- dcmtk-3.6.6/dcmdata/libsrc/dcistrms.cc 1970-01-01 00:00:00.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/libsrc/dcistrms.cc 2022-04-28 13:47:25.000000000 +0000 @@ -0,0 +1,82 @@ +/* + * + * Copyright (C) 2002-2021, 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: Jasper den Otter, Marco Eichelberg + * + * Purpose: DcmStdinStream and related classes, + * implements streamed input from stdin. + * + */ + +#include "dcmtk/config/osconfig.h" +#include "dcmtk/dcmdata/dcistrms.h" +#include "dcmtk/dcmdata/dcerror.h" + +BEGIN_EXTERN_C +#ifdef HAVE_FCNTL_H +#include +#endif +#ifdef HAVE_IO_H +#include +#endif +END_EXTERN_C + +// size of the buffer we use to read from stdin +#define DCMSTDINSTREAMBUFSIZE 32768 + +DcmStdinStream::DcmStdinStream() +: DcmInputStream(&producer_) // safe because DcmInputStream only stores pointer +, producer_() +, buf_(new unsigned char[DCMSTDINSTREAMBUFSIZE]) +{ +#ifdef _WIN32 + // Set "stdin" to binary mode + int result = setmode(fileno(stdin), O_BINARY); + if (result == -1) DCMDATA_ERROR("Failed to switch stdin to binary mode"); +#endif +} + +DcmStdinStream::~DcmStdinStream() +{ + delete[] buf_; +} + +DcmInputStreamFactory *DcmStdinStream::newFactory() const +{ + // we don't support delayed loading from stdin streams + return NULL; +} + +void DcmStdinStream::fillBuffer() +{ + // if there are a few bytes left in the previous buffer, make the + // buffer producer make a backup copy + producer_.releaseBuffer(); + + // read the next block from stdin + size_t numBytes = fread(buf_, 1, DCMSTDINSTREAMBUFSIZE, stdin); + + // make the buffer available to the buffer producer + producer_.setBuffer(buf_, OFstatic_cast(offile_off_t, numBytes)); + + // check if we are at the end of stream, and if so, notify the buffer producer + if (feof(stdin)) producer_.setEos(); + + // if there is a compression filter, the following call will + // cause it to feed the compression engine with data from the + // new buffer. + skip(0); +} + diff -Nru dcmtk-3.6.6/dcmdata/libsrc/dcitem.cc dcmtk-3.6.7/dcmdata/libsrc/dcitem.cc --- dcmtk-3.6.6/dcmdata/libsrc/dcitem.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/libsrc/dcitem.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1994-2020, OFFIS e.V. + * Copyright (C) 1994-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -22,14 +22,7 @@ #include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ -#define INCLUDE_CSTDLIB -#define INCLUDE_CSTDIO -#define INCLUDE_CSTRING -#define INCLUDE_CCTYPE -#include "dcmtk/ofstd/ofstdinc.h" - #include "dcmtk/dcmdata/dcitem.h" -#include "dcmtk/ofstd/ofdefine.h" /* for memzero() */ #include "dcmtk/dcmdata/dcdeftag.h" /* for name constants */ #include "dcmtk/dcmdata/dcistrma.h" /* for class DcmInputStream */ #include "dcmtk/dcmdata/dcobject.h" @@ -80,6 +73,8 @@ #include "dcmtk/ofstd/ofcast.h" #include "dcmtk/ofstd/ofstd.h" +#include /* for memset() */ + // ******************************** @@ -964,7 +959,7 @@ /* create an array of a corresponding size and set the array fields */ Uint8 * padBytes = new Uint8[padding]; - memzero(padBytes, size_t(padding)); + memset(padBytes, 0, size_t(padding)); /* set information in the above created padding element (size and actual value) */ paddingEl->putUint8Array(padBytes, padding); @@ -1463,7 +1458,11 @@ /* tag and length (and possibly VR) information as well as maybe some data */ /* data value information. We need to continue reading the data value */ /* information for this particular element. */ - errorFlag = elementList->get()->read(inStream, xfer, glenc, maxReadLength); + DcmObject *dO = elementList->get(); + if (dO) + errorFlag = dO->read(inStream, xfer, glenc, maxReadLength); + else errorFlag = EC_InternalError; // should never happen + /* if reading was successful, we read the entire information */ /* for this element; hence lastElementComplete is true */ if (errorFlag.good()) @@ -2509,7 +2508,7 @@ if (count != NULL) { if (status.good()) - *count = elem->getNumberOfValues(); + *count = elem->getLength() / sizeof(Uint8); else *count = 0; } @@ -2559,8 +2558,11 @@ if (count != NULL) { if (status.good()) - *count = elem->getNumberOfValues(); - else + { + /* don't use getNumberOfValues() because of OB/OW for pixel data + * and since AT uses two 16-bit integers per value */ + *count = elem->getLength() / sizeof(Uint16); + } else *count = 0; } /* reset value */ @@ -2609,7 +2611,7 @@ if (count != NULL) { if (status.good()) - *count = elem->getNumberOfValues(); + *count = elem->getLength() / sizeof(Sint16); else *count = 0; } @@ -2659,7 +2661,7 @@ if (count != NULL) { if (status.good()) - *count = elem->getNumberOfValues(); + *count = elem->getLength() / sizeof(Uint32); else *count = 0; } @@ -2709,7 +2711,7 @@ if (count != NULL) { if (status.good()) - *count = elem->getNumberOfValues(); + *count = elem->getLength() / sizeof(Sint32); else *count = 0; } @@ -2759,7 +2761,7 @@ if (count != NULL) { if (status.good()) - *count = elem->getNumberOfValues(); + *count = elem->getLength() / sizeof(Uint64); else *count = 0; } @@ -2809,7 +2811,7 @@ if (count != NULL) { if (status.good()) - *count = elem->getNumberOfValues(); + *count = elem->getLength() / sizeof(Sint64); else *count = 0; } @@ -2909,7 +2911,7 @@ if (count != NULL) { if (status.good()) - *count = elem->getNumberOfValues(); + *count = elem->getLength() / sizeof(Float32); else *count = 0; } @@ -2959,7 +2961,7 @@ if (count != NULL) { if (status.good()) - *count = elem->getNumberOfValues(); + *count = elem->getLength() / sizeof(Float64); else *count = 0; } diff -Nru dcmtk-3.6.6/dcmdata/libsrc/dcjson.cc dcmtk-3.6.7/dcmdata/libsrc/dcjson.cc --- dcmtk-3.6.6/dcmdata/libsrc/dcjson.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/libsrc/dcjson.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2016-2020, OFFIS e.V. + * Copyright (C) 2016-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -22,14 +22,11 @@ #include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ #include "dcmtk/dcmdata/dcjson.h" - -#define INCLUDE_CASSERT -#define INCLUDE_CSTRING -#include "dcmtk/ofstd/ofstdinc.h" - #include "dcmtk/ofstd/ofdefine.h" #include "dcmtk/ofstd/ofstring.h" +#include + void DcmJsonFormat::escapeControlCharacters(STD_NAMESPACE ostream &out, const OFString &value) { // escapes all forbidden control characters in JSON diff -Nru dcmtk-3.6.6/dcmdata/libsrc/dcmetinf.cc dcmtk-3.6.7/dcmdata/libsrc/dcmetinf.cc --- dcmtk-3.6.6/dcmdata/libsrc/dcmetinf.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/libsrc/dcmetinf.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1994-2020, OFFIS e.V. + * Copyright (C) 1994-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -22,9 +22,7 @@ #include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ -#define INCLUDE_CSTDLIB -#define INCLUDE_CSTRING -#include "dcmtk/ofstd/ofstdinc.h" +#include /* for memset() */ #include "dcmtk/ofstd/ofstream.h" #include "dcmtk/ofstd/ofstd.h" @@ -237,7 +235,7 @@ void DcmMetaInfo::setPreamble() { - memzero(filePreamble, sizeof(filePreamble)); + memset(filePreamble, 0, sizeof(filePreamble)); preambleUsed = OFFalse; } diff -Nru dcmtk-3.6.6/dcmdata/libsrc/dcobject.cc dcmtk-3.6.7/dcmdata/libsrc/dcobject.cc --- dcmtk-3.6.6/dcmdata/libsrc/dcobject.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/libsrc/dcobject.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1994-2020, OFFIS e.V. + * Copyright (C) 1994-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -35,11 +35,6 @@ #include "dcmtk/dcmdata/dcistrma.h" /* for class DcmInputStream */ #include "dcmtk/dcmdata/dcostrma.h" /* for class DcmOutputStream */ -#define INCLUDE_CSTDIO -#define INCLUDE_IOMANIP -#include "dcmtk/ofstd/ofstdinc.h" - - // global flags OFGlobal dcmEnableAutomaticInputDataCorrection(OFTrue); diff -Nru dcmtk-3.6.6/dcmdata/libsrc/dcostrmf.cc dcmtk-3.6.7/dcmdata/libsrc/dcostrmf.cc --- dcmtk-3.6.6/dcmdata/libsrc/dcostrmf.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/libsrc/dcostrmf.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2002-2017, OFFIS e.V. + * Copyright (C) 2002-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -23,9 +23,16 @@ #include "dcmtk/config/osconfig.h" #include "dcmtk/dcmdata/dcostrmf.h" #include "dcmtk/dcmdata/dcerror.h" +#include "dcmtk/ofstd/ofconsol.h" -#define INCLUDE_CSTDIO -#include "dcmtk/ofstd/ofstdinc.h" +BEGIN_EXTERN_C +#ifdef HAVE_FCNTL_H +#include +#endif +#ifdef HAVE_IO_H +#include +#endif +END_EXTERN_C DcmFileConsumer::DcmFileConsumer(const OFFilename &filename) @@ -142,3 +149,4 @@ } #endif } + diff -Nru dcmtk-3.6.6/dcmdata/libsrc/dcostrms.cc dcmtk-3.6.7/dcmdata/libsrc/dcostrms.cc --- dcmtk-3.6.6/dcmdata/libsrc/dcostrms.cc 1970-01-01 00:00:00.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/libsrc/dcostrms.cc 2022-04-28 13:47:25.000000000 +0000 @@ -0,0 +1,117 @@ +/* + * + * Copyright (C) 2002-2021, 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: Jasper den Otter, Marco Eichelberg + * + * Purpose: DcmStdoutStream and related classes, + * implements streamed output to stdout. + * + */ + +#include "dcmtk/config/osconfig.h" +#include "dcmtk/dcmdata/dcostrms.h" +#include "dcmtk/dcmdata/dcerror.h" +#include "dcmtk/ofstd/ofconsol.h" + +BEGIN_EXTERN_C +#ifdef HAVE_FCNTL_H +#include +#endif +#ifdef HAVE_IO_H +#include +#endif +END_EXTERN_C + + +DcmStdoutConsumer::DcmStdoutConsumer(const OFFilename & /* filename */) +: DcmConsumer() +, file_() +, status_(EC_Normal) +{ +#ifdef _WIN32 + // Set "stdout" to binary mode + int result = setmode(fileno(stdout), O_BINARY); + if (result == -1) DCMDATA_ERROR("Failed to switch stdout to binary mode"); +#endif +} + +DcmStdoutConsumer::DcmStdoutConsumer(FILE *file) +: DcmConsumer() +, file_(file) +, status_(EC_Normal) +{ +} + +DcmStdoutConsumer::~DcmStdoutConsumer() +{ +} + +OFBool DcmStdoutConsumer::good() const +{ + return status_.good(); +} + +OFCondition DcmStdoutConsumer::status() const +{ + return status_; +} + +OFBool DcmStdoutConsumer::isFlushed() const +{ + return OFTrue; +} + +offile_off_t DcmStdoutConsumer::avail() const +{ + // since we cannot report "unlimited", let's claim that we can still write 2GB. + // Note that offile_off_t is a signed type. + return 2147483647L; +} + +offile_off_t DcmStdoutConsumer::write(const void *buf, offile_off_t buflen) +{ + return OFstatic_cast(offile_off_t, fwrite(buf, 1, OFstatic_cast(size_t, buflen), stdout)); +} + +void DcmStdoutConsumer::flush() +{ + fflush(stdout); +} + +/* ======================================================================= */ + +DcmStdoutStream::DcmStdoutStream(const OFFilename &filename) +: DcmOutputStream(&consumer_) // safe because DcmStdoutStream only stores pointer +, consumer_(filename) +{ +} + +DcmStdoutStream::DcmStdoutStream(FILE *file) +: DcmOutputStream(&consumer_) // safe because DcmStdoutStream only stores pointer +, consumer_(file) +{ +} + +DcmStdoutStream::~DcmStdoutStream() +{ + // last attempt to flush stream before file is closed + flush(); +#ifdef DEBUG + if (! isFlushed()) + { + DCMDATA_WARN("closing unflushed DcmStdoutStream, loss of data!"); + } +#endif +} diff -Nru dcmtk-3.6.6/dcmdata/libsrc/dcpath.cc dcmtk-3.6.7/dcmdata/libsrc/dcpath.cc --- dcmtk-3.6.6/dcmdata/libsrc/dcpath.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/libsrc/dcpath.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2008-2020, OFFIS e.V. + * Copyright (C) 2008-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -25,9 +25,6 @@ #include "dcmtk/dcmdata/dcpath.h" #include "dcmtk/dcmdata/dcsequen.h" -#define INCLUDE_CINTTYPES -#include "dcmtk/ofstd/ofstdinc.h" - /*******************************************************************/ /* Implementation of class DcmPath */ /*******************************************************************/ diff -Nru dcmtk-3.6.6/dcmdata/libsrc/dcpixseq.cc dcmtk-3.6.7/dcmdata/libsrc/dcpixseq.cc --- dcmtk-3.6.6/dcmdata/libsrc/dcpixseq.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/libsrc/dcpixseq.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1994-2019, OFFIS e.V. + * Copyright (C) 1994-2011, 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 */ -#define INCLUDE_CSTDLIB -#define INCLUDE_CSTDIO -#include "dcmtk/ofstd/ofstdinc.h" - #include "dcmtk/ofstd/ofstream.h" #include "dcmtk/ofstd/ofuuid.h" diff -Nru dcmtk-3.6.6/dcmdata/libsrc/dcpxitem.cc dcmtk-3.6.7/dcmdata/libsrc/dcpxitem.cc --- dcmtk-3.6.6/dcmdata/libsrc/dcpxitem.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/libsrc/dcpxitem.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1994-2019, OFFIS e.V. + * Copyright (C) 1994-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -22,11 +22,6 @@ #include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ -#define INCLUDE_CSTDLIB -#define INCLUDE_CSTDIO -#define INCLUDE_CSTRING -#include "dcmtk/ofstd/ofstdinc.h" - #include "dcmtk/ofstd/ofstream.h" #include "dcmtk/dcmdata/dcpxitem.h" #include "dcmtk/dcmdata/dcswap.h" diff -Nru dcmtk-3.6.6/dcmdata/libsrc/dcrlecce.cc dcmtk-3.6.7/dcmdata/libsrc/dcrlecce.cc --- dcmtk-3.6.6/dcmdata/libsrc/dcrlecce.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/libsrc/dcrlecce.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2002-2020, OFFIS e.V. + * Copyright (C) 2002-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -31,10 +31,6 @@ #include "dcmtk/dcmdata/dcitem.h" #include "dcmtk/ofstd/ofstd.h" -#define INCLUDE_CSTDIO -#include "dcmtk/ofstd/ofstdinc.h" - - typedef OFList DcmRLEEncoderList; typedef OFListIterator(DcmRLEEncoder *) DcmRLEEncoderListIterator; diff -Nru dcmtk-3.6.6/dcmdata/libsrc/dcsequen.cc dcmtk-3.6.7/dcmdata/libsrc/dcsequen.cc --- dcmtk-3.6.6/dcmdata/libsrc/dcsequen.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/libsrc/dcsequen.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1994-2019, OFFIS e.V. + * Copyright (C) 1994-2021, 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 */ -#define INCLUDE_CSTDLIB -#define INCLUDE_CSTDIO -#include "dcmtk/ofstd/ofstdinc.h" - #include "dcmtk/ofstd/ofstream.h" #include "dcmtk/ofstd/ofstd.h" #include "dcmtk/ofstd/ofcast.h" diff -Nru dcmtk-3.6.6/dcmdata/libsrc/dcstack.cc dcmtk-3.6.7/dcmdata/libsrc/dcstack.cc --- dcmtk-3.6.6/dcmdata/libsrc/dcstack.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/libsrc/dcstack.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1994-2010, OFFIS e.V. + * Copyright (C) 1994-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -21,8 +21,6 @@ #include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ -#define INCLUDE_CSTDLIB -#include "dcmtk/ofstd/ofstdinc.h" #include "dcmtk/ofstd/ofcast.h" #include "dcmtk/ofstd/ofstream.h" #include "dcmtk/dcmdata/dcstack.h" diff -Nru dcmtk-3.6.6/dcmdata/libsrc/dctag.cc dcmtk-3.6.7/dcmdata/libsrc/dctag.cc --- dcmtk-3.6.6/dcmdata/libsrc/dctag.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/libsrc/dctag.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1994-2018, OFFIS e.V. + * Copyright (C) 1994-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -26,11 +26,6 @@ #include "dcmtk/dcmdata/dcdicent.h" #include "dcmtk/ofstd/ofstd.h" -#define INCLUDE_CSTDIO -#define INCLUDE_CSTRING -#include "dcmtk/ofstd/ofstdinc.h" - - DcmTag::DcmTag() : vr(EVR_UNKNOWN), tagName(NULL), diff -Nru dcmtk-3.6.6/dcmdata/libsrc/dctagkey.cc dcmtk-3.6.7/dcmdata/libsrc/dctagkey.cc --- dcmtk-3.6.6/dcmdata/libsrc/dctagkey.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/libsrc/dctagkey.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1994-2011, OFFIS e.V. + * Copyright (C) 1994-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -23,10 +23,6 @@ #include "dcmtk/dcmdata/dctagkey.h" #include "dcmtk/ofstd/ofstd.h" -#define INCLUDE_CSTDIO -#define INCLUDE_CSTRING -#include "dcmtk/ofstd/ofstdinc.h" - /* * DcmTagKey member functions */ diff -Nru dcmtk-3.6.6/dcmdata/libsrc/dcuid.cc dcmtk-3.6.7/dcmdata/libsrc/dcuid.cc --- dcmtk-3.6.6/dcmdata/libsrc/dcuid.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/libsrc/dcuid.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1994-2020, OFFIS e.V. + * Copyright (C) 1994-2022, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -30,14 +30,6 @@ #include #endif -#define INCLUDE_CSTDLIB -#define INCLUDE_CSTDIO -#define INCLUDE_CSTRING -#define INCLUDE_CTIME -#define INCLUDE_LIBC -#define INCLUDE_UNISTD -#include "dcmtk/ofstd/ofstdinc.h" - BEGIN_EXTERN_C #ifdef HAVE_SYS_TIME_H #include @@ -198,6 +190,7 @@ { UID_EnhancedSRStorage, "EnhancedSRStorage" }, { UID_EnhancedUSVolumeStorage, "EnhancedUSVolumeStorage" }, { UID_EnhancedXAImageStorage, "EnhancedXAImageStorage" }, + { UID_EnhancedXRayRadiationDoseSRStorage, "EnhancedXRayRadiationDoseSRStorage" }, { UID_EnhancedXRFImageStorage, "EnhancedXRFImageStorage" }, { UID_ExtensibleSRStorage, "ExtensibleSRStorage" }, { UID_GeneralAudioWaveformStorage, "GeneralAudioWaveformStorage" }, @@ -222,6 +215,7 @@ { UID_MacularGridThicknessAndVolumeReportStorage, "MacularGridThicknessAndVolumeReportStorage" }, { UID_MammographyCADSRStorage, "MammographyCADSRStorage" }, { UID_MediaStorageDirectoryStorage, "MediaStorageDirectoryStorage" }, + { UID_MicroscopyBulkSimpleAnnotationsStorage, "MicroscopyBulkSimpleAnnotationsStorage" }, { UID_MRImageStorage, "MRImageStorage" }, { UID_MRSpectroscopyStorage, "MRSpectroscopyStorage" }, { UID_MultichannelRespiratoryWaveformStorage, "MultichannelRespiratoryWaveformStorage" }, @@ -266,9 +260,11 @@ { UID_RTPlanStorage, "RTPlanStorage" }, { UID_RTRadiationRecordSetStorage, "RTRadiationRecordSetStorage" }, { UID_RTRadiationSalvageRecordStorage, "RTRadiationSalvageRecordStorage" }, + { UID_RTRadiationSetDeliveryInstructionStorage, "RTRadiationSetDeliveryInstructionStorage" }, { UID_RTRadiationSetStorage, "RTRadiationSetStorage" }, { UID_RTSegmentAnnotationStorage, "RTSegmentAnnotationStorage" }, { UID_RTStructureSetStorage, "RTStructureSetStorage" }, + { UID_RTTreatmentPreparationStorage, "RTTreatmentPreparationStorage" }, { UID_RTTreatmentSummaryRecordStorage, "RTTreatmentSummaryRecordStorage" }, { UID_SecondaryCaptureImageStorage, "SecondaryCaptureImageStorage" }, { UID_SegmentationStorage, "SegmentationStorage" }, @@ -301,6 +297,8 @@ { UID_VolumeRenderingVolumetricPresentationStateStorage, "VolumeRenderingVolumetricPresentationStateStorage" }, { UID_WideFieldOphthalmicPhotographyStereographicProjectionImageStorage, "WideFieldOphthalmicPhotographyStereographicProjectionImageStorage" }, { UID_WideFieldOphthalmicPhotography3DCoordinatesImageStorage, "WideFieldOphthalmicPhotography3DCoordinatesImageStorage" }, + { UID_XADefinedProcedureProtocolStorage, "XADefinedProcedureProtocolStorage" }, + { UID_XAPerformedProcedureProtocolStorage, "XAPerformedProcedureProtocolStorage" }, { UID_XAXRFGrayscaleSoftcopyPresentationStateStorage, "XAXRFGrayscaleSoftcopyPresentationStateStorage" }, { UID_XRay3DAngiographicImageStorage, "XRay3DAngiographicImageStorage" }, { UID_XRay3DCraniofacialImageStorage, "XRay3DCraniofacialImageStorage" }, @@ -542,6 +540,7 @@ { UID_ICBM452T1FrameOfReference, "ICBM452T1FrameOfReference" }, { UID_ICBMSingleSubjectMRIFrameOfReference, "ICBMSingleSubjectMRIFrameOfReference" }, { UID_IEC61217FixedCoordinateSystemFrameOfReference, "IEC61217FixedCoordinateSystemFrameOfReference" }, + { UID_IEC61217TableTopCoordinateSystemFrameOfReference, "IEC61217TableTopCoordinateSystemFrameOfReference" }, { UID_SPM2AVG152PDFrameOfReference, "SPM2AVG152PDFrameOfReference" }, { UID_SPM2AVG152T1FrameOfReference, "SPM2AVG152T1FrameOfReference" }, { UID_SPM2AVG152T2FrameOfReference, "SPM2AVG152T2FrameOfReference" }, @@ -661,6 +660,7 @@ UID_EnhancedSRStorage, UID_EnhancedUSVolumeStorage, UID_EnhancedXAImageStorage, + UID_EnhancedXRayRadiationDoseSRStorage, UID_EnhancedXRFImageStorage, UID_ExtensibleSRStorage, UID_GeneralAudioWaveformStorage, @@ -680,6 +680,7 @@ UID_LensometryMeasurementsStorage, UID_MacularGridThicknessAndVolumeReportStorage, UID_MammographyCADSRStorage, + UID_MicroscopyBulkSimpleAnnotationsStorage, UID_MRImageStorage, UID_MRSpectroscopyStorage, UID_MultichannelRespiratoryWaveformStorage, @@ -723,9 +724,11 @@ UID_RTPlanStorage, UID_RTRadiationRecordSetStorage, UID_RTRadiationSalvageRecordStorage, + UID_RTRadiationSetDeliveryInstructionStorage, UID_RTRadiationSetStorage, UID_RTSegmentAnnotationStorage, UID_RTStructureSetStorage, + UID_RTTreatmentPreparationStorage, UID_RTTreatmentSummaryRecordStorage, UID_SecondaryCaptureImageStorage, UID_SegmentationStorage, @@ -758,6 +761,7 @@ UID_VolumeRenderingVolumetricPresentationStateStorage, UID_WideFieldOphthalmicPhotographyStereographicProjectionImageStorage, UID_WideFieldOphthalmicPhotography3DCoordinatesImageStorage, + UID_XAPerformedProcedureProtocolStorage, UID_XAXRFGrayscaleSoftcopyPresentationStateStorage, UID_XRay3DAngiographicImageStorage, UID_XRay3DCraniofacialImageStorage, @@ -818,6 +822,7 @@ UID_ImplantAssemblyTemplateStorage, UID_ImplantTemplateGroupStorage, UID_ProtocolApprovalStorage, + UID_XADefinedProcedureProtocolStorage, // end marker (important!) NULL }; @@ -955,8 +960,10 @@ // UID_EncapsulatedMTLStorage, // UID_EncapsulatedOBJStorage, // UID_EncapsulatedSTLStorage, +// UID_EnhancedXRayRadiationDoseSRStorage, // UID_ExtensibleSRStorage, -// UID_GrayscalePlanarMPRVolumetricPresentationStateStorage +// UID_GrayscalePlanarMPRVolumetricPresentationStateStorage, +// UID_MicroscopyBulkSimpleAnnotationsStorage, // UID_MultichannelRespiratoryWaveformStorage, // UID_MultipleVolumeRenderingVolumetricPresentationStateStorage, // UID_OphthalmicOpticalCoherenceTomographyBscanVolumeAnalysisStorage, @@ -973,8 +980,10 @@ // UID_RTPhysicianIntentStorage, // UID_RTRadiationRecordSetStorage, // UID_RTRadiationSalvageRecordStorage, +// UID_RTRadiationSetDeliveryInstructionStorage, // UID_RTRadiationSetStorage, // UID_RTSegmentAnnotationStorage, +// UID_RTTreatmentPreparationStorage, // UID_SegmentedVolumeRenderingVolumetricPresentationStateStorage, // UID_SimplifiedAdultEchoSRStorage, // UID_SleepElectroencephalogramWaveformStorage, @@ -984,6 +993,7 @@ // UID_VolumeRenderingVolumetricPresentationStateStorage, // UID_WideFieldOphthalmicPhotographyStereographicProjectionImageStorage, // UID_WideFieldOphthalmicPhotography3DCoordinatesImageStorage, +// UID_XAPerformedProcedureProtocolStorage, // non-patient // UID_ColorPaletteStorage, // UID_CTDefinedProcedureProtocolStorage, @@ -992,6 +1002,7 @@ // UID_ImplantAssemblyTemplateStorage, // UID_ImplantTemplateGroupStorage, // UID_ProtocolApprovalStorage, +// UID_XADefinedProcedureProtocolStorage, // retired UID_RETIRED_HardcopyColorImageStorage, UID_RETIRED_HardcopyGrayscaleImageStorage, @@ -1211,8 +1222,8 @@ typedef struct { - const char *sopClass; - const char *modality; + const char *sopClass; /* official UID value */ + const char *modality; /* short character code */ unsigned long averageSize; /* can be way, way out */ } DcmModalityTable; @@ -1225,198 +1236,204 @@ ** the size of an image being transmitted). */ static const DcmModalityTable modalities[] = { - { UID_AcquisitionContextSRStorage, "SRa", 4096 }, - { UID_AdvancedBlendingPresentationStateStorage, "PSa", 4096 }, - { UID_AmbulatoryECGWaveformStorage, "ECA", 4096 }, - { UID_ArterialPulseWaveformStorage, "WVa", 4096 }, - { UID_AutorefractionMeasurementsStorage, "OPa", 4096 }, - { UID_BasicStructuredDisplayStorage, "SD", 4096 }, - { UID_BasicTextSRStorage, "SRt", 4096 }, - { UID_BasicVoiceAudioWaveformStorage, "AUV", 4096 }, - { UID_BlendingSoftcopyPresentationStateStorage, "PSb", 4096 }, - { UID_BodyPositionWaveformStorage, "WVb", 4096 }, - { UID_BreastProjectionXRayImageStorageForPresentation, "BX", 4096 * 4096 * 2 }, - { UID_BreastProjectionXRayImageStorageForProcessing, "BP", 4096 * 4096 * 2 }, - { UID_BreastTomosynthesisImageStorage, "BT", 4096 * 4096 * 2 }, - { UID_CardiacElectrophysiologyWaveformStorage, "WVc", 4096 }, - { UID_CArmPhotonElectronRadiationRecordStorage, "RRc", 4096 }, - { UID_CArmPhotonElectronRadiationStorage, "Rca", 4096 }, - { UID_ChestCADSRStorage, "SRh", 4096 }, - { UID_ColonCADSRStorage, "SRo", 4096 }, - { UID_ColorPaletteStorage, "CP", 4096 }, - { UID_ColorSoftcopyPresentationStateStorage, "PSc", 4096 }, - { UID_CompositingPlanarMPRVolumetricPresentationStateStorage, "VPc", 4096 }, - { UID_Comprehensive3DSRStorage, "SR3", 4096 }, - { UID_ComprehensiveSRStorage, "SRc", 4096 }, - { UID_ComputedRadiographyImageStorage, "CR", 2048 * 2048 * 2 }, - { UID_ContentAssessmentResultsStorage, "AS", 4096 }, - { UID_CornealTopographyMapStorage, "CM", 512 * 512 }, - { UID_CTDefinedProcedureProtocolStorage, "PPd", 4096 }, - { UID_CTImageStorage, "CT", 512 * 512 * 2 }, - { UID_CTPerformedProcedureProtocolStorage, "PPp", 4096 }, - { UID_DeformableSpatialRegistrationStorage, "RGd", 4096 }, - { UID_DermoscopicPhotographyImageStorage, "VLd", 768 * 576 * 3 }, - { UID_DigitalIntraOralXRayImageStorageForPresentation, "DXo", 1024 * 1024 * 2 }, - { UID_DigitalIntraOralXRayImageStorageForProcessing, "DPo", 1024 * 1024 * 2 }, - { UID_DigitalMammographyXRayImageStorageForPresentation, "DXm", 4096 * 4096 * 2 }, - { UID_DigitalMammographyXRayImageStorageForProcessing, "DPm", 4096 * 4096 * 2 }, - { UID_DigitalXRayImageStorageForPresentation, "DX", 2048 * 2048 * 2 }, - { UID_DigitalXRayImageStorageForProcessing, "DP", 2048 * 2048 * 2 }, - { UID_ElectromyogramWaveformStorage, "EMG", 4096 }, - { UID_ElectrooculogramWaveformStorage, "EOG", 4096 }, - { UID_EncapsulatedCDAStorage, "CDA", 4096 }, - { UID_EncapsulatedMTLStorage, "MTL", 4096 }, - { UID_EncapsulatedOBJStorage, "OBJ", 4096 }, - { UID_EncapsulatedPDFStorage, "PDF", 1024 * 1024 }, - { UID_EncapsulatedSTLStorage, "STL", 4096 }, - { UID_EnhancedCTImageStorage, "CTe", 256 * 512 * 512 }, - { UID_EnhancedMRColorImageStorage, "MRc", 256 * 512 * 512 * 3 }, - { UID_EnhancedMRImageStorage, "MRe", 256 * 512 * 512 }, - { UID_EnhancedPETImageStorage, "PIe", 512 * 512 * 2 }, - { UID_EnhancedSRStorage, "SRe", 4096 }, - { UID_EnhancedUSVolumeStorage, "USe", 512 * 512 }, - { UID_EnhancedXAImageStorage, "XAe", 256 * 512 * 512 }, - { UID_EnhancedXRFImageStorage, "RFe", 256 * 512 * 512 }, - { UID_ExtensibleSRStorage, "SRx", 4096 }, - { UID_GeneralAudioWaveformStorage, "AUG", 4096 }, - { UID_GeneralECGWaveformStorage, "ECG", 4096 }, - { UID_GenericImplantTemplateStorage, "IT", 4096 }, - { UID_GrayscalePlanarMPRVolumetricPresentationStateStorage, "VPg", 4096 }, - { UID_GrayscaleSoftcopyPresentationStateStorage, "PSg", 4096 }, - { UID_HangingProtocolStorage, "HP", 4096 }, - { UID_HemodynamicWaveformStorage, "WVh", 4096 }, - { UID_ImplantAssemblyTemplateStorage, "ITa", 4096 }, - { UID_ImplantationPlanSRDocumentStorage, "SRi", 4096 }, - { UID_ImplantTemplateGroupStorage, "ITg", 4096 }, - { UID_IntraocularLensCalculationsStorage, "OPc", 4096 }, + { UID_AcquisitionContextSRStorage, "SRa", 4096 }, + { UID_AdvancedBlendingPresentationStateStorage, "PSa", 4096 }, + { UID_AmbulatoryECGWaveformStorage, "ECA", 4096 }, + { UID_ArterialPulseWaveformStorage, "WVa", 4096 }, + { UID_AutorefractionMeasurementsStorage, "OPa", 4096 }, + { UID_BasicStructuredDisplayStorage, "SD", 4096 }, + { UID_BasicTextSRStorage, "SRt", 4096 }, + { UID_BasicVoiceAudioWaveformStorage, "AUV", 4096 }, + { UID_BlendingSoftcopyPresentationStateStorage, "PSb", 4096 }, + { UID_BodyPositionWaveformStorage, "WVb", 4096 }, + { UID_BreastProjectionXRayImageStorageForPresentation, "BX", 4096 * 4096 * 2 }, + { UID_BreastProjectionXRayImageStorageForProcessing, "BP", 4096 * 4096 * 2 }, + { UID_BreastTomosynthesisImageStorage, "BT", 4096 * 4096 * 2 }, + { UID_CardiacElectrophysiologyWaveformStorage, "WVc", 4096 }, + { UID_CArmPhotonElectronRadiationRecordStorage, "RRc", 4096 }, + { UID_CArmPhotonElectronRadiationStorage, "Rca", 4096 }, + { UID_ChestCADSRStorage, "SRh", 4096 }, + { UID_ColonCADSRStorage, "SRo", 4096 }, + { UID_ColorPaletteStorage, "CP", 4096 }, + { UID_ColorSoftcopyPresentationStateStorage, "PSc", 4096 }, + { UID_CompositingPlanarMPRVolumetricPresentationStateStorage, "VPc", 4096 }, + { UID_Comprehensive3DSRStorage, "SR3", 4096 }, + { UID_ComprehensiveSRStorage, "SRc", 4096 }, + { UID_ComputedRadiographyImageStorage, "CR", 2048 * 2048 * 2 }, + { UID_ContentAssessmentResultsStorage, "AS", 4096 }, + { UID_CornealTopographyMapStorage, "CM", 512 * 512 }, + { UID_CTDefinedProcedureProtocolStorage, "PPcd", 4096 }, /* was PPd */ + { UID_CTImageStorage, "CT", 512 * 512 * 2 }, + { UID_CTPerformedProcedureProtocolStorage, "PPcp", 4096 }, /* was PPp */ + { UID_DeformableSpatialRegistrationStorage, "RGd", 4096 }, + { UID_DermoscopicPhotographyImageStorage, "VLd", 768 * 576 * 3 }, + { UID_DigitalIntraOralXRayImageStorageForPresentation, "DXo", 1024 * 1024 * 2 }, + { UID_DigitalIntraOralXRayImageStorageForProcessing, "DPo", 1024 * 1024 * 2 }, + { UID_DigitalMammographyXRayImageStorageForPresentation, "DXm", 4096 * 4096 * 2 }, + { UID_DigitalMammographyXRayImageStorageForProcessing, "DPm", 4096 * 4096 * 2 }, + { UID_DigitalXRayImageStorageForPresentation, "DX", 2048 * 2048 * 2 }, + { UID_DigitalXRayImageStorageForProcessing, "DP", 2048 * 2048 * 2 }, + { UID_ElectromyogramWaveformStorage, "EMG", 4096 }, + { UID_ElectrooculogramWaveformStorage, "EOG", 4096 }, + { UID_EncapsulatedCDAStorage, "CDA", 4096 }, + { UID_EncapsulatedMTLStorage, "MTL", 4096 }, + { UID_EncapsulatedOBJStorage, "OBJ", 4096 }, + { UID_EncapsulatedPDFStorage, "PDF", 1024 * 1024 }, + { UID_EncapsulatedSTLStorage, "STL", 4096 }, + { UID_EnhancedCTImageStorage, "CTe", 256 * 512 * 512 }, + { UID_EnhancedMRColorImageStorage, "MRc", 256 * 512 * 512 * 3 }, + { UID_EnhancedMRImageStorage, "MRe", 256 * 512 * 512 }, + { UID_EnhancedPETImageStorage, "PIe", 512 * 512 * 2 }, + { UID_EnhancedSRStorage, "SRe", 4096 }, + { UID_EnhancedUSVolumeStorage, "USe", 512 * 512 }, + { UID_EnhancedXAImageStorage, "XAe", 256 * 512 * 512 }, + { UID_EnhancedXRayRadiationDoseSRStorage, "SRde", 4096 }, + { UID_EnhancedXRFImageStorage, "RFe", 256 * 512 * 512 }, + { UID_ExtensibleSRStorage, "SRx", 4096 }, + { UID_GeneralAudioWaveformStorage, "AUG", 4096 }, + { UID_GeneralECGWaveformStorage, "ECG", 4096 }, + { UID_GenericImplantTemplateStorage, "IT", 4096 }, + { UID_GrayscalePlanarMPRVolumetricPresentationStateStorage, "VPg", 4096 }, + { UID_GrayscaleSoftcopyPresentationStateStorage, "PSg", 4096 }, + { UID_HangingProtocolStorage, "HP", 4096 }, + { UID_HemodynamicWaveformStorage, "WVh", 4096 }, + { UID_ImplantAssemblyTemplateStorage, "ITa", 4096 }, + { UID_ImplantationPlanSRDocumentStorage, "SRi", 4096 }, + { UID_ImplantTemplateGroupStorage, "ITg", 4096 }, + { UID_IntraocularLensCalculationsStorage, "OPc", 4096 }, { UID_IntravascularOpticalCoherenceTomographyImageStorageForPresentation, "OCt", 512 * 512 }, { UID_IntravascularOpticalCoherenceTomographyImageStorageForProcessing, "OCp", 512 * 512 }, - { UID_KeratometryMeasurementsStorage, "OPk", 4096 }, - { UID_KeyObjectSelectionDocumentStorage, "KO", 4096 }, - { UID_LegacyConvertedEnhancedCTImageStorage, "CTl", 512 * 512 * 2 }, - { UID_LegacyConvertedEnhancedMRImageStorage, "MRl", 256 * 256 * 2 }, - { UID_LegacyConvertedEnhancedPETImageStorage, "PIl", 512 * 512 * 2 }, - { UID_LensometryMeasurementsStorage, "OPl", 4096 }, - { UID_MacularGridThicknessAndVolumeReportStorage, "SRg", 4096 }, - { UID_MammographyCADSRStorage, "SRm", 4096 }, - { UID_MRImageStorage, "MR", 256 * 256 * 2 }, - { UID_MRSpectroscopyStorage, "MRs", 256 * 512 * 512 }, - { UID_MultichannelRespiratoryWaveformStorage, "WVm", 4096 }, - { UID_MultiframeGrayscaleByteSecondaryCaptureImageStorage, "SCb", 512 * 512 }, - { UID_MultiframeGrayscaleWordSecondaryCaptureImageStorage, "SCw", 512 * 512 * 2 }, - { UID_MultiframeSingleBitSecondaryCaptureImageStorage, "SCs", 1024 * 1024 }, /* roughly an A4 300dpi scan */ - { UID_MultiframeTrueColorSecondaryCaptureImageStorage, "SCc", 512 * 512 * 3 }, + { UID_KeratometryMeasurementsStorage, "OPk", 4096 }, + { UID_KeyObjectSelectionDocumentStorage, "KO", 4096 }, + { UID_LegacyConvertedEnhancedCTImageStorage, "CTl", 512 * 512 * 2 }, + { UID_LegacyConvertedEnhancedMRImageStorage, "MRl", 256 * 256 * 2 }, + { UID_LegacyConvertedEnhancedPETImageStorage, "PIl", 512 * 512 * 2 }, + { UID_LensometryMeasurementsStorage, "OPl", 4096 }, + { UID_MacularGridThicknessAndVolumeReportStorage, "SRg", 4096 }, + { UID_MammographyCADSRStorage, "SRm", 4096 }, + { UID_MicroscopyBulkSimpleAnnotationsStorage, "MAs", 4096 }, + { UID_MRImageStorage, "MR", 256 * 256 * 2 }, + { UID_MRSpectroscopyStorage, "MRs", 256 * 512 * 512 }, + { UID_MultichannelRespiratoryWaveformStorage, "WVm", 4096 }, + { UID_MultiframeGrayscaleByteSecondaryCaptureImageStorage, "SCb", 512 * 512 }, + { 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_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_PerformedImagingAgentAdministrationSRStorage, "SRi", 4096 }, - { UID_PlannedImagingAgentAdministrationSRStorage, "SRj", 4096 }, - { UID_PositronEmissionTomographyImageStorage, "PI", 512 * 512 * 2 }, - { UID_ProcedureLogStorage, "SRp", 4096 }, - { UID_ProtocolApprovalStorage, "PA", 4096 }, - { UID_PseudoColorSoftcopyPresentationStateStorage, "PSp", 4096 }, - { UID_RadiopharmaceuticalRadiationDoseSRStorage, "SRr", 4096 }, - { UID_RawDataStorage, "RAW", 512 * 512 * 256 }, - { UID_RealWorldValueMappingStorage, "RWM", 4096 }, - { UID_RespiratoryWaveformStorage, "WVr", 4096 }, - { UID_RoboticArmRadiationStorage, "Rra", 4096 }, /* was RRr */ - { UID_RoboticRadiationRecordStorage, "RRr", 4096 }, - { UID_RoutineScalpElectroencephalogramWaveformStorage, "EEG", 4096 }, - { UID_RTBeamsDeliveryInstructionStorage, "RTd", 4096 }, - { UID_RTBeamsTreatmentRecordStorage, "RTb", 4096 }, - { UID_RTBrachyApplicationSetupDeliveryInstructionStorage, "RTa", 4096 }, - { UID_RTBrachyTreatmentRecordStorage, "RTr", 4096 }, - { UID_RTDoseStorage, "RD", 4096 }, - { UID_RTImageStorage, "RI", 4096 }, - { UID_RTIonBeamsTreatmentRecordStorage, "RTi", 4096 }, - { UID_RTIonPlanStorage, "RPi", 4096 }, - { UID_RTPlanStorage, "RP" , 4096 }, - { UID_RTPhysicianIntentStorage, "RIp", 4096 }, - { UID_RTRadiationRecordSetStorage, "RSr", 4096 }, - { UID_RTRadiationSalvageRecordStorage, "RRs", 4096 }, - { UID_RTRadiationSetStorage, "RSe", 4096 }, /* was RRs */ - { UID_RTSegmentAnnotationStorage, "RAs", 4096 }, /* was RRs */ - { UID_RTStructureSetStorage, "RS", 4096 }, - { UID_RTTreatmentSummaryRecordStorage, "RTs", 4096 }, - { UID_SecondaryCaptureImageStorage, "SC", 512 * 512 * 2 }, - { UID_SegmentationStorage, "SG", 4096 }, + { 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_PerformedImagingAgentAdministrationSRStorage, "SRi", 4096 }, + { UID_PlannedImagingAgentAdministrationSRStorage, "SRj", 4096 }, + { UID_PositronEmissionTomographyImageStorage, "PI", 512 * 512 * 2 }, + { UID_ProcedureLogStorage, "SRp", 4096 }, + { UID_ProtocolApprovalStorage, "PA", 4096 }, + { UID_PseudoColorSoftcopyPresentationStateStorage, "PSp", 4096 }, + { UID_RadiopharmaceuticalRadiationDoseSRStorage, "SRr", 4096 }, + { UID_RawDataStorage, "RAW", 512 * 512 * 256 }, + { UID_RealWorldValueMappingStorage, "RWM", 4096 }, + { UID_RespiratoryWaveformStorage, "WVr", 4096 }, + { UID_RoboticArmRadiationStorage, "Rra", 4096 }, /* was RRr */ + { UID_RoboticRadiationRecordStorage, "RRr", 4096 }, + { UID_RoutineScalpElectroencephalogramWaveformStorage, "EEG", 4096 }, + { UID_RTBeamsDeliveryInstructionStorage, "RTd", 4096 }, + { UID_RTBeamsTreatmentRecordStorage, "RTb", 4096 }, + { UID_RTBrachyApplicationSetupDeliveryInstructionStorage, "RTa", 4096 }, + { UID_RTBrachyTreatmentRecordStorage, "RTr", 4096 }, + { UID_RTDoseStorage, "RD", 4096 }, + { UID_RTImageStorage, "RI", 4096 }, + { UID_RTIonBeamsTreatmentRecordStorage, "RTi", 4096 }, + { UID_RTIonPlanStorage, "RPi", 4096 }, + { UID_RTPlanStorage, "RP" , 4096 }, + { UID_RTPhysicianIntentStorage, "RIp", 4096 }, + { UID_RTRadiationRecordSetStorage, "RSr", 4096 }, + { UID_RTRadiationSalvageRecordStorage, "RRs", 4096 }, + { UID_RTRadiationSetDeliveryInstructionStorage, "RSd", 4096 }, + { UID_RTRadiationSetStorage, "RSe", 4096 }, /* was RRs */ + { UID_RTSegmentAnnotationStorage, "RAs", 4096 }, /* was RRs */ + { UID_RTStructureSetStorage, "RS", 4096 }, + { UID_RTTreatmentPreparationStorage, "RTp", 4096 }, + { UID_RTTreatmentSummaryRecordStorage, "RTs", 4096 }, + { UID_SecondaryCaptureImageStorage, "SC", 512 * 512 * 2 }, + { UID_SegmentationStorage, "SG", 4096 }, { UID_SegmentedVolumeRenderingVolumetricPresentationStateStorage, "VPs", 4096 }, - { UID_SimplifiedAdultEchoSRStorage, "SRu", 4096 }, - { UID_SleepElectroencephalogramWaveformStorage, "WVs", 4096 }, - { UID_SpatialFiducialsStorage, "FID", 4096 }, - { UID_SpatialRegistrationStorage, "RGs", 4096 }, - { UID_SpectaclePrescriptionReportStorage, "SRs", 4096 }, - { UID_StereometricRelationshipStorage, "OPr", 4096 }, - { UID_SubjectiveRefractionMeasurementsStorage, "OPs", 4096 }, - { UID_SurfaceScanMeshStorage, "SSm", 4096 }, - { UID_SurfaceScanPointCloudStorage, "SSp", 4096 }, - { UID_SurfaceSegmentationStorage, "SGs", 4096 }, - { UID_TomotherapeuticRadiationRecordStorage, "RRt", 4096 }, - { UID_TomotherapeuticRadiationStorage, "Rto", 4096 }, /* was RRt */ - { UID_TractographyResultsStorage, "TR", 4096 }, - { UID_TwelveLeadECGWaveformStorage, "TLE", 4096 }, - { UID_UltrasoundImageStorage, "US", 512 * 512 }, - { UID_UltrasoundMultiframeImageStorage, "USm", 512 * 512 }, - { UID_VideoEndoscopicImageStorage, "VVe", 768 * 576 * 3 }, - { UID_VideoMicroscopicImageStorage, "VVm", 768 * 576 * 3 }, - { UID_VideoPhotographicImageStorage, "VVp", 768 * 576 * 3 }, - { UID_VisualAcuityMeasurementsStorage, "OPv", 4096 }, - { UID_VLEndoscopicImageStorage, "VLe", 768 * 576 * 3 }, - { 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_VolumeRenderingVolumetricPresentationStateStorage, "VPv", 4096 }, + { UID_SimplifiedAdultEchoSRStorage, "SRu", 4096 }, + { UID_SleepElectroencephalogramWaveformStorage, "WVs", 4096 }, + { UID_SpatialFiducialsStorage, "FID", 4096 }, + { UID_SpatialRegistrationStorage, "RGs", 4096 }, + { UID_SpectaclePrescriptionReportStorage, "SRs", 4096 }, + { UID_StereometricRelationshipStorage, "OPr", 4096 }, + { UID_SubjectiveRefractionMeasurementsStorage, "OPs", 4096 }, + { UID_SurfaceScanMeshStorage, "SSm", 4096 }, + { UID_SurfaceScanPointCloudStorage, "SSp", 4096 }, + { UID_SurfaceSegmentationStorage, "SGs", 4096 }, + { UID_TomotherapeuticRadiationRecordStorage, "RRt", 4096 }, + { UID_TomotherapeuticRadiationStorage, "Rto", 4096 }, /* was RRt */ + { UID_TractographyResultsStorage, "TR", 4096 }, + { UID_TwelveLeadECGWaveformStorage, "TLE", 4096 }, + { UID_UltrasoundImageStorage, "US", 512 * 512 }, + { UID_UltrasoundMultiframeImageStorage, "USm", 512 * 512 }, + { UID_VideoEndoscopicImageStorage, "VVe", 768 * 576 * 3 }, + { UID_VideoMicroscopicImageStorage, "VVm", 768 * 576 * 3 }, + { UID_VideoPhotographicImageStorage, "VVp", 768 * 576 * 3 }, + { UID_VisualAcuityMeasurementsStorage, "OPv", 4096 }, + { UID_VLEndoscopicImageStorage, "VLe", 768 * 576 * 3 }, + { 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_VolumeRenderingVolumetricPresentationStateStorage, "VPv", 4096 }, { UID_WideFieldOphthalmicPhotographyStereographicProjectionImageStorage, "OWs", 768 * 576 * 3 }, - { UID_WideFieldOphthalmicPhotography3DCoordinatesImageStorage, "OW3", 768 * 576 * 3 }, - { UID_XAXRFGrayscaleSoftcopyPresentationStateStorage, "PSx", 4096 }, - { UID_XRay3DAngiographicImageStorage, "XA3", 256 * 512 * 512 }, - { UID_XRay3DCraniofacialImageStorage, "XC3", 256 * 512 * 512 }, - { UID_XRayAngiographicImageStorage, "XA", 256 * 512 * 512 }, - { UID_XRayRadiationDoseSRStorage, "SRd", 4096 }, - { UID_XRayRadiofluoroscopicImageStorage, "RF", 256 * 512 * 512 }, + { UID_WideFieldOphthalmicPhotography3DCoordinatesImageStorage, "OW3", 768 * 576 * 3 }, + { UID_XADefinedProcedureProtocolStorage, "PPxd", 4096 }, + { UID_XAPerformedProcedureProtocolStorage, "PPxp", 4096 }, + { UID_XAXRFGrayscaleSoftcopyPresentationStateStorage, "PSx", 4096 }, + { UID_XRay3DAngiographicImageStorage, "XA3", 256 * 512 * 512 }, + { UID_XRay3DCraniofacialImageStorage, "XC3", 256 * 512 * 512 }, + { UID_XRayAngiographicImageStorage, "XA", 256 * 512 * 512 }, + { UID_XRayRadiationDoseSRStorage, "SRd", 4096 }, + { UID_XRayRadiofluoroscopicImageStorage, "RF", 256 * 512 * 512 }, // retired - { UID_RETIRED_HardcopyColorImageStorage, "HC", 4096 }, - { UID_RETIRED_HardcopyGrayscaleImageStorage, "HG", 4096 }, - { UID_RETIRED_NuclearMedicineImageStorage, "NMr", 64 * 64 * 2 }, - { UID_RETIRED_StandaloneCurveStorage, "CV", 4096 }, - { UID_RETIRED_StandaloneModalityLUTStorage, "ML", 4096 * 2 }, - { UID_RETIRED_StandaloneOverlayStorage, "OV", 512 * 512 }, - { UID_RETIRED_StandalonePETCurveStorage, "PC", 4096 }, - { UID_RETIRED_StandaloneVOILUTStorage, "VO", 4096 * 2 }, - { UID_RETIRED_StoredPrintStorage, "SP", 4096 }, - { UID_RETIRED_UltrasoundImageStorage, "USr", 512 * 512 }, - { UID_RETIRED_UltrasoundMultiframeImageStorage, "USf", 512 * 512 }, - { UID_RETIRED_VLImageStorage, "VLr", 768 * 576 * 3 }, - { UID_RETIRED_VLMultiframeImageStorage, "VMr", 768 * 576 * 3 }, - { UID_RETIRED_XRayAngiographicBiPlaneImageStorage, "XB", 512 * 512 * 2 }, + { UID_RETIRED_HardcopyColorImageStorage, "HC", 4096 }, + { UID_RETIRED_HardcopyGrayscaleImageStorage, "HG", 4096 }, + { UID_RETIRED_NuclearMedicineImageStorage, "NMr", 64 * 64 * 2 }, + { UID_RETIRED_StandaloneCurveStorage, "CV", 4096 }, + { UID_RETIRED_StandaloneModalityLUTStorage, "ML", 4096 * 2 }, + { UID_RETIRED_StandaloneOverlayStorage, "OV", 512 * 512 }, + { UID_RETIRED_StandalonePETCurveStorage, "PC", 4096 }, + { UID_RETIRED_StandaloneVOILUTStorage, "VO", 4096 * 2 }, + { UID_RETIRED_StoredPrintStorage, "SP", 4096 }, + { UID_RETIRED_UltrasoundImageStorage, "USr", 512 * 512 }, + { UID_RETIRED_UltrasoundMultiframeImageStorage, "USf", 512 * 512 }, + { UID_RETIRED_VLImageStorage, "VLr", 768 * 576 * 3 }, + { UID_RETIRED_VLMultiframeImageStorage, "VMr", 768 * 576 * 3 }, + { UID_RETIRED_XRayAngiographicBiPlaneImageStorage, "XB", 512 * 512 * 2 }, // draft - { UID_DRAFT_RTBeamsDeliveryInstructionStorage, "RBd", 4096 }, - { UID_DRAFT_SRAudioStorage, "SR_", 4096 }, /* was "SRw" */ - { UID_DRAFT_SRComprehensiveStorage, "SR_", 4096 }, /* was "SRx" */ - { UID_DRAFT_SRDetailStorage, "SR_", 4096 }, /* was "SRy" */ - { UID_DRAFT_SRTextStorage, "SR_", 4096 }, /* was "SRz" */ - { UID_DRAFT_WaveformStorage, "WVd", 4096 }, + { UID_DRAFT_RTBeamsDeliveryInstructionStorage, "RB_d", 4096 }, /* was "RBd" */ + { UID_DRAFT_SRAudioStorage, "SR_a", 4096 }, /* was "SRw" */ + { UID_DRAFT_SRComprehensiveStorage, "SR_c", 4096 }, /* was "SRx" */ + { UID_DRAFT_SRDetailStorage, "SR_d", 4096 }, /* was "SRy" */ + { UID_DRAFT_SRTextStorage, "SR_t", 4096 }, /* was "SRz" */ + { UID_DRAFT_WaveformStorage, "WV_d", 4096 }, /* was "WVd" */ // DICOS - { UID_DICOS_CTImageStorage, "CTs", 512 * 512 * 2 }, - { UID_DICOS_DigitalXRayImageStorageForPresentation, "DXs", 2048 * 2048 * 2 }, - { UID_DICOS_DigitalXRayImageStorageForProcessing, "DPs", 2048 * 2048 * 2 }, - { UID_DICOS_ThreatDetectionReportStorage, "TDR", 4096 }, - { UID_DICOS_2DAITStorage, "AI2", 4096 }, - { UID_DICOS_3DAITStorage, "AI3", 4096 }, - { UID_DICOS_QuadrupoleResonanceStorage, "QR", 4096 }, + { UID_DICOS_CTImageStorage, "CTs", 512 * 512 * 2 }, + { UID_DICOS_DigitalXRayImageStorageForPresentation, "DXs", 2048 * 2048 * 2 }, + { UID_DICOS_DigitalXRayImageStorageForProcessing, "DPs", 2048 * 2048 * 2 }, + { UID_DICOS_ThreatDetectionReportStorage, "TDR", 4096 }, + { UID_DICOS_2DAITStorage, "AI2", 4096 }, + { UID_DICOS_3DAITStorage, "AI3", 4096 }, + { UID_DICOS_QuadrupoleResonanceStorage, "QR", 4096 }, // DICONDE - { UID_DICONDE_EddyCurrentImageStorage, "EC", 512 * 512 }, - { UID_DICONDE_EddyCurrentMultiframeImageStorage, "ECm", 512 * 512 } + { UID_DICONDE_EddyCurrentImageStorage, "EC", 512 * 512 }, + { UID_DICONDE_EddyCurrentMultiframeImageStorage, "ECm", 512 * 512 } }; static const int numberOfDcmModalityTableEntries = OFstatic_cast(int, sizeof(modalities) / sizeof(DcmModalityTable)); diff -Nru dcmtk-3.6.6/dcmdata/libsrc/dcvrat.cc dcmtk-3.6.7/dcmdata/libsrc/dcvrat.cc --- dcmtk-3.6.6/dcmdata/libsrc/dcvrat.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/libsrc/dcvrat.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1994-2020, OFFIS e.V. + * Copyright (C) 1994-2021, 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/dcmdata/dcvrat.h" #include "dcmtk/dcmdata/dcjson.h" -#define INCLUDE_CSTDIO -#define INCLUDE_CSTRING -#include "dcmtk/ofstd/ofstdinc.h" - // ******************************** diff -Nru dcmtk-3.6.6/dcmdata/libsrc/dcvr.cc dcmtk-3.6.7/dcmdata/libsrc/dcvr.cc --- dcmtk-3.6.6/dcmdata/libsrc/dcvr.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/libsrc/dcvr.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1994-2020, OFFIS e.V. + * Copyright (C) 1994-2022, 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/dcmdata/dcvr.h" #include "dcmtk/dcmdata/dctypes.h" -#define INCLUDE_CSTDLIB -#define INCLUDE_CSTRING -#include "dcmtk/ofstd/ofstdinc.h" - /* ** global flags */ @@ -131,7 +127,7 @@ { EVR_ST, "ST", &noDelimiters, sizeof(char), DCMVR_PROP_ISASTRING | DCMVR_PROP_ISAFFECTEDBYCHARSET | DCMVR_PROP_ISLENGTHINCHAR, 0, 1024 }, { EVR_SV, "SV", &noDelimiters, sizeof(Sint64), DCMVR_PROP_EXTENDEDLENGTHENCODING, 8, 8 }, { 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, 4294967294U }, + { EVR_UC, "UC", &bsDelimiter, 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, 4294967294U }, @@ -146,27 +142,19 @@ { EVR_up, "up", &noDelimiters, sizeof(Uint32), DCMVR_PROP_NONSTANDARD, 4, 4 }, /* unique prefixes have been "invented" for the following internal VRs */ - { EVR_item, "it_EVR_item", &noDelimiters, 0, - DCMVR_PROP_NONSTANDARD | DCMVR_PROP_INTERNAL, 0, 0 }, - { EVR_metainfo, "mi_EVR_metainfo", &noDelimiters, 0, - DCMVR_PROP_NONSTANDARD | DCMVR_PROP_INTERNAL, 0, 0 }, - { EVR_dataset, "ds_EVR_dataset", &noDelimiters, 0, - DCMVR_PROP_NONSTANDARD | DCMVR_PROP_INTERNAL, 0, 0 }, - { EVR_fileFormat, "ff_EVR_fileFormat", &noDelimiters, 0, - DCMVR_PROP_NONSTANDARD | DCMVR_PROP_INTERNAL, 0, 0 }, - { EVR_dicomDir, "dd_EVR_dicomDir", &noDelimiters, 0, - DCMVR_PROP_NONSTANDARD | DCMVR_PROP_INTERNAL, 0, 0 }, - { EVR_dirRecord, "dr_EVR_dirRecord", &noDelimiters, 0, - DCMVR_PROP_NONSTANDARD | DCMVR_PROP_INTERNAL, 0, 0 }, + { EVR_item, "it_EVR_item", &noDelimiters, 0, DCMVR_PROP_NONSTANDARD | DCMVR_PROP_INTERNAL, 0, 0 }, + { EVR_metainfo, "mi_EVR_metainfo", &noDelimiters, 0, DCMVR_PROP_NONSTANDARD | DCMVR_PROP_INTERNAL, 0, 0 }, + { EVR_dataset, "ds_EVR_dataset", &noDelimiters, 0, DCMVR_PROP_NONSTANDARD | DCMVR_PROP_INTERNAL, 0, 0 }, + { EVR_fileFormat, "ff_EVR_fileFormat", &noDelimiters, 0, DCMVR_PROP_NONSTANDARD | DCMVR_PROP_INTERNAL, 0, 0 }, + { EVR_dicomDir, "dd_EVR_dicomDir", &noDelimiters, 0, DCMVR_PROP_NONSTANDARD | DCMVR_PROP_INTERNAL, 0, 0 }, + { EVR_dirRecord, "dr_EVR_dirRecord", &noDelimiters, 0, DCMVR_PROP_NONSTANDARD | DCMVR_PROP_INTERNAL, 0, 0 }, - { EVR_pixelSQ, "ps_EVR_pixelSQ", &noDelimiters, sizeof(Uint8), - DCMVR_PROP_NONSTANDARD | DCMVR_PROP_INTERNAL, 0, DCM_UndefinedLength }, + { EVR_pixelSQ, "ps_EVR_pixelSQ", &noDelimiters, sizeof(Uint8), DCMVR_PROP_NONSTANDARD | DCMVR_PROP_INTERNAL, 0, DCM_UndefinedLength }, /* Moved from internal use to non standard only: necessary to distinguish from "normal" OB */ - { EVR_pixelItem, "pi", &noDelimiters, sizeof(Uint8), - DCMVR_PROP_NONSTANDARD, 0, DCM_UndefinedLength }, + { EVR_pixelItem, "pi", &noDelimiters, sizeof(Uint8), DCMVR_PROP_NONSTANDARD, 0, DCM_UndefinedLength }, - { EVR_UNKNOWN, "??", &noDelimiters, sizeof(Uint8), /* EVR_UNKNOWN (i.e. "future" VRs) should be mapped to UN or OB */ - DCMVR_PROP_NONSTANDARD | DCMVR_PROP_INTERNAL | DCMVR_PROP_EXTENDEDLENGTHENCODING | DCMVR_PROP_UNDEFINEDLENGTH, 0, DCM_UndefinedLength }, + /* EVR_UNKNOWN (i.e. "future" VRs) should be mapped to UN or OB */ + { EVR_UNKNOWN, "??", &noDelimiters, sizeof(Uint8), DCMVR_PROP_NONSTANDARD | DCMVR_PROP_INTERNAL | DCMVR_PROP_EXTENDEDLENGTHENCODING | DCMVR_PROP_UNDEFINEDLENGTH, 0, DCM_UndefinedLength }, /* Unknown Value Representation */ { EVR_UN, "UN", &noDelimiters, sizeof(Uint8), DCMVR_PROP_EXTENDEDLENGTHENCODING | DCMVR_PROP_UNDEFINEDLENGTH, 0, 4294967294U }, @@ -176,8 +164,8 @@ /* Overlay Data - only used in ident() */ { EVR_OverlayData, "OverlayData", &noDelimiters, 0, DCMVR_PROP_INTERNAL, 0, DCM_UndefinedLength }, - { EVR_UNKNOWN2B, "??", &noDelimiters, sizeof(Uint8), /* illegal VRs, we assume no extended length coding */ - DCMVR_PROP_NONSTANDARD | DCMVR_PROP_INTERNAL, 0, DCM_UndefinedLength }, + /* illegal VRs, we assume no extended length coding */ + { EVR_UNKNOWN2B, "??", &noDelimiters, sizeof(Uint8), DCMVR_PROP_NONSTANDARD | DCMVR_PROP_INTERNAL, 0, DCM_UndefinedLength }, }; diff -Nru dcmtk-3.6.6/dcmdata/libsrc/dcvrcs.cc dcmtk-3.6.7/dcmdata/libsrc/dcvrcs.cc --- dcmtk-3.6.6/dcmdata/libsrc/dcvrcs.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/libsrc/dcvrcs.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1994-2017, OFFIS e.V. + * Copyright (C) 1994-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -22,9 +22,6 @@ #include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ -#define INCLUDE_CCTYPE -#include "dcmtk/ofstd/ofstdinc.h" - #include "dcmtk/dcmdata/dcvrcs.h" #include "dcmtk/dcmdata/dcmatch.h" diff -Nru dcmtk-3.6.6/dcmdata/libsrc/dcvrda.cc dcmtk-3.6.7/dcmdata/libsrc/dcvrda.cc --- dcmtk-3.6.6/dcmdata/libsrc/dcvrda.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/libsrc/dcvrda.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1994-2018, OFFIS e.V. + * Copyright (C) 1994-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -24,9 +24,6 @@ #include "dcmtk/dcmdata/dcvrda.h" #include "dcmtk/dcmdata/dcvrtm.h" #include "dcmtk/ofstd/ofstd.h" - -#define INCLUDE_CSTDIO -#include "dcmtk/ofstd/ofstdinc.h" #include "dcmtk/dcmdata/dcmatch.h" diff -Nru dcmtk-3.6.6/dcmdata/libsrc/dcvrdt.cc dcmtk-3.6.7/dcmdata/libsrc/dcvrdt.cc --- dcmtk-3.6.6/dcmdata/libsrc/dcvrdt.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/libsrc/dcvrdt.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1994-2018, OFFIS e.V. + * Copyright (C) 1994-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -28,10 +28,6 @@ #include "dcmtk/ofstd/ofstring.h" #include "dcmtk/ofstd/ofstd.h" -#define INCLUDE_CSTDIO -#include "dcmtk/ofstd/ofstdinc.h" - - #define MAX_DT_LENGTH 26 @@ -243,7 +239,7 @@ return EC_IllegalParameter; unsigned int month = 1; unsigned int day = 1; - double timeZone; + double timeZone = 0.0; // check for/extract time zone if (dicomDateTimeSize >= 9 && DcmTime::getTimeZoneFromString(dicomDateTime + dicomDateTimeSize - 5, 5, timeZone).good()) dicomDateTimeSize -= 5; diff -Nru dcmtk-3.6.6/dcmdata/libsrc/dcvrfd.cc dcmtk-3.6.7/dcmdata/libsrc/dcvrfd.cc --- dcmtk-3.6.6/dcmdata/libsrc/dcvrfd.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/libsrc/dcvrfd.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1994-2020, OFFIS e.V. + * Copyright (C) 1994-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -27,11 +27,6 @@ #include "dcmtk/ofstd/ofmath.h" #include "dcmtk/dcmdata/dcjson.h" -#define INCLUDE_CSTDIO -#define INCLUDE_CSTRING -#include "dcmtk/ofstd/ofstdinc.h" - - // ******************************** DcmFloatingPointDouble::DcmFloatingPointDouble(const DcmTag &tag) @@ -190,11 +185,11 @@ { /* check whether first value is printed (omit delimiter) */ if (i == 0) - OFStandard::ftoa(buffer, sizeof(buffer), *doubleVals, 0, 0, 17 /* DBL_DIG + 2 for DICOM FD */); + OFStandard::ftoa(buffer, sizeof(buffer), *doubleVals, 0, 0, 17 /* DBL_DECIMAL_DIG for DICOM FD */); else { buffer[0] = '\\'; - OFStandard::ftoa(buffer + 1, sizeof(buffer) - 1, *doubleVals, 0, 0, 17 /* DBL_DIG + 2 for DICOM FD */); + OFStandard::ftoa(buffer + 1, sizeof(buffer) - 1, *doubleVals, 0, 0, 17 /* DBL_DECIMAL_DIG for DICOM FD */); } /* check whether current value sticks to the length limit */ newLength = printedLength + OFstatic_cast(unsigned long, strlen(buffer)); @@ -273,7 +268,7 @@ { /* ... and convert it to a character string */ char buffer[64]; - OFStandard::ftoa(buffer, sizeof(buffer), doubleVal, 0, 0, 17 /* DBL_DIG + 2 for DICOM FD */); + OFStandard::ftoa(buffer, sizeof(buffer), doubleVal, 0, 0, 17 /* DBL_DECIMAL_DIG for DICOM FD */); /* assign result */ stringVal = buffer; } diff -Nru dcmtk-3.6.6/dcmdata/libsrc/dcvrfl.cc dcmtk-3.6.7/dcmdata/libsrc/dcvrfl.cc --- dcmtk-3.6.6/dcmdata/libsrc/dcvrfl.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/libsrc/dcvrfl.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1994-2020, OFFIS e.V. + * Copyright (C) 1994-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -27,11 +27,6 @@ #include "dcmtk/ofstd/ofmath.h" #include "dcmtk/dcmdata/dcjson.h" -#define INCLUDE_CSTDIO -#define INCLUDE_CSTRING -#include "dcmtk/ofstd/ofstdinc.h" - - // ******************************** @@ -192,11 +187,11 @@ { /* check whether first value is printed (omit delimiter) */ if (i == 0) - OFStandard::ftoa(buffer, sizeof(buffer), *floatVals, 0, 0, 8 /* FLT_DIG + 2 for DICOM FL */); + OFStandard::ftoa(buffer, sizeof(buffer), *floatVals, 0, 0, 9 /* FLT_DECIMAL_DIG for DICOM FL */); else { buffer[0] = '\\'; - OFStandard::ftoa(buffer + 1, sizeof(buffer) - 1, *floatVals, 0, 0, 8 /* FLT_DIG + 2 for DICOM FL */); + OFStandard::ftoa(buffer + 1, sizeof(buffer) - 1, *floatVals, 0, 0, 9 /* FLT_DECIMAL_DIG for DICOM FL */); } /* check whether current value sticks to the length limit */ newLength = printedLength + OFstatic_cast(unsigned long, strlen(buffer)); @@ -275,7 +270,7 @@ { /* ... and convert it to a character string */ char buffer[64]; - OFStandard::ftoa(buffer, sizeof(buffer), floatVal, 0, 0, 8 /* FLT_DIG + 2 for DICOM FL */); + OFStandard::ftoa(buffer, sizeof(buffer), floatVal, 0, 0, 9 /* FLT_DECIMAL_DIG for DICOM FL */); /* assign result */ value = buffer; } diff -Nru dcmtk-3.6.6/dcmdata/libsrc/dcvris.cc dcmtk-3.6.7/dcmdata/libsrc/dcvris.cc --- dcmtk-3.6.6/dcmdata/libsrc/dcvris.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/libsrc/dcvris.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1994-2020, OFFIS e.V. + * Copyright (C) 1994-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -25,11 +25,6 @@ #include "dcmtk/dcmdata/dcjson.h" #include "dcmtk/ofstd/ofstring.h" -#define INCLUDE_CSTDIO -#define INCLUDE_CINTTYPES -#include "dcmtk/ofstd/ofstdinc.h" - - #define MAX_IS_LENGTH 12 diff -Nru dcmtk-3.6.6/dcmdata/libsrc/dcvrlo.cc dcmtk-3.6.7/dcmdata/libsrc/dcvrlo.cc --- dcmtk-3.6.6/dcmdata/libsrc/dcvrlo.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/libsrc/dcvrlo.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1994-2017, OFFIS e.V. + * Copyright (C) 1994-2022, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -152,12 +152,3 @@ /* always report success */ return EC_Normal; } - - -// ******************************** - - -const OFString& DcmLongString::getDelimiterChars() const -{ - return DcmVR(EVR_LO).getDelimiterChars(); -} diff -Nru dcmtk-3.6.6/dcmdata/libsrc/dcvrobow.cc dcmtk-3.6.7/dcmdata/libsrc/dcvrobow.cc --- dcmtk-3.6.6/dcmdata/libsrc/dcvrobow.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/libsrc/dcvrobow.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1994-2020, OFFIS e.V. + * Copyright (C) 1994-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -33,12 +33,6 @@ #include "dcmtk/dcmdata/dcswap.h" #include "dcmtk/dcmdata/dcuid.h" /* for UID generation */ -#define INCLUDE_CSTDIO -#define INCLUDE_CSTDLIB -#define INCLUDE_CSTRING -#include "dcmtk/ofstd/ofstdinc.h" - - // ******************************** diff -Nru dcmtk-3.6.6/dcmdata/libsrc/dcvrpn.cc dcmtk-3.6.7/dcmdata/libsrc/dcvrpn.cc --- dcmtk-3.6.6/dcmdata/libsrc/dcvrpn.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/libsrc/dcvrpn.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1994-2020, OFFIS e.V. + * Copyright (C) 1994-2022, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -741,12 +741,3 @@ } return result; } - - -// ******************************** - - -const OFString& DcmPersonName::getDelimiterChars() const -{ - return DcmVR(EVR_PN).getDelimiterChars(); -} diff -Nru dcmtk-3.6.6/dcmdata/libsrc/dcvrsh.cc dcmtk-3.6.7/dcmdata/libsrc/dcvrsh.cc --- dcmtk-3.6.6/dcmdata/libsrc/dcvrsh.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/libsrc/dcvrsh.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1994-2017, OFFIS e.V. + * Copyright (C) 1994-2022, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -152,12 +152,3 @@ /* always report success */ return EC_Normal; } - - -// ******************************** - - -const OFString& DcmShortString::getDelimiterChars() const -{ - return DcmVR(EVR_SH).getDelimiterChars(); -} diff -Nru dcmtk-3.6.6/dcmdata/libsrc/dcvrsl.cc dcmtk-3.6.7/dcmdata/libsrc/dcvrsl.cc --- dcmtk-3.6.6/dcmdata/libsrc/dcvrsl.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/libsrc/dcvrsl.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1994-2019, OFFIS e.V. + * Copyright (C) 1994-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -25,12 +25,6 @@ #include "dcmtk/ofstd/ofstream.h" #include "dcmtk/dcmdata/dcvrsl.h" -#define INCLUDE_CSTDIO -#define INCLUDE_CSTRING -#define INCLUDE_CINTTYPES -#include "dcmtk/ofstd/ofstdinc.h" - - // ******************************** diff -Nru dcmtk-3.6.6/dcmdata/libsrc/dcvrss.cc dcmtk-3.6.7/dcmdata/libsrc/dcvrss.cc --- dcmtk-3.6.6/dcmdata/libsrc/dcvrss.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/libsrc/dcvrss.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1994-2019, OFFIS e.V. + * Copyright (C) 1994-2021, 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/ofstd/ofstream.h" #include "dcmtk/dcmdata/dcvrss.h" -#define INCLUDE_CSTDIO -#define INCLUDE_CSTRING -#include "dcmtk/ofstd/ofstdinc.h" - // ******************************** diff -Nru dcmtk-3.6.6/dcmdata/libsrc/dcvrsv.cc dcmtk-3.6.7/dcmdata/libsrc/dcvrsv.cc --- dcmtk-3.6.6/dcmdata/libsrc/dcvrsv.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/libsrc/dcvrsv.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2019-2020, OFFIS e.V. + * Copyright (C) 2019-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -26,12 +26,6 @@ #include "dcmtk/ofstd/ofstream.h" #include "dcmtk/dcmdata/dcjson.h" -#define INCLUDE_CSTDIO -#define INCLUDE_CSTRING -#define INCLUDE_CINTTYPES -#include "dcmtk/ofstd/ofstdinc.h" - - // ******************************** diff -Nru dcmtk-3.6.6/dcmdata/libsrc/dcvrtm.cc dcmtk-3.6.7/dcmdata/libsrc/dcvrtm.cc --- dcmtk-3.6.6/dcmdata/libsrc/dcvrtm.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/libsrc/dcvrtm.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1994-2018, OFFIS e.V. + * Copyright (C) 1994-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -24,12 +24,8 @@ #include "dcmtk/dcmdata/dcvrtm.h" #include "dcmtk/ofstd/ofstd.h" - -#define INCLUDE_CSTDIO -#include "dcmtk/ofstd/ofstdinc.h" #include "dcmtk/dcmdata/dcmatch.h" - #define MAX_TM_LENGTH 16 diff -Nru dcmtk-3.6.6/dcmdata/libsrc/dcvruc.cc dcmtk-3.6.7/dcmdata/libsrc/dcvruc.cc --- dcmtk-3.6.6/dcmdata/libsrc/dcvruc.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/libsrc/dcvruc.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2015-2017, OFFIS e.V. + * Copyright (C) 2015-2022, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -33,6 +33,7 @@ : DcmCharString(tag, len) { setMaxLength(DCM_UndefinedLength); + setNonSignificantChars(" \\"); } diff -Nru dcmtk-3.6.6/dcmdata/libsrc/dcvrui.cc dcmtk-3.6.7/dcmdata/libsrc/dcvrui.cc --- dcmtk-3.6.6/dcmdata/libsrc/dcvrui.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/libsrc/dcvrui.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1994-2012, OFFIS e.V. + * Copyright (C) 1994-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -28,11 +28,6 @@ #include "dcmtk/dcmdata/dcvrui.h" #include "dcmtk/dcmdata/dcuid.h" -#define INCLUDE_CSTRING -#define INCLUDE_CCTYPE -#include "dcmtk/ofstd/ofstdinc.h" - - #define MAX_UI_LENGTH 64 @@ -181,7 +176,15 @@ if ((stringVal != NULL) && (stringVal[0] == '=')) { uid = dcmFindUIDFromName(stringVal + 1); - uidLen = (uid != NULL) ? OFstatic_cast(Uint32, strlen(uid)) : 0; + /* check whether UID name could be mapped to a UID number */ + if (uid == NULL) + { + DCMDATA_DEBUG("DcmUniqueIdentifier::putString() cannot map UID name '" + << OFSTRING_GUARD(stringVal + 1) << "' to UID value"); + /* return with an error */ + return EC_UnknownUIDName; + } else + uidLen = OFstatic_cast(Uint32, strlen(uid)); } /* call inherited method to set the UID string */ return DcmByteString::putString(uid, uidLen); diff -Nru dcmtk-3.6.6/dcmdata/libsrc/dcvrul.cc dcmtk-3.6.7/dcmdata/libsrc/dcvrul.cc --- dcmtk-3.6.6/dcmdata/libsrc/dcvrul.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/libsrc/dcvrul.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1994-2019, OFFIS e.V. + * Copyright (C) 1994-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -25,12 +25,6 @@ #include "dcmtk/ofstd/ofstream.h" #include "dcmtk/dcmdata/dcvrul.h" -#define INCLUDE_CSTDIO -#define INCLUDE_CSTRING -#define INCLUDE_CINTTYPES -#include "dcmtk/ofstd/ofstdinc.h" - - // ******************************** diff -Nru dcmtk-3.6.6/dcmdata/libsrc/dcvrulup.cc dcmtk-3.6.7/dcmdata/libsrc/dcvrulup.cc --- dcmtk-3.6.6/dcmdata/libsrc/dcvrulup.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/libsrc/dcvrulup.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1994-2017, OFFIS e.V. + * Copyright (C) 1994-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -23,11 +23,6 @@ #include "dcmtk/config/osconfig.h" #include "dcmtk/dcmdata/dcvrulup.h" -#define INCLUDE_CSTDIO -#define INCLUDE_CSTRING -#include "dcmtk/ofstd/ofstdinc.h" - - // ******************************** diff -Nru dcmtk-3.6.6/dcmdata/libsrc/dcvrus.cc dcmtk-3.6.7/dcmdata/libsrc/dcvrus.cc --- dcmtk-3.6.6/dcmdata/libsrc/dcvrus.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/libsrc/dcvrus.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1994-2019, OFFIS e.V. + * Copyright (C) 1994-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -24,11 +24,6 @@ #include "dcmtk/ofstd/ofstream.h" #include "dcmtk/dcmdata/dcvrus.h" -#define INCLUDE_CSTDIO -#define INCLUDE_CSTRING -#include "dcmtk/ofstd/ofstdinc.h" - - // ******************************** diff -Nru dcmtk-3.6.6/dcmdata/libsrc/dcvruv.cc dcmtk-3.6.7/dcmdata/libsrc/dcvruv.cc --- dcmtk-3.6.6/dcmdata/libsrc/dcvruv.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/libsrc/dcvruv.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2019-2020, OFFIS e.V. + * Copyright (C) 2019-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -26,12 +26,6 @@ #include "dcmtk/ofstd/ofstream.h" #include "dcmtk/dcmdata/dcjson.h" -#define INCLUDE_CSTDIO -#define INCLUDE_CSTRING -#define INCLUDE_CINTTYPES -#include "dcmtk/ofstd/ofstdinc.h" - - // ******************************** diff -Nru dcmtk-3.6.6/dcmdata/libsrc/dcxfer.cc dcmtk-3.6.7/dcmdata/libsrc/dcxfer.cc --- dcmtk-3.6.6/dcmdata/libsrc/dcxfer.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/libsrc/dcxfer.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1994-2017, OFFIS e.V. + * Copyright (C) 1994-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -23,10 +23,6 @@ #include "dcmtk/dcmdata/dcxfer.h" #include "dcmtk/dcmdata/dcuid.h" -#define INCLUDE_CSTRING -#include "dcmtk/ofstd/ofstdinc.h" - - typedef struct { const char *xferID; diff -Nru dcmtk-3.6.6/dcmdata/libsrc/Makefile.dep dcmtk-3.6.7/dcmdata/libsrc/Makefile.dep --- dcmtk-3.6.6/dcmdata/libsrc/Makefile.dep 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/libsrc/Makefile.dep 2022-04-28 13:47:25.000000000 +0000 @@ -3,11 +3,11 @@ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../include/dcmtk/dcmdata/dctypes.h \ ../../oflog/include/dcmtk/oflog/oflog.h \ ../../oflog/include/dcmtk/oflog/logger.h \ ../../oflog/include/dcmtk/oflog/config.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../oflog/include/dcmtk/oflog/config/defines.h \ ../../oflog/include/dcmtk/oflog/helpers/threadcf.h \ ../../oflog/include/dcmtk/oflog/loglevel.h \ @@ -33,6 +33,8 @@ ../../oflog/include/dcmtk/oflog/logmacro.h \ ../../oflog/include/dcmtk/oflog/helpers/snprintf.h \ ../../oflog/include/dcmtk/oflog/tracelog.h \ + ../../ofstd/include/dcmtk/ofstd/ofconsol.h \ + ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ ../../ofstd/include/dcmtk/ofstd/oflist.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ @@ -41,12 +43,12 @@ ../../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/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.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/ofstd.h \ ../../ofstd/include/dcmtk/ofstd/oflist.h \ ../../ofstd/include/dcmtk/ofstd/oftraits.h \ @@ -199,8 +201,8 @@ ../include/dcmtk/dcmdata/dcswap.h ../include/dcmtk/dcmdata/dcvrui.h \ ../include/dcmtk/dcmdata/dcbytstr.h dcdatset.o: dcdatset.cc ../../config/include/dcmtk/config/osconfig.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstack.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ @@ -252,10 +254,11 @@ ../include/dcmtk/dcmdata/dcpcache.h ../include/dcmtk/dcmdata/dcvrus.h \ ../include/dcmtk/dcmdata/dcelem.h ../include/dcmtk/dcmdata/dcpixel.h \ ../include/dcmtk/dcmdata/dcvrpobw.h ../include/dcmtk/dcmdata/dcvrobow.h \ - ../include/dcmtk/dcmdata/dcdeftag.h ../include/dcmtk/dcmdata/dcostrma.h \ - ../include/dcmtk/dcmdata/dcostrmf.h ../include/dcmtk/dcmdata/dcistrma.h \ - ../include/dcmtk/dcmdata/dcistrmf.h ../include/dcmtk/dcmdata/dcwcache.h \ - ../include/dcmtk/dcmdata/dcfcache.h + ../include/dcmtk/dcmdata/dcdeftag.h ../include/dcmtk/dcmdata/dcistrma.h \ + ../include/dcmtk/dcmdata/dcistrmf.h ../include/dcmtk/dcmdata/dcistrms.h \ + ../include/dcmtk/dcmdata/dcistrmb.h ../include/dcmtk/dcmdata/dcostrma.h \ + ../include/dcmtk/dcmdata/dcostrmf.h ../include/dcmtk/dcmdata/dcostrms.h \ + ../include/dcmtk/dcmdata/dcwcache.h ../include/dcmtk/dcmdata/dcfcache.h dcdatutl.o: dcdatutl.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmdata/dcdatutl.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.h \ @@ -310,7 +313,6 @@ ../include/dcmtk/dcmdata/dcmetinf.h ../include/dcmtk/dcmdata/dcfilefo.h \ ../include/dcmtk/dcmdata/dcsequen.h ../include/dcmtk/dcmdata/dcelem.h dcddirif.o: dcddirif.cc ../../config/include/dcmtk/config/osconfig.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../include/dcmtk/dcmdata/dcddirif.h ../include/dcmtk/dcmdata/dcdicdir.h \ ../../ofstd/include/dcmtk/ofstd/ofmap.h \ ../../ofstd/include/dcmtk/ofstd/ofutil.h \ @@ -319,6 +321,7 @@ ../../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/oflist.h \ @@ -375,8 +378,8 @@ ../../ofstd/include/dcmtk/ofstd/oftime.h \ ../../ofstd/include/dcmtk/ofstd/ofbmanip.h dcdicdir.o: dcdicdir.cc ../../config/include/dcmtk/config/osconfig.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ @@ -436,9 +439,9 @@ ../include/dcmtk/dcmdata/dcwcache.h ../include/dcmtk/dcmdata/dcfcache.h \ ../include/dcmtk/dcmdata/dcvrui.h dcdicent.o: dcdicent.cc ../../config/include/dcmtk/config/osconfig.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../include/dcmtk/dcmdata/dcdicent.h ../include/dcmtk/dcmdata/dctagkey.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ @@ -515,8 +518,8 @@ ../../ofstd/include/dcmtk/ofstd/oflist.h \ ../include/dcmtk/dcmdata/dcdefine.h dcdirrec.o: dcdirrec.cc ../../config/include/dcmtk/config/osconfig.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ ../../ofstd/include/dcmtk/ofstd/oflist.h \ @@ -598,13 +601,13 @@ ../include/dcmtk/dcmdata/cmdlnarg.h ../include/dcmtk/dcmdata/dcspchrs.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 \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ ../../ofstd/include/dcmtk/ofstd/oflist.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.h \ ../../ofstd/include/dcmtk/ofstd/oftraits.h \ @@ -730,8 +733,8 @@ ../../ofstd/include/dcmtk/ofstd/ofstring.h \ ../include/dcmtk/dcmdata/dcdefine.h dcfilefo.o: dcfilefo.cc ../../config/include/dcmtk/config/osconfig.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../include/dcmtk/dcmdata/dcfilefo.h ../include/dcmtk/dcmdata/dcsequen.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ @@ -783,10 +786,12 @@ ../include/dcmtk/dcmdata/dcbytstr.h ../include/dcmtk/dcmdata/dcvrul.h \ ../include/dcmtk/dcmdata/dcvrus.h ../include/dcmtk/dcmdata/dcvrae.h \ ../include/dcmtk/dcmdata/dcvrsh.h ../include/dcmtk/dcmdata/dcchrstr.h \ - ../include/dcmtk/dcmdata/dcmetinf.h ../include/dcmtk/dcmdata/dcdeftag.h \ - ../include/dcmtk/dcmdata/dcuid.h ../include/dcmtk/dcmdata/dcostrma.h \ - ../include/dcmtk/dcmdata/dcostrmf.h ../include/dcmtk/dcmdata/dcistrma.h \ - ../include/dcmtk/dcmdata/dcistrmf.h ../include/dcmtk/dcmdata/dcwcache.h \ + ../include/dcmtk/dcmdata/dcvrur.h ../include/dcmtk/dcmdata/dcmetinf.h \ + ../include/dcmtk/dcmdata/dcdeftag.h ../include/dcmtk/dcmdata/dcuid.h \ + ../include/dcmtk/dcmdata/dcistrma.h ../include/dcmtk/dcmdata/dcistrmf.h \ + ../include/dcmtk/dcmdata/dcistrms.h ../include/dcmtk/dcmdata/dcistrmb.h \ + ../include/dcmtk/dcmdata/dcostrma.h ../include/dcmtk/dcmdata/dcostrmf.h \ + ../include/dcmtk/dcmdata/dcostrms.h ../include/dcmtk/dcmdata/dcwcache.h \ ../include/dcmtk/dcmdata/dcfcache.h ../include/dcmtk/dcmdata/dcjson.h dcfilter.o: dcfilter.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmdata/dcfilter.h \ @@ -1018,7 +1023,53 @@ ../include/dcmtk/dcmdata/dcdefine.h ../include/dcmtk/dcmdata/dcvr.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ - ../include/dcmtk/dcmdata/dcerror.h + ../include/dcmtk/dcmdata/dcistrmb.h ../include/dcmtk/dcmdata/dcerror.h +dcistrms.o: dcistrms.cc ../../config/include/dcmtk/config/osconfig.h \ + ../include/dcmtk/dcmdata/dcistrms.h ../include/dcmtk/dcmdata/dcistrma.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/ofcond.h \ + ../../ofstd/include/dcmtk/ofstd/ofstring.h \ + ../../ofstd/include/dcmtk/ofstd/offile.h \ + ../../ofstd/include/dcmtk/ofstd/ofstd.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 \ + ../../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 \ + ../../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/dcdefine.h ../include/dcmtk/dcmdata/dcvr.h \ + ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ + ../../ofstd/include/dcmtk/ofstd/ofthread.h \ + ../include/dcmtk/dcmdata/dcistrmb.h ../include/dcmtk/dcmdata/dcerror.h dcistrmz.o: dcistrmz.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmdata/dcistrmz.h ../include/dcmtk/dcmdata/dcistrma.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ @@ -1066,13 +1117,13 @@ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../include/dcmtk/dcmdata/dcerror.h dcitem.o: dcitem.cc ../../config/include/dcmtk/config/osconfig.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../include/dcmtk/dcmdata/dcitem.h \ ../../ofstd/include/dcmtk/ofstd/offile.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/ofstring.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ @@ -1147,19 +1198,19 @@ ../../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/ofstring.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../include/dcmtk/dcmdata/dctagkey.h ../include/dcmtk/dcmdata/dcdefine.h dclist.o: dclist.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../include/dcmtk/dcmdata/dclist.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../include/dcmtk/dcmdata/dcobject.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ @@ -1250,8 +1301,8 @@ ../../ofstd/include/dcmtk/ofstd/diag/pop.def \ ../../ofstd/include/dcmtk/ofstd/diag/vsprfw.def dcmetinf.o: dcmetinf.cc ../../config/include/dcmtk/config/osconfig.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ ../../ofstd/include/dcmtk/ofstd/oflist.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ @@ -1489,7 +1540,55 @@ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ ../../ofstd/include/dcmtk/ofstd/oferror.h \ - ../include/dcmtk/dcmdata/dcerror.h + ../include/dcmtk/dcmdata/dcerror.h \ + ../../ofstd/include/dcmtk/ofstd/ofconsol.h +dcostrms.o: dcostrms.cc ../../config/include/dcmtk/config/osconfig.h \ + ../include/dcmtk/dcmdata/dcostrms.h ../include/dcmtk/dcmdata/dcostrma.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/ofcond.h \ + ../../ofstd/include/dcmtk/ofstd/ofstring.h \ + ../include/dcmtk/dcmdata/dcxfer.h ../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 \ + ../../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/oftraits.h \ + ../../ofstd/include/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/dcdefine.h ../include/dcmtk/dcmdata/dcvr.h \ + ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ + ../../ofstd/include/dcmtk/ofstd/ofthread.h \ + ../../ofstd/include/dcmtk/ofstd/offile.h \ + ../../ofstd/include/dcmtk/ofstd/ofstd.h \ + ../../ofstd/include/dcmtk/ofstd/oflist.h \ + ../../ofstd/include/dcmtk/ofstd/oflimits.h \ + ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ + ../include/dcmtk/dcmdata/dcerror.h \ + ../../ofstd/include/dcmtk/ofstd/ofconsol.h dcostrmz.o: dcostrmz.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmdata/dcostrmz.h ../include/dcmtk/dcmdata/dcostrma.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ @@ -1685,10 +1784,11 @@ ../../ofstd/include/dcmtk/ofstd/oferror.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/dcpxitem.h + ../include/dcmtk/dcmdata/dcpcache.h ../include/dcmtk/dcmdata/dcpxitem.h \ + ../include/dcmtk/dcmdata/dcjson.h dcpixseq.o: dcpixseq.cc ../../config/include/dcmtk/config/osconfig.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofuuid.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ @@ -1741,8 +1841,8 @@ ../include/dcmtk/dcmdata/dcitem.h ../include/dcmtk/dcmdata/dcpcache.h \ ../include/dcmtk/dcmdata/dcdeftag.h dcpxitem.o: dcpxitem.cc ../../config/include/dcmtk/config/osconfig.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../include/dcmtk/dcmdata/dcpxitem.h ../include/dcmtk/dcmdata/dcvrobow.h \ ../include/dcmtk/dcmdata/dcelem.h ../include/dcmtk/dcmdata/dcobject.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ @@ -2077,8 +2177,8 @@ ../include/dcmtk/dcmdata/dctagkey.h ../include/dcmtk/dcmdata/dcstack.h \ ../../ofstd/include/dcmtk/ofstd/oflist.h dcsequen.o: dcsequen.cc ../../config/include/dcmtk/config/osconfig.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ ../../ofstd/include/dcmtk/ofstd/oflist.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ @@ -2187,9 +2287,9 @@ ../include/dcmtk/dcmdata/dcbytstr.h ../include/dcmtk/dcmdata/dcelem.h \ ../include/dcmtk/dcmdata/dcdeftag.h dcstack.o: dcstack.cc ../../config/include/dcmtk/config/osconfig.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../include/dcmtk/dcmdata/dcstack.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ @@ -2261,12 +2361,12 @@ dctagkey.o: dctagkey.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmdata/dctagkey.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.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 \ ../include/dcmtk/dcmdata/dcdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ ../../ofstd/include/dcmtk/ofstd/oflist.h \ @@ -2311,8 +2411,8 @@ ../../oflog/include/dcmtk/oflog/tracelog.h \ ../include/dcmtk/dcmdata/dcdefine.h dcuid.o: dcuid.cc ../../config/include/dcmtk/config/osconfig.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../include/dcmtk/dcmdata/dcuid.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ @@ -2481,6 +2581,7 @@ ../include/dcmtk/dcmdata/dcstack.h dcvrat.o: dcvrat.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../include/dcmtk/dcmdata/dcvrat.h ../include/dcmtk/dcmdata/dcelem.h \ ../include/dcmtk/dcmdata/dcobject.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ @@ -2489,7 +2590,6 @@ ../../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/ofstring.h \ ../include/dcmtk/dcmdata/dcerror.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ @@ -2524,7 +2624,6 @@ ../include/dcmtk/dcmdata/dctagkey.h ../include/dcmtk/dcmdata/dcstack.h \ ../include/dcmtk/dcmdata/dcjson.h dcvrcs.o: dcvrcs.cc ../../config/include/dcmtk/config/osconfig.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../include/dcmtk/dcmdata/dcvrcs.h ../include/dcmtk/dcmdata/dcbytstr.h \ ../include/dcmtk/dcmdata/dctypes.h \ ../../oflog/include/dcmtk/oflog/oflog.h \ @@ -2533,6 +2632,7 @@ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../oflog/include/dcmtk/oflog/config/defines.h \ ../../oflog/include/dcmtk/oflog/helpers/threadcf.h \ ../../oflog/include/dcmtk/oflog/loglevel.h \ @@ -2623,11 +2723,11 @@ dcvrds.o: dcvrds.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmdata/dcvrds.h \ ../../ofstd/include/dcmtk/ofstd/ofvector.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.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/dcmdata/dcbytstr.h ../include/dcmtk/dcmdata/dctypes.h \ ../../oflog/include/dcmtk/oflog/oflog.h \ @@ -2724,26 +2824,21 @@ ../../config/include/dcmtk/config/arith.h \ ../../ofstd/include/dcmtk/ofstd/oferror.h dcvrfd.o: dcvrfd.cc ../../config/include/dcmtk/config/osconfig.h \ - ../../ofstd/include/dcmtk/ofstd/ofstream.h \ - ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oflist.h \ + ../include/dcmtk/dcmdata/dcvrfd.h ../include/dcmtk/dcmdata/dcelem.h \ + ../include/dcmtk/dcmdata/dcobject.h \ + ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ + ../../ofstd/include/dcmtk/ofstd/ofthread.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/ofstring.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../include/dcmtk/dcmdata/dcerror.h \ ../../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 \ - ../../ofstd/include/dcmtk/ofstd/ofthread.h \ - ../include/dcmtk/dcmdata/dcerror.h ../include/dcmtk/dcmdata/dcdefine.h \ - ../include/dcmtk/dcmdata/dcxfer.h ../include/dcmtk/dcmdata/dctypes.h \ + ../include/dcmtk/dcmdata/dcdefine.h ../include/dcmtk/dcmdata/dcxfer.h \ + ../include/dcmtk/dcmdata/dctypes.h \ ../../oflog/include/dcmtk/oflog/oflog.h \ ../../oflog/include/dcmtk/oflog/logger.h \ ../../oflog/include/dcmtk/oflog/config.h \ @@ -2757,6 +2852,7 @@ ../../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 \ @@ -2769,28 +2865,30 @@ ../../oflog/include/dcmtk/oflog/helpers/snprintf.h \ ../../oflog/include/dcmtk/oflog/tracelog.h \ ../include/dcmtk/dcmdata/dcvr.h ../include/dcmtk/dcmdata/dctag.h \ - ../include/dcmtk/dcmdata/dctagkey.h ../include/dcmtk/dcmdata/dcstack.h -dcvrfl.o: dcvrfl.cc ../../config/include/dcmtk/config/osconfig.h \ - ../../ofstd/include/dcmtk/ofstd/ofstream.h \ + ../include/dcmtk/dcmdata/dctagkey.h ../include/dcmtk/dcmdata/dcstack.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.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/ofstring.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/ofmath.h \ + ../include/dcmtk/dcmdata/dcjson.h +dcvrfl.o: dcvrfl.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmdata/dcvrfl.h ../include/dcmtk/dcmdata/dcelem.h \ ../include/dcmtk/dcmdata/dcobject.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ - ../include/dcmtk/dcmdata/dcerror.h ../include/dcmtk/dcmdata/dcdefine.h \ - ../include/dcmtk/dcmdata/dcxfer.h ../include/dcmtk/dcmdata/dctypes.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/ofstring.h \ + ../include/dcmtk/dcmdata/dcerror.h \ + ../../ofstd/include/dcmtk/ofstd/ofcond.h \ + ../include/dcmtk/dcmdata/dcdefine.h ../include/dcmtk/dcmdata/dcxfer.h \ + ../include/dcmtk/dcmdata/dctypes.h \ ../../oflog/include/dcmtk/oflog/oflog.h \ ../../oflog/include/dcmtk/oflog/logger.h \ ../../oflog/include/dcmtk/oflog/config.h \ @@ -2804,6 +2902,7 @@ ../../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 \ @@ -2816,7 +2915,14 @@ ../../oflog/include/dcmtk/oflog/helpers/snprintf.h \ ../../oflog/include/dcmtk/oflog/tracelog.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 \ + ../../ofstd/include/dcmtk/ofstd/ofstd.h \ + ../../ofstd/include/dcmtk/ofstd/oflist.h \ + ../../ofstd/include/dcmtk/ofstd/oflimits.h \ + ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ + ../../ofstd/include/dcmtk/ofstd/ofmath.h \ + ../include/dcmtk/dcmdata/dcjson.h dcvris.o: dcvris.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmdata/dcvris.h ../include/dcmtk/dcmdata/dcbytstr.h \ ../include/dcmtk/dcmdata/dctypes.h \ @@ -2866,9 +2972,9 @@ ../../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/ofstring.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../include/dcmtk/dcmdata/dctagkey.h ../include/dcmtk/dcmdata/dcdefine.h \ ../include/dcmtk/dcmdata/dcvrlo.h ../include/dcmtk/dcmdata/dcchrstr.h \ @@ -3207,9 +3313,9 @@ ../../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/ofstring.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../include/dcmtk/dcmdata/dctagkey.h ../include/dcmtk/dcmdata/dcdefine.h \ ../include/dcmtk/dcmdata/dcvrpn.h ../include/dcmtk/dcmdata/dcchrstr.h \ @@ -3245,7 +3351,12 @@ ../include/dcmtk/dcmdata/dcerror.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../include/dcmtk/dcmdata/dcxfer.h ../include/dcmtk/dcmdata/dcvr.h \ - ../include/dcmtk/dcmdata/dctag.h ../include/dcmtk/dcmdata/dcstack.h + ../include/dcmtk/dcmdata/dctag.h ../include/dcmtk/dcmdata/dcstack.h \ + ../../ofstd/include/dcmtk/ofstd/ofstd.h \ + ../../ofstd/include/dcmtk/ofstd/oflist.h \ + ../../ofstd/include/dcmtk/ofstd/oflimits.h \ + ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h dcvrpobw.o: dcvrpobw.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmdata/dcvrpobw.h ../include/dcmtk/dcmdata/dcvrobow.h \ ../include/dcmtk/dcmdata/dcelem.h ../include/dcmtk/dcmdata/dcobject.h \ @@ -3335,6 +3446,7 @@ ../include/dcmtk/dcmdata/dcstack.h ../include/dcmtk/dcmdata/dcjson.h dcvrsl.o: dcvrsl.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../include/dcmtk/dcmdata/dcvrsl.h ../include/dcmtk/dcmdata/dcelem.h \ ../include/dcmtk/dcmdata/dcobject.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ @@ -3343,7 +3455,6 @@ ../../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/ofstring.h \ ../include/dcmtk/dcmdata/dcerror.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ @@ -3378,6 +3489,7 @@ ../include/dcmtk/dcmdata/dctagkey.h ../include/dcmtk/dcmdata/dcstack.h dcvrss.o: dcvrss.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../include/dcmtk/dcmdata/dcvrss.h ../include/dcmtk/dcmdata/dcelem.h \ ../include/dcmtk/dcmdata/dcobject.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ @@ -3386,7 +3498,6 @@ ../../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/ofstring.h \ ../include/dcmtk/dcmdata/dcerror.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ @@ -3464,7 +3575,6 @@ ../include/dcmtk/dcmdata/dctag.h ../include/dcmtk/dcmdata/dctagkey.h \ ../include/dcmtk/dcmdata/dcstack.h dcvrsv.o: dcvrsv.cc ../../config/include/dcmtk/config/osconfig.h \ - ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../include/dcmtk/dcmdata/dcvrsv.h ../include/dcmtk/dcmdata/dcelem.h \ ../include/dcmtk/dcmdata/dcobject.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ @@ -3474,6 +3584,7 @@ ../../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/ofstring.h \ ../include/dcmtk/dcmdata/dcerror.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ @@ -3505,7 +3616,8 @@ ../../oflog/include/dcmtk/oflog/helpers/snprintf.h \ ../../oflog/include/dcmtk/oflog/tracelog.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/dcjson.h dcvrtm.o: dcvrtm.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmdata/dcvrtm.h ../include/dcmtk/dcmdata/dctypes.h \ ../../oflog/include/dcmtk/oflog/oflog.h \ @@ -3602,12 +3714,12 @@ ../include/dcmtk/dcmdata/dcstack.h dcvrui.o: dcvrui.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.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/ofstd.h \ ../../ofstd/include/dcmtk/ofstd/oflist.h \ ../../ofstd/include/dcmtk/ofstd/oftraits.h \ @@ -3651,6 +3763,7 @@ ../include/dcmtk/dcmdata/dcuid.h dcvrul.o: dcvrul.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../include/dcmtk/dcmdata/dcvrul.h ../include/dcmtk/dcmdata/dcelem.h \ ../include/dcmtk/dcmdata/dcobject.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ @@ -3659,7 +3772,6 @@ ../../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/ofstring.h \ ../include/dcmtk/dcmdata/dcerror.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ @@ -3780,6 +3892,7 @@ ../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 \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../include/dcmtk/dcmdata/dcvrus.h ../include/dcmtk/dcmdata/dcelem.h \ ../include/dcmtk/dcmdata/dcobject.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ @@ -3788,7 +3901,6 @@ ../../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/ofstring.h \ ../include/dcmtk/dcmdata/dcerror.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ @@ -3866,7 +3978,6 @@ ../include/dcmtk/dcmdata/dctag.h ../include/dcmtk/dcmdata/dctagkey.h \ ../include/dcmtk/dcmdata/dcstack.h dcvruv.o: dcvruv.cc ../../config/include/dcmtk/config/osconfig.h \ - ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../include/dcmtk/dcmdata/dcvruv.h ../include/dcmtk/dcmdata/dcelem.h \ ../include/dcmtk/dcmdata/dcobject.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ @@ -3876,6 +3987,7 @@ ../../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/ofstring.h \ ../include/dcmtk/dcmdata/dcerror.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ @@ -3907,7 +4019,8 @@ ../../oflog/include/dcmtk/oflog/helpers/snprintf.h \ ../../oflog/include/dcmtk/oflog/tracelog.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/dcjson.h dcwcache.o: dcwcache.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmdata/dcwcache.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ @@ -4089,4 +4202,10 @@ ../../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 vrscani.h vrscanl.h + ../../oflog/include/dcmtk/oflog/tracelog.h \ + ../../ofstd/include/dcmtk/ofstd/ofdiag.h vrscani.h vrscanl.h \ + ../../ofstd/include/dcmtk/ofstd/diag/push.def \ + ../../ofstd/include/dcmtk/ofstd/diag/vsobjdes.def \ + ../../ofstd/include/dcmtk/ofstd/diag/pop.def +xml2dcm.o: xml2dcm.cc ../../config/include/dcmtk/config/osconfig.h \ + ../include/dcmtk/dcmdata/xml2dcm.h diff -Nru dcmtk-3.6.6/dcmdata/libsrc/Makefile.in dcmtk-3.6.7/dcmdata/libsrc/Makefile.in --- dcmtk-3.6.6/dcmdata/libsrc/Makefile.in 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/libsrc/Makefile.in 2022-04-28 13:47:25.000000000 +0000 @@ -46,9 +46,9 @@ dcdicdir.o dcrleccd.o dcrlecce.o dcrlecp.o dcrlerp.o dcrledrg.o dcrleerg.o \ dcdictbi.o dctagkey.o dcdicent.o dcdict.o dcvr.o dchashdi.o cmdlnarg.o \ dcvrut.o dcvrur.o dcvruc.o dctypes.o dcpcache.o dcddirif.o dcistrma.o \ - dcistrmb.o dcistrmf.o dcistrmz.o dcostrma.o dcostrmb.o dcostrmf.o \ - dcostrmz.o dcwcache.o dcpath.o vrscan.o vrscanl.o dcfilter.o dcjson.o \ - dcmatch.o + dcistrmb.o dcistrmf.o dcistrms.o dcistrmz.o dcostrma.o dcostrmb.o \ + dcostrmf.o dcostrms.o dcostrmz.o dcwcache.o dcpath.o vrscan.o vrscanl.o \ + dcfilter.o dcmatch.o dcjson.o xml2dcm.o support_objs = mkdeftag.o mkdictbi.o support_progs = mkdeftag mkdictbi diff -Nru dcmtk-3.6.6/dcmdata/libsrc/mkdictbi.cc dcmtk-3.6.7/dcmdata/libsrc/mkdictbi.cc --- dcmtk-3.6.6/dcmdata/libsrc/mkdictbi.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/libsrc/mkdictbi.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1994-2018, OFFIS e.V. + * Copyright (C) 1994-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -169,7 +169,7 @@ fprintf(fout, "*/\n"); fprintf(fout, "\n"); fprintf(fout, "#include \"dcmtk/dcmdata/dcdict.h\"\n"); - fprintf(fout, "#ifdef ENABLE_BUILTIN_DICTIONARY\n"); + fprintf(fout, "#if DCM_DICT_DEFAULT == DCM_DICT_DEFAULT_USE_BUILTIN\n"); fprintf(fout, "#include \"dcmtk/dcmdata/dcdicent.h\"\n"); fprintf(fout, "\n"); fprintf(fout, "struct DBI_SimpleEntry {\n"); @@ -251,7 +251,7 @@ fprintf(fout, "}\n"); fprintf(fout, "\n"); fprintf(fout, "\n"); - fprintf(fout, "#else // WITH_BUILTIN_DICTIONARY\n"); + fprintf(fout, "#else // DCM_DICT_DEFAULT == DCM_DICT_DEFAULT_USE_BUILTIN\n"); fprintf(fout, "void\n"); fprintf(fout, "DcmDataDictionary::loadBuiltinDictionary()\n"); fprintf(fout, "{\n"); @@ -259,12 +259,13 @@ fprintf(fout, " ** Empty Stub.\n"); fprintf(fout, " **\n"); fprintf(fout, " ** We don't want a populated built-in data dictionary. In order to enable it,\n"); - fprintf(fout, " ** define WITH_BUILTIN_DICTIONARY. To re-create the builtin dictionary from\n"); - fprintf(fout, " ** a textfile like dicom.dic, use dcmdata/libsrc/mkdictbi.\n"); + fprintf(fout, " ** define DCM_DICT_DEFAULT == DCM_DICT_DEFAULT_USE_BUILTIN (1).\n"); + fprintf(fout, " ** To re-create the builtin dictionary from a textfile like dicom.dic,\n"); + fprintf(fout, " ** use dcmdata/libsrc/mkdictbi.\n"); fprintf(fout, "*/\n"); fprintf(fout, "}\n"); fprintf(fout, "\n"); - fprintf(fout, "#endif // WITH_BUILTIN_DICTIONARY\n"); + fprintf(fout, "#endif // DCM_DICT_DEFAULT == DCM_DICT_DEFAULT_USE_BUILTIN\n"); fprintf(fout, "\n"); dcmDataDict.wrunlock(); if (filename) diff -Nru dcmtk-3.6.6/dcmdata/libsrc/vrscan.cc dcmtk-3.6.7/dcmdata/libsrc/vrscan.cc --- dcmtk-3.6.6/dcmdata/libsrc/vrscan.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/libsrc/vrscan.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2010-2018, OFFIS e.V. + * Copyright (C) 2010-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -26,12 +26,16 @@ #include "dcmtk/ofstd/ofbmanip.h" #include "dcmtk/ofstd/ofstd.h" /* For OFString::strerror() */ #include "dcmtk/dcmdata/dctypes.h" /* For DCMDATA_WARN() */ +#include "dcmtk/ofstd/ofdiag.h" BEGIN_EXTERN_C #include "vrscani.h" #include "vrscanl.h" END_EXTERN_C +#include DCMTK_DIAGNOSTIC_PUSH +#include DCMTK_DIAGNOSTIC_IGNORE_VISUAL_STUDIO_OBJECT_DESTRUCTION_WARNING + int vrscan::scan(const OFString& vr, const char* const value, const size_t size) { yyscan_t scanner; @@ -74,6 +78,8 @@ return result; } +#include DCMTK_DIAGNOSTIC_POP + int vrscan::scan(const OFString& vr, const OFString& value) { return scan(vr, value.data(), value.size()); diff -Nru dcmtk-3.6.6/dcmdata/libsrc/vrscanl.c dcmtk-3.6.7/dcmdata/libsrc/vrscanl.c --- dcmtk-3.6.6/dcmdata/libsrc/vrscanl.c 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/libsrc/vrscanl.c 2022-04-28 13:47:25.000000000 +0000 @@ -328,7 +328,7 @@ static yy_state_type yy_get_previous_state ( yyscan_t yyscanner ); static yy_state_type yy_try_NUL_trans ( yy_state_type current_state , yyscan_t yyscanner); static int yy_get_next_buffer ( yyscan_t yyscanner ); -static void yynoreturn yy_fatal_error ( const char* msg , yyscan_t yyscanner ); +/* static void yynoreturn yy_fatal_error ( const char* msg , yyscan_t yyscanner ); */ /* Done after the current pattern has been matched and before the * corresponding action - sets up yytext. @@ -6088,6 +6088,7 @@ #define YY_EXIT_FAILURE 2 #endif +/* static void yynoreturn yy_fatal_error (const char* msg , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; @@ -6095,6 +6096,7 @@ fprintf( stderr, "%s\n", msg ); exit( YY_EXIT_FAILURE ); } +*/ /* Redefine yyless() so it works in section 3 code. */ diff -Nru dcmtk-3.6.6/dcmdata/libsrc/xml2dcm.cc dcmtk-3.6.7/dcmdata/libsrc/xml2dcm.cc --- dcmtk-3.6.6/dcmdata/libsrc/xml2dcm.cc 1970-01-01 00:00:00.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/libsrc/xml2dcm.cc 2022-04-28 13:47:25.000000000 +0000 @@ -0,0 +1,791 @@ +/* + * + * Copyright (C) 2003-2021, 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: Joerg Riesmeier + * + * Purpose: Helper class for converting an XML document to DICOM file or data set + * + */ + + +#include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ +#include "dcmtk/dcmdata/xml2dcm.h" + +#ifdef WITH_LIBXML + +#include "dcmtk/dcmdata/dctypes.h" +#include "dcmtk/dcmdata/dcsequen.h" +#include "dcmtk/dcmdata/dcitem.h" +#include "dcmtk/dcmdata/dcpixseq.h" +#include "dcmtk/dcmdata/dcpixel.h" +#include "dcmtk/dcmdata/dcpxitem.h" +#include "dcmtk/dcmdata/dcdeftag.h" +#include "dcmtk/dcmdata/dcfilefo.h" +#include "dcmtk/dcmdata/dcmetinf.h" +#include "dcmtk/dcmdata/dcswap.h" +#include + +// This function is also used in dcmsr, try to stay in sync! +#if defined(HAVE_VSNPRINTF) && defined(HAVE_PROTOTYPE_VSNPRINTF) +extern "C" void errorFunction(void * ctx, const char *msg, ...) +{ + // Classic C requires us to declare variables at the beginning of the function. + OFString &buffer = *OFstatic_cast(OFString*, ctx); +#else +extern "C" void errorFunction(void * /* ctx */, const char *msg, ...) +{ +#endif + + if (!DCM_dcmdataLogger.isEnabledFor(OFLogger::DEBUG_LOG_LEVEL)) + return; + +#if defined(HAVE_VSNPRINTF) && defined(HAVE_PROTOTYPE_VSNPRINTF) + // libxml calls us multiple times for one line of log output which would + // result in garbled output. To avoid this, we buffer the output in a local + // string in the caller which we get through our 'ctx' parameter. Then, we + // output this string on one go when we receive a newline. + va_list ap; + char buf[1024]; + + va_start(ap, msg); +#ifdef HAVE_PROTOTYPE_STD__VSNPRINTF + std::vsnprintf(buf, 1024, msg, ap); +#else + vsnprintf(buf, 1024, msg, ap); +#endif + va_end(ap); + + // Since we can't do anything about a too small buffer for vsnprintf(), we + // ignore it. But we do make sure the buffer is null-terminated! + buf[1023] = '\0'; + buffer += buf; + + // If there is a full line in the buffer... + size_t pos = buffer.find('\n'); + while (pos != OFString_npos) + { + // ..output it and remove it from the buffer + DCMDATA_DEBUG(buffer.substr(0, pos)); + buffer.erase(0, pos + 1); + + pos = buffer.find('\n'); + } +#elif defined(HAVE_VPRINTF) + // No vsnprint, but at least vfprintf. Output the messages directly to stderr. + va_list ap; + va_start(ap, msg); +#ifdef HAVE_PROTOTYPE_STD__VFPRINTF + std::vfprintf(stderr, msg, ap); +#else + vfprintf(stderr, msg, ap); +#endif + va_end(ap); +#else + // We can only show the most basic part of the message, this will look bad :( + printf("%s", msg); +#endif +} + + +static OFBool xmlIsBlankNodeOrComment(xmlNode *node) +{ + if (xmlIsBlankNode(node)) return OFTrue; + return (0 == xmlStrcmp(node->name, OFreinterpret_cast(const xmlChar *, "comment"))); +} + + +DcmXMLParseHelper::DcmXMLParseHelper() +: EncodingHandler(NULL) +{ +} + + +DcmXMLParseHelper::~DcmXMLParseHelper() +{ +} + + +void DcmXMLParseHelper::initLibrary() +{ + /* check for compatible libxml version */ + LIBXML_TEST_VERSION + + /* temporary buffer needed for errorFunction - more detailed explanation there */ + OFString tmpErrorString; + + /* initialize the XML library (only required for MT-safety) */ + xmlInitParser(); + + /* do not substitute entities (other than the standard ones) */ + xmlSubstituteEntitiesDefault(0); + + /* add line number to debug messages */ + xmlLineNumbersDefault(1); + + /* enable node indenting for tree output */ + xmlIndentTreeOutput = 1; + xmlKeepBlanksDefault(0); + + /* enable libxml warnings and error messages */ + xmlGetWarningsDefaultValue = 1; + xmlSetGenericErrorFunc(&tmpErrorString, errorFunction); +} + + +void DcmXMLParseHelper::cleanupLibrary() +{ + xmlCleanupParser(); +} + + +OFBool DcmXMLParseHelper::convertUtf8ToCharset( + const xmlChar *fromString, + OFString &toString) +{ + OFBool result = OFFalse; + if (EncodingHandler != NULL) + { + /* prepare input/output buffers */ + xmlBufferPtr fromBuffer = xmlBufferCreate(); + xmlBufferPtr toBuffer = xmlBufferCreate(); + xmlBufferCat(fromBuffer, fromString); + /* convert character encoding of given string */ + result = (xmlCharEncOutFunc(EncodingHandler, toBuffer, fromBuffer) >= 0); + if (result) + toString = OFreinterpret_cast(const char *, xmlBufferContent(toBuffer)); + /* free allocated memory */ + xmlBufferFree(toBuffer); + xmlBufferFree(fromBuffer); + } + return result; +} + + +OFCondition DcmXMLParseHelper::checkNode( + xmlNodePtr current, + const char *name) +{ + OFCondition result = EC_Normal; + /* check whether node is valid at all */ + if (current != NULL) + { + /* check whether node has expected name */ + if (xmlStrcmp(current->name, OFreinterpret_cast(const xmlChar *, name)) != 0) + { + DCMDATA_ERROR("document of the wrong type, was '" << current->name << "', '" << name << "' expected"); + result = EC_XMLParseError; + } + } else { + DCMDATA_ERROR("document of the wrong type, '" << name << "' expected"); + result = EC_XMLParseError; + } + return result; +} + + +OFCondition DcmXMLParseHelper::createNewElement( + xmlNodePtr current, + DcmElement *&newElem) +{ + OFCondition result = EC_IllegalCall; + /* check whether node is valid */ + if (current != NULL) + { + /* get required information from XML element */ + xmlChar *elemTag = xmlGetProp(current, OFreinterpret_cast(const xmlChar *, "tag")); + xmlChar *elemVR = xmlGetProp(current, OFreinterpret_cast(const xmlChar *, "vr")); + /* convert tag string */ + DcmTagKey dcmTagKey; + unsigned int group = 0xffff; + unsigned int elem = 0xffff; + /* make sure that "tag" attribute exists */ + if (elemTag == NULL) + { + DCMDATA_WARN("missing 'tag' attribute for node '" << current->name << "'"); + result = EC_XMLParseError; + } + /* determine group and element number from "tag" */ + else if (sscanf(OFreinterpret_cast(char *, elemTag), "%x,%x", &group, &elem ) == 2) + { + dcmTagKey.set(OFstatic_cast(Uint16, group), OFstatic_cast(Uint16, elem)); + DcmTag dcmTag(dcmTagKey); + /* convert vr string */ + DcmVR dcmVR(OFreinterpret_cast(char *, elemVR)); + DcmEVR dcmEVR = dcmVR.getEVR(); + if (dcmEVR == EVR_UNKNOWN) + { + /* check whether "vr" attribute exists */ + if (elemVR == NULL) + { + DCMDATA_WARN("missing 'vr' attribute for " << dcmTag + << ", using unknown VR"); + } else { + DCMDATA_WARN("invalid 'vr' attribute (" << elemVR + << ") for " << dcmTag << ", using unknown VR"); + } + } + /* check for correct vr */ + const DcmEVR tagEVR = dcmTag.getEVR(); + if ((tagEVR != dcmEVR) && (dcmEVR != EVR_UNKNOWN) && (tagEVR != EVR_UNKNOWN) && + ((dcmTagKey != DCM_LUTData) || ((dcmEVR != EVR_US) && (dcmEVR != EVR_SS) && (dcmEVR != EVR_OW))) && + ((tagEVR != EVR_xs) || ((dcmEVR != EVR_US) && (dcmEVR != EVR_SS))) && + (((tagEVR != EVR_ox) && (tagEVR != EVR_px)) || ((dcmEVR != EVR_OB) && (dcmEVR != EVR_OW)))) + { + DCMDATA_WARN("element " << dcmTag << " has wrong VR (" << dcmVR.getVRName() + << "), correct is " << dcmTag.getVR().getVRName()); + } + if (dcmEVR != EVR_UNKNOWN) + dcmTag.setVR(dcmVR); + /* create DICOM element */ + result = DcmItem::newDicomElementWithVR(newElem, dcmTag); + } else { + DCMDATA_WARN("invalid 'tag' attribute (" << elemTag << ") for node '" << current->name << "'"); + result = EC_XMLParseError; + } + if (result.bad()) + { + /* delete new element if an error occurred */ + delete newElem; + newElem = NULL; + } + /* free allocated memory */ + xmlFree(elemTag); + xmlFree(elemVR); + } + return result; +} + + +OFCondition DcmXMLParseHelper::putElementContent( + xmlNodePtr current, + DcmElement *element) +{ + OFCondition result = EC_Normal; + /* check whether node and element are valid */ + if ((current != NULL) && (element != NULL)) + { + DcmEVR dcmEVR = element->getVR(); + /* get the XML node content */ + xmlChar *elemVal = xmlNodeGetContent(current); + xmlChar *attrVal = xmlGetProp(current, OFreinterpret_cast(const xmlChar *, "binary")); + /* check whether node content is present */ + if (xmlStrcmp(attrVal, OFreinterpret_cast(const xmlChar *, "hidden")) == 0) + { + DCMDATA_WARN("content of node " << element->getTag() << " is 'hidden', empty element inserted"); + /* return an error unless the element is part of the file meta information */ + if (element->getGTag() != 0x0002) + result = EC_MissingValue; + } + /* check whether node content is base64 encoded */ + else if (xmlStrcmp(attrVal, OFreinterpret_cast(const xmlChar *, "base64")) == 0) + { + Uint8 *data = NULL; + const size_t length = OFStandard::decodeBase64(OFreinterpret_cast(char *, elemVal), data); + if (length > 0) + { + if (dcmEVR == EVR_OW) + { + /* Base64 decoder produces big endian output data, convert to local byte order */ + swapIfNecessary(gLocalByteOrder, EBO_BigEndian, data, OFstatic_cast(Uint32, length), sizeof(Uint16)); + } + result = element->putUint8Array(data, OFstatic_cast(Uint32, length)); + /* delete buffer since data is copied into the element */ + delete[] data; + } + } + /* check whether node content is stored in a file */ + else if (xmlStrcmp(attrVal, OFreinterpret_cast(const xmlChar *, "file")) == 0) + { + if (xmlStrlen(elemVal) > 0) + { + const char *filename = OFreinterpret_cast(char *, elemVal); + /* try to open binary file */ + FILE *f = fopen(filename, "rb"); + if (f != NULL) + { + /* determine filesize */ + const size_t fileSize = OFStandard::getFileSize(filename); + size_t buflen = fileSize; + /* if odd then make even (DICOM requires even length values) */ + if (buflen & 1) + buflen++; + Uint8 *buf = NULL; + /* create buffer of OB or OW data */ + if (dcmEVR == EVR_OW) + { + Uint16 *buf16 = NULL; + result = element->createUint16Array(OFstatic_cast(Uint32, buflen / 2), buf16); + buf = OFreinterpret_cast(Uint8 *, buf16); + } else + result = element->createUint8Array(OFstatic_cast(Uint32, buflen), buf); + if (result.good()) + { + DCMDATA_INFO("reading " << fileSize << " bytes from binary data file: " << filename); + DCMDATA_DEBUG(" and storing it in the element " << element->getTag()); + /* read binary file into the buffer */ + if (fread(buf, 1, OFstatic_cast(size_t, fileSize), f) != fileSize) + { + DCMDATA_WARN("cannot read binary data file: " << filename << ": " << OFStandard::getLastSystemErrorCode().message()); + result = EC_CorruptedData; + } + else if (dcmEVR == EVR_OW) + { + /* swap 16 bit OW data (if necessary) */ + swapIfNecessary(gLocalByteOrder, EBO_LittleEndian, buf, OFstatic_cast(Uint32, buflen), sizeof(Uint16)); + } + } + fclose(f); + } else { + DCMDATA_WARN("cannot open binary data file: " << filename); + result = EC_InvalidTag; + } + } else + DCMDATA_WARN("filename for element " << element->getTag() << " is missing, empty element inserted"); + } else { + OFString dicomVal; + /* convert character set from UTF-8 (for specific VRs only) */ + if (element->isAffectedBySpecificCharacterSet() && + (xmlStrlen(elemVal) > 0) && convertUtf8ToCharset(elemVal, dicomVal)) + { + result = element->putOFStringArray(dicomVal); + } else { + /* set the value of the newly created element */ + result = element->putString(OFreinterpret_cast(char *, elemVal)); + } + if (result.bad()) + DCMDATA_WARN("cannot put content to element " << element->getTag() << ": " << result.text()); + } + /* free allocated memory */ + xmlFree(elemVal); + xmlFree(attrVal); + } else + result = EC_IllegalCall; + return result; +} + + +OFCondition DcmXMLParseHelper::parseElement( + DcmItem *dataset, + xmlNodePtr current) +{ + DcmElement *newElem = NULL; + /* create new DICOM element from XML element */ + OFCondition result = createNewElement(current, newElem); + if (result.good()) + { + /* retrieve specific character set (only on main dataset level) */ + if ((EncodingHandler == NULL) && (dataset->ident() == EVR_dataset) && + (newElem->getTag() == DCM_SpecificCharacterSet)) + { + const char *encString = NULL; + xmlChar *elemVal = xmlNodeGetContent(current); + /* check for known character set */ + if (xmlStrcmp(elemVal, OFreinterpret_cast(const xmlChar *, "ISO_IR 6")) == 0) + encString = "UTF-8"; + else if (xmlStrcmp(elemVal, OFreinterpret_cast(const xmlChar *, "ISO_IR 192")) == 0) + encString = "UTF-8"; + else if (xmlStrcmp(elemVal, OFreinterpret_cast(const xmlChar *, "ISO_IR 100")) == 0) + encString = "ISO-8859-1"; + else if (xmlStrcmp(elemVal, OFreinterpret_cast(const xmlChar *, "ISO_IR 101")) == 0) + encString = "ISO-8859-2"; + else if (xmlStrcmp(elemVal, OFreinterpret_cast(const xmlChar *, "ISO_IR 109")) == 0) + encString = "ISO-8859-3"; + else if (xmlStrcmp(elemVal, OFreinterpret_cast(const xmlChar *, "ISO_IR 110")) == 0) + encString = "ISO-8859-4"; + else if (xmlStrcmp(elemVal, OFreinterpret_cast(const xmlChar *, "ISO_IR 148")) == 0) + encString = "ISO-8859-9"; + else if (xmlStrcmp(elemVal, OFreinterpret_cast(const xmlChar *, "ISO_IR 144")) == 0) + encString = "ISO-8859-5"; + else if (xmlStrcmp(elemVal, OFreinterpret_cast(const xmlChar *, "ISO_IR 127")) == 0) + encString = "ISO-8859-6"; + else if (xmlStrcmp(elemVal, OFreinterpret_cast(const xmlChar *, "ISO_IR 126")) == 0) + encString = "ISO-8859-7"; + else if (xmlStrcmp(elemVal, OFreinterpret_cast(const xmlChar *, "ISO_IR 138")) == 0) + encString = "ISO-8859-8"; + else if (xmlStrlen(elemVal) > 0) + DCMDATA_WARN("character set '" << elemVal << "' not supported"); + if (encString != NULL) + { + /* find appropriate encoding handler */ + EncodingHandler = xmlFindCharEncodingHandler(encString); + } + xmlFree(elemVal); + } + /* set the element value */ + result = putElementContent(current, newElem); + /* insert the new element into the dataset */ + if (result.good()) + result = dataset->insert(newElem, OFTrue /*replaceOld*/); + if (result.bad()) + { + /* delete element if insertion or putting the value failed */ + delete newElem; + } + } + return result; +} + +OFCondition DcmXMLParseHelper::parseSequence( + DcmSequenceOfItems *sequence, + xmlNodePtr current, + E_TransferSyntax xfer, + const OFBool stopOnError) +{ + OFCondition result = EC_Normal; + if (sequence != NULL) + { + /* ignore blank (empty or whitespace only) nodes */ + while ((current != NULL) && xmlIsBlankNodeOrComment(current)) + current = current->next; + while (current != NULL) + { + /* ignore non-item nodes */ + if (xmlStrcmp(current->name, OFreinterpret_cast(const xmlChar *, "item")) == 0) + { + /* create new sequence item */ + DcmItem *newItem = new DcmItem(); + if (newItem != NULL) + { + sequence->insert(newItem); + /* proceed parsing the item content */ + result = parseDataSet(newItem, current->xmlChildrenNode, xfer, stopOnError); + if (result.bad()) + DCMDATA_WARN("cannot parse invalid item: " << result.text()); + } + } else if (!xmlIsBlankNodeOrComment(current)) + DCMDATA_WARN("unexpected node '" << current->name << "', 'item' expected, skipping"); + /* check for errors */ + if (result.bad()) + { + if (stopOnError) + { + /* exit the loop and return with an error */ + break; + } else { + DCMDATA_DEBUG("ignoring error as requested by the user"); + /* ignore the error */ + result = EC_Normal; + } + } + /* proceed with next node */ + current = current->next; + } + } else + result = EC_IllegalCall; + return result; +} + + +OFCondition DcmXMLParseHelper::parsePixelSequence( + DcmPixelSequence *sequence, + xmlNodePtr current, + const OFBool stopOnError) +{ + OFCondition result = EC_Normal; + if (sequence != NULL) + { + /* ignore blank (empty or whitespace only) nodes */ + while ((current != NULL) && xmlIsBlankNodeOrComment(current)) + current = current->next; + while (current != NULL) + { + /* ignore non-pixel-item nodes */ + if (xmlStrcmp(current->name, OFreinterpret_cast(const xmlChar *, "pixel-item")) == 0) + { + /* create new pixel item */ + DcmPixelItem *newItem = new DcmPixelItem(DCM_PixelItemTag); + if (newItem != NULL) + { + sequence->insert(newItem); + /* put pixel data into the item */ + result = putElementContent(current, newItem); + if (result.bad()) + DCMDATA_WARN("cannot parse invalid pixel-item: " << result.text()); + } + } else if (!xmlIsBlankNodeOrComment(current)) + DCMDATA_WARN("unexpected node '" << current->name << "', 'pixel-item' expected, skipping"); + /* check for errors */ + if (result.bad()) + { + if (stopOnError) + { + /* exit the loop and return with an error */ + break; + } else { + DCMDATA_DEBUG("ignoring error as requested by the user"); + /* ignore the error */ + result = EC_Normal; + } + } + /* proceed with next node */ + current = current->next; + } + } else + result = EC_IllegalCall; + return result; +} + + +OFCondition DcmXMLParseHelper::parseMetaHeader( + DcmMetaInfo *metainfo, + xmlNodePtr current, + const OFBool parse, + const OFBool stopOnError) +{ + /* check for valid node and correct name */ + OFCondition result = checkNode(current, "meta-header"); + if (result.good() && parse) + { + /* get child nodes */ + current = current->xmlChildrenNode; + while (current != NULL) + { + /* ignore non-element nodes */ + if (xmlStrcmp(current->name, OFreinterpret_cast(const xmlChar *, "element")) == 0) + result = parseElement(metainfo, current); + else if (!xmlIsBlankNodeOrComment(current)) + DCMDATA_WARN("unexpected node '" << current->name << "', 'element' expected, skipping"); + /* check for errors */ + if (result.bad()) + { + if (stopOnError) + { + /* exit the loop and return with an error */ + break; + } else { + DCMDATA_DEBUG("ignoring error as requested by the user"); + /* ignore the error */ + result = EC_Normal; + } + } + /* proceed with next node */ + current = current->next; + } + } + return result; +} + + +OFCondition DcmXMLParseHelper::parseDataSet( + DcmItem *dataset, + xmlNodePtr current, + E_TransferSyntax xfer, + const OFBool stopOnError) +{ + OFCondition result = EC_Normal; + /* ignore blank (empty or whitespace only) nodes */ + while ((current != NULL) && xmlIsBlankNodeOrComment(current)) + current = current->next; + while (current != NULL) + { + /* ignore non-element/sequence nodes */ + if (xmlStrcmp(current->name, OFreinterpret_cast(const xmlChar *, "element")) == 0) + result = parseElement(dataset, current); + else if (xmlStrcmp(current->name, OFreinterpret_cast(const xmlChar *, "sequence")) == 0) + { + DcmElement *newElem = NULL; + /* create new sequence element */ + if (createNewElement(current, newElem).good()) + { + /* insert new sequence element into the dataset */ + result = dataset->insert(newElem, OFTrue /*replaceOld*/); + if (result.good()) + { + /* special handling for compressed pixel data */ + if (newElem->getTag() == DCM_PixelData) + { + /* create new pixel sequence */ + DcmPixelSequence *sequence = new DcmPixelSequence(DCM_PixelSequenceTag); + if (sequence != NULL) + { + if (newElem->ident() == EVR_PixelData) + { + /* ... insert it into the dataset and proceed with the pixel items */ + OFstatic_cast(DcmPixelData *, newElem)->putOriginalRepresentation(xfer, NULL, sequence); + result = parsePixelSequence(sequence, current->xmlChildrenNode, stopOnError); + } else + DCMDATA_WARN("wrong VR for 'sequence' element with pixel data, ignoring child nodes"); + } + } else { + /* proceed parsing the items of the sequence */ + if (newElem->ident() == EVR_SQ) + result = parseSequence(OFstatic_cast(DcmSequenceOfItems *, newElem), current->xmlChildrenNode, xfer, stopOnError); + else + DCMDATA_WARN("wrong VR for 'sequence' element, ignoring child nodes"); + } + } else { + /* delete element if insertion failed */ + delete newElem; + } + } + } else if (!xmlIsBlankNodeOrComment(current)) + DCMDATA_WARN("unexpected node '" << current->name << "', skipping"); + /* check for errors */ + if (result.bad()) + { + if (stopOnError) + { + /* exit the loop and return with an error */ + break; + } else { + DCMDATA_DEBUG("ignoring error as requested by the user"); + /* ignore the error */ + result = EC_Normal; + } + } + /* proceed with next node */ + current = current->next; + } + return result; +} + + +OFCondition DcmXMLParseHelper::validateXmlDocument(xmlDocPtr doc) +{ + OFCondition result = EC_Normal; + DCMDATA_INFO("validating XML document ..."); + xmlGenericError(xmlGenericErrorContext, "--- libxml validating ---\n"); + /* temporary buffer needed for errorFunction - more detailed explanation there */ + OFString tmpErrorString; + /* create context for document validation */ + xmlValidCtxt cvp; + cvp.userData = &tmpErrorString; + cvp.error = errorFunction; + cvp.warning = errorFunction; + /* validate the document */ + const int valid = xmlValidateDocument(&cvp, doc); + xmlGenericError(xmlGenericErrorContext, "-------------------------\n"); + if (!valid) + { + DCMDATA_ERROR("document does not validate"); + result = EC_XMLValidationFailure; + } + return result; +} + + +OFCondition DcmXMLParseHelper::readXmlFile( + const char *ifname, + DcmFileFormat &fileformat, + E_TransferSyntax &xfer, + const OFBool metaInfo, + const OFBool checkNamespace, + const OFBool validateDocument, + const OFBool stopOnError) +{ + OFCondition result = EC_Normal; + xfer = EXS_Unknown; + xmlGenericError(xmlGenericErrorContext, "--- libxml parsing ------\n"); + /* build an XML tree from the file */ +#if LIBXML_VERSION >= 20703 + /* + * Starting with libxml version 2.7.3, the maximum length of XML element values + * is limited to 10 MB. The following code disables this default limitation. + */ + xmlDocPtr doc = xmlReadFile(ifname, NULL /*encoding*/, XML_PARSE_HUGE); +#else + xmlDocPtr doc = xmlParseFile(ifname); +#endif + xmlGenericError(xmlGenericErrorContext, "-------------------------\n"); + if (doc != NULL) + { + /* validate document */ + if (validateDocument) + result = validateXmlDocument(doc); + if (result.good()) + { + /* check whether the document is of the right kind */ + xmlNodePtr current = xmlDocGetRootElement(doc); + if (current != NULL) + { + /* check namespace declaration (if required) */ + if (!checkNamespace || (xmlSearchNsByHref(doc, current, OFreinterpret_cast(const xmlChar *, DCMTK_XML_NAMESPACE_URI)) != NULL)) + { + /* check whether to parse a "file-format" or "data-set" */ + if (xmlStrcmp(current->name, OFreinterpret_cast(const xmlChar *, "file-format")) == 0) + { + DCMDATA_INFO("parsing file-format ..."); + if (metaInfo) + DCMDATA_INFO("parsing meta-header ..."); + else + DCMDATA_INFO("skipping meta-header ..."); + current = current->xmlChildrenNode; + /* ignore blank (empty or whitespace only) nodes */ + while ((current != NULL) && xmlIsBlankNodeOrComment(current)) + current = current->next; + /* parse/skip "meta-header" */ + result = parseMetaHeader(fileformat.getMetaInfo(), current, metaInfo /*parse*/, stopOnError); + if (result.good()) + { + current = current->next; + /* ignore blank (empty or whitespace only) nodes */ + while ((current != NULL) && xmlIsBlankNodeOrComment(current)) + current = current->next; + } else + DCMDATA_ERROR("cannot parse invalid meta-header"); + } + /* there should always be a "data-set" node */ + if (result.good()) + { + DCMDATA_INFO("parsing data-set ..."); + /* parse "data-set" */ + result = checkNode(current, "data-set"); + if (result.good()) + { + /* determine stored transfer syntax */ + xmlChar *xferUID = xmlGetProp(current, OFreinterpret_cast(const xmlChar *, "xfer")); + if (xferUID != NULL) + xfer = DcmXfer(OFreinterpret_cast(char *, xferUID)).getXfer(); + result = parseDataSet(fileformat.getDataset(), current->xmlChildrenNode, xfer, stopOnError); + /* free allocated memory */ + xmlFree(xferUID); + if (result.bad()) + DCMDATA_ERROR("cannot parse invalid data-set"); + } + } + if (result.bad()) + { + if (DCM_dcmdataLogger.isEnabledFor(OFLogger::DEBUG_LOG_LEVEL)) + { + DCMDATA_DEBUG("--- libxml dump ---------"); + /* dump XML document for debugging purposes */ + xmlChar *str; + int size; + xmlDocDumpFormatMemory(doc, &str, &size, 1); + DCMDATA_DEBUG(str); + xmlFree(str); + DCMDATA_DEBUG("-------------------------"); + } + DCMDATA_ERROR("cannot read invalid document: " << ifname); + } + } else { + DCMDATA_ERROR("document has wrong type, dcmtk namespace not found"); + result = EC_XMLParseError; + } + } else { + DCMDATA_ERROR("document is empty: " << ifname); + result = EC_XMLParseError; + } + } + } else { + DCMDATA_ERROR("could not parse document: " << ifname); + result = EC_XMLParseError; + } + /* free allocated memory */ + xmlFreeDoc(doc); + return result; +} + +#endif /* WITH_LIBXML */ diff -Nru dcmtk-3.6.6/dcmdata/tests/CMakeLists.txt dcmtk-3.6.7/dcmdata/tests/CMakeLists.txt --- dcmtk-3.6.6/dcmdata/tests/CMakeLists.txt 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/tests/CMakeLists.txt 2022-04-28 13:47:25.000000000 +0000 @@ -1,5 +1,33 @@ # declare executables -DCMTK_ADD_EXECUTABLE(dcmdata_tests tests tpread ti2dbmp tchval tpath tvrdatim telemlen tparser tdict tvrds tvrfd tvrpn tvrui tvrol tvrov tvrsv tvruv tstrval tspchrs tparent tfilter tvrcomp tmatch tnewdcme tgenuid tsequen) +DCMTK_ADD_EXECUTABLE(dcmdata_tests + tchval.cc + tdict.cc + telemlen.cc + tests.cc + tfilter.cc + tgenuid.cc + ti2dbmp.cc + titem.cc + tmatch.cc + tnewdcme.cc + tparent.cc + tparser.cc + tpath.cc + tpread.cc + tsequen.cc + tspchrs.cc + tstrval.cc + tvrcomp.cc + tvrdatim.cc + tvrds.cc + tvrfd.cc + tvrol.cc + tvrov.cc + tvrpn.cc + tvrsv.cc + tvrui.cc + tvruv.cc +) # make sure executables are linked to the corresponding libraries DCMTK_TARGET_LINK_MODULES(dcmdata_tests i2d dcmdata oflog ofstd) diff -Nru dcmtk-3.6.6/dcmdata/tests/dctmacro.h dcmtk-3.6.7/dcmdata/tests/dctmacro.h --- dcmtk-3.6.6/dcmdata/tests/dctmacro.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/tests/dctmacro.h 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2011-2012, OFFIS e.V. + * Copyright (C) 2011-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -72,7 +72,7 @@ static inline OFCondition readDataset(DcmDataset& dset, const Uint8* buffer, size_t length, E_TransferSyntax ts) { DcmInputBufferStream stream; - stream.setBuffer(buffer, length); + stream.setBuffer(buffer, OFstatic_cast(offile_off_t, length)); stream.setEos(); dset.clear(); @@ -103,7 +103,7 @@ // Write the dataset into a temporary buffer OFVector writeBuffer(length * 2); - DcmOutputBufferStream out(&writeBuffer[0], writeBuffer.size()); + DcmOutputBufferStream out(&writeBuffer[0], OFstatic_cast(offile_off_t, writeBuffer.size())); dset.transferInit(); cond = dset.write(out, ts1, encType, NULL); dset.transferEnd(); diff -Nru dcmtk-3.6.6/dcmdata/tests/Makefile.dep dcmtk-3.6.7/dcmdata/tests/Makefile.dep --- dcmtk-3.6.6/dcmdata/tests/Makefile.dep 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/tests/Makefile.dep 2022-04-28 13:47:25.000000000 +0000 @@ -332,7 +332,8 @@ ../include/dcmtk/dcmdata/dctypes.h ../include/dcmtk/dcmdata/dcvr.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 + ../include/dcmtk/dcmdata/dcitem.h ../include/dcmtk/dcmdata/dcpcache.h \ + ../include/dcmtk/dcmdata/dcdict.h ../include/dcmtk/dcmdata/dchashdi.h tgenuid.o: tgenuid.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/oftest.h \ ../../ofstd/include/dcmtk/ofstd/ofconapp.h \ @@ -435,6 +436,63 @@ ../include/dcmtk/dcmdata/dcvr.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../include/dcmtk/dcmdata/libi2d/i2define.h +titem.o: titem.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/ofexbl.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.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/ofcond.h \ + ../../ofstd/include/dcmtk/ofstd/oflimits.h \ + ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ + ../../ofstd/include/dcmtk/ofstd/ofexit.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/dcvrat.h ../include/dcmtk/dcmdata/dcelem.h \ + ../include/dcmtk/dcmdata/dcvrus.h ../include/dcmtk/dcmdata/dcdeftag.h tmatch.o: tmatch.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/oftest.h \ ../../ofstd/include/dcmtk/ofstd/ofconapp.h \ @@ -809,13 +867,13 @@ ../include/dcmtk/dcmdata/dcvrol.h ../include/dcmtk/dcmdata/dcvrov.h \ ../include/dcmtk/dcmdata/cmdlnarg.h ../include/dcmtk/dcmdata/dcpath.h tpread.o: tpread.cc ../../config/include/dcmtk/config/osconfig.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.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/ofexbl.h \ @@ -1139,7 +1197,8 @@ ../include/dcmtk/dcmdata/dcvruc.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 + ../include/dcmtk/dcmdata/dcovlay.h ../include/dcmtk/dcmdata/dcpixseq.h \ + ../include/dcmtk/dcmdata/dcdict.h ../include/dcmtk/dcmdata/dchashdi.h tvrdatim.o: tvrdatim.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/oftest.h \ ../../ofstd/include/dcmtk/ofstd/ofconapp.h \ @@ -1200,7 +1259,8 @@ ../../ofstd/include/dcmtk/ofstd/oftime.h \ ../include/dcmtk/dcmdata/dcvrdt.h \ ../../ofstd/include/dcmtk/ofstd/ofdatime.h \ - ../include/dcmtk/dcmdata/dcdeftag.h + ../include/dcmtk/dcmdata/dcdeftag.h ../include/dcmtk/dcmdata/dcdict.h \ + ../include/dcmtk/dcmdata/dchashdi.h tvrds.o: tvrds.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/oftest.h \ ../../ofstd/include/dcmtk/ofstd/ofconapp.h \ diff -Nru dcmtk-3.6.6/dcmdata/tests/Makefile.in dcmtk-3.6.7/dcmdata/tests/Makefile.in --- dcmtk-3.6.6/dcmdata/tests/Makefile.in 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/tests/Makefile.in 2022-04-28 13:47:25.000000000 +0000 @@ -18,13 +18,13 @@ 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) $(MATHLIBS) +LOCALLIBS = -ldcmdata -loflog -lofstd $(ZLIBLIBS) $(XMLLIBS) $(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 tvrov.o tvrsv.o tvruv.o tstrval.o \ tspchrs.o tvrpn.o tparent.o tfilter.o tvrcomp.o tmatch.o tnewdcme.o \ - tgenuid.o tsequen.o + tgenuid.o tsequen.o titem.o progs = tests diff -Nru dcmtk-3.6.6/dcmdata/tests/tests.cc dcmtk-3.6.7/dcmdata/tests/tests.cc --- dcmtk-3.6.6/dcmdata/tests/tests.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/tests/tests.cc 2022-04-28 13:47:25.000000000 +0000 @@ -94,6 +94,7 @@ OFTEST_REGISTER(dcmdata_sequenceInsert); OFTEST_REGISTER(dcmdata_pixelSequenceInsert); OFTEST_REGISTER(dcmdata_findAndGetSequenceItem); +OFTEST_REGISTER(dcmdata_findAndGetUint16Array); OFTEST_REGISTER(dcmdata_parser_missingDelimitationItems); OFTEST_REGISTER(dcmdata_parser_missingSequenceDelimitationItem_1); OFTEST_REGISTER(dcmdata_parser_missingSequenceDelimitationItem_2); diff -Nru dcmtk-3.6.6/dcmdata/tests/titem.cc dcmtk-3.6.7/dcmdata/tests/titem.cc --- dcmtk-3.6.6/dcmdata/tests/titem.cc 1970-01-01 00:00:00.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/tests/titem.cc 2022-04-28 13:47:25.000000000 +0000 @@ -0,0 +1,50 @@ +/* + * + * Copyright (C) 2021, 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: Joerg Riesmeier + * + * Purpose: test program for class DcmItem + * + */ + + +#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/dcvrat.h" +#include "dcmtk/dcmdata/dcvrus.h" +#include "dcmtk/dcmdata/dcdeftag.h" + + +OFTEST(dcmdata_findAndGetUint16Array) +{ + DcmItem item; + /* create data elements with values */ + DcmUnsignedShort usValue(DCM_SynchronizationChannel); + DcmAttributeTag atValue(DCM_FrameIncrementPointer); + usValue.putString("1\\2"); + atValue.putTagVal(DCM_FrameTime); + /* add elements to item */ + OFCHECK(item.insert(new DcmUnsignedShort(usValue)).good()); + OFCHECK(item.insert(new DcmAttributeTag(atValue)).good()); + /* and check the number of 16-bit values stored */ + const Uint16 *uintVals = NULL; + unsigned long numUints = 0; + OFCHECK(item.findAndGetUint16Array(DCM_SynchronizationChannel, uintVals, &numUints).good()); + OFCHECK_EQUAL(numUints, 2); + OFCHECK(item.findAndGetUint16Array(DCM_FrameIncrementPointer, uintVals, &numUints).good()); + OFCHECK_EQUAL(numUints, 2); +} diff -Nru dcmtk-3.6.6/dcmdata/tests/tpread.cc dcmtk-3.6.7/dcmdata/tests/tpread.cc --- dcmtk-3.6.6/dcmdata/tests/tpread.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/tests/tpread.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1994-2020, OFFIS e.V. + * Copyright (C) 1994-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -21,11 +21,6 @@ #include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ -#define INCLUDE_CSTDLIB -#define INCLUDE_CSTDIO -#define INCLUDE_CSTRING -#include "dcmtk/ofstd/ofstdinc.h" - #include "dcmtk/ofstd/oftest.h" #include "dcmtk/ofstd/ofrand.h" #include "dcmtk/dcmdata/dctk.h" diff -Nru dcmtk-3.6.6/dcmdata/tests/tsequen.cc dcmtk-3.6.7/dcmdata/tests/tsequen.cc --- dcmtk-3.6.6/dcmdata/tests/tsequen.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmdata/tests/tsequen.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2019, J. Riesmeier, Oldenburg, Germany + * Copyright (C) 2019-2022, J. Riesmeier, Oldenburg, Germany * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation are maintained by @@ -64,7 +64,7 @@ unsigned long counter = 0; for (unsigned long i = 0; i < NUMBER_OF_ITEMS; ++i) { - if (pixelSequence.insert(new DcmPixelItem(DcmTag(DCM_Item, EVR_OB))).good()) + if (pixelSequence.insert(new DcmPixelItem(DCM_PixelItemTag)).good()) ++counter; } /* check whether that worked (for-loop shouldn't take too long) */ diff -Nru dcmtk-3.6.6/dcmect/libsrc/CMakeLists.txt dcmtk-3.6.7/dcmect/libsrc/CMakeLists.txt --- dcmtk-3.6.6/dcmect/libsrc/CMakeLists.txt 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmect/libsrc/CMakeLists.txt 2022-04-28 13:47:25.000000000 +0000 @@ -1,4 +1,6 @@ # create library from source files -DCMTK_ADD_LIBRARY(dcmect enhanced_ct types) +DCMTK_ADD_LIBRARY(dcmect + enhanced_ct.cc + types.cc) DCMTK_TARGET_LINK_MODULES(dcmect dcmfg dcmiod dcmdata ofstd oflog) diff -Nru dcmtk-3.6.6/dcmect/libsrc/enhanced_ct.cc dcmtk-3.6.7/dcmect/libsrc/enhanced_ct.cc --- dcmtk-3.6.6/dcmect/libsrc/enhanced_ct.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmect/libsrc/enhanced_ct.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2019, Open Connections GmbH + * Copyright (C) 2019-2021, Open Connections GmbH * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation are maintained by @@ -480,7 +480,7 @@ else { DCMECT_ERROR("Invalid SOP Class: " - << sopClass << ", only Enhanced CT Image Storage (1.2.840.10008.5.1.4.1.1.2.1​) supported"); + << sopClass << ", only Enhanced CT Image Storage (1.2.840.10008.5.1.4.1.1.2.1) supported"); return ECT_InvalidSOPClass; } } diff -Nru dcmtk-3.6.6/dcmect/libsrc/Makefile.dep dcmtk-3.6.7/dcmect/libsrc/Makefile.dep --- dcmtk-3.6.6/dcmect/libsrc/Makefile.dep 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmect/libsrc/Makefile.dep 2022-04-28 13:47:25.000000000 +0000 @@ -3,7 +3,6 @@ ../include/dcmtk/dcmect/def.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 \ ../include/dcmtk/dcmect/types.h \ ../../dcmiod/include/dcmtk/dcmiod/iodmacro.h \ ../../dcmdata/include/dcmtk/dcmdata/dctk.h \ @@ -11,6 +10,7 @@ ../../oflog/include/dcmtk/oflog/oflog.h \ ../../oflog/include/dcmtk/oflog/logger.h \ ../../oflog/include/dcmtk/oflog/config.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../oflog/include/dcmtk/oflog/config/defines.h \ ../../oflog/include/dcmtk/oflog/helpers/threadcf.h \ ../../oflog/include/dcmtk/oflog/loglevel.h \ @@ -141,9 +141,9 @@ ../../dcmiod/include/dcmtk/dcmiod/modimagepixelvariant.h \ ../../dcmiod/include/dcmtk/dcmiod/modimagepixelbase.h \ ../../ofstd/include/dcmtk/ofstd/ofvriant.h \ + ../../ofstd/include/dcmtk/ofstd/ofdiag.h \ ../../ofstd/include/dcmtk/ofstd/variadic/variant.h \ ../../ofstd/include/dcmtk/ofstd/variadic/helpers.h \ - ../../ofstd/include/dcmtk/ofstd/ofdiag.h \ ../../ofstd/include/dcmtk/ofstd/diag/push.def \ ../../ofstd/include/dcmtk/ofstd/diag/cnvrsn.def \ ../../ofstd/include/dcmtk/ofstd/diag/vsprfw.def \ @@ -157,23 +157,19 @@ ../../dcmfg/include/dcmtk/dcmfg/concatenationcreator.h \ ../../dcmfg/include/dcmtk/dcmfg/concatenationloader.h \ ../../dcmiod/include/dcmtk/dcmiod/iodutil.h \ - ../../dcmdata/include/dcmtk/dcmdata/dcdatutl.h \ - ../../ofstd/include/dcmtk/ofstd/oftuple.h \ - ../../ofstd/include/dcmtk/ofstd/diag/mmtag.def \ - ../../ofstd/include/dcmtk/ofstd/variadic/tuplefrd.h \ - ../../ofstd/include/dcmtk/ofstd/variadic/tuple.h + ../../dcmdata/include/dcmtk/dcmdata/dcdatutl.h types.o: types.cc ../include/dcmtk/dcmect/types.h \ ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmect/def.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 \ ../../dcmiod/include/dcmtk/dcmiod/iodmacro.h \ ../../dcmdata/include/dcmtk/dcmdata/dctk.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 \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../oflog/include/dcmtk/oflog/config/defines.h \ ../../oflog/include/dcmtk/oflog/helpers/threadcf.h \ ../../oflog/include/dcmtk/oflog/loglevel.h \ diff -Nru dcmtk-3.6.6/dcmect/tests/CMakeLists.txt dcmtk-3.6.7/dcmect/tests/CMakeLists.txt --- dcmtk-3.6.6/dcmect/tests/CMakeLists.txt 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmect/tests/CMakeLists.txt 2022-04-28 13:47:25.000000000 +0000 @@ -1,8 +1,9 @@ # declare executables DCMTK_ADD_EXECUTABLE(dcmect_tests - tests - t_huge_concat - t_roundtrip) + tests.cc + t_huge_concat.cc + t_roundtrip.cc +) # make sure executables are linked to the corresponding libraries DCMTK_TARGET_LINK_MODULES(dcmect_tests dcmect dcmfg dcmdata oflog ofstd) diff -Nru dcmtk-3.6.6/dcmect/tests/Makefile.dep dcmtk-3.6.7/dcmect/tests/Makefile.dep --- dcmtk-3.6.6/dcmect/tests/Makefile.dep 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmect/tests/Makefile.dep 2022-04-28 13:47:25.000000000 +0000 @@ -150,9 +150,9 @@ ../../dcmiod/include/dcmtk/dcmiod/modimagepixelvariant.h \ ../../dcmiod/include/dcmtk/dcmiod/modimagepixelbase.h \ ../../ofstd/include/dcmtk/ofstd/ofvriant.h \ + ../../ofstd/include/dcmtk/ofstd/ofdiag.h \ ../../ofstd/include/dcmtk/ofstd/variadic/variant.h \ ../../ofstd/include/dcmtk/ofstd/variadic/helpers.h \ - ../../ofstd/include/dcmtk/ofstd/ofdiag.h \ ../../ofstd/include/dcmtk/ofstd/diag/push.def \ ../../ofstd/include/dcmtk/ofstd/diag/cnvrsn.def \ ../../ofstd/include/dcmtk/ofstd/diag/vsprfw.def \ @@ -167,10 +167,6 @@ ../../dcmfg/include/dcmtk/dcmfg/concatenationloader.h \ ../../dcmiod/include/dcmtk/dcmiod/iodutil.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdatutl.h \ - ../../ofstd/include/dcmtk/ofstd/oftuple.h \ - ../../ofstd/include/dcmtk/ofstd/diag/mmtag.def \ - ../../ofstd/include/dcmtk/ofstd/variadic/tuplefrd.h \ - ../../ofstd/include/dcmtk/ofstd/variadic/tuple.h \ ../../dcmfg/include/dcmtk/dcmfg/fgctacquisitiondetails.h \ ../../dcmfg/include/dcmtk/dcmfg/fgctacquisitiontype.h \ ../../dcmfg/include/dcmtk/dcmfg/fgctadditionalxraysource.h \ @@ -344,9 +340,9 @@ ../../dcmiod/include/dcmtk/dcmiod/modimagepixelvariant.h \ ../../dcmiod/include/dcmtk/dcmiod/modimagepixelbase.h \ ../../ofstd/include/dcmtk/ofstd/ofvriant.h \ + ../../ofstd/include/dcmtk/ofstd/ofdiag.h \ ../../ofstd/include/dcmtk/ofstd/variadic/variant.h \ ../../ofstd/include/dcmtk/ofstd/variadic/helpers.h \ - ../../ofstd/include/dcmtk/ofstd/ofdiag.h \ ../../ofstd/include/dcmtk/ofstd/diag/push.def \ ../../ofstd/include/dcmtk/ofstd/diag/cnvrsn.def \ ../../ofstd/include/dcmtk/ofstd/diag/vsprfw.def \ @@ -361,10 +357,6 @@ ../../dcmfg/include/dcmtk/dcmfg/concatenationloader.h \ ../../dcmiod/include/dcmtk/dcmiod/iodutil.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdatutl.h \ - ../../ofstd/include/dcmtk/ofstd/oftuple.h \ - ../../ofstd/include/dcmtk/ofstd/diag/mmtag.def \ - ../../ofstd/include/dcmtk/ofstd/variadic/tuplefrd.h \ - ../../ofstd/include/dcmtk/ofstd/variadic/tuple.h \ ../../dcmfg/include/dcmtk/dcmfg/fgctacquisitiondetails.h \ ../../dcmfg/include/dcmtk/dcmfg/fgctacquisitiontype.h \ ../../dcmfg/include/dcmtk/dcmfg/fgctadditionalxraysource.h \ diff -Nru dcmtk-3.6.6/dcmect/tests/t_huge_concat.cc dcmtk-3.6.7/dcmect/tests/t_huge_concat.cc --- dcmtk-3.6.6/dcmect/tests/t_huge_concat.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmect/tests/t_huge_concat.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2019-2020, OFFIS e.V. + * Copyright (C) 2019-2022, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -272,7 +272,6 @@ OFCHECK(exp_item->setCTDIVol(0.1).good()); CodeSequenceMacro* phantom_item = new CodeSequenceMacro("113682", "DCM", "ACR Accreditation Phantom - CT"); exp_item->getCTDIPhantomTypeCodeSequence().push_back(phantom_item); - OFCHECK(exp_item->setEstimatedDoseSaving(0.2).good()); OFCHECK(exp_item->setExposureInMas(0.3).good()); OFCHECK(exp_item->setExposureModulationType("WEIRD").good()); OFCHECK(exp_item->setExposureTimeInMs(0.4).good()); @@ -734,8 +733,7 @@ EXPECTED_DUMP += " (0018,1130) DS [50] # 2, 1 TableHeight\n"; EXPECTED_DUMP += " (0018,1140) CS [CW] # 2, 1 RotationDirection\n"; EXPECTED_DUMP += " (0018,9305) FD 5 # 8, 1 RevolutionTime\n"; - EXPECTED_DUMP - += " (0018,9306) FD 1 # 8, 1 SingleCollimationWidth\n"; + EXPECTED_DUMP += " (0018,9306) FD 1 # 8, 1 SingleCollimationWidth\n"; EXPECTED_DUMP += " (0018,9307) FD 10 # 8, 1 TotalCollimationWidth\n"; EXPECTED_DUMP += " (fffe,e00d) na (ItemDelimitationItem for re-encoding) # 0, 0 ItemDelimitationItem\n"; EXPECTED_DUMP += " (fffe,e0dd) na (SequenceDelimitationItem for re-encod.) # 0, 0 SequenceDelimitationItem\n"; @@ -748,62 +746,44 @@ EXPECTED_DUMP += " (fffe,e0dd) na (SequenceDelimitationItem for re-encod.) # 0, 0 SequenceDelimitationItem\n"; EXPECTED_DUMP += " (0018,9312) SQ (Sequence with explicit length #=1) # 0, 1 CTGeometrySequence\n"; EXPECTED_DUMP += " (fffe,e000) na (Item with explicit length #=2) # 0, 1 Item\n"; - EXPECTED_DUMP - += " (0018,1110) DS [0.5] # 4, 1 DistanceSourceToDetector\n"; - EXPECTED_DUMP += " (0018,9335) FD 5 # 8, 1 " - "DistanceSourceToDataCollectionCenter\n"; + EXPECTED_DUMP += " (0018,1110) DS [0.5] # 4, 1 DistanceSourceToDetector\n"; + EXPECTED_DUMP += " (0018,9335) FD 5 # 8, 1 DistanceSourceToDataCollectionCenter\n"; EXPECTED_DUMP += " (fffe,e00d) na (ItemDelimitationItem for re-encoding) # 0, 0 ItemDelimitationItem\n"; EXPECTED_DUMP += " (fffe,e0dd) na (SequenceDelimitationItem for re-encod.) # 0, 0 SequenceDelimitationItem\n"; EXPECTED_DUMP += " (0018,9314) SQ (Sequence with explicit length #=1) # 0, 1 CTReconstructionSequence\n"; EXPECTED_DUMP += " (fffe,e000) na (Item with explicit length #=7) # 0, 1 Item\n"; - EXPECTED_DUMP - += " (0018,1100) DS [100] # 4, 1 ReconstructionDiameter\n"; + EXPECTED_DUMP += " (0018,1100) DS [100] # 4, 1 ReconstructionDiameter\n"; EXPECTED_DUMP += " (0018,1210) SH [DUMMY] # 6, 1 ConvolutionKernel\n"; - EXPECTED_DUMP - += " (0018,9315) CS [ALGO] # 4, 1 ReconstructionAlgorithm\n"; - EXPECTED_DUMP - += " (0018,9316) CS [DUMMYGROUP] # 10, 1 ConvolutionKernelGroup\n"; + EXPECTED_DUMP += " (0018,9315) CS [ALGO] # 4, 1 ReconstructionAlgorithm\n"; + EXPECTED_DUMP += " (0018,9316) CS [DUMMYGROUP] # 10, 1 ConvolutionKernelGroup\n"; EXPECTED_DUMP += " (0018,9319) FD 90 # 8, 1 ReconstructionAngle\n"; EXPECTED_DUMP += " (0018,9320) SH [FILTER] # 6, 1 ImageFilter\n"; - EXPECTED_DUMP - += " (0018,9322) FD 0.1\\0.1 # 16, 2 ReconstructionPixelSpacing\n"; + EXPECTED_DUMP += " (0018,9322) FD 0.1\\0.1 # 16, 2 ReconstructionPixelSpacing\n"; EXPECTED_DUMP += " (fffe,e00d) na (ItemDelimitationItem for re-encoding) # 0, 0 ItemDelimitationItem\n"; EXPECTED_DUMP += " (fffe,e0dd) na (SequenceDelimitationItem for re-encod.) # 0, 0 SequenceDelimitationItem\n"; EXPECTED_DUMP += " (0018,9321) SQ (Sequence with explicit length #=1) # 0, 1 CTExposureSequence\n"; - EXPECTED_DUMP += " (fffe,e000) na (Item with explicit length #=10) # 0, 1 Item\n"; - EXPECTED_DUMP += " (0018,115e) DS [0.5] # 4, 1 " - "ImageAndFluoroscopyAreaDoseProduct\n"; - EXPECTED_DUMP - += " (0018,1271) FD 0.6 # 8, 1 WaterEquivalentDiameter\n"; - EXPECTED_DUMP += " (0018,1272) SQ (Sequence with explicit length #=1) # 0, 1 " - "WaterEquivalentDiameterCalculationMethodCodeSequence\n"; + EXPECTED_DUMP += " (fffe,e000) na (Item with explicit length #=9) # 0, 1 Item\n"; + EXPECTED_DUMP += " (0018,115e) DS [0.5] # 4, 1 ImageAndFluoroscopyAreaDoseProduct\n"; + EXPECTED_DUMP += " (0018,1271) FD 0.6 # 8, 1 WaterEquivalentDiameter\n"; + EXPECTED_DUMP += " (0018,1272) SQ (Sequence with explicit length #=1) # 0, 1 WaterEquivalentDiameterCalculationMethodCodeSequence\n"; EXPECTED_DUMP += " (fffe,e000) na (Item with explicit length #=3) # 0, 1 Item\n"; EXPECTED_DUMP += " (0008,0100) SH [113987] # 6, 1 CodeValue\n"; - EXPECTED_DUMP - += " (0008,0102) SH [DCM] # 4, 1 CodingSchemeDesignator\n"; + EXPECTED_DUMP += " (0008,0102) SH [DCM] # 4, 1 CodingSchemeDesignator\n"; EXPECTED_DUMP += " (0008,0104) LO [AAPM 220] # 8, 1 CodeMeaning\n"; - EXPECTED_DUMP - += " (fffe,e00d) na (ItemDelimitationItem for re-encoding) # 0, 0 ItemDelimitationItem\n"; - EXPECTED_DUMP - += " (fffe,e0dd) na (SequenceDelimitationItem for re-encod.) # 0, 0 SequenceDelimitationItem\n"; - EXPECTED_DUMP - += " (0018,9323) CS [WEIRD] # 6, 1 ExposureModulationType\n"; - EXPECTED_DUMP += " (0018,9324) FD 0.2 # 8, 1 EstimatedDoseSaving\n"; + EXPECTED_DUMP += " (fffe,e00d) na (ItemDelimitationItem for re-encoding) # 0, 0 ItemDelimitationItem\n"; + EXPECTED_DUMP += " (fffe,e0dd) na (SequenceDelimitationItem for re-encod.) # 0, 0 SequenceDelimitationItem\n"; + EXPECTED_DUMP += " (0018,9323) CS [WEIRD] # 6, 1 ExposureModulationType\n"; EXPECTED_DUMP += " (0018,9328) FD 0.4 # 8, 1 ExposureTimeInms\n"; EXPECTED_DUMP += " (0018,9330) FD 0.7 # 8, 1 XRayTubeCurrentInmA\n"; EXPECTED_DUMP += " (0018,9332) FD 0.3 # 8, 1 ExposureInmAs\n"; EXPECTED_DUMP += " (0018,9345) FD 0.1 # 8, 1 CTDIvol\n"; - EXPECTED_DUMP - += " (0018,9346) SQ (Sequence with explicit length #=1) # 0, 1 CTDIPhantomTypeCodeSequence\n"; + EXPECTED_DUMP += " (0018,9346) SQ (Sequence with explicit length #=1) # 0, 1 CTDIPhantomTypeCodeSequence\n"; EXPECTED_DUMP += " (fffe,e000) na (Item with explicit length #=3) # 0, 1 Item\n"; EXPECTED_DUMP += " (0008,0100) SH [113682] # 6, 1 CodeValue\n"; - EXPECTED_DUMP - += " (0008,0102) SH [DCM] # 4, 1 CodingSchemeDesignator\n"; + EXPECTED_DUMP += " (0008,0102) SH [DCM] # 4, 1 CodingSchemeDesignator\n"; EXPECTED_DUMP += " (0008,0104) LO [ACR Accreditation Phantom - CT] # 30, 1 CodeMeaning\n"; - EXPECTED_DUMP - += " (fffe,e00d) na (ItemDelimitationItem for re-encoding) # 0, 0 ItemDelimitationItem\n"; - EXPECTED_DUMP - += " (fffe,e0dd) na (SequenceDelimitationItem for re-encod.) # 0, 0 SequenceDelimitationItem\n"; + EXPECTED_DUMP += " (fffe,e00d) na (ItemDelimitationItem for re-encoding) # 0, 0 ItemDelimitationItem\n"; + EXPECTED_DUMP += " (fffe,e0dd) na (SequenceDelimitationItem for re-encod.) # 0, 0 SequenceDelimitationItem\n"; EXPECTED_DUMP += " (fffe,e00d) na (ItemDelimitationItem for re-encoding) # 0, 0 ItemDelimitationItem\n"; EXPECTED_DUMP += " (fffe,e0dd) na (SequenceDelimitationItem for re-encod.) # 0, 0 SequenceDelimitationItem\n"; EXPECTED_DUMP += " (0018,9325) SQ (Sequence with explicit length #=1) # 0, 1 CTXRayDetailsSequence\n"; @@ -812,19 +792,15 @@ EXPECTED_DUMP += " (0018,1160) SH [FILTER_TYPE] # 12, 1 FilterType\n"; EXPECTED_DUMP += " (0018,1190) DS [4.4\\4.4\\4.4\\4.4] # 16, 4 FocalSpots\n"; EXPECTED_DUMP += " (0018,7050) CS [FILTER_MATERIAL] # 16, 1 FilterMaterial\n"; - EXPECTED_DUMP - += " (0018,9351) FL 2 # 4, 1 CalciumScoringMassFactorPatient\n"; - EXPECTED_DUMP += " (0018,9352) FL 1\\1\\1 # 12, 3 " - "CalciumScoringMassFactorDevice\n"; + EXPECTED_DUMP += " (0018,9351) FL 2 # 4, 1 CalciumScoringMassFactorPatient\n"; + EXPECTED_DUMP += " (0018,9352) FL 1\\1\\1 # 12, 3 CalciumScoringMassFactorDevice\n"; EXPECTED_DUMP += " (0018,9353) FL 3 # 4, 1 EnergyWeightingFactor\n"; EXPECTED_DUMP += " (fffe,e00d) na (ItemDelimitationItem for re-encoding) # 0, 0 ItemDelimitationItem\n"; EXPECTED_DUMP += " (fffe,e0dd) na (SequenceDelimitationItem for re-encod.) # 0, 0 SequenceDelimitationItem\n"; EXPECTED_DUMP += " (0018,9326) SQ (Sequence with explicit length #=1) # 0, 1 CTPositionSequence\n"; EXPECTED_DUMP += " (fffe,e000) na (Item with explicit length #=3) # 0, 1 Item\n"; - EXPECTED_DUMP - += " (0018,9313) FD 2\\2\\2 # 24, 3 DataCollectionCenterPatient\n"; - EXPECTED_DUMP += " (0018,9318) FD 1\\1\\1 # 24, 3 " - "ReconstructionTargetCenterPatient\n"; + EXPECTED_DUMP += " (0018,9313) FD 2\\2\\2 # 24, 3 DataCollectionCenterPatient\n"; + EXPECTED_DUMP += " (0018,9318) FD 1\\1\\1 # 24, 3 ReconstructionTargetCenterPatient\n"; EXPECTED_DUMP += " (0018,9327) FD 100 # 8, 1 TablePosition\n"; EXPECTED_DUMP += " (fffe,e00d) na (ItemDelimitationItem for re-encoding) # 0, 0 ItemDelimitationItem\n"; EXPECTED_DUMP += " (fffe,e0dd) na (SequenceDelimitationItem for re-encod.) # 0, 0 SequenceDelimitationItem\n"; @@ -833,16 +809,13 @@ EXPECTED_DUMP += " (0008,9007) CS [ORIGINAL\\PRIMARY\\VOLUME\\MAXIMUM] # 32, 4 FrameType\n"; EXPECTED_DUMP += " (0008,9205) CS [MONOCHROME] # 10, 1 PixelPresentation\n"; EXPECTED_DUMP += " (0008,9206) CS [VOLUME] # 6, 1 VolumetricProperties\n"; - EXPECTED_DUMP - += " (0008,9207) CS [VOLUME_RENDER] # 14, 1 VolumeBasedCalculationTechnique\n"; + EXPECTED_DUMP += " (0008,9207) CS [VOLUME_RENDER] # 14, 1 VolumeBasedCalculationTechnique\n"; EXPECTED_DUMP += " (fffe,e00d) na (ItemDelimitationItem for re-encoding) # 0, 0 ItemDelimitationItem\n"; EXPECTED_DUMP += " (fffe,e0dd) na (SequenceDelimitationItem for re-encod.) # 0, 0 SequenceDelimitationItem\n"; - EXPECTED_DUMP - += " (0018,9360) SQ (Sequence with explicit length #=1) # 0, 1 CTAdditionalXRaySourceSequence\n"; + EXPECTED_DUMP += " (0018,9360) SQ (Sequence with explicit length #=1) # 0, 1 CTAdditionalXRaySourceSequence\n"; EXPECTED_DUMP += " (fffe,e000) na (Item with explicit length #=8) # 0, 1 Item\n"; EXPECTED_DUMP += " (0018,0060) DS [5] # 2, 1 KVP\n"; - EXPECTED_DUMP - += " (0018,0090) DS [1] # 2, 1 DataCollectionDiameter\n"; + EXPECTED_DUMP += " (0018,0090) DS [1] # 2, 1 DataCollectionDiameter\n"; EXPECTED_DUMP += " (0018,1160) SH [FILTER_TYPE] # 12, 1 FilterType\n"; EXPECTED_DUMP += " (0018,1190) DS [4.4\\4.4\\4.4\\4.4] # 16, 4 FocalSpots\n"; EXPECTED_DUMP += " (0018,7050) CS [FILTER_MATERIAL] # 16, 1 FilterMaterial\n"; @@ -854,42 +827,34 @@ EXPECTED_DUMP += " (0018,9477) SQ (Sequence with explicit length #=1) # 0, 1 " "IrradiationEventIdentificationSequence\n"; EXPECTED_DUMP += " (fffe,e000) na (Item with explicit length #=1) # 0, 1 Item\n"; - EXPECTED_DUMP - += " (0008,3010) UI [2.25.30853892236613436472911970638347155062] # 44, 1 IrradiationEventUID\n"; + EXPECTED_DUMP += " (0008,3010) UI [2.25.30853892236613436472911970638347155062] # 44, 1 IrradiationEventUID\n"; EXPECTED_DUMP += " (fffe,e00d) na (ItemDelimitationItem for re-encoding) # 0, 0 ItemDelimitationItem\n"; EXPECTED_DUMP += " (fffe,e0dd) na (SequenceDelimitationItem for re-encod.) # 0, 0 SequenceDelimitationItem\n"; EXPECTED_DUMP += " (0020,9071) SQ (Sequence with explicit length #=1) # 0, 1 FrameAnatomySequence\n"; EXPECTED_DUMP += " (fffe,e000) na (Item with explicit length #=2) # 0, 1 Item\n"; - EXPECTED_DUMP - += " (0008,2218) SQ (Sequence with explicit length #=1) # 0, 1 AnatomicRegionSequence\n"; + EXPECTED_DUMP += " (0008,2218) SQ (Sequence with explicit length #=1) # 0, 1 AnatomicRegionSequence\n"; EXPECTED_DUMP += " (fffe,e000) na (Item with explicit length #=3) # 0, 1 Item\n"; EXPECTED_DUMP += " (0008,0100) SH [12738006] # 8, 1 CodeValue\n"; - EXPECTED_DUMP - += " (0008,0102) SH [SCT] # 4, 1 CodingSchemeDesignator\n"; + EXPECTED_DUMP += " (0008,0102) SH [SCT] # 4, 1 CodingSchemeDesignator\n"; EXPECTED_DUMP += " (0008,0104) LO [Brain] # 6, 1 CodeMeaning\n"; - EXPECTED_DUMP - += " (fffe,e00d) na (ItemDelimitationItem for re-encoding) # 0, 0 ItemDelimitationItem\n"; - EXPECTED_DUMP - += " (fffe,e0dd) na (SequenceDelimitationItem for re-encod.) # 0, 0 SequenceDelimitationItem\n"; + EXPECTED_DUMP += " (fffe,e00d) na (ItemDelimitationItem for re-encoding) # 0, 0 ItemDelimitationItem\n"; + EXPECTED_DUMP += " (fffe,e0dd) na (SequenceDelimitationItem for re-encod.) # 0, 0 SequenceDelimitationItem\n"; EXPECTED_DUMP += " (0020,9072) CS [B] # 2, 1 FrameLaterality\n"; EXPECTED_DUMP += " (fffe,e00d) na (ItemDelimitationItem for re-encoding) # 0, 0 ItemDelimitationItem\n"; EXPECTED_DUMP += " (fffe,e0dd) na (SequenceDelimitationItem for re-encod.) # 0, 0 SequenceDelimitationItem\n"; EXPECTED_DUMP += " (0020,9113) SQ (Sequence with explicit length #=1) # 0, 1 PlanePositionSequence\n"; EXPECTED_DUMP += " (fffe,e000) na (Item with explicit length #=1) # 0, 1 Item\n"; - EXPECTED_DUMP - += " (0020,0032) DS [0.0\\0.0\\0.0] # 12, 3 ImagePositionPatient\n"; + EXPECTED_DUMP += " (0020,0032) DS [0.0\\0.0\\0.0] # 12, 3 ImagePositionPatient\n"; EXPECTED_DUMP += " (fffe,e00d) na (ItemDelimitationItem for re-encoding) # 0, 0 ItemDelimitationItem\n"; EXPECTED_DUMP += " (fffe,e0dd) na (SequenceDelimitationItem for re-encod.) # 0, 0 SequenceDelimitationItem\n"; EXPECTED_DUMP += " (0020,9116) SQ (Sequence with explicit length #=1) # 0, 1 PlaneOrientationSequence\n"; EXPECTED_DUMP += " (fffe,e000) na (Item with explicit length #=1) # 0, 1 Item\n"; - EXPECTED_DUMP - += " (0020,0037) DS [1.0\\0.0\\0.0\\0.0\\1.0\\0.0] # 24, 6 ImageOrientationPatient\n"; + EXPECTED_DUMP += " (0020,0037) DS [1.0\\0.0\\0.0\\0.0\\1.0\\0.0] # 24, 6 ImageOrientationPatient\n"; EXPECTED_DUMP += " (fffe,e00d) na (ItemDelimitationItem for re-encoding) # 0, 0 ItemDelimitationItem\n"; EXPECTED_DUMP += " (fffe,e0dd) na (SequenceDelimitationItem for re-encod.) # 0, 0 SequenceDelimitationItem\n"; EXPECTED_DUMP += " (0020,9310) SQ (Sequence with explicit length #=1) # 0, 1 TemporalPositionSequence\n"; EXPECTED_DUMP += " (fffe,e000) na (Item with explicit length #=1) # 0, 1 Item\n"; - EXPECTED_DUMP - += " (0020,930d) FD 1 # 8, 1 TemporalPositionTimeOffset\n"; + EXPECTED_DUMP += " (0020,930d) FD 1 # 8, 1 TemporalPositionTimeOffset\n"; EXPECTED_DUMP += " (fffe,e00d) na (ItemDelimitationItem for re-encoding) # 0, 0 ItemDelimitationItem\n"; EXPECTED_DUMP += " (fffe,e0dd) na (SequenceDelimitationItem for re-encod.) # 0, 0 SequenceDelimitationItem\n"; EXPECTED_DUMP += " (0028,9110) SQ (Sequence with explicit length #=1) # 0, 1 PixelMeasuresSequence\n"; @@ -903,12 +868,10 @@ EXPECTED_DUMP += " (fffe,e000) na (Item with explicit length #=3) # 0, 1 Item\n"; EXPECTED_DUMP += " (0028,1050) DS [1000] # 4, 1 WindowCenter\n"; EXPECTED_DUMP += " (0028,1051) DS [2000] # 4, 1 WindowWidth\n"; - EXPECTED_DUMP - += " (0028,1055) LO [BRAIN] # 6, 1 WindowCenterWidthExplanation\n"; + EXPECTED_DUMP += " (0028,1055) LO [BRAIN] # 6, 1 WindowCenterWidthExplanation\n"; EXPECTED_DUMP += " (fffe,e00d) na (ItemDelimitationItem for re-encoding) # 0, 0 ItemDelimitationItem\n"; EXPECTED_DUMP += " (fffe,e0dd) na (SequenceDelimitationItem for re-encod.) # 0, 0 SequenceDelimitationItem\n"; - EXPECTED_DUMP - += " (0028,9145) SQ (Sequence with explicit length #=1) # 0, 1 PixelValueTransformationSequence\n"; + EXPECTED_DUMP += " (0028,9145) SQ (Sequence with explicit length #=1) # 0, 1 PixelValueTransformationSequence\n"; EXPECTED_DUMP += " (fffe,e000) na (Item with explicit length #=3) # 0, 1 Item\n"; EXPECTED_DUMP += " (0028,1052) DS [0] # 2, 1 RescaleIntercept\n"; EXPECTED_DUMP += " (0028,1053) DS [1] # 2, 1 RescaleSlope\n"; @@ -917,28 +880,22 @@ EXPECTED_DUMP += " (fffe,e0dd) na (SequenceDelimitationItem for re-encod.) # 0, 0 SequenceDelimitationItem\n"; EXPECTED_DUMP += " (fffe,e00d) na (ItemDelimitationItem for re-encoding) # 0, 0 ItemDelimitationItem\n"; EXPECTED_DUMP += "(fffe,e0dd) na (SequenceDelimitationItem for re-encod.) # 0, 0 SequenceDelimitationItem\n"; - EXPECTED_DUMP - += "(5200,9230) SQ (Sequence with explicit length #=1) # 0, 1 PerFrameFunctionalGroupsSequence\n"; + EXPECTED_DUMP += "(5200,9230) SQ (Sequence with explicit length #=1) # 0, 1 PerFrameFunctionalGroupsSequence\n"; EXPECTED_DUMP += " (fffe,e000) na (Item with explicit length #=1) # 0, 1 Item\n"; EXPECTED_DUMP += " (0020,9111) SQ (Sequence with explicit length #=1) # 0, 1 FrameContentSequence\n"; EXPECTED_DUMP += " (fffe,e000) na (Item with explicit length #=7) # 0, 1 Item\n"; - EXPECTED_DUMP - += " (0018,9074) DT [20190816092557] # 14, 1 FrameAcquisitionDateTime\n"; - EXPECTED_DUMP - += " (0018,9151) DT [20190816092557] # 14, 1 FrameReferenceDateTime\n"; - EXPECTED_DUMP - += " (0018,9220) FD 0.001 # 8, 1 FrameAcquisitionDuration\n"; + EXPECTED_DUMP += " (0018,9074) DT [20190816092557] # 14, 1 FrameAcquisitionDateTime\n"; + EXPECTED_DUMP += " (0018,9151) DT [20190816092557] # 14, 1 FrameReferenceDateTime\n"; + EXPECTED_DUMP += " (0018,9220) FD 0.001 # 8, 1 FrameAcquisitionDuration\n"; EXPECTED_DUMP += " (0020,9056) SH [1] # 2, 1 StackID\n"; EXPECTED_DUMP += " (0020,9057) UL 1 # 4, 1 InStackPositionNumber\n"; - EXPECTED_DUMP - += " (0020,9156) US 1 # 2, 1 FrameAcquisitionNumber\n"; + EXPECTED_DUMP += " (0020,9156) US 1 # 2, 1 FrameAcquisitionNumber\n"; EXPECTED_DUMP += " (0020,9157) UL 1\\1 # 8, 2 DimensionIndexValues\n"; EXPECTED_DUMP += " (fffe,e00d) na (ItemDelimitationItem for re-encoding) # 0, 0 ItemDelimitationItem\n"; EXPECTED_DUMP += " (fffe,e0dd) na (SequenceDelimitationItem for re-encod.) # 0, 0 SequenceDelimitationItem\n"; EXPECTED_DUMP += " (fffe,e00d) na (ItemDelimitationItem for re-encoding) # 0, 0 ItemDelimitationItem\n"; EXPECTED_DUMP += "(fffe,e0dd) na (SequenceDelimitationItem for re-encod.) # 0, 0 SequenceDelimitationItem\n"; - EXPECTED_DUMP += "(7fe0,0010) OW 0001\\0001\\0001\\0001\\0001\\0001\\0001\\0001\\0001\\0001\\0001\\0001\\0001... # " - "32000000, 1 PixelData\n"; + EXPECTED_DUMP += "(7fe0,0010) OW 0001\\0001\\0001\\0001\\0001\\0001\\0001\\0001\\0001\\0001\\0001\\0001\\0001... # 32000000, 1 PixelData\n"; OFStringStream ss; ss << NUM_ROWS; OFString numRows(ss.str().c_str()); diff -Nru dcmtk-3.6.6/dcmect/tests/t_roundtrip.cc dcmtk-3.6.7/dcmect/tests/t_roundtrip.cc --- dcmtk-3.6.6/dcmect/tests/t_roundtrip.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmect/tests/t_roundtrip.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2019-2020, OFFIS e.V. + * Copyright (C) 2019-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -28,6 +28,9 @@ #include "dcmtk/dcmect/enhanced_ct.h" +#include "dcmtk/dcmdata/dcxfer.h" +#include "dcmtk/dcmdata/dcswap.h" + #include "dcmtk/dcmfg/concatenationcreator.h" #include "dcmtk/dcmfg/concatenationloader.h" #include "dcmtk/dcmfg/fgctacquisitiondetails.h" @@ -295,7 +298,6 @@ OFCHECK(exp_item->setCTDIVol(0.1).good()); CodeSequenceMacro* phantom_item = new CodeSequenceMacro("113682", "DCM", "ACR Accreditation Phantom - CT"); exp_item->getCTDIPhantomTypeCodeSequence().push_back(phantom_item); - OFCHECK(exp_item->setEstimatedDoseSaving(0.2).good()); OFCHECK(exp_item->setExposureInMas(0.3).good()); OFCHECK(exp_item->setExposureModulationType("WEIRD").good()); OFCHECK(exp_item->setExposureTimeInMs(0.4).good()); @@ -619,6 +621,8 @@ // Check that all pixels are set to their original source instances frame number (starting from 1) for (size_t pix = 0; pix < NUM_PIXELS_PER_FRAME; pix++) { + // We need to swap the 16 bit value if the test runs on big endian platforms + swapIfNecessary(gLocalByteOrder, EBO_LittleEndian, &frame[pix], 2, sizeof(Uint16)); OFCHECK(frame[pix] == numInstance + 1); } delete concat; @@ -658,7 +662,11 @@ { EXPECTED_DUMP += "\n"; EXPECTED_DUMP += "# Dicom-Data-Set\n"; - EXPECTED_DUMP += "# Used TransferSyntax: Little Endian Explicit\n"; + // DcmDataset.print() produces dumps in local endianess, so make sure the dump reflects the current machine + if (gLocalByteOrder == EBO_LittleEndian) + EXPECTED_DUMP += "# Used TransferSyntax: Little Endian Explicit\n"; + else + EXPECTED_DUMP += "# Used TransferSyntax: Big Endian Explicit\n"; EXPECTED_DUMP += "(0008,0008) CS [ORIGINAL\\PRIMARY\\VOLUME\\MAXIMUM] # 32, 4 ImageType\n"; EXPECTED_DUMP += "(0008,0016) UI =EnhancedCTImageStorage # 28, 1 SOPClassUID\n"; EXPECTED_DUMP @@ -789,7 +797,7 @@ EXPECTED_DUMP += " (fffe,e00d) na (ItemDelimitationItem for re-encoding) # 0, 0 ItemDelimitationItem\n"; EXPECTED_DUMP += " (fffe,e0dd) na (SequenceDelimitationItem for re-encod.) # 0, 0 SequenceDelimitationItem\n"; EXPECTED_DUMP += " (0018,9321) SQ (Sequence with explicit length #=1) # 0, 1 CTExposureSequence\n"; - EXPECTED_DUMP += " (fffe,e000) na (Item with explicit length #=10) # 0, 1 Item\n"; + EXPECTED_DUMP += " (fffe,e000) na (Item with explicit length #=9) # 0, 1 Item\n"; EXPECTED_DUMP += " (0018,115e) DS [0.5] # 4, 1 " "ImageAndFluoroscopyAreaDoseProduct\n"; EXPECTED_DUMP @@ -807,7 +815,6 @@ += " (fffe,e0dd) na (SequenceDelimitationItem for re-encod.) # 0, 0 SequenceDelimitationItem\n"; EXPECTED_DUMP += " (0018,9323) CS [WEIRD] # 6, 1 ExposureModulationType\n"; - EXPECTED_DUMP += " (0018,9324) FD 0.2 # 8, 1 EstimatedDoseSaving\n"; EXPECTED_DUMP += " (0018,9328) FD 0.4 # 8, 1 ExposureTimeInms\n"; EXPECTED_DUMP += " (0018,9330) FD 0.7 # 8, 1 XRayTubeCurrentInmA\n"; EXPECTED_DUMP += " (0018,9332) FD 0.3 # 8, 1 ExposureInmAs\n"; diff -Nru dcmtk-3.6.6/dcmfg/include/dcmtk/dcmfg/concatenationcreator.h dcmtk-3.6.7/dcmfg/include/dcmtk/dcmfg/concatenationcreator.h --- dcmtk-3.6.6/dcmfg/include/dcmtk/dcmfg/concatenationcreator.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmfg/include/dcmtk/dcmfg/concatenationcreator.h 2022-04-28 13:47:25.000000000 +0000 @@ -200,9 +200,8 @@ /// as configured by the user using setCfgFramesPerInstance(). Default is 25. Uint32 m_cfgNumFramesPerInstance; - /// Number of bytes used for each frame (same in source instance and concatenation instances). - /// Default is 25. Can be set by setCfgFramesPerInstance(). - size_t m_numBytesFrame; + /// Number of bits used for each frame (same in source instance and concatenation instances). + size_t m_numBitsFrame; /// Pointer to source dataset; will be modified during conversion (but content is restored /// before the call to this class returns). diff -Nru dcmtk-3.6.6/dcmfg/include/dcmtk/dcmfg/fgctexposure.h dcmtk-3.6.7/dcmfg/include/dcmtk/dcmfg/fgctexposure.h --- dcmtk-3.6.6/dcmfg/include/dcmtk/dcmfg/fgctexposure.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmfg/include/dcmtk/dcmfg/fgctexposure.h 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2019, Open Connections GmbH + * Copyright (C) 2019-2021, Open Connections GmbH * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation are maintained by @@ -30,6 +30,8 @@ #include "dcmtk/ofstd/ofstring.h" #include "dcmtk/ofstd/ofvector.h" +#include + /** Class representing the "CT Exposure" Functional Group Macro. */ class DCMTK_DCMFG_EXPORT FGCTExposure : public FGBase @@ -235,14 +237,14 @@ */ virtual OFCondition getExposureModulationType(OFString& value, const signed long pos = 0); - /** Get Estimated Dose Saving + /** Get Estimated Dose Saving (retired) * @param value Reference to variable that should hold the result * @param pos Index of the value to get (0..vm-1), -1 for all components * @return EC_Normal, if value could be returned, error otherwise */ virtual OFCondition getEstimatedDoseSaving(OFString& value, const signed long pos = 0); - /** Get Estimated Dose Saving + /** Get Estimated Dose Saving (retired) * @param value Reference to variable that should hold the result * @param pos Index of the value to get (0..vm-1) * @return EC_Normal, if value could be returned, error otherwise @@ -337,7 +339,7 @@ */ virtual OFCondition setExposureModulationType(const OFString& value, const OFBool checkValue = OFTrue); - /** Set Estimated Dose Saving + /** Set Estimated Dose Saving (retired) * @param value Value that should be set * @param checkValue If OFTrue, basic checks are performed whether the value is * valid for this attribute @@ -388,7 +390,7 @@ /// Exposure Modulation Type (CS, 1-n, 1C) DcmCodeString m_ExposureModulationType; - /// Estimated Dose Saving (FD, 1, 2C) + /// Estimated Dose Saving (FD, 1, 2C), retired DcmFloatingPointDouble m_EstimatedDoseSaving; /// CTDIvol (FD, 1, 2C) diff -Nru dcmtk-3.6.6/dcmfg/libsrc/CMakeLists.txt dcmtk-3.6.7/dcmfg/libsrc/CMakeLists.txt --- dcmtk-3.6.6/dcmfg/libsrc/CMakeLists.txt 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmfg/libsrc/CMakeLists.txt 2022-04-28 13:47:25.000000000 +0000 @@ -1,40 +1,40 @@ # create library from source files DCMTK_ADD_LIBRARY(dcmfg - concatenationcreator - concatenationloader - fg - fgbase - fgctacquisitiondetails - fgctacquisitiontype - fgctadditionalxraysource - fgctexposure - fgctgeometry - fgctimageframetype - fgctposition - fgctreconstruction - fgcttabledynamics - fgctxraydetails - fgderimg - fgfact - fgfracon - fgframeanatomy - fgframevoilut - fgpixeltransform - fgimagedatatype - fginterface - fgirradiationeventid - fgpixmsr - fgparametricmapframetype - fgplanor - fgplanorvol - fgplanpo - fgplanposvol - fgrealworldvaluemapping - fgseg - fgtemporalposition - fgusimagedescription - fgtypes - stack - stackinterface) + concatenationcreator.cc + concatenationloader.cc + fg.cc + fgbase.cc + fgctacquisitiondetails.cc + fgctacquisitiontype.cc + fgctadditionalxraysource.cc + fgctexposure.cc + fgctgeometry.cc + fgctimageframetype.cc + fgctposition.cc + fgctreconstruction.cc + fgcttabledynamics.cc + fgctxraydetails.cc + fgderimg.cc + fgfact.cc + fgfracon.cc + fgframeanatomy.cc + fgframevoilut.cc + fgpixeltransform.cc + fgimagedatatype.cc + fginterface.cc + fgirradiationeventid.cc + fgpixmsr.cc + fgparametricmapframetype.cc + fgplanor.cc + fgplanorvol.cc + fgplanpo.cc + fgplanposvol.cc + fgrealworldvaluemapping.cc + fgseg.cc + fgtemporalposition.cc + fgusimagedescription.cc + fgtypes.cc + stack.cc + stackinterface.cc) DCMTK_TARGET_LINK_MODULES(dcmfg dcmiod dcmdata ofstd oflog) diff -Nru dcmtk-3.6.6/dcmfg/libsrc/concatenationcreator.cc dcmtk-3.6.7/dcmfg/libsrc/concatenationcreator.cc --- dcmtk-3.6.6/dcmfg/libsrc/concatenationcreator.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmfg/libsrc/concatenationcreator.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2019, Open Connections GmbH + * Copyright (C) 2019-2021, Open Connections GmbH * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation are maintained by @@ -21,13 +21,14 @@ #include "dcmtk/config/osconfig.h" +#include "dcmtk/ofstd/ofstd.h" #include "dcmtk/dcmdata/dcdeftag.h" #include "dcmtk/dcmdata/dcitem.h" #include "dcmtk/dcmdata/dcpixel.h" #include "dcmtk/dcmdata/dcuid.h" #include "dcmtk/dcmfg/concatenationcreator.h" #include "dcmtk/dcmfg/fgtypes.h" -#include "dcmtk/ofstd/ofstd.h" + // Maximum number of instances that make up a Concatenation const Uint16 ConcatenationCreator::m_MAX_INSTANCES_PER_CONCATENATION = 65535; @@ -44,7 +45,7 @@ : m_configured(OFFalse) , m_cfgTransferOwnership(OFFalse) , m_cfgNumFramesPerInstance(25) - , m_numBytesFrame(0) + , m_numBitsFrame(0) , m_srcDataset(OFnullptr) , m_srcSOPInstanceUID() , m_srcPixelData(OFnullptr) @@ -97,7 +98,7 @@ OFCondition ConcatenationCreator::setCfgInput(DcmItem* srcDataset, Uint8* pixelData, - size_t pixelDataLength, + size_t /* pixelDataLength */, OFBool transferOwnership) { // Check input parameters @@ -164,7 +165,7 @@ } Uint8* dstData = NULL; - size_t numTotalBytesInstance = m_numBytesFrame * numFramesThisInstance; + size_t numTotalBytesInstance = (m_numBitsFrame * numFramesThisInstance) / 8; // Cast is safe, checked in configureCommon() dstPixelData->createUint8Array(OFstatic_cast(Uint32, numTotalBytesInstance), dstData); if (!dstData) @@ -172,7 +173,8 @@ return EC_MemoryExhausted; } dstPixelData->setVR(m_VRPixelData); - memcpy(dstData, &(m_srcPixelData[m_numBytesFrame * m_currentSrcFrame]), numTotalBytesInstance); + size_t srcPos = (m_numBitsFrame * m_currentSrcFrame) / 8; + memcpy(dstData, &m_srcPixelData[srcPos], numTotalBytesInstance); result = dstDataset.insert(dstPixelData.release()); if (result.good()) { @@ -246,7 +248,7 @@ OFCondition result = configureCommon(); if (result.bad()) { - DCMFG_ERROR("Unable to compute number of instances for Concatenation, maybe input not intialized?)"); + DCMFG_ERROR("Unable to compute number of instances for Concatenation, maybe input not initialized?)"); return 0; } } @@ -399,6 +401,39 @@ if (m_srcNumFrames < m_dstNumFramesPerInstance) return FG_EC_NotEnoughFrames; + // Check pixel data length correct, i.e. whether there is a sufficient amount of data available + Uint16 bitsAlloc, rows, cols; + bitsAlloc = rows = cols = 0; + m_srcDataset->findAndGetUint16(DCM_BitsAllocated, bitsAlloc); + m_srcDataset->findAndGetUint16(DCM_Rows, rows); + m_srcDataset->findAndGetUint16(DCM_Columns, cols); + if ((rows == 0) || (cols == 0)) + return FG_EC_PixelDataDimensionsInvalid; + // 8, 16 bit and 1 bit (relevant for Segmentation objects) are supported + if ((bitsAlloc != 16) && (bitsAlloc != 8) && (bitsAlloc != 1)) + return FG_EC_PixelDataDimensionsInvalid; + + // Compute number of bits per frame + m_numBitsFrame = rows * cols * bitsAlloc; + + // If Bits Allocated is 1 (i.e. not 8 or 16), the last byte of the frame can only be + // partly occupied with bits. Since we work with bytewise memcpy later, make sure that + // number of bytes per instance (number of frames per instance multiplied by the number + // of bytes per frame) is dividable by 8. If not, increase number of frames per instance + // so that number of bytes per instance is dividable by 8. + if ((m_numBitsFrame * m_dstNumFramesPerInstance ) % 8 != 0) + { + size_t newDstNumFramesPerInstance = ((m_dstNumFramesPerInstance / 8) + 1) * 8; + // if we finally have more destination frames per instance than we have in the source image, + // just write a single concatenation instance containing all frames from source image + if (newDstNumFramesPerInstance > m_srcNumFrames) + { + newDstNumFramesPerInstance = m_srcNumFrames; + } + DCMFG_INFO("Adapting Number of Frames per Instance from " << m_dstNumFramesPerInstance << " to " << newDstNumFramesPerInstance); + m_dstNumFramesPerInstance = OFstatic_cast(Uint32, newDstNumFramesPerInstance); + } + // Remember number of instances to be produced Uint32 u32 = m_srcNumFrames / m_dstNumFramesPerInstance; m_dstNumFramesLastInstance = m_srcNumFrames % m_dstNumFramesPerInstance; @@ -413,14 +448,6 @@ } m_dstNumInstances = OFstatic_cast(Uint16, u32); // safe now - // Check whether pixel data for one instance stays below 4 GB - size_t numTotalBytesInstance = m_numBytesFrame * m_dstNumFramesPerInstance; - if (numTotalBytesInstance > m_MAX_PIXEL_DATA_LENGTH) - { - DCMFG_ERROR("Uncompressed pixel data must not exceed " << m_MAX_PIXEL_DATA_LENGTH << "bytes per concatenation instance"); - return FG_EC_PixelDataDimensionsInvalid; - } - // Check whether number of items in per-frame functional groups is identical to Number of Frames attribute if (m_srcNumFrames != m_srcPerFrameFG->card()) { @@ -428,28 +455,15 @@ return FG_EC_NotEnoughFrames; } - // Check pixel data length correct, i.e. whether there is a sufficient amount of data available - Uint16 bitsAlloc, rows, cols; - bitsAlloc = rows = cols = 0; - m_srcDataset->findAndGetUint16(DCM_BitsAllocated, bitsAlloc); - m_srcDataset->findAndGetUint16(DCM_Rows, rows); - m_srcDataset->findAndGetUint16(DCM_Columns, cols); - if ((rows == 0) || (cols == 0)) - return FG_EC_PixelDataDimensionsInvalid; - // 8, 16 bit and 1 bit (relevant for Segmentation objects) are supported - if ((bitsAlloc != 16) && (bitsAlloc != 8) && (bitsAlloc != 1)) - return FG_EC_PixelDataDimensionsInvalid; - if ((bitsAlloc == 1) && (m_dstNumFramesPerInstance % 8 != 0) && (m_dstNumFramesPerInstance * rows * cols % 8 != 0)) + + // Check whether pixel data for one instance stays below 4 GB + size_t numTotalBytesInstance = (m_numBitsFrame * m_dstNumFramesPerInstance) / 8; + if (numTotalBytesInstance > m_MAX_PIXEL_DATA_LENGTH) { - DCMFG_ERROR("Can only handle frames per instance (or rows*cols*frames per instance) dividable by 8 for binary " - "segmentations"); - return EC_InvalidValue; - } - m_numBytesFrame = rows * cols * bitsAlloc / 8; - // In case of 1 bit allocated, tiny images might result in 0 bytes - // calculated, so round to 1 byte minimum - if (m_numBytesFrame == 0) - m_numBytesFrame = 1; + DCMFG_ERROR("Uncompressed pixel data must not exceed " << m_MAX_PIXEL_DATA_LENGTH << "bytes per concatenation instance"); + return FG_EC_PixelDataDimensionsInvalid; + } + if (bitsAlloc <= 8) // 1 or 8 bit { m_VRPixelData = EVR_OB; diff -Nru dcmtk-3.6.6/dcmfg/libsrc/concatenationloader.cc dcmtk-3.6.7/dcmfg/libsrc/concatenationloader.cc --- dcmtk-3.6.6/dcmfg/libsrc/concatenationloader.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmfg/libsrc/concatenationloader.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2019-2020, Open Connections GmbH + * Copyright (C) 2019-2022, Open Connections GmbH * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation are maintained by @@ -242,7 +242,6 @@ if (result.good()) { OFListIterator(ConcatenationLoader::Info::Instance) inst = c->m_Files.begin(); - inst++; // first instance already handled while (result.good() && (inst != c->m_Files.end())) { DcmFileFormat dcmff; @@ -303,7 +302,15 @@ result = m_Result->putAndInsertOFStringArray(DCM_SOPInstanceUID, srcUID); if (result.good()) { - result = extractFrames(*m_Result, firstInstance, firstInstance.m_Files.front().m_NumberOfFrames); + // Clear Per-Frame Functional Groups Sequence + result = m_Result->findAndDeleteElement(DCM_PerFrameFunctionalGroupsSequence); + if (result.good()) + { + result = m_Result->insertEmptyElement(DCM_PerFrameFunctionalGroupsSequence); + } + } + if (result.good()) + { m_Result->findAndDeleteElement(DCM_PixelData); } } @@ -330,8 +337,8 @@ OFCondition result = item.findAndGetUint8Array(DCM_PixelData, pixData); if (result.good() && pixData) { - size_t bytes_per_frame = 0; - result = computeBytesPerFrame(info.m_Rows, info.m_Cols, info.m_BitsAlloc, bytes_per_frame); + size_t bytesPerFrame = 0; + result = computeBytesPerFrame(info.m_Rows, info.m_Cols, info.m_BitsAlloc, bytesPerFrame); if (result.good()) { const Uint8* ptr = pixData; @@ -340,7 +347,7 @@ DcmIODTypes::Frame* frame = new DcmIODTypes::Frame(); if (frame) { - frame->length = bytes_per_frame; + frame->length = bytesPerFrame; frame->pixData = new Uint8[frame->length]; if (frame->pixData) { @@ -445,7 +452,7 @@ char buf[100]; dcmGenerateUniqueIdentifier(buf, SITE_INSTANCE_UID_ROOT); uid = buf; - DCMFG_WARN("SOP Instance UID of Concatentation Source (0020,0242)​ not set, created new SOP Instance UID " + DCMFG_WARN("SOP Instance UID of Concatenation Source (0020,0242) not set, created new SOP Instance UID " << uid); } OFCondition result = m_Result->putAndInsertOFStringArray(DCM_SOPInstanceUID, uid); @@ -551,8 +558,8 @@ { out << "Concatenation UID* : " << m_ConcatenationUID << OFendl; out << " SOP Class UID* : " << m_SOPClassUID << OFendl; - out << " Concatentation Source UID* : " << m_SourceUID << OFendl; - out << " Concatentation Source File : " << m_FileConatenationSource << OFendl; + out << " Concatenation Source UID* : " << m_SourceUID << OFendl; + out << " Concatenation Source File : " << m_FileConatenationSource << OFendl; out << " Number of Frames (computed): " << m_NumTotalFrames << OFendl; out << " In-conc. Total Number : " << m_inConcatTotalNumber << OFendl; out << " Patient ID : " << m_PatientID << OFendl; diff -Nru dcmtk-3.6.6/dcmfg/libsrc/fgbase.cc dcmtk-3.6.7/dcmfg/libsrc/fgbase.cc --- dcmtk-3.6.6/dcmfg/libsrc/fgbase.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmfg/libsrc/fgbase.cc 2022-04-28 13:47:25.000000000 +0000 @@ -237,7 +237,8 @@ FGUnknown* copy = new FGUnknown(this->m_seqStartTag); if (copy) { - *(copy->m_fgSequence) = *(this->m_fgSequence); + if (this->m_fgSequence != NULL) + *(copy->m_fgSequence) = *(this->m_fgSequence); } return copy; } diff -Nru dcmtk-3.6.6/dcmfg/libsrc/fgctacquisitiontype.cc dcmtk-3.6.7/dcmfg/libsrc/fgctacquisitiontype.cc --- dcmtk-3.6.6/dcmfg/libsrc/fgctacquisitiontype.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmfg/libsrc/fgctacquisitiontype.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2019, Open Connections GmbH + * Copyright (C) 2019-2021, Open Connections GmbH * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation are maintained by @@ -183,7 +183,7 @@ return result; } -OFCondition FGCTAcquisitionType::setTubeAngle(const Float64& value, const OFBool checkValue) +OFCondition FGCTAcquisitionType::setTubeAngle(const Float64& value, const OFBool /* checkValue */) { return m_TubeAngle.putFloat64(value); } diff -Nru dcmtk-3.6.6/dcmfg/libsrc/fgctadditionalxraysource.cc dcmtk-3.6.7/dcmfg/libsrc/fgctadditionalxraysource.cc --- dcmtk-3.6.6/dcmfg/libsrc/fgctadditionalxraysource.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmfg/libsrc/fgctadditionalxraysource.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2019, Open Connections GmbH + * Copyright (C) 2019-2021, Open Connections GmbH * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation are maintained by @@ -289,14 +289,13 @@ return result; } -OFCondition FGCTAdditionalXRaySource::FGCTAdditionalXRaySourceItem::setKVP(const Float64 value, const OFBool checkValue) +OFCondition FGCTAdditionalXRaySource::FGCTAdditionalXRaySourceItem::setKVP(const Float64 value, const OFBool /* checkValue */) { - (void)checkValue; return m_KVP.putFloat64(value); } OFCondition FGCTAdditionalXRaySource::FGCTAdditionalXRaySourceItem::setXRayTubeCurrentInmA(const Float64 value, - const OFBool checkValue) + const OFBool /* checkValue */) { return m_XRayTubeCurrentInmA.putFloat64(value); } @@ -311,7 +310,7 @@ } OFCondition FGCTAdditionalXRaySource::FGCTAdditionalXRaySourceItem::setDataCollectionDiameter(const Float64 value, - const OFBool checkValue) + const OFBool /* checkValue */) { return m_DataCollectionDiameter.putFloat64(value); } @@ -350,13 +349,13 @@ } OFCondition FGCTAdditionalXRaySource::FGCTAdditionalXRaySourceItem::setExposureInmAs(const Float64 value, - const OFBool checkValue) + const OFBool /* checkValue */) { return m_ExposureInmAs.putFloat64(value); } OFCondition FGCTAdditionalXRaySource::FGCTAdditionalXRaySourceItem::setEnergyWeightingFactor(const Float32 value, - const OFBool checkValue) + const OFBool /* checkValue */) { return m_EnergyWeightingFactor.putFloat32(value); } diff -Nru dcmtk-3.6.6/dcmfg/libsrc/fgctexposure.cc dcmtk-3.6.7/dcmfg/libsrc/fgctexposure.cc --- dcmtk-3.6.6/dcmfg/libsrc/fgctexposure.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmfg/libsrc/fgctexposure.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2019, Open Connections GmbH + * Copyright (C) 2019-2021, Open Connections GmbH * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation are maintained by @@ -34,7 +34,7 @@ , m_XRayTubeCurrentInMa(DCM_XRayTubeCurrentInmA) , m_ExposureInMas(DCM_ExposureInmAs) , m_ExposureModulationType(DCM_ExposureModulationType) - , m_EstimatedDoseSaving(DCM_EstimatedDoseSaving) + , m_EstimatedDoseSaving(DCM_RETIRED_EstimatedDoseSaving) , m_CTDIVol(DCM_CTDIvol) , m_CTDIPhantomTypeCodeSequence() , m_WaterEquivalentDiameter(DCM_WaterEquivalentDiameter) diff -Nru dcmtk-3.6.6/dcmfg/libsrc/fgctposition.cc dcmtk-3.6.7/dcmfg/libsrc/fgctposition.cc --- dcmtk-3.6.6/dcmfg/libsrc/fgctposition.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmfg/libsrc/fgctposition.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2019, Open Connections GmbH + * Copyright (C) 2019-2021, Open Connections GmbH * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation are maintained by @@ -152,7 +152,7 @@ // --- set() functionality --- -OFCondition FGCTPosition::setTablePosition(const Float64 value, const OFBool checkValue) +OFCondition FGCTPosition::setTablePosition(const Float64 value, const OFBool /* checkValue */) { return m_TablePosition.putFloat64(value); } diff -Nru dcmtk-3.6.6/dcmfg/libsrc/fgcttabledynamics.cc dcmtk-3.6.7/dcmfg/libsrc/fgcttabledynamics.cc --- dcmtk-3.6.6/dcmfg/libsrc/fgcttabledynamics.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmfg/libsrc/fgcttabledynamics.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2019, Open Connections GmbH + * Copyright (C) 2019-2021, Open Connections GmbH * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation are maintained by @@ -229,19 +229,19 @@ // --- set() functionality --- -OFCondition FGCTTableDynamics::FGCTTableDynamicsItem::setTableSpeed(const Float64& value, const OFBool checkValue) +OFCondition FGCTTableDynamics::FGCTTableDynamicsItem::setTableSpeed(const Float64& value, const OFBool /* checkValue */) { return m_TableSpeed.putFloat64(value); } OFCondition FGCTTableDynamics::FGCTTableDynamicsItem::setTableFeedPerRotation(const Float64& value, - const OFBool checkValue) + const OFBool /* checkValue */) { return m_TableFeedPerRotation.putFloat64(value); } OFCondition FGCTTableDynamics::FGCTTableDynamicsItem::setSpiralPitchFactor(const Float64& value, - const OFBool checkValue) + const OFBool /* checkValue */) { return m_SpiralPitchFactor.putFloat64(value); } diff -Nru dcmtk-3.6.6/dcmfg/libsrc/fgctxraydetails.cc dcmtk-3.6.7/dcmfg/libsrc/fgctxraydetails.cc --- dcmtk-3.6.6/dcmfg/libsrc/fgctxraydetails.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmfg/libsrc/fgctxraydetails.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2019, Open Connections GmbH + * Copyright (C) 2019-2021, Open Connections GmbH * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation are maintained by @@ -342,7 +342,7 @@ } OFCondition FGCTXRayDetails::FGCTXRayDetailsItem::setCalciumScoringMassFactorPatient(const Float32 value, - const bool checkValue) + const bool /* checkValue */) { return m_CalciumScoringMassFactorPatient.putFloat32(value); } @@ -353,7 +353,7 @@ return DcmIODUtil::setFloat32ValuesOnElement(m_CalciumScoringMassFactorDevice, values, "1-n", checkValues); } -OFCondition FGCTXRayDetails::FGCTXRayDetailsItem::setEnergyWeightingFactor(const Float32 value, const bool checkValue) +OFCondition FGCTXRayDetails::FGCTXRayDetailsItem::setEnergyWeightingFactor(const Float32 value, const bool /* checkValue */) { return m_EnergyWeightingFactor.putFloat32(value); } diff -Nru dcmtk-3.6.6/dcmfg/libsrc/fgfact.cc dcmtk-3.6.7/dcmfg/libsrc/fgfact.cc --- dcmtk-3.6.6/dcmfg/libsrc/fgfact.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmfg/libsrc/fgfact.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2015-2019, Open Connections GmbH + * Copyright (C) 2015-2021, Open Connections GmbH * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation are maintained by @@ -170,7 +170,6 @@ default: { DCMFG_DEBUG("Encountered unknown functional group"); - return NULL; break; } } diff -Nru dcmtk-3.6.6/dcmfg/libsrc/fginterface.cc dcmtk-3.6.7/dcmfg/libsrc/fginterface.cc --- dcmtk-3.6.6/dcmfg/libsrc/fginterface.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmfg/libsrc/fginterface.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2015-2019, Open Connections GmbH + * Copyright (C) 2015-2022, Open Connections GmbH * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation are maintained by diff -Nru dcmtk-3.6.6/dcmfg/libsrc/Makefile.dep dcmtk-3.6.7/dcmfg/libsrc/Makefile.dep --- dcmtk-3.6.6/dcmfg/libsrc/Makefile.dep 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmfg/libsrc/Makefile.dep 2022-04-28 13:47:25.000000000 +0000 @@ -3,12 +3,12 @@ ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \ ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.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 \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ @@ -120,12 +120,12 @@ ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \ ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.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 \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ @@ -187,14 +187,7 @@ ../../dcmiod/include/dcmtk/dcmiod/iodrules.h \ ../../ofstd/include/dcmtk/ofstd/ofmap.h \ ../../ofstd/include/dcmtk/ofstd/ofdate.h \ - ../../ofstd/include/dcmtk/ofstd/oftime.h \ - ../../ofstd/include/dcmtk/ofstd/oftuple.h \ - ../../ofstd/include/dcmtk/ofstd/ofdiag.h \ - ../../ofstd/include/dcmtk/ofstd/diag/push.def \ - ../../ofstd/include/dcmtk/ofstd/diag/mmtag.def \ - ../../ofstd/include/dcmtk/ofstd/variadic/tuplefrd.h \ - ../../ofstd/include/dcmtk/ofstd/variadic/tuple.h \ - ../../ofstd/include/dcmtk/ofstd/diag/pop.def ../include/dcmtk/dcmfg/fg.h \ + ../../ofstd/include/dcmtk/ofstd/oftime.h ../include/dcmtk/dcmfg/fg.h \ ../include/dcmtk/dcmfg/fgbase.h ../include/dcmtk/dcmfg/fgtypes.h \ ../../dcmdata/include/dcmtk/dcmdata/dctk.h \ ../../dcmdata/include/dcmtk/dcmdata/dcswap.h \ @@ -367,12 +360,12 @@ ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \ ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.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 \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../include/dcmtk/dcmfg/fgbase.h \ ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \ @@ -502,12 +495,12 @@ ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \ ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.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 \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../include/dcmtk/dcmfg/fgctacquisitiondetails.h \ ../../dcmdata/include/dcmtk/dcmdata/dctk.h \ @@ -625,12 +618,12 @@ ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \ ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.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 \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../include/dcmtk/dcmfg/fgctacquisitiontype.h \ ../../dcmdata/include/dcmtk/dcmdata/dctk.h \ @@ -748,12 +741,12 @@ ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \ ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.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 \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../include/dcmtk/dcmfg/fgctadditionalxraysource.h \ ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \ @@ -871,12 +864,12 @@ ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \ ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.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 \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../include/dcmtk/dcmfg/fgctexposure.h \ ../../dcmdata/include/dcmtk/dcmdata/dctk.h \ @@ -996,12 +989,12 @@ ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \ ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.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 \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../include/dcmtk/dcmfg/fgctgeometry.h \ ../../dcmdata/include/dcmtk/dcmdata/dctk.h \ @@ -1119,12 +1112,12 @@ ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \ ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.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 \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../include/dcmtk/dcmfg/fgctimageframetype.h \ ../../dcmdata/include/dcmtk/dcmdata/dctk.h \ @@ -1242,12 +1235,12 @@ ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \ ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.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 \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../include/dcmtk/dcmfg/fgctposition.h \ ../../dcmdata/include/dcmtk/dcmdata/dctk.h \ @@ -1365,12 +1358,12 @@ ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \ ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.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 \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../include/dcmtk/dcmfg/fgctreconstruction.h \ ../../dcmdata/include/dcmtk/dcmdata/dctk.h \ @@ -1488,12 +1481,12 @@ ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \ ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.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 \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../include/dcmtk/dcmfg/fgcttabledynamics.h \ ../../dcmdata/include/dcmtk/dcmdata/dctk.h \ @@ -1611,12 +1604,12 @@ ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \ ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.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 \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../include/dcmtk/dcmfg/fgctxraydetails.h \ ../../dcmdata/include/dcmtk/dcmdata/dctk.h \ @@ -2008,12 +2001,12 @@ ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \ ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.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 \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../include/dcmtk/dcmfg/fgfracon.h \ ../../dcmdata/include/dcmtk/dcmdata/dctk.h \ @@ -2131,12 +2124,12 @@ ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \ ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.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 \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../include/dcmtk/dcmfg/fgframeanatomy.h \ ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \ @@ -2256,12 +2249,12 @@ ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \ ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.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 \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../include/dcmtk/dcmfg/fgframevoilut.h \ ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \ @@ -2379,12 +2372,12 @@ ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \ ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.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 \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../include/dcmtk/dcmfg/fgimagedatatype.h \ ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \ @@ -2626,12 +2619,12 @@ ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \ ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.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 \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../include/dcmtk/dcmfg/fgirradiationeventid.h \ ../../dcmdata/include/dcmtk/dcmdata/dctk.h \ @@ -2749,12 +2742,12 @@ ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \ ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.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 \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../include/dcmtk/dcmfg/fgparametricmapframetype.h \ ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \ @@ -2872,12 +2865,12 @@ ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \ ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.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 \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../../dcmdata/include/dcmtk/dcmdata/dcuid.h \ ../include/dcmtk/dcmfg/fgpixeltransform.h \ @@ -2994,12 +2987,12 @@ ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \ ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.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 \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../include/dcmtk/dcmfg/fgpixmsr.h \ ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \ @@ -3116,12 +3109,12 @@ ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \ ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.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 \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../include/dcmtk/dcmfg/fgfact.h ../include/dcmtk/dcmfg/fgtypes.h \ ../../dcmdata/include/dcmtk/dcmdata/dctk.h \ @@ -3239,12 +3232,12 @@ ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \ ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.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 \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrfd.h \ ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \ @@ -3361,12 +3354,12 @@ ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \ ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.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 \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../include/dcmtk/dcmfg/fgfact.h ../include/dcmtk/dcmfg/fgtypes.h \ ../../dcmdata/include/dcmtk/dcmdata/dctk.h \ @@ -3484,12 +3477,12 @@ ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \ ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.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 \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../include/dcmtk/dcmfg/fgplanposvol.h \ ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \ @@ -3607,12 +3600,12 @@ ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \ ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.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 \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../include/dcmtk/dcmfg/fgrealworldvaluemapping.h \ ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \ @@ -3732,12 +3725,12 @@ ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \ ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.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 \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../include/dcmtk/dcmfg/fgseg.h \ ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \ @@ -3855,12 +3848,12 @@ ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \ ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.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 \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../include/dcmtk/dcmfg/fgtemporalposition.h \ ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \ @@ -4112,12 +4105,12 @@ ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \ ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.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 \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../include/dcmtk/dcmfg/fgusimagedescription.h \ ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \ @@ -4235,9 +4228,9 @@ ../../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/ofstring.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../../ofstd/include/dcmtk/ofstd/ofvector.h \ ../../ofstd/include/dcmtk/ofstd/ofmap.h \ diff -Nru dcmtk-3.6.6/dcmfg/libsrc/stackinterface.cc dcmtk-3.6.7/dcmfg/libsrc/stackinterface.cc --- dcmtk-3.6.6/dcmfg/libsrc/stackinterface.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmfg/libsrc/stackinterface.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2015-2019, Open Connections GmbH + * Copyright (C) 2015-2021, Open Connections GmbH * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation are maintained by @@ -63,7 +63,7 @@ if (fracon != NULL) { OFString stackID; - Uint32 inStackPos; + Uint32 inStackPos = 0; // Check whether stack ID is actually present and get value if ((fracon->getStackID(stackID).good()) && (fracon->getInStackPositionNumber(inStackPos).good())) { diff -Nru dcmtk-3.6.6/dcmfg/tests/CMakeLists.txt dcmtk-3.6.7/dcmfg/tests/CMakeLists.txt --- dcmtk-3.6.6/dcmfg/tests/CMakeLists.txt 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmfg/tests/CMakeLists.txt 2022-04-28 13:47:25.000000000 +0000 @@ -1,16 +1,17 @@ # declare executables DCMTK_ADD_EXECUTABLE(dcmfg_tests - tests - t_concatenation_creator - t_concatenation_loader - t_ct_acquisition_details - t_ct_acquisition_type - t_ct_image_frame_type - t_ct_position - t_ct_table_dynamics - t_deriv_image - t_frame_content - t_irradiation_event_identification) + tests.cc + t_concatenation_creator.cc + t_concatenation_loader.cc + t_ct_acquisition_details.cc + t_ct_acquisition_type.cc + t_ct_image_frame_type.cc + t_ct_position.cc + t_ct_table_dynamics.cc + t_deriv_image.cc + t_frame_content.cc + t_irradiation_event_identification.cc +) # make sure executables are linked to the corresponding libraries DCMTK_TARGET_LINK_MODULES(dcmfg_tests dcmfg dcmdata oflog ofstd) diff -Nru dcmtk-3.6.6/dcmfg/tests/Makefile.dep dcmtk-3.6.7/dcmfg/tests/Makefile.dep --- dcmtk-3.6.6/dcmfg/tests/Makefile.dep 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmfg/tests/Makefile.dep 2022-04-28 13:47:25.000000000 +0000 @@ -129,12 +129,12 @@ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../dcmiod/include/dcmtk/dcmiod/iodtypes.h \ ../../dcmiod/include/dcmtk/dcmiod/ioddef.h \ ../../oflog/include/dcmtk/oflog/oflog.h \ ../../oflog/include/dcmtk/oflog/logger.h \ ../../oflog/include/dcmtk/oflog/config.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../oflog/include/dcmtk/oflog/config/defines.h \ ../../oflog/include/dcmtk/oflog/helpers/threadcf.h \ ../../oflog/include/dcmtk/oflog/loglevel.h \ @@ -190,13 +190,6 @@ ../../ofstd/include/dcmtk/ofstd/ofmap.h \ ../../ofstd/include/dcmtk/ofstd/ofdate.h \ ../../ofstd/include/dcmtk/ofstd/oftime.h \ - ../../ofstd/include/dcmtk/ofstd/oftuple.h \ - ../../ofstd/include/dcmtk/ofstd/ofdiag.h \ - ../../ofstd/include/dcmtk/ofstd/diag/push.def \ - ../../ofstd/include/dcmtk/ofstd/diag/mmtag.def \ - ../../ofstd/include/dcmtk/ofstd/variadic/tuplefrd.h \ - ../../ofstd/include/dcmtk/ofstd/variadic/tuple.h \ - ../../ofstd/include/dcmtk/ofstd/diag/pop.def \ ../include/dcmtk/dcmfg/fgtypes.h \ ../../dcmdata/include/dcmtk/dcmdata/dctk.h \ ../../dcmdata/include/dcmtk/dcmdata/dcswap.h \ diff -Nru dcmtk-3.6.6/dcmfg/tests/t_concatenation_loader.cc dcmtk-3.6.7/dcmfg/tests/t_concatenation_loader.cc --- dcmtk-3.6.6/dcmfg/tests/t_concatenation_loader.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmfg/tests/t_concatenation_loader.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2019-2020, OFFIS e.V. + * Copyright (C) 2019-2022, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -114,8 +114,8 @@ { SCAN_DUMP += "Concatenation UID* : 1.3.6.1.4.1.5962.1.7.70.2.1.1166562673.14401\n"; SCAN_DUMP += " SOP Class UID* : 1.2.840.10008.5.1.4.1.1.2.1\n"; - SCAN_DUMP += " Concatentation Source UID* : \n"; - SCAN_DUMP += " Concatentation Source File : \n"; + SCAN_DUMP += " Concatenation Source UID* : \n"; + SCAN_DUMP += " Concatenation Source File : \n"; SCAN_DUMP += " Number of Frames (computed): 60\n"; SCAN_DUMP += " In-conc. Total Number : 6\n"; SCAN_DUMP += " Patient ID : 0070\n"; @@ -152,8 +152,8 @@ SCAN_DUMP += "--------------------------------------------------------------\n"; SCAN_DUMP += "Concatenation UID* : 1.3.6.1.4.1.5962.1.7.70.2.2.1166562673.14401\n"; SCAN_DUMP += " SOP Class UID* : 1.2.840.10008.5.1.4.1.1.2.1\n"; - SCAN_DUMP += " Concatentation Source UID* : \n"; - SCAN_DUMP += " Concatentation Source File : \n"; + SCAN_DUMP += " Concatenation Source UID* : \n"; + SCAN_DUMP += " Concatenation Source File : \n"; SCAN_DUMP += " Number of Frames (computed): 30\n"; SCAN_DUMP += " In-conc. Total Number : 3\n"; SCAN_DUMP += " Patient ID : 0070\n"; @@ -178,8 +178,8 @@ SCAN_DUMP += "--------------------------------------------------------------\n"; SCAN_DUMP += "Concatenation UID* : 1.3.6.1.4.1.5962.1.7.70.2.3.1166562673.14401\n"; SCAN_DUMP += " SOP Class UID* : 1.2.840.10008.5.1.4.1.1.2.1\n"; - SCAN_DUMP += " Concatentation Source UID* : \n"; - SCAN_DUMP += " Concatentation Source File : \n"; + SCAN_DUMP += " Concatenation Source UID* : \n"; + SCAN_DUMP += " Concatenation Source File : \n"; SCAN_DUMP += " Number of Frames (computed): 30\n"; SCAN_DUMP += " In-conc. Total Number : 3\n"; SCAN_DUMP += " Patient ID : 0070\n"; @@ -491,7 +491,7 @@ DSET_DUMP += " (fffe,e0dd) na (SequenceDelimitationItem) # 0, 0 SequenceDelimitationItem\n"; DSET_DUMP += " (fffe,e00d) na (ItemDelimitationItem) # 0, 0 ItemDelimitationItem\n"; DSET_DUMP += "(fffe,e0dd) na (SequenceDelimitationItem) # 0, 0 SequenceDelimitationItem\n"; - DSET_DUMP += "(5200,9230) SQ (Sequence with undefined length #=60) # u/l, 1 PerFrameFunctionalGroupsSequence\n"; + DSET_DUMP += "(5200,9230) SQ (Sequence with explicit length #=60) # 0, 1 PerFrameFunctionalGroupsSequence\n"; DSET_DUMP += " (fffe,e000) na (Item with undefined length #=4) # u/l, 1 Item\n"; DSET_DUMP += " (0018,9326) SQ (Sequence with undefined length #=1) # u/l, 1 CTPositionSequence\n"; DSET_DUMP += " (fffe,e000) na (Item with undefined length #=3) # u/l, 1 Item\n"; @@ -3132,7 +3132,7 @@ DSET_DUMP += " (fffe,e00d) na (ItemDelimitationItem) # 0, 0 ItemDelimitationItem\n"; DSET_DUMP += " (fffe,e0dd) na (SequenceDelimitationItem) # 0, 0 SequenceDelimitationItem\n"; DSET_DUMP += " (fffe,e00d) na (ItemDelimitationItem) # 0, 0 ItemDelimitationItem\n"; - DSET_DUMP += "(fffe,e0dd) na (SequenceDelimitationItem) # 0, 0 SequenceDelimitationItem\n"; + DSET_DUMP += "(fffe,e0dd) na (SequenceDelimitationItem for re-encod.) # 0, 0 SequenceDelimitationItem\n"; } void check_dump(const OFString& expected, const OFString& output) diff -Nru dcmtk-3.6.6/dcmimage/apps/CMakeLists.txt dcmtk-3.6.7/dcmimage/apps/CMakeLists.txt --- dcmtk-3.6.6/dcmimage/apps/CMakeLists.txt 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmimage/apps/CMakeLists.txt 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ # declare executables foreach(PROGRAM dcm2pnm dcmquant dcmscale dcmicmp) - DCMTK_ADD_EXECUTABLE(${PROGRAM} ${PROGRAM}) + DCMTK_ADD_EXECUTABLE(${PROGRAM} ${PROGRAM}.cc) endforeach() # make sure executables are linked to the corresponding libraries diff -Nru dcmtk-3.6.6/dcmimage/apps/dcm2pnm.cc dcmtk-3.6.7/dcmimage/apps/dcm2pnm.cc --- dcmtk-3.6.6/dcmimage/apps/dcm2pnm.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmimage/apps/dcm2pnm.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1996-2020, OFFIS e.V. + * Copyright (C) 1996-2021, 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 */ -#define INCLUDE_CSTDIO -#define INCLUDE_CSTRING -#include "dcmtk/ofstd/ofstdinc.h" - #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 -Nru dcmtk-3.6.6/dcmimage/apps/dcmquant.cc dcmtk-3.6.7/dcmimage/apps/dcmquant.cc --- dcmtk-3.6.6/dcmimage/apps/dcmquant.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmimage/apps/dcmquant.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2001-2020, OFFIS e.V. + * Copyright (C) 2001-2021, 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 */ -#define INCLUDE_CSTDIO -#define INCLUDE_CSTRING -#include "dcmtk/ofstd/ofstdinc.h" - #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 -Nru dcmtk-3.6.6/dcmimage/apps/dcmscale.cc dcmtk-3.6.7/dcmimage/apps/dcmscale.cc --- dcmtk-3.6.6/dcmimage/apps/dcmscale.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmimage/apps/dcmscale.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2002-2020, OFFIS e.V. + * Copyright (C) 2002-2021, 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 */ -#define INCLUDE_CSTDIO -#define INCLUDE_CSTRING -#include "dcmtk/ofstd/ofstdinc.h" - #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 -Nru dcmtk-3.6.6/dcmimage/apps/Makefile.dep dcmtk-3.6.7/dcmimage/apps/Makefile.dep --- dcmtk-3.6.6/dcmimage/apps/Makefile.dep 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmimage/apps/Makefile.dep 2022-04-28 13:47:25.000000000 +0000 @@ -1,5 +1,4 @@ dcm2pnm.o: dcm2pnm.cc ../../config/include/dcmtk/config/osconfig.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../dcmdata/include/dcmtk/dcmdata/dctk.h \ ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \ ../../oflog/include/dcmtk/oflog/oflog.h \ @@ -8,6 +7,7 @@ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../oflog/include/dcmtk/oflog/config/defines.h \ ../../oflog/include/dcmtk/oflog/helpers/threadcf.h \ ../../oflog/include/dcmtk/oflog/loglevel.h \ @@ -151,9 +151,9 @@ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../dcmimgle/include/dcmtk/dcmimgle/diutils.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../../oflog/include/dcmtk/oflog/oflog.h \ ../../oflog/include/dcmtk/oflog/logger.h \ @@ -271,7 +271,6 @@ ../include/dcmtk/dcmimage/diregist.h \ ../../dcmimgle/include/dcmtk/dcmimgle/diregbas.h dcmquant.o: dcmquant.cc ../../config/include/dcmtk/config/osconfig.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../dcmdata/include/dcmtk/dcmdata/dctk.h \ ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \ ../../oflog/include/dcmtk/oflog/oflog.h \ @@ -280,6 +279,7 @@ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../oflog/include/dcmtk/oflog/config/defines.h \ ../../oflog/include/dcmtk/oflog/helpers/threadcf.h \ ../../oflog/include/dcmtk/oflog/loglevel.h \ @@ -412,7 +412,6 @@ ../include/dcmtk/dcmimage/diqttype.h \ ../../dcmdata/include/dcmtk/dcmdata/dccodec.h dcmscale.o: dcmscale.cc ../../config/include/dcmtk/config/osconfig.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../dcmdata/include/dcmtk/dcmdata/dctk.h \ ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \ ../../oflog/include/dcmtk/oflog/oflog.h \ @@ -421,6 +420,7 @@ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../oflog/include/dcmtk/oflog/config/defines.h \ ../../oflog/include/dcmtk/oflog/helpers/threadcf.h \ ../../oflog/include/dcmtk/oflog/loglevel.h \ diff -Nru dcmtk-3.6.6/dcmimage/docs/dcm2pnm.man dcmtk-3.6.7/dcmimage/docs/dcm2pnm.man --- dcmtk-3.6.6/dcmimage/docs/dcm2pnm.man 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmimage/docs/dcm2pnm.man 2022-04-28 13:47:25.000000000 +0000 @@ -405,8 +405,7 @@ The \e --write-tiff option is only available when DCMTK has been configured and compiled with support for the external \b libtiff TIFF library. The availability of the TIFF compression options depends on the \b libtiff -configuration. In particular, the patented LZW algorithm may not be -available. +configuration. The \e --write-png option is only available when DCMTK has been configured and compiled with support for the external \b libpng PNG library. Option @@ -497,6 +496,6 @@ \section dcm2pnm_copyright COPYRIGHT -Copyright (C) 1998-2020 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany. +Copyright (C) 1998-2022 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany. */ diff -Nru dcmtk-3.6.6/dcmimage/docs/dcmicmp.man dcmtk-3.6.7/dcmimage/docs/dcmicmp.man --- dcmtk-3.6.6/dcmimage/docs/dcmicmp.man 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmimage/docs/dcmicmp.man 2022-04-28 13:47:25.000000000 +0000 @@ -372,6 +372,6 @@ \section dcmicmp_copyright COPYRIGHT -Copyright (C) 2018 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany. +Copyright (C) 2018-2022 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany. */ diff -Nru dcmtk-3.6.6/dcmimage/docs/dcmquant.man dcmtk-3.6.7/dcmimage/docs/dcmquant.man --- dcmtk-3.6.6/dcmimage/docs/dcmquant.man 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmimage/docs/dcmquant.man 2022-04-28 13:47:25.000000000 +0000 @@ -284,6 +284,6 @@ \section dcmquant_copyright COPYRIGHT -Copyright (C) 2001-2017 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany. +Copyright (C) 2001-2022 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany. */ diff -Nru dcmtk-3.6.6/dcmimage/docs/dcmscale.man dcmtk-3.6.7/dcmimage/docs/dcmscale.man --- dcmtk-3.6.6/dcmimage/docs/dcmscale.man 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmimage/docs/dcmscale.man 2022-04-28 13:47:25.000000000 +0000 @@ -266,6 +266,6 @@ \section dcmscale_copyright COPYRIGHT -Copyright (C) 2002-2020 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany. +Copyright (C) 2002-2022 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany. */ diff -Nru dcmtk-3.6.6/dcmimage/include/dcmtk/dcmimage/dcmicmph.h dcmtk-3.6.7/dcmimage/include/dcmtk/dcmimage/dcmicmph.h --- dcmtk-3.6.6/dcmimage/include/dcmtk/dcmimage/dcmicmph.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmimage/include/dcmtk/dcmimage/dcmicmph.h 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2018-2019, OFFIS e.V. + * Copyright (C) 2018-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -30,6 +30,8 @@ #include "dcmtk/ofstd/ofcmdln.h" /* for OFCmdUnsignedInt */ #include "dcmtk/dcmdata/dcxfer.h" /* for E_TransferSyntax */ +#include + class DicomImage; class DcmFileFormat; class DcmItem; diff -Nru dcmtk-3.6.6/dcmimage/include/dcmtk/dcmimage/dicoopx.h dcmtk-3.6.7/dcmimage/include/dcmtk/dcmimage/dicoopx.h --- dcmtk-3.6.6/dcmimage/include/dcmtk/dcmimage/dicoopx.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmimage/include/dcmtk/dcmimage/dicoopx.h 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1996-2012, OFFIS e.V. + * Copyright (C) 1996-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -27,10 +27,6 @@ #include "dcmtk/dcmimgle/diutils.h" #include "dcmtk/ofstd/ofstream.h" -#define INCLUDE_CSTDLIB -#define INCLUDE_CSTDIO -#include "dcmtk/ofstd/ofstdinc.h" - #include "dcmtk/dcmimage/dicdefin.h" diff -Nru dcmtk-3.6.6/dcmimage/include/dcmtk/dcmimage/dihsvpxt.h dcmtk-3.6.7/dcmimage/include/dcmtk/dcmimage/dihsvpxt.h --- dcmtk-3.6.6/dcmimage/include/dcmtk/dcmimage/dihsvpxt.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmimage/include/dcmtk/dcmimage/dihsvpxt.h 2022-04-28 13:47:25.000000000 +0000 @@ -138,6 +138,13 @@ } /** convert a single HSV value to RGB + * @param red the red part of the RGB value + * @param green the green part of the RGB value + * @param blue the blue part of the RGB value + * @param hue the hue part of the HSV value + * @param saturation the saturation part of the HSV value + * @param value the value part of the HSV value + * @param the maximal value of any rgb value */ void convertValue(T2 &red, T2 &green, diff -Nru dcmtk-3.6.6/dcmimage/include/dcmtk/dcmimage/diqthash.h dcmtk-3.6.7/dcmimage/include/dcmtk/dcmimage/diqthash.h --- dcmtk-3.6.6/dcmimage/include/dcmtk/dcmimage/diqthash.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmimage/include/dcmtk/dcmimage/diqthash.h 2022-04-28 13:47:25.000000000 +0000 @@ -114,6 +114,8 @@ /** Retrieves the specified item from the hash table. * If the item has not been created a new item is created and is returned. + * @param colorP the item in the hash table + * @return the retrieved, or created object */ DcmQuantHistogramItemList& item(const DcmQuantPixel& colorP) { diff -Nru dcmtk-3.6.6/dcmimage/include/dcmtk/dcmimage/diqtpbox.h dcmtk-3.6.7/dcmimage/include/dcmtk/dcmimage/diqtpbox.h --- dcmtk-3.6.6/dcmimage/include/dcmtk/dcmimage/diqtpbox.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmimage/include/dcmtk/dcmimage/diqtpbox.h 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2002-2014, OFFIS e.V. + * Copyright (C) 2002-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -23,12 +23,10 @@ #ifndef DIQTPBOX_H #define DIQTPBOX_H - #include "dcmtk/config/osconfig.h" -#define INCLUDE_CSTDLIB -#define INCLUDE_CASSERT -#include "dcmtk/ofstd/ofstdinc.h" +#include +#include #include "dcmtk/dcmimage/dicdefin.h" diff -Nru dcmtk-3.6.6/dcmimage/include/dcmtk/dcmimage/diqtstab.h dcmtk-3.6.7/dcmimage/include/dcmtk/dcmimage/diqtstab.h --- dcmtk-3.6.6/dcmimage/include/dcmtk/dcmimage/diqtstab.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmimage/include/dcmtk/dcmimage/diqtstab.h 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2002-2014, OFFIS e.V. + * Copyright (C) 2002-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -23,15 +23,11 @@ #ifndef DIQTSTAB_H #define DIQTSTAB_H - #include "dcmtk/config/osconfig.h" #include "dcmtk/ofstd/ofcast.h" #include "dcmtk/dcmimage/diqttype.h" /* for DcmQuantComponent */ -#define INCLUDE_CSTDLIB -#define INCLUDE_CASSERT -#include "dcmtk/ofstd/ofstdinc.h" - +#include /** this is a helper class used for temporarily reducing the image bit depth * during calculation of an image histogram. An object of this class diff -Nru dcmtk-3.6.6/dcmimage/include/dcmtk/dcmimage/diquant.h dcmtk-3.6.7/dcmimage/include/dcmtk/dcmimage/diquant.h --- dcmtk-3.6.6/dcmimage/include/dcmtk/dcmimage/diquant.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmimage/include/dcmtk/dcmimage/diquant.h 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2002-2011, OFFIS e.V. + * Copyright (C) 2002-2021, 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 * - * Purpose: class DcmQuantFloydSteinberg + * Purpose: class DcmQuant * */ @@ -24,10 +24,10 @@ #define DIQUANT_H #include "dcmtk/config/osconfig.h" -#include "dcmtk/ofstd/ofcond.h" /* for OFCondition */ -#include "dcmtk/dcmdata/dctypes.h" /* for Uint32 etc. */ +#include "dcmtk/ofstd/ofcond.h" /* for OFCondition */ +#include "dcmtk/dcmdata/dctypes.h" /* for Uint32 etc. */ #include "dcmtk/dcmimage/diqttype.h" /* for enums */ -#include "dcmtk/ofstd/ofstring.h" /* for class OFString */ +#include "dcmtk/ofstd/ofstring.h" /* for class OFString */ class DicomImage; diff -Nru dcmtk-3.6.6/dcmimage/include/dcmtk/dcmimage/diybrpxt.h dcmtk-3.6.7/dcmimage/include/dcmtk/dcmimage/diybrpxt.h --- dcmtk-3.6.6/dcmimage/include/dcmtk/dcmimage/diybrpxt.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmimage/include/dcmtk/dcmimage/diybrpxt.h 2022-04-28 13:47:25.000000000 +0000 @@ -268,6 +268,13 @@ } /** convert a single YCbCr value to RGB + * @param red the red part of the RGB value + * @param green the green part of the RGB value + * @param blue the blue part of the RGB value + * @param y the luma part of the YCbCr value + * @param cb the blue-difference part of the YCbCr value + * @param cr the red-difference part of the YCbCr value + * @param maxvalue the maximum value of the RGB parts */ inline void convertValue(T2 &red, T2 &green, T2 &blue, const T2 y, const T2 cb, const T2 cr, const T2 maxvalue) { diff -Nru dcmtk-3.6.6/dcmimage/include/dcmtk/dcmimage/diyf2pxt.h dcmtk-3.6.7/dcmimage/include/dcmtk/dcmimage/diyf2pxt.h --- dcmtk-3.6.6/dcmimage/include/dcmtk/dcmimage/diyf2pxt.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmimage/include/dcmtk/dcmimage/diyf2pxt.h 2022-04-28 13:47:25.000000000 +0000 @@ -134,6 +134,13 @@ } /** convert a single YCbCr value to RGB + * @param red the red part of the RGB value + * @param green the green part of the RGB value + * @param blue the blue part of the RGB value + * @param y the luma part of the YCbCr value + * @param cb the blue-difference part of the YCbCr value + * @param cr the red-difference part of the YCbCr value + * @param maxvalue the maximum value of the RGB parts */ inline void convertValue(T2 &red, T2 &green, diff -Nru dcmtk-3.6.6/dcmimage/include/dcmtk/dcmimage/diyp2pxt.h dcmtk-3.6.7/dcmimage/include/dcmtk/dcmimage/diyp2pxt.h --- dcmtk-3.6.6/dcmimage/include/dcmtk/dcmimage/diyp2pxt.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmimage/include/dcmtk/dcmimage/diyp2pxt.h 2022-04-28 13:47:25.000000000 +0000 @@ -114,6 +114,13 @@ } /** convert a single YCbCr value to RGB + * @param red the red part of the RGB value + * @param green the green part of the RGB value + * @param blue the blue part of the RGB value + * @param y the luma part of the YCbCr value + * @param cb the blue-difference part of the YCbCr value + * @param cr the red-difference part of the YCbCr value + * @param maxvalue the maximum value of the RGB parts */ inline void convertValue(T2 &red, T2 &green, diff -Nru dcmtk-3.6.6/dcmimage/libsrc/CMakeLists.txt dcmtk-3.6.7/dcmimage/libsrc/CMakeLists.txt --- dcmtk-3.6.6/dcmimage/libsrc/CMakeLists.txt 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmimage/libsrc/CMakeLists.txt 2022-04-28 13:47:25.000000000 +0000 @@ -1,5 +1,28 @@ # create library from source files -DCMTK_ADD_LIBRARY(dcmimage diargimg dicmyimg dicoimg dicoopx dicopx dihsvimg dilogger dipalimg dipipng dipitiff diqtctab diqtfs diqthash diqthitl diqtpbox diquant diregist dirgbimg diybrimg diyf2img diyp2img dcmicmph) +DCMTK_ADD_LIBRARY(dcmimage + dcmicmph.cc + diargimg.cc + dicmyimg.cc + dicoimg.cc + dicoopx.cc + dicopx.cc + dihsvimg.cc + dilogger.cc + dipalimg.cc + dipipng.cc + dipitiff.cc + diqtctab.cc + diqtfs.cc + diqthash.cc + diqthitl.cc + diqtpbox.cc + diquant.cc + diregist.cc + dirgbimg.cc + diybrimg.cc + diyf2img.cc + diyp2img.cc +) DCMTK_TARGET_LINK_MODULES(dcmimage oflog dcmdata dcmimgle) DCMTK_TARGET_LINK_LIBRARIES(dcmimage ${LIBTIFF_LIBS} ${LIBPNG_LIBS}) diff -Nru dcmtk-3.6.6/dcmimage/libsrc/dcmicmph.cc dcmtk-3.6.7/dcmimage/libsrc/dcmicmph.cc --- dcmtk-3.6.6/dcmimage/libsrc/dcmicmph.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmimage/libsrc/dcmicmph.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2018, OFFIS e.V. + * Copyright (C) 2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -24,11 +24,6 @@ #include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ #include "dcmtk/dcmimage/dcmicmph.h" /* header file for this implementation file */ -#define INCLUDE_CSTDIO -#define INCLUDE_CSTRING -#define INCLUDE_CMATH -#include "dcmtk/ofstd/ofstdinc.h" - #include "dcmtk/ofstd/ofconapp.h" /* for OFConsoleApplication */ #include "dcmtk/ofstd/ofcmdln.h" /* for OFCommandLine */ #include "dcmtk/ofstd/ofstd.h" /* for OFStandard */ diff -Nru dcmtk-3.6.6/dcmimage/libsrc/dicoimg.cc dcmtk-3.6.7/dcmimage/libsrc/dicoimg.cc --- dcmtk-3.6.6/dcmimage/libsrc/dicoimg.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmimage/libsrc/dicoimg.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1996-2018, OFFIS e.V. + * Copyright (C) 1996-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -37,10 +37,6 @@ #include "dcmtk/dcmimage/dilogger.h" #include "dcmtk/dcmimgle/diutils.h" -#define INCLUDE_CINTTYPES -#include "dcmtk/ofstd/ofstdinc.h" - - /*----------------* * constructors * *----------------*/ @@ -586,7 +582,7 @@ #endif dataset.putAndInsertString(DCM_NumberOfFrames, numBuf); dataset.putAndInsertUint16(DCM_SamplesPerPixel, 3); - dataset.putAndInsertUint16(DCM_PlanarConfiguration, planarConfig); + dataset.putAndInsertUint16(DCM_PlanarConfiguration, OFstatic_cast(const Uint16, planarConfig)); /* set pixel encoding and data */ switch (InterData->getRepresentation()) { @@ -615,8 +611,8 @@ dataset.putAndInsertUint16(DCM_PixelRepresentation, 1); break; } - dataset.putAndInsertUint16(DCM_BitsStored, BitsPerSample); - dataset.putAndInsertUint16(DCM_HighBit, BitsPerSample - 1); + dataset.putAndInsertUint16(DCM_BitsStored, OFstatic_cast(Uint16, BitsPerSample)); + dataset.putAndInsertUint16(DCM_HighBit, OFstatic_cast(Uint16, (BitsPerSample - 1))); /* update other DICOM attributes */ updateImagePixelModuleAttributes(dataset); result = 1; diff -Nru dcmtk-3.6.6/dcmimage/libsrc/dipipng.cc dcmtk-3.6.7/dcmimage/libsrc/dipipng.cc --- dcmtk-3.6.6/dcmimage/libsrc/dipipng.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmimage/libsrc/dipipng.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2003-2019, OFFIS e.V. + * Copyright (C) 2003-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -28,6 +28,7 @@ #include "dcmtk/dcmimgle/diimage.h" #include "dcmtk/dcmimage/dipipng.h" #include "dcmtk/dcmdata/dcuid.h" /* for dcmtk version */ +#include "dcmtk/ofstd/ofdiag.h" BEGIN_EXTERN_C #ifdef HAVE_LIBPNG_PNG_H @@ -51,6 +52,8 @@ { } +#include DCMTK_DIAGNOSTIC_PUSH +#include DCMTK_DIAGNOSTIC_IGNORE_VISUAL_STUDIO_OBJECT_DESTRUCTION_WARNING int DiPNGPlugin::write( DiImage *image, @@ -191,6 +194,8 @@ return result; } +#include DCMTK_DIAGNOSTIC_POP + void DiPNGPlugin::setInterlaceType(DiPNGInterlace itype) { diff -Nru dcmtk-3.6.6/dcmimage/libsrc/diqtctab.cc dcmtk-3.6.7/dcmimage/libsrc/diqtctab.cc --- dcmtk-3.6.6/dcmimage/libsrc/diqtctab.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmimage/libsrc/diqtctab.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2002-2016, OFFIS e.V. + * Copyright (C) 2002-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -31,9 +31,9 @@ #include "dcmtk/dcmdata/dcswap.h" /* for swapIfNecessary() */ #include "dcmtk/dcmdata/dcdeftag.h" /* for tag constants */ #include "dcmtk/dcmdata/dcuid.h" /* for OFFIS_DCMTK_VERSION */ +#include "dcmtk/ofstd/ofdiag.h" /* for DCMTK_DIAGNOSTIC macros */ -#define INCLUDE_CSTDIO -#include "dcmtk/ofstd/ofstdinc.h" +#include DCMTK_DIAGNOSTIC_IGNORE_CONST_EXPRESSION_WARNING /* ------------------------------------------------------------ */ @@ -206,13 +206,13 @@ double rl, gl, bl; DcmQuantPixel p; - p.assign(maxr - minr, 0, 0); + p.assign(OFstatic_cast(DcmQuantComponent, (maxr - minr)), 0, 0); rl = p.luminance(); - p.assign(0, maxg - ming, 0); + p.assign(0, OFstatic_cast(DcmQuantComponent, (maxg - ming)), 0); gl = p.luminance(); - p.assign(0, 0, maxb - minb); + p.assign(0, 0, OFstatic_cast(DcmQuantComponent, (maxb - minb))); bl = p.luminance(); if ( rl >= gl && rl >= bl ) @@ -277,7 +277,7 @@ minb = (minb < v ? minb : v); maxb = (minb > v ? minb : v); } - array[bi]->assign(( minr + maxr ) / 2, ( ming + maxg ) / 2, ( minb + maxb ) / 2); + array[bi]->assign(OFstatic_cast(DcmQuantComponent, (( minr + maxr ) / 2)), OFstatic_cast(DcmQuantComponent, (( ming + maxg ) / 2)), OFstatic_cast(DcmQuantComponent, (( minb + maxb ) / 2))); } } else if (repType == DcmRepresentativeColorType_default) diff -Nru dcmtk-3.6.6/dcmimage/libsrc/diqtfs.cc dcmtk-3.6.7/dcmimage/libsrc/diqtfs.cc --- dcmtk-3.6.6/dcmimage/libsrc/diqtfs.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmimage/libsrc/diqtfs.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2002-2014, OFFIS e.V. + * Copyright (C) 2002-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -23,9 +23,9 @@ #include "dcmtk/config/osconfig.h" #include "dcmtk/dcmimage/diqtfs.h" #include "dcmtk/ofstd/ofstd.h" /* for OFStandard::myrand_r */ - -#define INCLUDE_CTIME #include "dcmtk/ofstd/ofstdinc.h" +#include + BEGIN_EXTERN_C #include // needed for time() diff -Nru dcmtk-3.6.6/dcmimage/libsrc/diqtpbox.cc dcmtk-3.6.7/dcmimage/libsrc/diqtpbox.cc --- dcmtk-3.6.6/dcmimage/libsrc/diqtpbox.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmimage/libsrc/diqtpbox.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2002-2010, OFFIS e.V. + * Copyright (C) 2002-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -23,13 +23,10 @@ #include "dcmtk/config/osconfig.h" #include "dcmtk/ofstd/ofcast.h" #include "dcmtk/dcmimage/diqtpbox.h" /* for DcmQuantPixelBoxArray */ +#include "dcmtk/ofstd/ofstdinc.h" -#ifdef USE_STD_CXX_INCLUDES // Solaris defines qsort() in namespace std, other compilers don't... -namespace std { } -using namespace std; -#endif - +using STD_NAMESPACE qsort; BEGIN_EXTERN_C static int sumcompare(const void *x1, const void *x2) diff -Nru dcmtk-3.6.6/dcmimage/libsrc/Makefile.dep dcmtk-3.6.7/dcmimage/libsrc/Makefile.dep --- dcmtk-3.6.6/dcmimage/libsrc/Makefile.dep 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmimage/libsrc/Makefile.dep 2022-04-28 13:47:25.000000000 +0000 @@ -4,9 +4,9 @@ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../dcmimgle/include/dcmtk/dcmimgle/diutils.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../../oflog/include/dcmtk/oflog/oflog.h \ ../../oflog/include/dcmtk/oflog/logger.h \ @@ -743,7 +743,11 @@ ../include/dcmtk/dcmimage/dipipng.h \ ../../dcmimgle/include/dcmtk/dcmimgle/diplugin.h \ ../include/dcmtk/dcmimage/dicdefin.h \ - ../../dcmdata/include/dcmtk/dcmdata/dcuid.h + ../../dcmdata/include/dcmtk/dcmdata/dcuid.h \ + ../../ofstd/include/dcmtk/ofstd/ofdiag.h \ + ../../ofstd/include/dcmtk/ofstd/diag/push.def \ + ../../ofstd/include/dcmtk/ofstd/diag/vsobjdes.def \ + ../../ofstd/include/dcmtk/ofstd/diag/pop.def dipitiff.o: dipitiff.cc ../../config/include/dcmtk/config/osconfig.h \ ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \ ../../oflog/include/dcmtk/oflog/oflog.h \ @@ -809,7 +813,8 @@ ../../dcmimgle/include/dcmtk/dcmimgle/diutils.h \ ../include/dcmtk/dcmimage/dipitiff.h \ ../../dcmimgle/include/dcmtk/dcmimgle/diplugin.h \ - ../include/dcmtk/dcmimage/dicdefin.h + ../include/dcmtk/dcmimage/dicdefin.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcuid.h diqtctab.o: diqtctab.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmimage/diqtctab.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ @@ -877,7 +882,9 @@ ../../dcmdata/include/dcmtk/dcmdata/dcvrobow.h \ ../../dcmdata/include/dcmtk/dcmdata/dcswap.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \ - ../../dcmdata/include/dcmtk/dcmdata/dcuid.h + ../../dcmdata/include/dcmtk/dcmdata/dcuid.h \ + ../../ofstd/include/dcmtk/ofstd/ofdiag.h \ + ../../ofstd/include/dcmtk/ofstd/diag/constexp.def diqtfs.o: diqtfs.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmimage/diqtfs.h ../include/dcmtk/dcmimage/diqtpix.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ @@ -900,11 +907,11 @@ diqthash.o: diqthash.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmimage/diqthash.h \ ../../ofstd/include/dcmtk/ofstd/ofvector.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.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/dcmimage/diqtpix.h ../include/dcmtk/dcmimage/diqttype.h \ ../include/dcmtk/dcmimage/dicdefin.h \ @@ -991,10 +998,10 @@ diqtpbox.o: diqtpbox.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../include/dcmtk/dcmimage/diqtpbox.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../include/dcmtk/dcmimage/dicdefin.h \ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ - ../../ofstd/include/dcmtk/ofstd/ofexport.h + ../../ofstd/include/dcmtk/ofstd/ofexport.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h diquant.o: diquant.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmimage/diquant.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ diff -Nru dcmtk-3.6.6/dcmimgle/apps/CMakeLists.txt dcmtk-3.6.7/dcmimgle/apps/CMakeLists.txt --- dcmtk-3.6.6/dcmimgle/apps/CMakeLists.txt 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmimgle/apps/CMakeLists.txt 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ # declare executables foreach(PROGRAM dcmdspfn dcod2lum dconvlum) - DCMTK_ADD_EXECUTABLE(${PROGRAM} ${PROGRAM}) + DCMTK_ADD_EXECUTABLE(${PROGRAM} ${PROGRAM}.cc) endforeach() # make sure executables are linked to the corresponding libraries diff -Nru dcmtk-3.6.6/dcmimgle/apps/dcod2lum.cc dcmtk-3.6.7/dcmimgle/apps/dcod2lum.cc --- dcmtk-3.6.6/dcmimgle/apps/dcod2lum.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmimgle/apps/dcod2lum.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2002-2019, OFFIS e.V. + * Copyright (C) 2002-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -22,11 +22,6 @@ #include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ -#define INCLUDE_CSTDLIB -#define INCLUDE_CCTYPE -#define INCLUDE_CSTRING -#include "dcmtk/ofstd/ofstdinc.h" - #include "dcmtk/ofstd/ofstream.h" #include "dcmtk/ofstd/ofconsol.h" #include "dcmtk/dcmimgle/didispfn.h" diff -Nru dcmtk-3.6.6/dcmimgle/apps/dconvlum.cc dcmtk-3.6.7/dcmimgle/apps/dconvlum.cc --- dcmtk-3.6.6/dcmimgle/apps/dconvlum.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmimgle/apps/dconvlum.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1999-2019, OFFIS e.V. + * Copyright (C) 1999-2021, 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 */ -#define INCLUDE_CSTDLIB -#define INCLUDE_CCTYPE -#include "dcmtk/ofstd/ofstdinc.h" - #include "dcmtk/ofstd/ofstream.h" #include "dcmtk/ofstd/ofstd.h" #include "dcmtk/ofstd/ofconsol.h" diff -Nru dcmtk-3.6.6/dcmimgle/apps/Makefile.dep dcmtk-3.6.7/dcmimgle/apps/Makefile.dep --- dcmtk-3.6.6/dcmimgle/apps/Makefile.dep 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmimgle/apps/Makefile.dep 2022-04-28 13:47:25.000000000 +0000 @@ -123,8 +123,8 @@ ../include/dcmtk/dcmimgle/didislut.h \ ../include/dcmtk/dcmimgle/dibaslut.h ../include/dcmtk/dcmimgle/diutils.h dcod2lum.o: dcod2lum.cc ../../config/include/dcmtk/config/osconfig.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofconsol.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ @@ -137,8 +137,8 @@ ../../dcmdata/include/dcmtk/dcmdata/dcuid.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h dconvlum.o: dconvlum.cc ../../config/include/dcmtk/config/osconfig.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ ../../ofstd/include/dcmtk/ofstd/oflist.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ diff -Nru dcmtk-3.6.6/dcmimgle/docs/dcmdspfn.man dcmtk-3.6.7/dcmimgle/docs/dcmdspfn.man --- dcmtk-3.6.6/dcmimgle/docs/dcmdspfn.man 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmimgle/docs/dcmdspfn.man 2022-04-28 13:47:25.000000000 +0000 @@ -196,6 +196,6 @@ \section dcmdspfn_copyright COPYRIGHT -Copyright (C) 1999-2014 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany. +Copyright (C) 1999-2022 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany. */ diff -Nru dcmtk-3.6.6/dcmimgle/docs/dcod2lum.man dcmtk-3.6.7/dcmimgle/docs/dcod2lum.man --- dcmtk-3.6.6/dcmimgle/docs/dcod2lum.man 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmimgle/docs/dcod2lum.man 2022-04-28 13:47:25.000000000 +0000 @@ -56,6 +56,6 @@ \section dcod2lum_copyright COPYRIGHT -Copyright (C) 2002-2014 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany. +Copyright (C) 2002-2022 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany. */ diff -Nru dcmtk-3.6.6/dcmimgle/docs/dconvlum.man dcmtk-3.6.7/dcmimgle/docs/dconvlum.man --- dcmtk-3.6.6/dcmimgle/docs/dconvlum.man 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmimgle/docs/dconvlum.man 2022-04-28 13:47:25.000000000 +0000 @@ -54,6 +54,6 @@ \section dconvlum_copyright COPYRIGHT -Copyright (C) 1999-2014 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany. +Copyright (C) 1999-2022 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany. */ diff -Nru dcmtk-3.6.6/dcmimgle/include/dcmtk/dcmimgle/dicrvfit.h dcmtk-3.6.7/dcmimgle/include/dcmtk/dcmimgle/dicrvfit.h --- dcmtk-3.6.6/dcmimgle/include/dcmtk/dcmimgle/dicrvfit.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmimgle/include/dcmtk/dcmimgle/dicrvfit.h 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1996-2016, OFFIS e.V. + * Copyright (C) 1996-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -27,10 +27,7 @@ #include "dcmtk/ofstd/oftypes.h" #include "dcmtk/ofstd/ofcast.h" -#define INCLUDE_CMATH -#define INCLUDE_CSTDDEF /* For NULL */ -#include "dcmtk/ofstd/ofstdinc.h" - +#include /*---------------------* * macro definitions * diff -Nru dcmtk-3.6.6/dcmimgle/include/dcmtk/dcmimgle/didocu.h dcmtk-3.6.7/dcmimgle/include/dcmtk/dcmimgle/didocu.h --- dcmtk-3.6.6/dcmimgle/include/dcmtk/dcmimgle/didocu.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmimgle/include/dcmtk/dcmimgle/didocu.h 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1996-2014, OFFIS e.V. + * Copyright (C) 1996-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -31,10 +31,6 @@ #include "dcmtk/dcmimgle/diobjcou.h" #include "dcmtk/ofstd/ofstring.h" -#define INCLUDE_CSTDDEF -#include "dcmtk/ofstd/ofstdinc.h" - - /*------------------------* * forward declarations * *------------------------*/ diff -Nru dcmtk-3.6.6/dcmimgle/include/dcmtk/dcmimgle/digsdfn.h dcmtk-3.6.7/dcmimgle/include/dcmtk/dcmimgle/digsdfn.h --- dcmtk-3.6.6/dcmimgle/include/dcmtk/dcmimgle/digsdfn.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmimgle/include/dcmtk/dcmimgle/digsdfn.h 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1998-2014, OFFIS e.V. + * Copyright (C) 1998-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -27,10 +27,6 @@ #include "dcmtk/dcmimgle/didispfn.h" -#define INCLUDE_CSTDDEF /* For NULL */ -#include "dcmtk/ofstd/ofstdinc.h" - - /*---------------------* * class declaration * *---------------------*/ diff -Nru dcmtk-3.6.6/dcmimgle/include/dcmtk/dcmimgle/diimage.h dcmtk-3.6.7/dcmimgle/include/dcmtk/dcmimgle/diimage.h --- dcmtk-3.6.6/dcmimgle/include/dcmtk/dcmimgle/diimage.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmimgle/include/dcmtk/dcmimgle/diimage.h 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1996-2016, OFFIS e.V. + * Copyright (C) 1996-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -35,9 +35,6 @@ #include "dcmtk/dcmimgle/diovlay.h" #include "dcmtk/dcmimgle/diutils.h" -#define INCLUDE_CSTDIO -#include "dcmtk/ofstd/ofstdinc.h" - #include "dcmtk/ofstd/ofstream.h" diff -Nru dcmtk-3.6.6/dcmimgle/include/dcmtk/dcmimgle/diinpxt.h dcmtk-3.6.7/dcmimgle/include/dcmtk/dcmimgle/diinpxt.h --- dcmtk-3.6.6/dcmimgle/include/dcmtk/dcmimgle/diinpxt.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmimgle/include/dcmtk/dcmimgle/diinpxt.h 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1996-2018, OFFIS e.V. + * Copyright (C) 1996-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -28,6 +28,7 @@ #include "dcmtk/ofstd/ofbmanip.h" #include "dcmtk/ofstd/ofcast.h" +#include "dcmtk/ofstd/ofdiag.h" /* for DCMTK_DIAGNOSTIC macros */ #include "dcmtk/dcmimgle/diinpx.h" #include "dcmtk/dcmimgle/didocu.h" @@ -173,6 +174,9 @@ #endif } +#include DCMTK_DIAGNOSTIC_PUSH +#include DCMTK_DIAGNOSTIC_IGNORE_CONST_EXPRESSION_WARNING + /** determine minimum and maximum pixel value * ** @return status, true if successful, false otherwise @@ -284,6 +288,8 @@ return 0; } +#include DCMTK_DIAGNOSTIC_POP + /** get pixel representation * ** @return pixel representation diff -Nru dcmtk-3.6.6/dcmimgle/include/dcmtk/dcmimgle/dimoipxt.h dcmtk-3.6.7/dcmimgle/include/dcmtk/dcmimgle/dimoipxt.h --- dcmtk-3.6.6/dcmimgle/include/dcmtk/dcmimgle/dimoipxt.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmimgle/include/dcmtk/dcmimgle/dimoipxt.h 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1996-2017, OFFIS e.V. + * Copyright (C) 1996-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -27,6 +27,7 @@ #include "dcmtk/ofstd/ofbmanip.h" #include "dcmtk/ofstd/ofcast.h" +#include "dcmtk/ofstd/ofdiag.h" /* for DCMTK_DIAGNOSTIC macros */ #include "dcmtk/dcmimgle/dimopxt.h" #include "dcmtk/dcmimgle/diinpx.h" @@ -86,6 +87,9 @@ private: +#include DCMTK_DIAGNOSTIC_PUSH +#include DCMTK_DIAGNOSTIC_IGNORE_CONST_EXPRESSION_WARNING + /** initialize optimization LUT * ** @param lut reference to storage area for lookup table @@ -109,6 +113,8 @@ return result; } +#include DCMTK_DIAGNOSTIC_POP + /** perform modality LUT transform * ** @param input pointer to input pixel representation diff -Nru dcmtk-3.6.6/dcmimgle/include/dcmtk/dcmimgle/dimoopxt.h dcmtk-3.6.7/dcmimgle/include/dcmtk/dcmimgle/dimoopxt.h --- dcmtk-3.6.6/dcmimgle/include/dcmtk/dcmimgle/dimoopxt.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmimgle/include/dcmtk/dcmimgle/dimoopxt.h 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1996-2020, OFFIS e.V. + * Copyright (C) 1996-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -27,6 +27,7 @@ #include "dcmtk/ofstd/ofcast.h" #include "dcmtk/ofstd/ofbmanip.h" +#include "dcmtk/ofstd/ofdiag.h" /* for DCMTK_DIAGNOSTIC macros */ #include "dcmtk/dcmimgle/dimoopx.h" #include "dcmtk/dcmimgle/dimopx.h" @@ -40,8 +41,7 @@ #include "dimcopxt.h" #endif -#define INCLUDE_CMATH -#include "dcmtk/ofstd/ofstdinc.h" +#include /*---------------------* @@ -287,6 +287,9 @@ } } +#include DCMTK_DIAGNOSTIC_PUSH +#include DCMTK_DIAGNOSTIC_IGNORE_CONST_EXPRESSION_WARNING + /** initialize an optimization LUT if the optimization criteria is fulfilled * ** @param lut reference to storage area where the optimization LUT should be stored @@ -310,6 +313,8 @@ return result; } +#include DCMTK_DIAGNOSTIC_POP + #ifdef PASTEL_COLOR_OUTPUT void color(void *buffer, // create true color pastel image const DiMonoPixel *inter, diff -Nru dcmtk-3.6.6/dcmimgle/include/dcmtk/dcmimgle/diovpln.h dcmtk-3.6.7/dcmimgle/include/dcmtk/dcmimgle/diovpln.h --- dcmtk-3.6.6/dcmimgle/include/dcmtk/dcmimgle/diovpln.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmimgle/include/dcmtk/dcmimgle/diovpln.h 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1996-2018, OFFIS e.V. + * Copyright (C) 1996-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -29,10 +29,6 @@ #include "dcmtk/dcmimgle/diutils.h" -#define INCLUDE_CSTDDEF -#include "dcmtk/ofstd/ofstdinc.h" - - /*------------------------* * forward declarations * *------------------------*/ @@ -317,6 +313,16 @@ return Mode; } + /** check whether overlay plane is a multi-frame overlay. + * (see DICOM PS3.3 for definition of "Multi-frame Overlay") + * + ** @return true if plane is a multi-frame overlay, false otherwise + */ + inline int isMultiframe() const + { + return MultiframeOverlay; + } + /** check whether overlay plane is embedded in the pixel data * ** @return true if plane is embedded, false otherwise @@ -487,7 +493,9 @@ /// y-coordinate of first pixel in surrounding memory buffer unsigned int StartTop; - /// true, if overlay data in embedded in pixel data + /// true if overlay plane is a multi-frame overlay + int MultiframeOverlay; + /// true if overlay data is embedded in pixel data int EmbeddedData; /// pointer to current element of 'Data' @@ -512,8 +520,12 @@ int result = 0; if (Valid && (Data != NULL)) { - const Uint32 frameNumber = OFstatic_cast(Uint32, FirstFrame + frame); + /* check for multi-frame overlay */ + const Uint32 frameNumber = (MultiframeOverlay) ? OFstatic_cast(Uint32, FirstFrame + frame) : 0; DCMIMGLE_TRACE("reset overlay plane in group 0x" << STD_NAMESPACE hex << GroupNumber << " to start position"); + /* special case: single frame overlay for multi-frame image */ + if (!MultiframeOverlay && (frame > 0)) + DCMIMGLE_TRACE(" using single frame overlay for multi-frame image (see CP-1974)"); DCMIMGLE_TRACE(" frameNumber: " << frameNumber << " (" << FirstFrame << "+" << frame << "), ImageFrameOrigin: " << ImageFrameOrigin << ", NumberOfFrames: " << NumberOfFrames); if ((frameNumber >= ImageFrameOrigin) && (frameNumber < ImageFrameOrigin + NumberOfFrames)) @@ -540,13 +552,13 @@ inline int DiOverlayPlane::getNextBit() { int result; - if (BitsAllocated == 16) // optimization - result = OFstatic_cast(int, *(Ptr++) & (1 << BitPosition)); + if (BitsAllocated == 16) // optimization + result = *(Ptr++) & (1 << BitPosition); else { - Ptr = StartPtr + (BitPos >> 4); // div 16 - result = OFstatic_cast(int, *Ptr & (1 << (BitPos & 0xf))); // mod 16 - BitPos += BitsAllocated; // next bit + Ptr = StartPtr + (BitPos >> 4); // div 16 + result = *Ptr & (1 << (BitPos & 0xf)); // mod 16 + BitPos += BitsAllocated; // next bit } return result; } diff -Nru dcmtk-3.6.6/dcmimgle/include/dcmtk/dcmimgle/diplugin.h dcmtk-3.6.7/dcmimgle/include/dcmtk/dcmimgle/diplugin.h --- dcmtk-3.6.6/dcmimgle/include/dcmtk/dcmimgle/diplugin.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmimgle/include/dcmtk/dcmimgle/diplugin.h 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2001-2011, OFFIS e.V. + * Copyright (C) 2001-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -25,9 +25,6 @@ #include "dcmtk/config/osconfig.h" -#define INCLUDE_CSTDIO -#include "dcmtk/ofstd/ofstdinc.h" - /*------------------------* * forward declarations * diff -Nru dcmtk-3.6.6/dcmimgle/include/dcmtk/dcmimgle/displint.h dcmtk-3.6.7/dcmimgle/include/dcmtk/dcmimgle/displint.h --- dcmtk-3.6.6/dcmimgle/include/dcmtk/dcmimgle/displint.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmimgle/include/dcmtk/dcmimgle/displint.h 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1996-2016, OFFIS e.V. + * Copyright (C) 1996-2021, 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" #include "dcmtk/ofstd/ofcast.h" -#define INCLUDE_CSTDDEF /* For NULL */ -#include "dcmtk/ofstd/ofstdinc.h" - - /*--------------------* * macro definition * *--------------------*/ diff -Nru dcmtk-3.6.6/dcmimgle/libsrc/CMakeLists.txt dcmtk-3.6.7/dcmimgle/libsrc/CMakeLists.txt --- dcmtk-3.6.6/dcmimgle/libsrc/CMakeLists.txt 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmimgle/libsrc/CMakeLists.txt 2022-04-28 13:47:25.000000000 +0000 @@ -1,4 +1,31 @@ # create library from source files -DCMTK_ADD_LIBRARY(dcmimgle dcmimage dibaslut diciefn dicielut didislut didispfn didocu digsdfn digsdlut diimage diinpx diluptab dimo1img dimo2img dimoimg dimoimg3 dimoimg4 dimoimg5 dimomod dimoopx dimopx diovdat diovlay diovlimg diovpln diutils) +DCMTK_ADD_LIBRARY(dcmimgle + dcmimage.cc + dibaslut.cc + diciefn.cc + dicielut.cc + didislut.cc + didispfn.cc + didocu.cc + digsdfn.cc + digsdlut.cc + diimage.cc + diinpx.cc + diluptab.cc + dimo1img.cc + dimo2img.cc + dimoimg.cc + dimoimg3.cc + dimoimg4.cc + dimoimg5.cc + dimomod.cc + dimoopx.cc + dimopx.cc + diovdat.cc + diovlay.cc + diovlimg.cc + diovpln.cc + diutils.cc +) DCMTK_TARGET_LINK_MODULES(dcmimgle ofstd oflog dcmdata) diff -Nru dcmtk-3.6.6/dcmimgle/libsrc/dcmimage.cc dcmtk-3.6.7/dcmimgle/libsrc/dcmimage.cc --- dcmtk-3.6.6/dcmimgle/libsrc/dcmimage.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmimgle/libsrc/dcmimage.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1996-2010, OFFIS e.V. + * Copyright (C) 1996-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -37,9 +37,6 @@ #include "dcmtk/dcmimgle/diplugin.h" #include "dcmtk/dcmdata/dcdicent.h" /* needed by MSVC5 */ -#define INCLUDE_CCTYPE -#include "dcmtk/ofstd/ofstdinc.h" - #ifndef FILENAME_MAX #define FILENAME_MAX 255 #endif @@ -203,12 +200,12 @@ if (cstr != NULL) { char *q = cstr; - unsigned char c; + char c; for (const char *p = str; *p != 0; p++) // remove invalid chars { - c = OFstatic_cast(unsigned char, *p); + c = *p; if (isalpha(c)) - *(q++) = toupper(c); + *(q++) = OFstatic_cast(char, toupper(c)); else if (isdigit(c)) *(q++) = c; } diff -Nru dcmtk-3.6.6/dcmimgle/libsrc/diciefn.cc dcmtk-3.6.7/dcmimgle/libsrc/diciefn.cc --- dcmtk-3.6.6/dcmimgle/libsrc/diciefn.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmimgle/libsrc/diciefn.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1998-2014, OFFIS e.V. + * Copyright (C) 1998-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -25,11 +25,6 @@ #include "dcmtk/dcmimgle/diciefn.h" #include "dcmtk/ofstd/ofstream.h" -#define INCLUDE_CMATH -#define INCLUDE_CSTRING -#include "dcmtk/ofstd/ofstdinc.h" - - /*----------------* * constructors * *----------------*/ diff -Nru dcmtk-3.6.6/dcmimgle/libsrc/dicielut.cc dcmtk-3.6.7/dcmimgle/libsrc/dicielut.cc --- dcmtk-3.6.6/dcmimgle/libsrc/dicielut.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmimgle/libsrc/dicielut.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1999-2016, OFFIS e.V. + * Copyright (C) 1999-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -24,9 +24,7 @@ #include "dcmtk/dcmimgle/dicielut.h" -#define INCLUDE_CMATH -#include "dcmtk/ofstd/ofstdinc.h" - +#include /*----------------* * constructors * diff -Nru dcmtk-3.6.6/dcmimgle/libsrc/didislut.cc dcmtk-3.6.7/dcmimgle/libsrc/didislut.cc --- dcmtk-3.6.6/dcmimgle/libsrc/didislut.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmimgle/libsrc/didislut.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1996-2010, OFFIS e.V. + * Copyright (C) 1996-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -33,7 +33,7 @@ const Uint16 max, const double amb, const double illum) - : DiBaseLUT(count, DicomImageClass::tobits(max, 0)), + : DiBaseLUT(count, OFstatic_cast(Uint16, DicomImageClass::tobits(max, 0))), AmbientLight((amb > 0) ? amb : 0), Illumination((illum > 0) ? illum : 0) { diff -Nru dcmtk-3.6.6/dcmimgle/libsrc/didispfn.cc dcmtk-3.6.7/dcmimgle/libsrc/didispfn.cc --- dcmtk-3.6.6/dcmimgle/libsrc/didispfn.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmimgle/libsrc/didispfn.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1999-2019, OFFIS e.V. + * Copyright (C) 1999-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -29,11 +29,6 @@ #include "dcmtk/dcmimgle/didislut.h" #include "dcmtk/ofstd/ofstream.h" -#define INCLUDE_CCTYPE -#define INCLUDE_CMATH -#include "dcmtk/ofstd/ofstdinc.h" - - /*----------------------------* * constant initializations * *----------------------------*/ diff -Nru dcmtk-3.6.6/dcmimgle/libsrc/didocu.cc dcmtk-3.6.7/dcmimgle/libsrc/didocu.cc --- dcmtk-3.6.6/dcmimgle/libsrc/didocu.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmimgle/libsrc/didocu.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1996-2018, OFFIS e.V. + * Copyright (C) 1996-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -143,12 +143,22 @@ // convert pixel data to uncompressed format (if required) if ((Flags & CIF_DecompressCompletePixelData) || !(Flags & CIF_UsePartialAccessToPixelData)) { - pstack.clear(); - // push reference to DICOM dataset on the stack (required for decompression process) - pstack.push(Object); - // dummy stack entry - pstack.push(PixelData); - status = PixelData->chooseRepresentation(EXS_LittleEndianExplicit, NULL, pstack); + if (Object->ident() == EVR_dataset) + { + // Call DcmDataset::chooseRepresentation() to enable an update + // of the transfer syntax attributes of the dataset instance + status = OFstatic_cast(DcmDataset *, Object)->chooseRepresentation(EXS_LittleEndianExplicit, NULL); + } + else + { + // Object is a DcmItem instance. Directly call DcmPixelData::chooseRepresentation(). + pstack.clear(); + // push reference to DICOM dataset on the stack (required for decompression process) + pstack.push(Object); + // dummy stack entry + pstack.push(PixelData); + status = PixelData->chooseRepresentation(EXS_LittleEndianExplicit, NULL, pstack); + } if (status.good()) { // set transfer syntax to unencapsulated/uncompressed diff -Nru dcmtk-3.6.6/dcmimgle/libsrc/digsdfn.cc dcmtk-3.6.7/dcmimgle/libsrc/digsdfn.cc --- dcmtk-3.6.6/dcmimgle/libsrc/digsdfn.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmimgle/libsrc/digsdfn.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1999-2016, OFFIS e.V. + * Copyright (C) 1999-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -28,10 +28,7 @@ #include "dcmtk/ofstd/ofstream.h" -#define INCLUDE_CMATH -#define INCLUDE_CSTRING -#include "dcmtk/ofstd/ofstdinc.h" - +#include /*----------------------------* * constant initializations * diff -Nru dcmtk-3.6.6/dcmimgle/libsrc/digsdlut.cc dcmtk-3.6.7/dcmimgle/libsrc/digsdlut.cc --- dcmtk-3.6.6/dcmimgle/libsrc/digsdlut.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmimgle/libsrc/digsdlut.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1999-2016, OFFIS e.V. + * Copyright (C) 1999-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -25,9 +25,7 @@ #include "dcmtk/dcmimgle/digsdlut.h" #include "dcmtk/dcmimgle/displint.h" -#define INCLUDE_CMATH -#include "dcmtk/ofstd/ofstdinc.h" - +#include /*----------------* * constructors * diff -Nru dcmtk-3.6.6/dcmimgle/libsrc/diimage.cc dcmtk-3.6.7/dcmimgle/libsrc/diimage.cc --- dcmtk-3.6.6/dcmimgle/libsrc/diimage.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmimgle/libsrc/diimage.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1996-2020, OFFIS e.V. + * Copyright (C) 1996-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -32,10 +32,6 @@ #include "dcmtk/dcmimgle/diutils.h" #include "dcmtk/ofstd/ofstd.h" -#define INCLUDE_CSTRING -#include "dcmtk/ofstd/ofstdinc.h" - - /*----------------* * constructors * *----------------*/ @@ -413,9 +409,9 @@ Columns(image->Columns), PixelWidth(image->PixelWidth), PixelHeight(image->PixelHeight), - BitsAllocated(alloc), - BitsStored(stored), - HighBit(stored - 1), + BitsAllocated(OFstatic_cast(const Uint16, alloc)), + BitsStored(OFstatic_cast(const Uint16, stored)), + HighBit(OFstatic_cast(const Uint16, (stored - 1))), BitsPerSample(image->BitsPerSample), SamplesPerPixel(image->SamplesPerPixel), Polarity(image->Polarity), @@ -768,8 +764,8 @@ dataset.putAndInsertUint16(DCM_BitsAllocated, 16); else dataset.putAndInsertUint16(DCM_BitsAllocated, 32); - dataset.putAndInsertUint16(DCM_BitsStored, bitsStored); - dataset.putAndInsertUint16(DCM_HighBit, bitsStored - 1); + dataset.putAndInsertUint16(DCM_BitsStored, OFstatic_cast(const Uint16, bitsStored)); + dataset.putAndInsertUint16(DCM_HighBit, OFstatic_cast(Uint16, bitsStored - 1)); dataset.putAndInsertUint16(DCM_PixelRepresentation, 0); /* handle VOI transformations */ if (dataset.tagExists(DCM_WindowCenter) || @@ -826,7 +822,7 @@ infoHeader.biWidth = Columns; infoHeader.biHeight = Rows; infoHeader.biPlanes = 1; - infoHeader.biBitCount = bits; + infoHeader.biBitCount = OFstatic_cast(const Uint16, bits); infoHeader.biCompression = 0; infoHeader.biSizeImage = 0; infoHeader.biXPelsPerMeter = 0; diff -Nru dcmtk-3.6.6/dcmimgle/libsrc/diluptab.cc dcmtk-3.6.7/dcmimgle/libsrc/diluptab.cc --- dcmtk-3.6.6/dcmimgle/libsrc/diluptab.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmimgle/libsrc/diluptab.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1996-2016, OFFIS e.V. + * Copyright (C) 1996-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -289,7 +289,7 @@ if ((descripMode == ELM_IgnoreValue) || (bits < MIN_TABLE_ENTRY_SIZE) || (bits > MAX_TABLE_ENTRY_SIZE)) { /* check whether correct bit depth can be determined automatically */ - Bits = (MaxValue > 0) ? DicomImageClass::tobits(MaxValue, 0) : bits; + Bits = (MaxValue > 0) ? OFstatic_cast(Uint16, DicomImageClass::tobits(MaxValue, 0)) : bits; /* check bit depth (again) for valid range */ if (Bits < MIN_TABLE_ENTRY_SIZE) Bits = MIN_TABLE_ENTRY_SIZE; @@ -468,7 +468,7 @@ if (Valid) { const Uint32 count = DicomImageClass::maxval(Bits, 0); - const Uint16 bits = DicomImageClass::tobits(Count + FirstEntry); + const Uint16 bits = OFstatic_cast(Uint16, DicomImageClass::tobits(Count + FirstEntry)); Uint16 *data = new Uint16[count]; Uint8 *valid = new Uint8[count]; if ((data != NULL) && (valid != NULL)) diff -Nru dcmtk-3.6.6/dcmimgle/libsrc/dimoimg.cc dcmtk-3.6.7/dcmimgle/libsrc/dimoimg.cc --- dcmtk-3.6.6/dcmimgle/libsrc/dimoimg.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmimgle/libsrc/dimoimg.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1996-2019 OFFIS e.V. + * Copyright (C) 1996-2021 OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -37,11 +37,6 @@ #include "dcmtk/dcmimgle/diutils.h" #include "dcmtk/dcmimgle/diregbas.h" -#define INCLUDE_CMATH -#define INCLUDE_CINTTYPES -#include "dcmtk/ofstd/ofstdinc.h" - - /*---------------------* * const definitions * *---------------------*/ @@ -539,36 +534,6 @@ /* - * this implementation is necessary to avoid linker errors on NeXTSTEP (gcc 2.5.8) - */ - -DiMonoImage::DiMonoImage(const DiMonoImage &) - : DiImage(NULL), - WindowCenter(0), - WindowWidth(0), - WindowCount(0), - VoiLutCount(0), - ValidWindow(0), - VoiExplanation(), - VoiLutFunction(EFV_Default), - PresLutShape(ESP_Default), - MinDensity(Default_MinDensity), - MaxDensity(Default_MaxDensity), - Reflection(Default_Reflection), - Illumination(Default_Illumination), - VoiLutData(NULL), - PresLutData(NULL), - InterData(NULL), - DisplayFunction(NULL), - OutputData(NULL), - OverlayData(NULL) -{ - DCMIMGLE_FATAL("using unimplemented copy constructor in class DiMonoImage ... aborting"); - abort(); -} - - -/* * createMonoOutputImage */ @@ -1936,7 +1901,7 @@ *(p++) = OFstatic_cast(Uint16, (DiGSDFunction::getJNDIndex(la + l0 * pow(OFstatic_cast(double, 10), -(dmin + OFstatic_cast(double, i) * density))) - jmin) * factor); } - PresLutData = new DiLookupTable(data, count, bits); + PresLutData = new DiLookupTable(data, count, OFstatic_cast(const Uint16, bits)); return (PresLutData != NULL) && (PresLutData->isValid()); } } @@ -2063,8 +2028,8 @@ dataset.putAndInsertUint16Array(DCM_PixelData, OFstatic_cast(const Uint16 *, pixel), count * 2 /*double-words*/); break; } - dataset.putAndInsertUint16(DCM_BitsStored, bits); - dataset.putAndInsertUint16(DCM_HighBit, bits - 1); + dataset.putAndInsertUint16(DCM_BitsStored, OFstatic_cast(Uint16, bits)); + dataset.putAndInsertUint16(DCM_HighBit, OFstatic_cast(Uint16, (bits - 1))); /* update other DICOM attributes */ updateImagePixelModuleAttributes(dataset); result = 1; diff -Nru dcmtk-3.6.6/dcmimgle/libsrc/diovlay.cc dcmtk-3.6.7/dcmimgle/libsrc/diovlay.cc --- dcmtk-3.6.6/dcmimgle/libsrc/diovlay.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmimgle/libsrc/diovlay.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1996-2019, OFFIS e.V. + * Copyright (C) 1996-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -495,7 +495,9 @@ ++(Data->Count); else if (status == 2) // group number already exists delete Data->Planes[plane]; - Data->Planes[plane] = new DiOverlayPlane(group, left_pos, top_pos, columns, rows, data, label, description, mode); + Data->Planes[plane] = new DiOverlayPlane(group, OFstatic_cast(const Sint16, left_pos), + OFstatic_cast(const Sint16, top_pos), OFstatic_cast(const Uint16, columns), + OFstatic_cast(const Uint16, rows), data, label, description, mode); if (checkPlane(plane, 0)) { if (Data->Planes[plane]->getNumberOfFrames() > Frames) // set maximum number of frames @@ -576,7 +578,7 @@ { width = op->getWidth(); height = op->getHeight(); - return op->getData(frame, 0, 0, width, height, bits, fore, back, OFFalse /*useOrigin*/); + return op->getData(frame, 0, 0, OFstatic_cast(Uint16, width), OFstatic_cast(Uint16, height), bits, fore, back, OFFalse /*useOrigin*/); } } return NULL; diff -Nru dcmtk-3.6.6/dcmimgle/libsrc/diovpln.cc dcmtk-3.6.7/dcmimgle/libsrc/diovpln.cc --- dcmtk-3.6.6/dcmimgle/libsrc/diovpln.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmimgle/libsrc/diovpln.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1996-2019, OFFIS e.V. + * Copyright (C) 1996-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -60,13 +60,14 @@ DefaultMode(EMO_Graphic), Label(), Description(), - GroupNumber(group), + GroupNumber(OFstatic_cast(Uint16, group)), Valid(0), Visible(0), BitPos(0), StartBitPos(0), StartLeft(0), StartTop(0), + MultiframeOverlay(0), EmbeddedData(0), Ptr(NULL), StartPtr(NULL), @@ -77,7 +78,7 @@ /* determine first frame to be processed */ FirstFrame = docu->getFrameStart(); /* specify overlay group number */ - DcmTagKey tag(group, DCM_OverlayRows.getElement() /* dummy */); + DcmTagKey tag(OFstatic_cast(Uint16, group), DCM_OverlayRows.getElement() /* dummy */); /* get descriptive data */ tag.setElement(DCM_OverlayLabel.getElement()); docu->getValue(tag, Label); @@ -91,6 +92,7 @@ Sint32 sl = 0; /* multi-frame overlays */ tag.setElement(DCM_NumberOfFramesInOverlay.getElement()); + MultiframeOverlay = (docu->search(tag) != NULL); docu->getValue(tag, sl); NumberOfFrames = (sl < 1) ? 1 : OFstatic_cast(Uint32, sl); tag.setElement(DCM_ImageFrameOrigin.getElement()); @@ -103,6 +105,8 @@ if (Valid) { DCMIMGLE_DEBUG("processing overlay plane in group 0x" << STD_NAMESPACE hex << group); + if (MultiframeOverlay) + DCMIMGLE_TRACE(" this is a multi-frame overlay with " << NumberOfFrames << " frame(s) starting at frame " << (ImageFrameOrigin + 1)); if (docu->getValue(tag, Top, 1) < 2) DCMIMGLE_WARN("missing second value for 'OverlayOrigin' ... assuming 'Top' = " << Top); } @@ -111,6 +115,8 @@ if (Valid) { DCMIMGLE_DEBUG("processing overlay plane in group 0x" << STD_NAMESPACE hex << group); + if (MultiframeOverlay) + DCMIMGLE_TRACE(" this is a multi-frame overlay with " << NumberOfFrames << " frame(s) starting at frame " << (ImageFrameOrigin + 1)); if (docu->getValue(tag, Left, 1) < 2) DCMIMGLE_WARN("missing second value for 'OverlayOrigin' ... assuming 'Left' = " << Left); } @@ -189,6 +195,13 @@ Data = NULL; } else Valid = (Data != NULL); + /* check condition for multi-frame overlay */ + if (NumberOfFrames > 1) + { + Sint32 numFrames = 0; + if (!docu->getValue(DCM_NumberOfFrames, numFrames) || (numFrames == 1)) + DCMIMGLE_WARN("found multi-frame overlay in group 0x" << STD_NAMESPACE hex << group << " for single frame image"); + } } if (Valid) { @@ -229,13 +242,14 @@ DefaultMode(mode), Label(), Description(), - GroupNumber(group), + GroupNumber(OFstatic_cast(Uint16, group)), Valid(0), Visible((mode == EMO_BitmapShutter) ? 1 : 0), BitPos(0), StartBitPos(0), StartLeft(0), StartTop(0), + MultiframeOverlay(0), EmbeddedData(0), Ptr(NULL), StartPtr(NULL), @@ -279,7 +293,7 @@ Rows(rows), Columns(columns), BitsAllocated(16), - BitPosition(bit), + BitPosition(OFstatic_cast(Uint16, bit)), Foreground(plane->Foreground), Threshold(plane->Threshold), PValue(0), @@ -294,6 +308,7 @@ StartBitPos(0), StartLeft(plane->StartLeft), StartTop(plane->StartTop), + MultiframeOverlay(plane->MultiframeOverlay), EmbeddedData(0), Ptr(NULL), StartPtr(NULL), diff -Nru dcmtk-3.6.6/dcmimgle/libsrc/diutils.cc dcmtk-3.6.7/dcmimgle/libsrc/diutils.cc --- dcmtk-3.6.6/dcmimgle/libsrc/diutils.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmimgle/libsrc/diutils.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1996-2011, OFFIS e.V. + * Copyright (C) 1996-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -27,9 +27,10 @@ #include "dcmtk/dcmimgle/diutils.h" -#define INCLUDE_CMATH -#include "dcmtk/ofstd/ofstdinc.h" +// #define INCLUDE_CMATH +// #include "dcmtk/ofstd/ofstdinc.h" +#include /*--------------------* * global variables * diff -Nru dcmtk-3.6.6/dcmimgle/libsrc/Makefile.dep dcmtk-3.6.7/dcmimgle/libsrc/Makefile.dep --- dcmtk-3.6.6/dcmimgle/libsrc/Makefile.dep 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmimgle/libsrc/Makefile.dep 2022-04-28 13:47:25.000000000 +0000 @@ -232,10 +232,10 @@ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ - ../include/dcmtk/dcmimgle/didispfn.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ + ../include/dcmtk/dcmimgle/didispfn.h \ ../include/dcmtk/dcmimgle/didefine.h \ ../include/dcmtk/dcmimgle/displint.h \ ../include/dcmtk/dcmimgle/dicrvfit.h \ @@ -532,11 +532,15 @@ ../../dcmdata/include/dcmtk/dcmdata/dcvrobow.h \ ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \ ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \ + ../../ofstd/include/dcmtk/ofstd/ofdiag.h \ ../include/dcmtk/dcmimgle/diinpx.h ../include/dcmtk/dcmimgle/didocu.h \ ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \ ../../dcmdata/include/dcmtk/dcmdata/dcsequen.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdatset.h \ - ../include/dcmtk/dcmimgle/dipxrept.h + ../include/dcmtk/dcmimgle/dipxrept.h \ + ../../ofstd/include/dcmtk/ofstd/diag/push.def \ + ../../ofstd/include/dcmtk/ofstd/diag/constexp.def \ + ../../ofstd/include/dcmtk/ofstd/diag/pop.def diinpx.o: diinpx.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmimgle/diinpx.h ../include/dcmtk/dcmimgle/diutils.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ @@ -576,12 +580,12 @@ ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \ ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.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 \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../../dcmdata/include/dcmtk/dcmdata/dcsequen.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ @@ -835,9 +839,14 @@ ../include/dcmtk/dcmimgle/dimo2img.h \ ../include/dcmtk/dcmimgle/dimoipxt.h \ ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \ + ../../ofstd/include/dcmtk/ofstd/ofdiag.h \ ../include/dcmtk/dcmimgle/dimopxt.h ../include/dcmtk/dcmimgle/dipxrept.h \ - ../include/dcmtk/dcmimgle/diinpx.h ../include/dcmtk/dcmimgle/dimocpt.h \ - ../include/dcmtk/dcmimgle/dimosct.h ../include/dcmtk/dcmimgle/discalet.h \ + ../include/dcmtk/dcmimgle/diinpx.h \ + ../../ofstd/include/dcmtk/ofstd/diag/push.def \ + ../../ofstd/include/dcmtk/ofstd/diag/constexp.def \ + ../../ofstd/include/dcmtk/ofstd/diag/pop.def \ + ../include/dcmtk/dcmimgle/dimocpt.h ../include/dcmtk/dcmimgle/dimosct.h \ + ../include/dcmtk/dcmimgle/discalet.h \ ../include/dcmtk/dcmimgle/ditranst.h ../include/dcmtk/dcmimgle/dimoflt.h \ ../include/dcmtk/dcmimgle/diflipt.h ../include/dcmtk/dcmimgle/dimorot.h \ ../include/dcmtk/dcmimgle/dirotat.h ../include/dcmtk/dcmimgle/dimoopxt.h \ @@ -915,8 +924,13 @@ ../include/dcmtk/dcmimgle/didispfn.h \ ../include/dcmtk/dcmimgle/dimoipxt.h \ ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \ + ../../ofstd/include/dcmtk/ofstd/ofdiag.h \ ../include/dcmtk/dcmimgle/dimopxt.h ../include/dcmtk/dcmimgle/dipxrept.h \ - ../include/dcmtk/dcmimgle/diinpx.h ../include/dcmtk/dcmimgle/dimoopxt.h \ + ../include/dcmtk/dcmimgle/diinpx.h \ + ../../ofstd/include/dcmtk/ofstd/diag/push.def \ + ../../ofstd/include/dcmtk/ofstd/diag/constexp.def \ + ../../ofstd/include/dcmtk/ofstd/diag/pop.def \ + ../include/dcmtk/dcmimgle/dimoopxt.h \ ../include/dcmtk/dcmimgle/didislut.h dimoimg4.o: dimoimg4.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmimgle/dimoimg.h \ @@ -985,8 +999,13 @@ ../include/dcmtk/dcmimgle/didispfn.h \ ../include/dcmtk/dcmimgle/dimoipxt.h \ ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \ + ../../ofstd/include/dcmtk/ofstd/ofdiag.h \ ../include/dcmtk/dcmimgle/dimopxt.h ../include/dcmtk/dcmimgle/dipxrept.h \ - ../include/dcmtk/dcmimgle/diinpx.h ../include/dcmtk/dcmimgle/dimoopxt.h \ + ../include/dcmtk/dcmimgle/diinpx.h \ + ../../ofstd/include/dcmtk/ofstd/diag/push.def \ + ../../ofstd/include/dcmtk/ofstd/diag/constexp.def \ + ../../ofstd/include/dcmtk/ofstd/diag/pop.def \ + ../include/dcmtk/dcmimgle/dimoopxt.h \ ../include/dcmtk/dcmimgle/didislut.h dimoimg5.o: dimoimg5.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmimgle/dimoimg.h \ @@ -1055,19 +1074,24 @@ ../include/dcmtk/dcmimgle/didispfn.h \ ../include/dcmtk/dcmimgle/dimoipxt.h \ ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \ + ../../ofstd/include/dcmtk/ofstd/ofdiag.h \ ../include/dcmtk/dcmimgle/dimopxt.h ../include/dcmtk/dcmimgle/dipxrept.h \ - ../include/dcmtk/dcmimgle/diinpx.h ../include/dcmtk/dcmimgle/dimoopxt.h \ + ../include/dcmtk/dcmimgle/diinpx.h \ + ../../ofstd/include/dcmtk/ofstd/diag/push.def \ + ../../ofstd/include/dcmtk/ofstd/diag/constexp.def \ + ../../ofstd/include/dcmtk/ofstd/diag/pop.def \ + ../include/dcmtk/dcmimgle/dimoopxt.h \ ../include/dcmtk/dcmimgle/didislut.h dimomod.o: dimomod.cc ../../config/include/dcmtk/config/osconfig.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \ ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.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 \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../../dcmdata/include/dcmtk/dcmdata/dcuid.h \ ../include/dcmtk/dcmimgle/dimomod.h ../include/dcmtk/dcmimgle/diluptab.h \ diff -Nru dcmtk-3.6.6/dcmiod/include/dcmtk/dcmiod/cielabutil.h dcmtk-3.6.7/dcmiod/include/dcmtk/dcmiod/cielabutil.h --- dcmtk-3.6.6/dcmiod/include/dcmtk/dcmiod/cielabutil.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmiod/include/dcmtk/dcmiod/cielabutil.h 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2016-2019, Pascal Getreuer, Open Connections GmbH + * Copyright (C) 2016-2021, Pascal Getreuer, Open Connections GmbH * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation are maintained by @@ -23,9 +23,9 @@ #define CIELABUTIL_H #include "dcmtk/config/osconfig.h" -#define INCLUDE_CMATH // for pow() function #include "dcmtk/dcmiod/ioddef.h" -#include "dcmtk/ofstd/ofstdinc.h" + +#include /** Class supporting color space conversions from and to CIELab. In some IODs * DICOM stores CIELab color values which must often be converted to RGB for diff -Nru dcmtk-3.6.6/dcmiod/include/dcmtk/dcmiod/iodimage.h dcmtk-3.6.7/dcmiod/include/dcmtk/dcmiod/iodimage.h --- dcmtk-3.6.6/dcmiod/include/dcmtk/dcmiod/iodimage.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmiod/include/dcmtk/dcmiod/iodimage.h 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2015-2019, Open Connections GmbH + * Copyright (C) 2015-2021, Open Connections GmbH * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation are maintained by @@ -199,7 +199,7 @@ typename std::enable_if::value, OFCondition>::type #else OFTypename - OFenable_if<(OFvariadic_find_type::value != -1), OFCondition>::type + OFenable_if<(OFvariadic_find_type::value != ~OFstatic_cast(size_t,0)), OFCondition>::type #endif readFloatingPointDoubleImagePixel(DcmItem& dataset) { @@ -213,7 +213,7 @@ typename std::enable_if::value, OFCondition>::type #else OFTypename - OFenable_if<(OFvariadic_find_type::value == -1), OFCondition>::type + OFenable_if<(OFvariadic_find_type::value == ~OFstatic_cast(size_t,0)), OFCondition>::type #endif readFloatingPointDoubleImagePixel(DcmItem& dataset) { @@ -225,7 +225,7 @@ typename std::enable_if::value, OFCondition>::type #else OFTypename - OFenable_if<(OFvariadic_find_type::value != -1), OFCondition>::type + OFenable_if<(OFvariadic_find_type::value != ~OFstatic_cast(size_t,0)), OFCondition>::type #endif readFloatingPointImagePixel(DcmItem& dataset) { @@ -239,7 +239,7 @@ typename std::enable_if::value, OFCondition>::type #else OFTypename - OFenable_if<(OFvariadic_find_type::value == -1), OFCondition>::type + OFenable_if<(OFvariadic_find_type::value == ~OFstatic_cast(size_t,0)), OFCondition>::type #endif readFloatingPointImagePixel(DcmItem& dataset) { @@ -248,7 +248,8 @@ OFCondition readIntegerImagePixel(DcmItem& dataset) { - Uint16 allocated, representation; + Uint16 allocated = 0; + Uint16 representation = 0; // Pixel data is not managed right now by Image Pixel Module class. if (/* dataset.tagExists(DCM_PixelData) && */ dataset.findAndGetUint16(DCM_BitsAllocated, allocated).good() && dataset.findAndGetUint16(DCM_PixelRepresentation, representation).good()) @@ -273,7 +274,7 @@ typename std::enable_if, Types...>::value, OFCondition>::type #else OFTypename - OFenable_if<(OFvariadic_find_type, OFVARIADIC_TEMPLATE_PARAMETER_PACK(T)>::value != -1), + OFenable_if<(OFvariadic_find_type, OFVARIADIC_TEMPLATE_PARAMETER_PACK(T)>::value != ~OFstatic_cast(size_t,0)), OFCondition>::type #endif readImagePixel(DcmItem& dataset) @@ -287,7 +288,7 @@ typename std::enable_if, Types...>::value, OFCondition>::type #else OFTypename - OFenable_if<(OFvariadic_find_type, OFVARIADIC_TEMPLATE_PARAMETER_PACK(T)>::value == -1), + OFenable_if<(OFvariadic_find_type, OFVARIADIC_TEMPLATE_PARAMETER_PACK(T)>::value == ~OFstatic_cast(size_t,0)), OFCondition>::type #endif readImagePixel(DcmItem& dataset) diff -Nru dcmtk-3.6.6/dcmiod/include/dcmtk/dcmiod/iodrules.h dcmtk-3.6.7/dcmiod/include/dcmtk/dcmiod/iodrules.h --- dcmtk-3.6.6/dcmiod/include/dcmtk/dcmiod/iodrules.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmiod/include/dcmtk/dcmiod/iodrules.h 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2015-2019, Open Connections GmbH + * Copyright (C) 2015-2021, Open Connections GmbH * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation are maintained by @@ -29,9 +29,6 @@ #include "dcmtk/ofstd/ofmap.h" #include "dcmtk/ofstd/ofstring.h" -#define INCLUDE_OSTREAM // for debugging -#include "dcmtk/ofstd/ofstdinc.h" - class DcmItem; class DcmTagKey; class DcmElement; diff -Nru dcmtk-3.6.6/dcmiod/include/dcmtk/dcmiod/modmultiframedimension.h dcmtk-3.6.7/dcmiod/include/dcmtk/dcmiod/modmultiframedimension.h --- dcmtk-3.6.6/dcmiod/include/dcmtk/dcmiod/modmultiframedimension.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmiod/include/dcmtk/dcmiod/modmultiframedimension.h 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2015-2019, Open Connections GmbH + * Copyright (C) 2015-2022, Open Connections GmbH * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation are maintained by @@ -338,6 +338,17 @@ const OFString& fgPrivateCreator, const OFString& privateCreator); + /** Enable or disable calling of the checkDimensions() routine when writing the module. + * Checking can be very time-consuming if many frames are present. Default is OFTrue. + * @param doCheck If enabled, checkDimensions() is called when writing. + */ + virtual void setCheckOnWrite(const OFBool doCheck); + + /** Returns whether checkDimensions() routine is called when writing the module. + * @returns OFTrue if calling of checkDimensions() is enabled when writing, OFFalse otherwise. + */ + virtual OFBool getCheckOnWrite(); + protected: /** Go over Dimension Index Pointers and extract Dimension Organization UIDs for * Dimension Organization Sequence. @@ -353,6 +364,11 @@ /// Vector with all items of the Dimension Organization Sequence OFVector m_DimensionOrganizationSequence; + + /// If enabled, dimension structures are checked when writing the module. + /// This can be very time-consuming if many frames are present. Default is + /// OFTrue. + OFBool m_CheckOnWrite; }; #endif // MODMULTIFRAMEDIMENSION_H diff -Nru dcmtk-3.6.6/dcmiod/include/dcmtk/dcmiod/modsopcommon.h dcmtk-3.6.7/dcmiod/include/dcmtk/dcmiod/modsopcommon.h --- dcmtk-3.6.6/dcmiod/include/dcmtk/dcmiod/modsopcommon.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmiod/include/dcmtk/dcmiod/modsopcommon.h 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2015-2019, Open Connections GmbH + * Copyright (C) 2015-2021, Open Connections GmbH * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation are maintained by @@ -177,8 +177,8 @@ /** Set Timezone Offset From UTC * @param value Value to be set (single value only) or "" for no value. - * Encoded as an ASCII string in the format “&ZZXXâ€. The components of this - * string, from left to right, are & = “+†or “-â€, and ZZ = Hours and + * Encoded as an ASCII string in the format "&ZZXX". The components of this + * string, from left to right, are & = "+" or "-", and ZZ = Hours and * XX = Minutes of offset. * @param checkValue Check 'value' for conformance with VR (SH) and VM (1) if enabled * @return EC_Normal if successful, an error code otherwise diff -Nru dcmtk-3.6.6/dcmiod/libsrc/cielabutil.cc dcmtk-3.6.7/dcmiod/libsrc/cielabutil.cc --- dcmtk-3.6.6/dcmiod/libsrc/cielabutil.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmiod/libsrc/cielabutil.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2005-2019, Pascal Getreuer, Open Connections GmbH + * Copyright (C) 2005-2021, Pascal Getreuer, Open Connections GmbH * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation are maintained by @@ -20,8 +20,7 @@ */ #include "dcmtk/dcmiod/cielabutil.h" #include "dcmtk/config/osconfig.h" -#define INCLUDE_CMATH // for pow() function -#include "dcmtk/ofstd/ofstdinc.h" +#include "dcmtk/ofstd/ofstdinc.h" /* for STD_NAMESPACE */ // workaround for SunPro not defining these C functions in the global namespace #ifdef __sun diff -Nru dcmtk-3.6.6/dcmiod/libsrc/CMakeLists.txt dcmtk-3.6.7/dcmiod/libsrc/CMakeLists.txt --- dcmtk-3.6.6/dcmiod/libsrc/CMakeLists.txt 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmiod/libsrc/CMakeLists.txt 2022-04-28 13:47:25.000000000 +0000 @@ -1,36 +1,37 @@ # create library from source files DCMTK_ADD_LIBRARY(dcmiod - cielabutil - iodcontentitemmacro - iodcommn - iodmacro - iodrules - iodreferences - iodutil - iodtypes - modacquisitioncontext - modbase - modcommoninstanceref - modenhequipment - modenhusimage - modenhusseries - modequipment - modfloatingpointimagepixel - modfor - modgeneralimage - modgeneralseries - modgeneralstudy - modhelp - modimagepixel - modimagepixelbase - modmultiframefg - modmultiframedimension - modpatient - modpatientstudy - modsegmentationseries - modsopcommon - modsynchronization - modusfor) + cielabutil.cc + iodcontentitemmacro.cc + iodcommn.cc + iodmacro.cc + iodrules.cc + iodreferences.cc + iodutil.cc + iodtypes.cc + modacquisitioncontext.cc + modbase.cc + modcommoninstanceref.cc + modenhequipment.cc + modenhusimage.cc + modenhusseries.cc + modequipment.cc + modfloatingpointimagepixel.cc + modfor.cc + modgeneralimage.cc + modgeneralseries.cc + modgeneralstudy.cc + modhelp.cc + modimagepixel.cc + modimagepixelbase.cc + modmultiframefg.cc + modmultiframedimension.cc + modpatient.cc + modpatientstudy.cc + modsegmentationseries.cc + modsopcommon.cc + modsynchronization.cc + modusfor.cc +) DCMTK_TARGET_LINK_MODULES(dcmiod dcmdata ofstd oflog) diff -Nru dcmtk-3.6.6/dcmiod/libsrc/iodmacro.cc dcmtk-3.6.7/dcmiod/libsrc/iodmacro.cc --- dcmtk-3.6.6/dcmiod/libsrc/iodmacro.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmiod/libsrc/iodmacro.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2015-2020, Open Connections GmbH + * Copyright (C) 2015-2021, Open Connections GmbH * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation are maintained by @@ -64,7 +64,7 @@ set(codeValue, codingSchemeDesignator, codeMeaning, codingSchemeVersion); } -OFCondition CodeSequenceMacro::check(const bool quiet) +OFCondition CodeSequenceMacro::check(const bool /* quiet */) { OFString val; getCodeValue(val); @@ -1671,10 +1671,10 @@ void HL7HierarchicDesignatorMacro::resetRules() { // parameters are tag, VM, type. Overwrite old rules if any. - m_Rules->addRule(new IODRule(DCM_UniversalEntityID, "1", "1C", "getName()", DcmIODTypes::IE_UNDEFINED), OFTrue); - m_Rules->addRule(new IODRule(DCM_LocalNamespaceEntityID, "1", "1C", "getName()", DcmIODTypes::IE_UNDEFINED), + m_Rules->addRule(new IODRule(DCM_UniversalEntityID, "1", "1C", getName(), DcmIODTypes::IE_UNDEFINED), OFTrue); + m_Rules->addRule(new IODRule(DCM_LocalNamespaceEntityID, "1", "1C", getName(), DcmIODTypes::IE_UNDEFINED), OFTrue); - m_Rules->addRule(new IODRule(DCM_UniversalEntityIDType, "1", "1C", "getName()", DcmIODTypes::IE_UNDEFINED), OFTrue); + m_Rules->addRule(new IODRule(DCM_UniversalEntityIDType, "1", "1C", getName(), DcmIODTypes::IE_UNDEFINED), OFTrue); } OFCondition HL7HierarchicDesignatorMacro::setLocalNamespaceEntityID(const OFString& value, const OFBool checkValue) @@ -1693,7 +1693,7 @@ { OFCondition result = (checkValue) ? DcmCodeString::checkStringValue(value, "1") : EC_Normal; if (result.good()) - result = m_Item->putAndInsertOFStringArray(DCM_UniversalEntityID, value); + result = m_Item->putAndInsertOFStringArray(DCM_UniversalEntityIDType, value); return result; } diff -Nru dcmtk-3.6.6/dcmiod/libsrc/iodutil.cc dcmtk-3.6.7/dcmiod/libsrc/iodutil.cc --- dcmtk-3.6.6/dcmiod/libsrc/iodutil.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmiod/libsrc/iodutil.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2015-2019, Open Connections GmbH + * Copyright (C) 2015-2022, Open Connections GmbH * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation are maintained by @@ -675,12 +675,13 @@ Uint32 DcmIODUtil::limitMaxFrames(const size_t numFramesPresent, const OFString& warning) { + // limit to 2^31-1 since this is the Number of Frames attribute's VR IS' maximum value if (numFramesPresent > 2147483647) { DCMIOD_WARN(warning); return 2147483647; } - return OFstatic_cast(Uint16, numFramesPresent); + return OFstatic_cast(Uint32, numFramesPresent); } OFCondition DcmIODUtil::extractBinaryFrames(Uint8* pixData, @@ -715,7 +716,10 @@ return EC_MemoryExhausted; } memcpy(frame->pixData, readPos, frame->length); - // If we have been copying too much, i.e the first bits of the frame + // --------------------------------------------------------- + // Remove bits in first byte from former frame if necessary: + // --------------------------------------------------------- + // If we have been copying too much, i.e the first bits of this frame // actually belong to the former frame, shift the whole frame this amount // of bits to the left in order to shift the superfluous bits out, i.e. // make frame start at byte boundary. @@ -723,9 +727,12 @@ { DcmIODUtil::alignFrameOnByteBoundary(frame->pixData, frame->length, 8 - bitShift); } + // ------------------------------------------------------- + // Mask out (set 0) bits of last byte if not used by frame + // ------------------------------------------------------- // Adapt last byte by masking out unused bits (i.e. those belonging to next frame). // A reader should ignore those unused bits anyway. - frame->pixData[frame->length - 1] = (frame->pixData[frame->length - 1] << (overlapBits)) >> (overlapBits); + frame->pixData[frame->length - 1] = OFstatic_cast(unsigned char, (frame->pixData[frame->length - 1] << overlapBits)) >> overlapBits; // Store frame results.push_back(frame); // Compute the bitshift created by this frame @@ -735,6 +742,7 @@ // that was partially read. Otherwise skip to the next full byte. if (bitShift > 0) { + readPos = readPos + frame->length - 1; } else @@ -755,12 +763,12 @@ for (size_t x = 0; x < bufLen - 1; x++) { // Shift current byte - buf[x] = buf[x] >> numBits; + buf[x] = OFstatic_cast(unsigned char, buf[x]) >> numBits; // isolate portion of next byte that must be shifted into current byte Uint8 next = (buf[x + 1] << (8 - numBits)); // Take over portion from next byte buf[x] |= next; } // Shift last byte manually - buf[bufLen - 1] >>= numBits; + buf[bufLen - 1] = OFstatic_cast(unsigned char, buf[bufLen - 1]) >> numBits; } diff -Nru dcmtk-3.6.6/dcmiod/libsrc/Makefile.dep dcmtk-3.6.7/dcmiod/libsrc/Makefile.dep --- dcmtk-3.6.6/dcmiod/libsrc/Makefile.dep 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmiod/libsrc/Makefile.dep 2022-04-28 13:47:25.000000000 +0000 @@ -10,12 +10,12 @@ ../include/dcmtk/dcmiod/iodrules.h \ ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.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 \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../include/dcmtk/dcmiod/iodtypes.h ../include/dcmtk/dcmiod/ioddef.h \ ../../oflog/include/dcmtk/oflog/oflog.h \ @@ -139,12 +139,12 @@ ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \ ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.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 \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrcs.h \ ../../dcmdata/include/dcmtk/dcmdata/dcbytstr.h \ @@ -380,9 +380,9 @@ ../../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/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.h \ ../../ofstd/include/dcmtk/ofstd/ofvector.h \ @@ -449,12 +449,12 @@ ../../config/include/dcmtk/config/osconfig.h \ ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.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 \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../include/dcmtk/dcmiod/iodtypes.h ../include/dcmtk/dcmiod/ioddef.h \ ../../oflog/include/dcmtk/oflog/oflog.h \ @@ -509,10 +509,10 @@ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../oflog/include/dcmtk/oflog/oflog.h \ ../../oflog/include/dcmtk/oflog/logger.h \ ../../oflog/include/dcmtk/oflog/config.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../oflog/include/dcmtk/oflog/config/defines.h \ ../../oflog/include/dcmtk/oflog/helpers/threadcf.h \ ../../oflog/include/dcmtk/oflog/loglevel.h \ @@ -930,10 +930,10 @@ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../include/dcmtk/dcmiod/iodrules.h \ ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ @@ -1246,10 +1246,10 @@ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../include/dcmtk/dcmiod/iodrules.h \ ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ @@ -1319,12 +1319,12 @@ ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \ ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.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 \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../include/dcmtk/dcmiod/modimagepixelbase.h \ ../include/dcmtk/dcmiod/modbase.h \ @@ -1461,12 +1461,12 @@ ../include/dcmtk/dcmiod/iodrules.h \ ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.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 \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../include/dcmtk/dcmiod/iodtypes.h ../include/dcmtk/dcmiod/ioddef.h \ ../../oflog/include/dcmtk/oflog/oflog.h \ @@ -1541,13 +1541,13 @@ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../include/dcmtk/dcmiod/iodmacro.h \ ../../dcmdata/include/dcmtk/dcmdata/dctk.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 \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../oflog/include/dcmtk/oflog/config/defines.h \ ../../oflog/include/dcmtk/oflog/helpers/threadcf.h \ ../../oflog/include/dcmtk/oflog/loglevel.h \ @@ -1838,12 +1838,12 @@ ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \ ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.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 \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../include/dcmtk/dcmiod/modimagepixelbase.h \ ../include/dcmtk/dcmiod/modbase.h \ @@ -1983,12 +1983,12 @@ ../include/dcmtk/dcmiod/iodrules.h \ ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.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 \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../include/dcmtk/dcmiod/iodtypes.h ../include/dcmtk/dcmiod/ioddef.h \ ../../oflog/include/dcmtk/oflog/oflog.h \ @@ -2566,12 +2566,12 @@ ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \ ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.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 \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrcs.h \ ../../dcmdata/include/dcmtk/dcmdata/dcbytstr.h \ diff -Nru dcmtk-3.6.6/dcmiod/libsrc/modmultiframedimension.cc dcmtk-3.6.7/dcmiod/libsrc/modmultiframedimension.cc --- dcmtk-3.6.6/dcmiod/libsrc/modmultiframedimension.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmiod/libsrc/modmultiframedimension.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2015-2018, Open Connections GmbH + * Copyright (C) 2015-2022, Open Connections GmbH * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation are maintained by @@ -35,6 +35,7 @@ : IODModule(data, rules) , m_DimensionIndexSequence() , m_DimensionOrganizationSequence() + , m_CheckOnWrite(OFTrue) { // reset element rules resetRules(); @@ -151,6 +152,14 @@ OFCondition IODMultiframeDimensionModule::write(DcmItem& destination) { OFCondition result = EC_Normal; + if (m_CheckOnWrite) + { + result = checkDimensions(); + if (result.bad()) + { + return result; + } + } // Re-create dimension organization data createDimensionOrganizationData(); @@ -349,6 +358,16 @@ return returnValue; } +void IODMultiframeDimensionModule::setCheckOnWrite(const OFBool doCheck) +{ + m_CheckOnWrite = doCheck; +} + +OFBool IODMultiframeDimensionModule::getCheckOnWrite() +{ + return m_CheckOnWrite; +} + void IODMultiframeDimensionModule::createDimensionOrganizationData() { // Clear old data @@ -540,7 +559,7 @@ return EC_InternalError; OFCondition result; - Uint16* attrTagArray; + Uint16* attrTagArray = NULL; result = elem->putTagVal(value); if (result.good()) result = elem->getUint16Array(attrTagArray); @@ -572,7 +591,7 @@ return EC_InternalError; OFCondition result; - Uint16* attrTagArray; + Uint16* attrTagArray = NULL; result = elem->putTagVal(value); if (result.good()) result = elem->getUint16Array(attrTagArray); diff -Nru dcmtk-3.6.6/dcmiod/tests/CMakeLists.txt dcmtk-3.6.7/dcmiod/tests/CMakeLists.txt --- dcmtk-3.6.6/dcmiod/tests/CMakeLists.txt 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmiod/tests/CMakeLists.txt 2022-04-28 13:47:25.000000000 +0000 @@ -1,5 +1,10 @@ # declare executables -DCMTK_ADD_EXECUTABLE(dcmiod_tests tests tcielabutil tcodes timagepixel) +DCMTK_ADD_EXECUTABLE(dcmiod_tests + tests.cc + tcielabutil.cc + tcodes.cc + timagepixel.cc +) # make sure executables are linked to the corresponding libraries DCMTK_TARGET_LINK_MODULES(dcmiod_tests dcmiod dcmdata oflog ofstd) diff -Nru dcmtk-3.6.6/dcmiod/tests/Makefile.dep dcmtk-3.6.7/dcmiod/tests/Makefile.dep --- dcmtk-3.6.6/dcmiod/tests/Makefile.dep 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmiod/tests/Makefile.dep 2022-04-28 13:47:25.000000000 +0000 @@ -4,9 +4,9 @@ ../../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/ofrand.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../../ofstd/include/dcmtk/ofstd/oftest.h \ ../../ofstd/include/dcmtk/ofstd/ofconapp.h \ @@ -228,12 +228,12 @@ ../include/dcmtk/dcmiod/iodrules.h \ ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.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 \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../include/dcmtk/dcmiod/iodtypes.h ../include/dcmtk/dcmiod/ioddef.h \ ../../oflog/include/dcmtk/oflog/oflog.h \ @@ -355,9 +355,9 @@ ../include/dcmtk/dcmiod/modimagepixelvariant.h \ ../include/dcmtk/dcmiod/modimagepixelbase.h \ ../../ofstd/include/dcmtk/ofstd/ofvriant.h \ + ../../ofstd/include/dcmtk/ofstd/ofdiag.h \ ../../ofstd/include/dcmtk/ofstd/variadic/variant.h \ ../../ofstd/include/dcmtk/ofstd/variadic/helpers.h \ - ../../ofstd/include/dcmtk/ofstd/ofdiag.h \ ../../ofstd/include/dcmtk/ofstd/diag/push.def \ ../../ofstd/include/dcmtk/ofstd/diag/cnvrsn.def \ ../../ofstd/include/dcmtk/ofstd/diag/vsprfw.def \ diff -Nru dcmtk-3.6.6/dcmjpeg/apps/CMakeLists.txt dcmtk-3.6.7/dcmjpeg/apps/CMakeLists.txt --- dcmtk-3.6.6/dcmjpeg/apps/CMakeLists.txt 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmjpeg/apps/CMakeLists.txt 2022-04-28 13:47:25.000000000 +0000 @@ -3,7 +3,7 @@ # declare executables foreach(PROGRAM dcmcjpeg dcmdjpeg dcmj2pnm dcmmkdir) - DCMTK_ADD_EXECUTABLE(${PROGRAM} ${PROGRAM}) + DCMTK_ADD_EXECUTABLE(${PROGRAM} ${PROGRAM}.cc) endforeach() # make sure executables are linked to the corresponding libraries diff -Nru dcmtk-3.6.6/dcmjpeg/apps/dcmcjpeg.cc dcmtk-3.6.7/dcmjpeg/apps/dcmcjpeg.cc --- dcmtk-3.6.6/dcmjpeg/apps/dcmcjpeg.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmjpeg/apps/dcmcjpeg.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2001-2018, OFFIS e.V. + * Copyright (C) 2001-2021, 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 */ -#define INCLUDE_CSTDLIB -#define INCLUDE_CSTDIO -#define INCLUDE_CSTRING -#include "dcmtk/ofstd/ofstdinc.h" #include "dcmtk/dcmdata/dctk.h" #include "dcmtk/dcmdata/cmdlnarg.h" diff -Nru dcmtk-3.6.6/dcmjpeg/apps/dcmdjpeg.cc dcmtk-3.6.7/dcmjpeg/apps/dcmdjpeg.cc --- dcmtk-3.6.6/dcmjpeg/apps/dcmdjpeg.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmjpeg/apps/dcmdjpeg.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2001-2020, OFFIS e.V. + * Copyright (C) 2001-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -21,11 +21,6 @@ #include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ -#define INCLUDE_CSTDLIB -#define INCLUDE_CSTDIO -#define INCLUDE_CSTRING -#include "dcmtk/ofstd/ofstdinc.h" - #include "dcmtk/dcmdata/dctk.h" #include "dcmtk/dcmdata/cmdlnarg.h" #include "dcmtk/ofstd/ofconapp.h" diff -Nru dcmtk-3.6.6/dcmjpeg/apps/Makefile.dep dcmtk-3.6.7/dcmjpeg/apps/Makefile.dep --- dcmtk-3.6.6/dcmjpeg/apps/Makefile.dep 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmjpeg/apps/Makefile.dep 2022-04-28 13:47:25.000000000 +0000 @@ -1,5 +1,4 @@ dcmcjpeg.o: dcmcjpeg.cc ../../config/include/dcmtk/config/osconfig.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../dcmdata/include/dcmtk/dcmdata/dctk.h \ ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \ ../../oflog/include/dcmtk/oflog/oflog.h \ @@ -8,6 +7,7 @@ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../oflog/include/dcmtk/oflog/config/defines.h \ ../../oflog/include/dcmtk/oflog/helpers/threadcf.h \ ../../oflog/include/dcmtk/oflog/loglevel.h \ @@ -128,7 +128,6 @@ ../../dcmimgle/include/dcmtk/dcmimgle/diregbas.h \ ../../dcmimage/include/dcmtk/dcmimage/dicdefin.h dcmdjpeg.o: dcmdjpeg.cc ../../config/include/dcmtk/config/osconfig.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../dcmdata/include/dcmtk/dcmdata/dctk.h \ ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \ ../../oflog/include/dcmtk/oflog/oflog.h \ @@ -137,6 +136,7 @@ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../oflog/include/dcmtk/oflog/config/defines.h \ ../../oflog/include/dcmtk/oflog/helpers/threadcf.h \ ../../oflog/include/dcmtk/oflog/loglevel.h \ @@ -253,7 +253,6 @@ ../../dcmimgle/include/dcmtk/dcmimgle/diplugin.h dcmj2pnm.o: dcmj2pnm.cc ../../dcmimage/apps/dcm2pnm.cc \ ../../config/include/dcmtk/config/osconfig.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../dcmdata/include/dcmtk/dcmdata/dctk.h \ ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \ ../../oflog/include/dcmtk/oflog/oflog.h \ @@ -262,6 +261,7 @@ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../oflog/include/dcmtk/oflog/config/defines.h \ ../../oflog/include/dcmtk/oflog/helpers/threadcf.h \ ../../oflog/include/dcmtk/oflog/loglevel.h \ diff -Nru dcmtk-3.6.6/dcmjpeg/docs/dcmcjpeg.man dcmtk-3.6.7/dcmjpeg/docs/dcmcjpeg.man --- dcmtk-3.6.6/dcmjpeg/docs/dcmcjpeg.man 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmjpeg/docs/dcmcjpeg.man 2022-04-28 13:47:25.000000000 +0000 @@ -148,7 +148,7 @@ +tl --true-lossless true lossless codec (default) - # This option selects an encoder, that guarantees truely lossless + # This option selects an encoder, that guarantees truly lossless # image compression. See NOTES for further information. +pl --pseudo-lossless @@ -701,6 +701,6 @@ \section dcmcjpeg_copyright COPYRIGHT -Copyright (C) 2001-2018 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany. +Copyright (C) 2001-2022 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany. */ diff -Nru dcmtk-3.6.6/dcmjpeg/docs/dcmdjpeg.man dcmtk-3.6.7/dcmjpeg/docs/dcmdjpeg.man --- dcmtk-3.6.6/dcmjpeg/docs/dcmdjpeg.man 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmjpeg/docs/dcmdjpeg.man 2022-04-28 13:47:25.000000000 +0000 @@ -344,6 +344,6 @@ \section dcmdjpeg_copyright COPYRIGHT -Copyright (C) 2001-2019 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany. +Copyright (C) 2001-2022 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany. */ diff -Nru dcmtk-3.6.6/dcmjpeg/docs/dcmj2pnm.man dcmtk-3.6.7/dcmjpeg/docs/dcmj2pnm.man --- dcmtk-3.6.6/dcmjpeg/docs/dcmj2pnm.man 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmjpeg/docs/dcmj2pnm.man 2022-04-28 13:47:25.000000000 +0000 @@ -476,8 +476,7 @@ The \e --write-tiff option is only available when DCMTK has been configured and compiled with support for the external \b libtiff TIFF library. The availability of the TIFF compression options depends on the \b libtiff -configuration. In particular, the patented LZW algorithm may not be -available. +configuration. The \e --write-png option is only available when DCMTK has been configured and compiled with support for the external \b libpng PNG library. Option @@ -574,6 +573,6 @@ \section dcmj2pnm_copyright COPYRIGHT -Copyright (C) 2001-2020 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany. +Copyright (C) 2001-2022 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany. */ diff -Nru dcmtk-3.6.6/dcmjpeg/docs/dcmmkdir.man dcmtk-3.6.7/dcmjpeg/docs/dcmmkdir.man --- dcmtk-3.6.6/dcmjpeg/docs/dcmmkdir.man 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmjpeg/docs/dcmmkdir.man 2022-04-28 13:47:25.000000000 +0000 @@ -477,6 +477,6 @@ \section dcmmkdir_copyright COPYRIGHT -Copyright (C) 2001-2016 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany. +Copyright (C) 2001-2022 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany. */ diff -Nru dcmtk-3.6.6/dcmjpeg/include/dcmtk/dcmjpeg/djcodece.h dcmtk-3.6.7/dcmjpeg/include/dcmtk/dcmjpeg/djcodece.h --- dcmtk-3.6.6/dcmjpeg/include/dcmtk/dcmjpeg/djcodece.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmjpeg/include/dcmtk/dcmjpeg/djcodece.h 2022-04-28 13:47:25.000000000 +0000 @@ -359,7 +359,7 @@ * @param ratio image compression ratio. This is not the "quality factor" * but the real effective ratio between compressed and uncompressed image, * i. e. 30 means a 30:1 lossy compression. - * @param derivation description returned in this + * @param derivationDescription derivation description returned in this * parameter which is initially empty */ virtual void createDerivationDescription( diff -Nru dcmtk-3.6.6/dcmjpeg/include/dcmtk/dcmjpeg/djcparam.h dcmtk-3.6.7/dcmjpeg/include/dcmtk/dcmjpeg/djcparam.h --- dcmtk-3.6.6/dcmjpeg/include/dcmtk/dcmjpeg/djcparam.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmjpeg/include/dcmtk/dcmjpeg/djcparam.h 2022-04-28 13:47:25.000000000 +0000 @@ -141,7 +141,7 @@ } /** returns maximum fragment size (in kbytes) for compression, 0 for unlimited. - * @returnmaximum fragment size for compression + * @return maximum fragment size for compression */ Uint32 getFragmentSize() const { diff -Nru dcmtk-3.6.6/dcmjpeg/include/dcmtk/dcmjpeg/djencbas.h dcmtk-3.6.7/dcmjpeg/include/dcmtk/dcmjpeg/djencbas.h --- dcmtk-3.6.6/dcmjpeg/include/dcmtk/dcmjpeg/djencbas.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmjpeg/include/dcmtk/dcmjpeg/djencbas.h 2022-04-28 13:47:25.000000000 +0000 @@ -59,7 +59,7 @@ * @param ratio image compression ratio. This is not the "quality factor" * but the real effective ratio between compressed and uncompressed image, * i. e. 30 means a 30:1 lossy compression. - * @param imageComments image comments returned in this + * @param derivationDescription derivation description returned in this * parameter which is initially empty */ virtual void createDerivationDescription( diff -Nru dcmtk-3.6.6/dcmjpeg/include/dcmtk/dcmjpeg/djencext.h dcmtk-3.6.7/dcmjpeg/include/dcmtk/dcmjpeg/djencext.h --- dcmtk-3.6.6/dcmjpeg/include/dcmtk/dcmjpeg/djencext.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmjpeg/include/dcmtk/dcmjpeg/djencext.h 2022-04-28 13:47:25.000000000 +0000 @@ -59,7 +59,7 @@ * @param ratio image compression ratio. This is not the "quality factor" * but the real effective ratio between compressed and uncompressed image, * i. e. 30 means a 30:1 lossy compression. - * @param imageComments image comments returned in this + * @param derivationDescription derivation description returned in this * parameter which is initially empty */ virtual void createDerivationDescription( diff -Nru dcmtk-3.6.6/dcmjpeg/include/dcmtk/dcmjpeg/djenclol.h dcmtk-3.6.7/dcmjpeg/include/dcmtk/dcmjpeg/djenclol.h --- dcmtk-3.6.6/dcmjpeg/include/dcmtk/dcmjpeg/djenclol.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmjpeg/include/dcmtk/dcmjpeg/djenclol.h 2022-04-28 13:47:25.000000000 +0000 @@ -59,7 +59,7 @@ * @param ratio image compression ratio. This is not the "quality factor" * but the real effective ratio between compressed and uncompressed image, * i. e. 30 means a 30:1 lossy compression. - * @param imageComments image comments returned in this + * @param derivationDescription derivation description returned in this * parameter which is initially empty */ virtual void createDerivationDescription( diff -Nru dcmtk-3.6.6/dcmjpeg/include/dcmtk/dcmjpeg/djencpro.h dcmtk-3.6.7/dcmjpeg/include/dcmtk/dcmjpeg/djencpro.h --- dcmtk-3.6.6/dcmjpeg/include/dcmtk/dcmjpeg/djencpro.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmjpeg/include/dcmtk/dcmjpeg/djencpro.h 2022-04-28 13:47:25.000000000 +0000 @@ -59,7 +59,7 @@ * @param ratio image compression ratio. This is not the "quality factor" * but the real effective ratio between compressed and uncompressed image, * i. e. 30 means a 30:1 lossy compression. - * @param imageComments image comments returned in this + * @param derivationDescription derivation description returned in this * parameter which is initially empty */ virtual void createDerivationDescription( diff -Nru dcmtk-3.6.6/dcmjpeg/include/dcmtk/dcmjpeg/djencsps.h dcmtk-3.6.7/dcmjpeg/include/dcmtk/dcmjpeg/djencsps.h --- dcmtk-3.6.6/dcmjpeg/include/dcmtk/dcmjpeg/djencsps.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmjpeg/include/dcmtk/dcmjpeg/djencsps.h 2022-04-28 13:47:25.000000000 +0000 @@ -59,7 +59,7 @@ * @param ratio image compression ratio. This is not the "quality factor" * but the real effective ratio between compressed and uncompressed image, * i. e. 30 means a 30:1 lossy compression. - * @param imageComments image comments returned in this + * @param derivationDescription derivation description returned in this * parameter which is initially empty */ virtual void createDerivationDescription( diff -Nru dcmtk-3.6.6/dcmjpeg/include/dcmtk/dcmjpeg/djencsv1.h dcmtk-3.6.7/dcmjpeg/include/dcmtk/dcmjpeg/djencsv1.h --- dcmtk-3.6.6/dcmjpeg/include/dcmtk/dcmjpeg/djencsv1.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmjpeg/include/dcmtk/dcmjpeg/djencsv1.h 2022-04-28 13:47:25.000000000 +0000 @@ -59,7 +59,7 @@ * @param ratio image compression ratio. This is not the "quality factor" * but the real effective ratio between compressed and uncompressed image, * i. e. 30 means a 30:1 lossy compression. - * @param imageComments image comments returned in this + * @param derivationDescription derivation description returned in this * parameter which is initially empty */ virtual void createDerivationDescription( diff -Nru dcmtk-3.6.6/dcmjpeg/libijg12/CMakeLists.txt dcmtk-3.6.7/dcmjpeg/libijg12/CMakeLists.txt --- dcmtk-3.6.6/dcmjpeg/libijg12/CMakeLists.txt 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmjpeg/libijg12/CMakeLists.txt 2022-04-28 13:47:25.000000000 +0000 @@ -1,2 +1,67 @@ # create library from source files -DCMTK_ADD_LIBRARY(ijg12 jaricom jcapimin jcapistd jcarith jccoefct jccolor jcdctmgr jcdiffct jchuff jcinit jclhuff jclossls jclossy jcmainct jcmarker jcmaster jcodec jcomapi jcparam jcphuff jcpred jcprepct jcsample jcscale jcshuff jctrans jdapimin jdapistd jdarith jdatadst jdatasrc jdcoefct jdcolor jddctmgr jddiffct jdhuff jdinput jdlhuff jdlossls jdlossy jdmainct jdmarker jdmaster jdmerge jdphuff jdpostct jdpred jdsample jdscale jdshuff jdtrans jerror jfdctflt jfdctfst jfdctint jidctflt jidctfst jidctint jidctred jmemmgr jmemnobs jquant1 jquant2 jutils) +DCMTK_ADD_LIBRARY(ijg12 + jaricom.c + jcapimin.c + jcapistd.c + jcarith.c + jccoefct.c + jccolor.c + jcdctmgr.c + jcdiffct.c + jchuff.c + jcinit.c + jclhuff.c + jclossls.c + jclossy.c + jcmainct.c + jcmarker.c + jcmaster.c + jcodec.c + jcomapi.c + jcparam.c + jcphuff.c + jcpred.c + jcprepct.c + jcsample.c + jcscale.c + jcshuff.c + jctrans.c + jdapimin.c + jdapistd.c + jdarith.c + jdatadst.c + jdatasrc.c + jdcoefct.c + jdcolor.c + jddctmgr.c + jddiffct.c + jdhuff.c + jdinput.c + jdlhuff.c + jdlossls.c + jdlossy.c + jdmainct.c + jdmarker.c + jdmaster.c + jdmerge.c + jdphuff.c + jdpostct.c + jdpred.c + jdsample.c + jdscale.c + jdshuff.c + jdtrans.c + jerror.c + jfdctflt.c + jfdctfst.c + jfdctint.c + jidctflt.c + jidctfst.c + jidctint.c + jidctred.c + jmemmgr.c + jmemnobs.c + jquant1.c + jquant2.c + jutils.c +) diff -Nru dcmtk-3.6.6/dcmjpeg/libijg12/jccoefct.c dcmtk-3.6.7/dcmjpeg/libijg12/jccoefct.c --- dcmtk-3.6.6/dcmjpeg/libijg12/jccoefct.c 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmjpeg/libijg12/jccoefct.c 2022-04-28 13:47:25.000000000 +0000 @@ -343,6 +343,7 @@ METHODDEF(boolean) compress_output (j_compress_ptr cinfo, JSAMPIMAGE input_buf) { + (void)input_buf; j_lossy_c_ptr lossyc = (j_lossy_c_ptr) cinfo->codec; c_coef_ptr coef = (c_coef_ptr) lossyc->coef_private; JDIMENSION MCU_col_num; /* index of current MCU within row */ @@ -414,7 +415,7 @@ coef = (c_coef_ptr) (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, SIZEOF(c_coef_controller)); - lossyc->coef_private = (struct jpeg_c_coef_controller *) coef; + lossyc->coef_private = (void *) coef; lossyc->coef_start_pass = start_pass_coef; /* Create the coefficient buffer. */ diff -Nru dcmtk-3.6.6/dcmjpeg/libijg12/jccolor.c dcmtk-3.6.7/dcmjpeg/libijg12/jccolor.c --- dcmtk-3.6.6/dcmjpeg/libijg12/jccolor.c 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmjpeg/libijg12/jccolor.c 2022-04-28 13:47:25.000000000 +0000 @@ -340,6 +340,7 @@ METHODDEF(void) null_method (j_compress_ptr cinfo) { + (void) cinfo; /* no work needed */ } diff -Nru dcmtk-3.6.6/dcmjpeg/libijg12/jcdctmgr.c dcmtk-3.6.7/dcmjpeg/libijg12/jcdctmgr.c --- dcmtk-3.6.6/dcmjpeg/libijg12/jcdctmgr.c 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmjpeg/libijg12/jcdctmgr.c 2022-04-28 13:47:25.000000000 +0000 @@ -353,7 +353,7 @@ fdct = (fdct_ptr) (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, SIZEOF(fdct_controller)); - lossyc->fdct_private = (struct jpeg_forward_dct *) fdct; + lossyc->fdct_private = (void *) fdct; lossyc->fdct_start_pass = start_pass_fdctmgr; switch (cinfo->dct_method) { diff -Nru dcmtk-3.6.6/dcmjpeg/libijg12/jcdiffct.c dcmtk-3.6.7/dcmjpeg/libijg12/jcdiffct.c --- dcmtk-3.6.6/dcmjpeg/libijg12/jcdiffct.c 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmjpeg/libijg12/jcdiffct.c 2022-04-28 13:47:25.000000000 +0000 @@ -302,6 +302,7 @@ METHODDEF(boolean) compress_output (j_compress_ptr cinfo, JSAMPIMAGE input_buf) { + (void)input_buf; j_lossless_c_ptr losslsc = (j_lossless_c_ptr) cinfo->codec; c_diff_ptr diff = (c_diff_ptr) losslsc->diff_private; /* JDIMENSION MCU_col_num; */ /* index of current MCU within row */ diff -Nru dcmtk-3.6.6/dcmjpeg/libijg12/jclhuff.c dcmtk-3.6.7/dcmjpeg/libijg12/jclhuff.c --- dcmtk-3.6.6/dcmjpeg/libijg12/jclhuff.c 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmjpeg/libijg12/jclhuff.c 2022-04-28 13:47:25.000000000 +0000 @@ -569,6 +569,7 @@ METHODDEF(boolean) need_optimization_pass (j_compress_ptr cinfo) { + (void)cinfo; return TRUE; } @@ -587,7 +588,7 @@ entropy = (lhuff_entropy_ptr) (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, SIZEOF(lhuff_entropy_encoder)); - losslsc->entropy_private = (struct jpeg_entropy_encoder *) entropy; + losslsc->entropy_private = (void *) entropy; losslsc->pub.entropy_start_pass = start_pass_huff; losslsc->pub.need_optimization_pass = need_optimization_pass; diff -Nru dcmtk-3.6.6/dcmjpeg/libijg12/jcmarker.c dcmtk-3.6.7/dcmjpeg/libijg12/jcmarker.c --- dcmtk-3.6.6/dcmjpeg/libijg12/jcmarker.c 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmjpeg/libijg12/jcmarker.c 2022-04-28 13:47:25.000000000 +0000 @@ -224,6 +224,7 @@ /* Since the useful info is so small, we want to emit all the tables in */ /* one DAC marker. Therefore this routine does its own scan of the table. */ { + (void)cinfo; #ifdef C_ARITH_CODING_SUPPORTED char dc_in_use[NUM_ARITH_TBLS]; char ac_in_use[NUM_ARITH_TBLS]; diff -Nru dcmtk-3.6.6/dcmjpeg/libijg12/jcphuff.c dcmtk-3.6.7/dcmjpeg/libijg12/jcphuff.c --- dcmtk-3.6.6/dcmjpeg/libijg12/jcphuff.c 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmjpeg/libijg12/jcphuff.c 2022-04-28 13:47:25.000000000 +0000 @@ -833,7 +833,7 @@ entropy = (phuff_entropy_ptr) (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, SIZEOF(phuff_entropy_encoder)); - lossyc->entropy_private = (struct jpeg_entropy_encoder *) entropy; + lossyc->entropy_private = (void *) entropy; lossyc->pub.entropy_start_pass = start_pass_phuff; lossyc->pub.need_optimization_pass = need_optimization_pass; diff -Nru dcmtk-3.6.6/dcmjpeg/libijg12/jcpred.c dcmtk-3.6.7/dcmjpeg/libijg12/jcpred.c --- dcmtk-3.6.6/dcmjpeg/libijg12/jcpred.c 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmjpeg/libijg12/jcpred.c 2022-04-28 13:47:25.000000000 +0000 @@ -213,6 +213,7 @@ const JSAMPROW input_buf, JSAMPROW prev_row, JDIFFROW diff_buf, JDIMENSION width) { + (void)prev_row; DIFFERENCE_1D(INITIAL_PREDICTORx); /* diff -Nru dcmtk-3.6.6/dcmjpeg/libijg12/jcsample.c dcmtk-3.6.7/dcmjpeg/libijg12/jcsample.c --- dcmtk-3.6.6/dcmjpeg/libijg12/jcsample.c 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmjpeg/libijg12/jcsample.c 2022-04-28 13:47:25.000000000 +0000 @@ -74,6 +74,7 @@ METHODDEF(void) start_pass_downsample (j_compress_ptr cinfo) { + (void)cinfo; /* no work for now */ } diff -Nru dcmtk-3.6.6/dcmjpeg/libijg12/jcscale.c dcmtk-3.6.7/dcmjpeg/libijg12/jcscale.c --- dcmtk-3.6.6/dcmjpeg/libijg12/jcscale.c 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmjpeg/libijg12/jcscale.c 2022-04-28 13:47:25.000000000 +0000 @@ -34,6 +34,7 @@ noscale(j_compress_ptr cinfo, JSAMPROW input_buf, JSAMPROW output_buf, JDIMENSION width) { + (void)cinfo; MEMCOPY(output_buf, input_buf, width * SIZEOF(JSAMPLE)); return; } diff -Nru dcmtk-3.6.6/dcmjpeg/libijg12/jcshuff.c dcmtk-3.6.7/dcmjpeg/libijg12/jcshuff.c --- dcmtk-3.6.6/dcmjpeg/libijg12/jcshuff.c 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmjpeg/libijg12/jcshuff.c 2022-04-28 13:47:25.000000000 +0000 @@ -629,6 +629,7 @@ METHODDEF(boolean) need_optimization_pass (j_compress_ptr cinfo) { + (void)cinfo; return TRUE; } @@ -647,7 +648,7 @@ entropy = (shuff_entropy_ptr) (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, SIZEOF(shuff_entropy_encoder)); - lossyc->entropy_private = (struct jpeg_entropy_encoder *) entropy; + lossyc->entropy_private = (void *) entropy; lossyc->pub.entropy_start_pass = start_pass_huff; lossyc->pub.need_optimization_pass = need_optimization_pass; diff -Nru dcmtk-3.6.6/dcmjpeg/libijg12/jctrans.c dcmtk-3.6.7/dcmjpeg/libijg12/jctrans.c --- dcmtk-3.6.6/dcmjpeg/libijg12/jctrans.c 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmjpeg/libijg12/jctrans.c 2022-04-28 13:47:25.000000000 +0000 @@ -267,6 +267,7 @@ METHODDEF(boolean) compress_output (j_compress_ptr cinfo, JSAMPIMAGE input_buf) { + (void)input_buf; j_lossy_c_ptr lossyc = (j_lossy_c_ptr) cinfo->codec; c_coef_ptr coef = (c_coef_ptr) lossyc->coef_private; JDIMENSION MCU_col_num; /* index of current MCU within row */ @@ -362,7 +363,7 @@ coef = (c_coef_ptr) (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, SIZEOF(c_coef_controller)); - lossyc->coef_private = (struct jpeg_c_coef_controller *) coef; + lossyc->coef_private = (void *) coef; /* Save pointer to virtual arrays */ coef->whole_image = coef_arrays; diff -Nru dcmtk-3.6.6/dcmjpeg/libijg12/jdatasrc.c dcmtk-3.6.7/dcmjpeg/libijg12/jdatasrc.c --- dcmtk-3.6.6/dcmjpeg/libijg12/jdatasrc.c 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmjpeg/libijg12/jdatasrc.c 2022-04-28 13:47:25.000000000 +0000 @@ -168,6 +168,7 @@ METHODDEF(void) term_source (j_decompress_ptr cinfo) { + (void)cinfo; /* no work necessary here */ } diff -Nru dcmtk-3.6.6/dcmjpeg/libijg12/jdcoefct.c dcmtk-3.6.7/dcmjpeg/libijg12/jdcoefct.c --- dcmtk-3.6.6/dcmjpeg/libijg12/jdcoefct.c 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmjpeg/libijg12/jdcoefct.c 2022-04-28 13:47:25.000000000 +0000 @@ -229,6 +229,7 @@ METHODDEF(int) dummy_consume_data (j_decompress_ptr cinfo) { + (void)cinfo; return JPEG_SUSPENDED; /* Always indicate nothing was done */ } diff -Nru dcmtk-3.6.6/dcmjpeg/libijg12/jdcolor.c dcmtk-3.6.7/dcmjpeg/libijg12/jdcolor.c --- dcmtk-3.6.6/dcmjpeg/libijg12/jdcolor.c 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmjpeg/libijg12/jdcolor.c 2022-04-28 13:47:25.000000000 +0000 @@ -309,6 +309,7 @@ METHODDEF(void) start_pass_dcolor (j_decompress_ptr cinfo) { + (void)cinfo; /* no work needed */ } diff -Nru dcmtk-3.6.6/dcmjpeg/libijg12/jddiffct.c dcmtk-3.6.7/dcmjpeg/libijg12/jddiffct.c --- dcmtk-3.6.6/dcmjpeg/libijg12/jddiffct.c 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmjpeg/libijg12/jddiffct.c 2022-04-28 13:47:25.000000000 +0000 @@ -238,6 +238,7 @@ METHODDEF(int) dummy_consume_data (j_decompress_ptr cinfo) { + (void)cinfo; return JPEG_SUSPENDED; /* Always indicate nothing was done */ } diff -Nru dcmtk-3.6.6/dcmjpeg/libijg12/jdhuff.c dcmtk-3.6.7/dcmjpeg/libijg12/jdhuff.c --- dcmtk-3.6.6/dcmjpeg/libijg12/jdhuff.c 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmjpeg/libijg12/jdhuff.c 2022-04-28 13:47:25.000000000 +0000 @@ -138,7 +138,11 @@ for (i = 0; i < numsymbols; i++) { int sym = htbl->huffval[i]; if (sym < 0 || sym > 16) +#ifdef DCMTK_ENABLE_STRICT_HUFFMAN_TABLE_CHECK ERREXIT(cinfo, JERR_BAD_HUFF_TABLE); +#else + TRACEMS1(cinfo, 1, JTRC_UNOPT_HUFF_TABLE, sym); +#endif } } } diff -Nru dcmtk-3.6.6/dcmjpeg/libijg12/jdmarker.c dcmtk-3.6.7/dcmjpeg/libijg12/jdmarker.c --- dcmtk-3.6.6/dcmjpeg/libijg12/jdmarker.c 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmjpeg/libijg12/jdmarker.c 2022-04-28 13:47:25.000000000 +0000 @@ -344,6 +344,12 @@ TRACEMS3(cinfo, 1, JTRC_SOS_COMPONENT, cc, compptr->dc_tbl_no, compptr->ac_tbl_no); + + /* This CSi (cc) should differ from the previous CSi */ + for (ci = 0; ci < i; ci++) { + if (cinfo->cur_comp_info[ci] == compptr) + ERREXIT1(cinfo, JERR_BAD_COMPONENT_ID, cc); + } } /* Collect the additional scan parameters Ss, Se, Ah/Al. */ diff -Nru dcmtk-3.6.6/dcmjpeg/libijg12/jdmerge.c dcmtk-3.6.7/dcmjpeg/libijg12/jdmerge.c --- dcmtk-3.6.6/dcmjpeg/libijg12/jdmerge.c 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmjpeg/libijg12/jdmerge.c 2022-04-28 13:47:25.000000000 +0000 @@ -148,6 +148,7 @@ JDIMENSION out_rows_avail) /* 2:1 vertical sampling case: may need a spare row. */ { + (void) in_row_groups_avail; my_upsample_ptr upsample = (my_upsample_ptr) cinfo->upsample; JSAMPROW work_ptrs[2]; JDIMENSION num_rows; /* number of rows returned to caller */ @@ -197,6 +198,8 @@ JDIMENSION out_rows_avail) /* 1:1 vertical sampling case: much easier, never need a spare row. */ { + (void) in_row_groups_avail; + (void) out_rows_avail; my_upsample_ptr upsample = (my_upsample_ptr) cinfo->upsample; /* Just do the upsampling. */ diff -Nru dcmtk-3.6.6/dcmjpeg/libijg12/jdpostct.c dcmtk-3.6.7/dcmjpeg/libijg12/jdpostct.c --- dcmtk-3.6.6/dcmjpeg/libijg12/jdpostct.c 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmjpeg/libijg12/jdpostct.c 2022-04-28 13:47:25.000000000 +0000 @@ -161,6 +161,8 @@ JSAMPARRAY output_buf, JDIMENSION *out_row_ctr, JDIMENSION out_rows_avail) { + (void) output_buf; + (void) out_rows_avail; my_post_ptr post = (my_post_ptr) cinfo->post; JDIMENSION old_next_row, num_rows; @@ -205,6 +207,10 @@ JSAMPARRAY output_buf, JDIMENSION *out_row_ctr, JDIMENSION out_rows_avail) { + (void) input_buf; + (void) in_row_group_ctr; + (void) in_row_groups_avail; + my_post_ptr post = (my_post_ptr) cinfo->post; JDIMENSION num_rows, max_rows; diff -Nru dcmtk-3.6.6/dcmjpeg/libijg12/jdpred.c dcmtk-3.6.7/dcmjpeg/libijg12/jdpred.c --- dcmtk-3.6.6/dcmjpeg/libijg12/jdpred.c 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmjpeg/libijg12/jdpred.c 2022-04-28 13:47:25.000000000 +0000 @@ -101,6 +101,8 @@ const JDIFFROW diff_buf, const JDIFFROW prev_row, JDIFFROW undiff_buf, JDIMENSION width) { + (void)cinfo; + (void)comp_index; UNDIFFERENCE_1D(INITIAL_PREDICTOR2); } @@ -109,6 +111,8 @@ const JDIFFROW diff_buf, const JDIFFROW prev_row, JDIFFROW undiff_buf, JDIMENSION width) { + (void)cinfo; + (void)comp_index; UNDIFFERENCE_2D(PREDICTOR2); JPEG_UNUSED(Rc); JPEG_UNUSED(Rb); @@ -119,6 +123,8 @@ const JDIFFROW diff_buf, const JDIFFROW prev_row, JDIFFROW undiff_buf, JDIMENSION width) { + (void)cinfo; + (void)comp_index; UNDIFFERENCE_2D(PREDICTOR3); JPEG_UNUSED(Rc); JPEG_UNUSED(Rb); @@ -129,6 +135,8 @@ const JDIFFROW diff_buf, const JDIFFROW prev_row, JDIFFROW undiff_buf, JDIMENSION width) { + (void)cinfo; + (void)comp_index; UNDIFFERENCE_2D(PREDICTOR4); JPEG_UNUSED(Rc); JPEG_UNUSED(Rb); @@ -139,6 +147,8 @@ const JDIFFROW diff_buf, const JDIFFROW prev_row, JDIFFROW undiff_buf, JDIMENSION width) { + (void)cinfo; + (void)comp_index; SHIFT_TEMPS UNDIFFERENCE_2D(PREDICTOR5); JPEG_UNUSED(Rc); @@ -150,6 +160,8 @@ const JDIFFROW diff_buf, const JDIFFROW prev_row, JDIFFROW undiff_buf, JDIMENSION width) { + (void)cinfo; + (void)comp_index; SHIFT_TEMPS UNDIFFERENCE_2D(PREDICTOR6); JPEG_UNUSED(Rc); @@ -161,6 +173,8 @@ const JDIFFROW diff_buf, const JDIFFROW prev_row, JDIFFROW undiff_buf, JDIMENSION width) { + (void)cinfo; + (void)comp_index; SHIFT_TEMPS UNDIFFERENCE_2D(PREDICTOR7); JPEG_UNUSED(Rc); @@ -180,6 +194,8 @@ const JDIFFROW diff_buf, JDIFFROW prev_row, JDIFFROW undiff_buf, JDIMENSION width) { + + (void)prev_row; j_lossless_d_ptr losslsd = (j_lossless_d_ptr) cinfo->codec; UNDIFFERENCE_1D(INITIAL_PREDICTORx); diff -Nru dcmtk-3.6.6/dcmjpeg/libijg12/jdsample.c dcmtk-3.6.7/dcmjpeg/libijg12/jdsample.c --- dcmtk-3.6.6/dcmjpeg/libijg12/jdsample.c 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmjpeg/libijg12/jdsample.c 2022-04-28 13:47:25.000000000 +0000 @@ -92,6 +92,7 @@ JSAMPARRAY output_buf, JDIMENSION *out_row_ctr, JDIMENSION out_rows_avail) { + (void)in_row_groups_avail; my_upsample_ptr upsample = (my_upsample_ptr) cinfo->upsample; int ci; jpeg_component_info * compptr; @@ -157,6 +158,8 @@ fullsize_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr, JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr) { + (void)cinfo; + (void)compptr; *output_data_ptr = input_data; } @@ -170,6 +173,9 @@ noop_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr, JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr) { + (void)cinfo; + (void)compptr; + (void)input_data; *output_data_ptr = NULL; /* safety check */ } @@ -233,6 +239,7 @@ h2v1_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr, JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr) { + (void)compptr; JSAMPARRAY output_data = *output_data_ptr; register JSAMPROW inptr, outptr; register JSAMPLE invalue; @@ -261,6 +268,7 @@ h2v2_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr, JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr) { + (void)compptr; JSAMPARRAY output_data = *output_data_ptr; register JSAMPROW inptr, outptr; register JSAMPLE invalue; diff -Nru dcmtk-3.6.6/dcmjpeg/libijg12/jdscale.c dcmtk-3.6.7/dcmjpeg/libijg12/jdscale.c --- dcmtk-3.6.6/dcmjpeg/libijg12/jdscale.c 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmjpeg/libijg12/jdscale.c 2022-04-28 13:47:25.000000000 +0000 @@ -67,6 +67,7 @@ const JDIFFROW diff_buf, JSAMPROW output_buf, JDIMENSION width) { + (void)cinfo; unsigned int xindex; for (xindex = 0; xindex < width; xindex++) diff -Nru dcmtk-3.6.6/dcmjpeg/libijg12/jerror12.h dcmtk-3.6.7/dcmjpeg/libijg12/jerror12.h --- dcmtk-3.6.6/dcmjpeg/libijg12/jerror12.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmjpeg/libijg12/jerror12.h 2022-04-28 13:47:25.000000000 +0000 @@ -181,6 +181,7 @@ "Unrecognized component IDs %d %d %d, assuming RGB") JMESSAGE(JTRC_UNKNOWN_LOSSY_IDS, "Unrecognized component IDs %d %d %d, assuming YCbCr") +JMESSAGE(JTRC_UNOPT_HUFF_TABLE, "Symbol %d indicates un-optimized Huffman table") JMESSAGE(JTRC_XMS_CLOSE, "Freed XMS handle %u") JMESSAGE(JTRC_XMS_OPEN, "Obtained XMS handle %u") JMESSAGE(JWRN_ADOBE_XFORM, "Unknown Adobe color transform code %d") diff -Nru dcmtk-3.6.6/dcmjpeg/libijg12/jmemmgr.c dcmtk-3.6.7/dcmjpeg/libijg12/jmemmgr.c --- dcmtk-3.6.6/dcmjpeg/libijg12/jmemmgr.c 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmjpeg/libijg12/jmemmgr.c 2022-04-28 13:47:25.000000000 +0000 @@ -29,6 +29,7 @@ #include "jinclude12.h" #include "jpeglib12.h" #include "jmemsys12.h" /* import the system-dependent declarations */ +#include "dcmtk/ofstd/ofdiag.h" /* for DCMTK_DIAGNOSTIC macros */ #ifndef NO_GETENV #ifndef HAVE_STDLIB_H /* should declare getenv() */ @@ -483,8 +484,6 @@ } -#ifdef NEED_DARRAY - /* * Creation of 2-D difference arrays. * This is essentially the same as the code for sample arrays, above. @@ -532,7 +531,6 @@ return result; } -#endif /* @@ -1071,6 +1069,7 @@ jpeg_mem_term(cinfo); /* system-dependent cleanup */ } +#include DCMTK_DIAGNOSTIC_IGNORE_CONST_EXPRESSION_WARNING /* * Memory manager initialization. @@ -1121,9 +1120,7 @@ mem->pub.alloc_large = alloc_large; mem->pub.alloc_sarray = alloc_sarray; mem->pub.alloc_barray = alloc_barray; -#ifdef NEED_DARRAY mem->pub.alloc_darray = alloc_darray; -#endif mem->pub.request_virt_sarray = request_virt_sarray; mem->pub.request_virt_barray = request_virt_barray; mem->pub.realize_virt_arrays = realize_virt_arrays; diff -Nru dcmtk-3.6.6/dcmjpeg/libijg12/jmemnobs.c dcmtk-3.6.7/dcmjpeg/libijg12/jmemnobs.c --- dcmtk-3.6.6/dcmjpeg/libijg12/jmemnobs.c 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmjpeg/libijg12/jmemnobs.c 2022-04-28 13:47:25.000000000 +0000 @@ -34,12 +34,15 @@ GLOBAL(void *) jpeg_get_small (j_common_ptr cinfo, size_t sizeofobject) { + (void) cinfo; return (void *) malloc(sizeofobject); } GLOBAL(void) jpeg_free_small (j_common_ptr cinfo, void * object, size_t sizeofobject) { + (void) cinfo; + (void) sizeofobject; free(object); } @@ -54,12 +57,15 @@ GLOBAL(void FAR *) jpeg_get_large (j_common_ptr cinfo, size_t sizeofobject) { + (void) cinfo; return (void FAR *) malloc(sizeofobject); } GLOBAL(void) jpeg_free_large (j_common_ptr cinfo, void FAR * object, size_t sizeofobject) { + (void) cinfo; + (void) sizeofobject; free(object); } @@ -73,6 +79,9 @@ jpeg_mem_available (j_common_ptr cinfo, long min_bytes_needed, long max_bytes_needed, long already_allocated) { + (void) cinfo; + (void) min_bytes_needed; + (void) already_allocated; return max_bytes_needed; } @@ -87,6 +96,8 @@ jpeg_open_backing_store (j_common_ptr cinfo, backing_store_ptr info, long total_bytes_needed) { + (void) info; + (void) total_bytes_needed; ERREXIT(cinfo, JERR_NO_BACKING_STORE); } @@ -99,11 +110,13 @@ GLOBAL(long) jpeg_mem_init (j_common_ptr cinfo) { + (void) cinfo; return 0; /* just set max_memory_to_use to 0 */ } GLOBAL(void) jpeg_mem_term (j_common_ptr cinfo) { + (void) cinfo; /* no work */ } diff -Nru dcmtk-3.6.6/dcmjpeg/libijg12/jpeglib12.h dcmtk-3.6.7/dcmjpeg/libijg12/jpeglib12.h --- dcmtk-3.6.6/dcmjpeg/libijg12/jpeglib12.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmjpeg/libijg12/jpeglib12.h 2022-04-28 13:47:25.000000000 +0000 @@ -779,15 +779,6 @@ typedef struct jvirt_sarray_control * jvirt_sarray_ptr; typedef struct jvirt_barray_control * jvirt_barray_ptr; - -#ifdef C_LOSSLESS_SUPPORTED -#define NEED_DARRAY -#else -#ifdef D_LOSSLESS_SUPPORTED -#define NEED_DARRAY -#endif -#endif - struct jpeg_memory_mgr { /* Method pointers */ JMETHOD(void *, alloc_small, (j_common_ptr cinfo, int pool_id, @@ -800,11 +791,9 @@ JMETHOD(JBLOCKARRAY, alloc_barray, (j_common_ptr cinfo, int pool_id, JDIMENSION blocksperrow, JDIMENSION numrows)); -#ifdef NEED_DARRAY JMETHOD(JDIFFARRAY, alloc_darray, (j_common_ptr cinfo, int pool_id, JDIMENSION diffsperrow, JDIMENSION numrows)); -#endif JMETHOD(jvirt_sarray_ptr, request_virt_sarray, (j_common_ptr cinfo, int pool_id, boolean pre_zero, diff -Nru dcmtk-3.6.6/dcmjpeg/libijg12/jquant1.c dcmtk-3.6.7/dcmjpeg/libijg12/jquant1.c --- dcmtk-3.6.6/dcmjpeg/libijg12/jquant1.c 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmjpeg/libijg12/jquant1.c 2022-04-28 13:47:25.000000000 +0000 @@ -251,6 +251,8 @@ * (Forcing the upper and lower values to the limits ensures that * dithering can't produce a color outside the selected gamut.) */ + (void) cinfo; + (void) ci; return (int) (((IJG_INT32) j * MAXJSAMPLE + maxj/2) / maxj); } @@ -260,6 +262,8 @@ /* Return largest input value that should map to j'th output value */ /* Must have largest(j=0) >= 0, and largest(j=maxj) >= MAXJSAMPLE */ { + (void) cinfo; + (void) ci; /* Breakpoints are halfway between values returned by output_value */ return (int) (((IJG_INT32) (2*j + 1) * MAXJSAMPLE + maxj) / (2*maxj)); } @@ -740,6 +744,7 @@ METHODDEF(void) start_pass_1_quant (j_decompress_ptr cinfo, boolean is_pre_scan) { + (void) is_pre_scan; my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize; size_t arraysize; int i; @@ -797,6 +802,7 @@ METHODDEF(void) finish_pass_1_quant (j_decompress_ptr cinfo) { + (void) cinfo; /* no work in 1-pass case */ } diff -Nru dcmtk-3.6.6/dcmjpeg/libijg12/jquant2.c dcmtk-3.6.7/dcmjpeg/libijg12/jquant2.c --- dcmtk-3.6.6/dcmjpeg/libijg12/jquant2.c 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmjpeg/libijg12/jquant2.c 2022-04-28 13:47:25.000000000 +0000 @@ -224,6 +224,7 @@ prescan_quantize (j_decompress_ptr cinfo, JSAMPARRAY input_buf, JSAMPARRAY output_buf, int num_rows) { + (void) output_buf; my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize; register JSAMPROW ptr; register histptr histp; @@ -1155,6 +1156,7 @@ METHODDEF(void) finish_pass2 (j_decompress_ptr cinfo) { + (void) cinfo; /* no work */ } diff -Nru dcmtk-3.6.6/dcmjpeg/libijg12/Makefile.dep dcmtk-3.6.7/dcmjpeg/libijg12/Makefile.dep --- dcmtk-3.6.6/dcmjpeg/libijg12/Makefile.dep 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmjpeg/libijg12/Makefile.dep 2022-04-28 13:47:25.000000000 +0000 @@ -211,7 +211,8 @@ jmemmgr.o: jmemmgr.c jinclude12.h jconfig12.h \ ../../config/include/dcmtk/config/osconfig.h jpeglib12.h jmorecfg12.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h jpegint12.h jerror12.h \ - jmemsys12.h + jmemsys12.h ../../ofstd/include/dcmtk/ofstd/ofdiag.h \ + ../../ofstd/include/dcmtk/ofstd/diag/constexp.def jmemnobs.o: jmemnobs.c jinclude12.h jconfig12.h \ ../../config/include/dcmtk/config/osconfig.h jpeglib12.h jmorecfg12.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h jpegint12.h jerror12.h \ diff -Nru dcmtk-3.6.6/dcmjpeg/libijg16/CMakeLists.txt dcmtk-3.6.7/dcmjpeg/libijg16/CMakeLists.txt --- dcmtk-3.6.6/dcmjpeg/libijg16/CMakeLists.txt 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmjpeg/libijg16/CMakeLists.txt 2022-04-28 13:47:25.000000000 +0000 @@ -1,2 +1,67 @@ # create library from source files -DCMTK_ADD_LIBRARY(ijg16 jaricom jcapimin jcapistd jcarith jccoefct jccolor jcdctmgr jcdiffct jchuff jcinit jclhuff jclossls jclossy jcmainct jcmarker jcmaster jcodec jcomapi jcparam jcphuff jcpred jcprepct jcsample jcscale jcshuff jctrans jdapimin jdapistd jdarith jdatadst jdatasrc jdcoefct jdcolor jddctmgr jddiffct jdhuff jdinput jdlhuff jdlossls jdlossy jdmainct jdmarker jdmaster jdmerge jdphuff jdpostct jdpred jdsample jdscale jdshuff jdtrans jerror jfdctflt jfdctfst jfdctint jidctflt jidctfst jidctint jidctred jmemmgr jmemnobs jquant1 jquant2 jutils) +DCMTK_ADD_LIBRARY(ijg16 + jaricom.c + jcapimin.c + jcapistd.c + jcarith.c + jccoefct.c + jccolor.c + jcdctmgr.c + jcdiffct.c + jchuff.c + jcinit.c + jclhuff.c + jclossls.c + jclossy.c + jcmainct.c + jcmarker.c + jcmaster.c + jcodec.c + jcomapi.c + jcparam.c + jcphuff.c + jcpred.c + jcprepct.c + jcsample.c + jcscale.c + jcshuff.c + jctrans.c + jdapimin.c + jdapistd.c + jdarith.c + jdatadst.c + jdatasrc.c + jdcoefct.c + jdcolor.c + jddctmgr.c + jddiffct.c + jdhuff.c + jdinput.c + jdlhuff.c + jdlossls.c + jdlossy.c + jdmainct.c + jdmarker.c + jdmaster.c + jdmerge.c + jdphuff.c + jdpostct.c + jdpred.c + jdsample.c + jdscale.c + jdshuff.c + jdtrans.c + jerror.c + jfdctflt.c + jfdctfst.c + jfdctint.c + jidctflt.c + jidctfst.c + jidctint.c + jidctred.c + jmemmgr.c + jmemnobs.c + jquant1.c + jquant2.c + jutils.c +) diff -Nru dcmtk-3.6.6/dcmjpeg/libijg16/jccoefct.c dcmtk-3.6.7/dcmjpeg/libijg16/jccoefct.c --- dcmtk-3.6.6/dcmjpeg/libijg16/jccoefct.c 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmjpeg/libijg16/jccoefct.c 2022-04-28 13:47:25.000000000 +0000 @@ -343,6 +343,7 @@ METHODDEF(boolean) compress_output (j_compress_ptr cinfo, JSAMPIMAGE input_buf) { + (void)input_buf; j_lossy_c_ptr lossyc = (j_lossy_c_ptr) cinfo->codec; c_coef_ptr coef = (c_coef_ptr) lossyc->coef_private; JDIMENSION MCU_col_num; /* index of current MCU within row */ @@ -414,7 +415,7 @@ coef = (c_coef_ptr) (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, SIZEOF(c_coef_controller)); - lossyc->coef_private = (struct jpeg_c_coef_controller *) coef; + lossyc->coef_private = (void *) coef; lossyc->coef_start_pass = start_pass_coef; /* Create the coefficient buffer. */ diff -Nru dcmtk-3.6.6/dcmjpeg/libijg16/jccolor.c dcmtk-3.6.7/dcmjpeg/libijg16/jccolor.c --- dcmtk-3.6.6/dcmjpeg/libijg16/jccolor.c 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmjpeg/libijg16/jccolor.c 2022-04-28 13:47:25.000000000 +0000 @@ -369,6 +369,7 @@ METHODDEF(void) null_method (j_compress_ptr cinfo) { + (void) cinfo; /* no work needed */ } diff -Nru dcmtk-3.6.6/dcmjpeg/libijg16/jcdctmgr.c dcmtk-3.6.7/dcmjpeg/libijg16/jcdctmgr.c --- dcmtk-3.6.6/dcmjpeg/libijg16/jcdctmgr.c 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmjpeg/libijg16/jcdctmgr.c 2022-04-28 13:47:25.000000000 +0000 @@ -353,7 +353,7 @@ fdct = (fdct_ptr) (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, SIZEOF(fdct_controller)); - lossyc->fdct_private = (struct jpeg_forward_dct *) fdct; + lossyc->fdct_private = (void *) fdct; lossyc->fdct_start_pass = start_pass_fdctmgr; switch (cinfo->dct_method) { diff -Nru dcmtk-3.6.6/dcmjpeg/libijg16/jcdiffct.c dcmtk-3.6.7/dcmjpeg/libijg16/jcdiffct.c --- dcmtk-3.6.6/dcmjpeg/libijg16/jcdiffct.c 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmjpeg/libijg16/jcdiffct.c 2022-04-28 13:47:25.000000000 +0000 @@ -302,6 +302,7 @@ METHODDEF(boolean) compress_output (j_compress_ptr cinfo, JSAMPIMAGE input_buf) { + (void)input_buf; j_lossless_c_ptr losslsc = (j_lossless_c_ptr) cinfo->codec; c_diff_ptr diff = (c_diff_ptr) losslsc->diff_private; /* JDIMENSION MCU_col_num; */ /* index of current MCU within row */ diff -Nru dcmtk-3.6.6/dcmjpeg/libijg16/jclhuff.c dcmtk-3.6.7/dcmjpeg/libijg16/jclhuff.c --- dcmtk-3.6.6/dcmjpeg/libijg16/jclhuff.c 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmjpeg/libijg16/jclhuff.c 2022-04-28 13:47:25.000000000 +0000 @@ -569,6 +569,7 @@ METHODDEF(boolean) need_optimization_pass (j_compress_ptr cinfo) { + (void)cinfo; return TRUE; } @@ -587,7 +588,7 @@ entropy = (lhuff_entropy_ptr) (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, SIZEOF(lhuff_entropy_encoder)); - losslsc->entropy_private = (struct jpeg_entropy_encoder *) entropy; + losslsc->entropy_private = (void *) entropy; losslsc->pub.entropy_start_pass = start_pass_huff; losslsc->pub.need_optimization_pass = need_optimization_pass; diff -Nru dcmtk-3.6.6/dcmjpeg/libijg16/jcmarker.c dcmtk-3.6.7/dcmjpeg/libijg16/jcmarker.c --- dcmtk-3.6.6/dcmjpeg/libijg16/jcmarker.c 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmjpeg/libijg16/jcmarker.c 2022-04-28 13:47:25.000000000 +0000 @@ -224,6 +224,7 @@ /* Since the useful info is so small, we want to emit all the tables in */ /* one DAC marker. Therefore this routine does its own scan of the table. */ { + (void)cinfo; #ifdef C_ARITH_CODING_SUPPORTED char dc_in_use[NUM_ARITH_TBLS]; char ac_in_use[NUM_ARITH_TBLS]; diff -Nru dcmtk-3.6.6/dcmjpeg/libijg16/jcphuff.c dcmtk-3.6.7/dcmjpeg/libijg16/jcphuff.c --- dcmtk-3.6.6/dcmjpeg/libijg16/jcphuff.c 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmjpeg/libijg16/jcphuff.c 2022-04-28 13:47:25.000000000 +0000 @@ -833,7 +833,7 @@ entropy = (phuff_entropy_ptr) (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, SIZEOF(phuff_entropy_encoder)); - lossyc->entropy_private = (struct jpeg_entropy_encoder *) entropy; + lossyc->entropy_private = (void *) entropy; lossyc->pub.entropy_start_pass = start_pass_phuff; lossyc->pub.need_optimization_pass = need_optimization_pass; diff -Nru dcmtk-3.6.6/dcmjpeg/libijg16/jcpred.c dcmtk-3.6.7/dcmjpeg/libijg16/jcpred.c --- dcmtk-3.6.6/dcmjpeg/libijg16/jcpred.c 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmjpeg/libijg16/jcpred.c 2022-04-28 13:47:25.000000000 +0000 @@ -213,6 +213,7 @@ const JSAMPROW input_buf, JSAMPROW prev_row, JDIFFROW diff_buf, JDIMENSION width) { + (void)prev_row; DIFFERENCE_1D(INITIAL_PREDICTORx); /* diff -Nru dcmtk-3.6.6/dcmjpeg/libijg16/jcsample.c dcmtk-3.6.7/dcmjpeg/libijg16/jcsample.c --- dcmtk-3.6.6/dcmjpeg/libijg16/jcsample.c 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmjpeg/libijg16/jcsample.c 2022-04-28 13:47:25.000000000 +0000 @@ -74,6 +74,7 @@ METHODDEF(void) start_pass_downsample (j_compress_ptr cinfo) { + (void)cinfo; /* no work for now */ } diff -Nru dcmtk-3.6.6/dcmjpeg/libijg16/jcscale.c dcmtk-3.6.7/dcmjpeg/libijg16/jcscale.c --- dcmtk-3.6.6/dcmjpeg/libijg16/jcscale.c 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmjpeg/libijg16/jcscale.c 2022-04-28 13:47:25.000000000 +0000 @@ -34,6 +34,7 @@ noscale(j_compress_ptr cinfo, JSAMPROW input_buf, JSAMPROW output_buf, JDIMENSION width) { + (void)cinfo; MEMCOPY(output_buf, input_buf, width * SIZEOF(JSAMPLE)); return; } diff -Nru dcmtk-3.6.6/dcmjpeg/libijg16/jcshuff.c dcmtk-3.6.7/dcmjpeg/libijg16/jcshuff.c --- dcmtk-3.6.6/dcmjpeg/libijg16/jcshuff.c 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmjpeg/libijg16/jcshuff.c 2022-04-28 13:47:25.000000000 +0000 @@ -629,6 +629,7 @@ METHODDEF(boolean) need_optimization_pass (j_compress_ptr cinfo) { + (void)cinfo; return TRUE; } @@ -647,7 +648,7 @@ entropy = (shuff_entropy_ptr) (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, SIZEOF(shuff_entropy_encoder)); - lossyc->entropy_private = (struct jpeg_entropy_encoder *) entropy; + lossyc->entropy_private = (void *) entropy; lossyc->pub.entropy_start_pass = start_pass_huff; lossyc->pub.need_optimization_pass = need_optimization_pass; diff -Nru dcmtk-3.6.6/dcmjpeg/libijg16/jctrans.c dcmtk-3.6.7/dcmjpeg/libijg16/jctrans.c --- dcmtk-3.6.6/dcmjpeg/libijg16/jctrans.c 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmjpeg/libijg16/jctrans.c 2022-04-28 13:47:25.000000000 +0000 @@ -267,6 +267,7 @@ METHODDEF(boolean) compress_output (j_compress_ptr cinfo, JSAMPIMAGE input_buf) { + (void)input_buf; j_lossy_c_ptr lossyc = (j_lossy_c_ptr) cinfo->codec; c_coef_ptr coef = (c_coef_ptr) lossyc->coef_private; JDIMENSION MCU_col_num; /* index of current MCU within row */ @@ -362,7 +363,7 @@ coef = (c_coef_ptr) (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, SIZEOF(c_coef_controller)); - lossyc->coef_private = (struct jpeg_c_coef_controller *) coef; + lossyc->coef_private = (void *) coef; /* Save pointer to virtual arrays */ coef->whole_image = coef_arrays; diff -Nru dcmtk-3.6.6/dcmjpeg/libijg16/jdatasrc.c dcmtk-3.6.7/dcmjpeg/libijg16/jdatasrc.c --- dcmtk-3.6.6/dcmjpeg/libijg16/jdatasrc.c 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmjpeg/libijg16/jdatasrc.c 2022-04-28 13:47:25.000000000 +0000 @@ -168,6 +168,7 @@ METHODDEF(void) term_source (j_decompress_ptr cinfo) { + (void)cinfo; /* no work necessary here */ } diff -Nru dcmtk-3.6.6/dcmjpeg/libijg16/jdcoefct.c dcmtk-3.6.7/dcmjpeg/libijg16/jdcoefct.c --- dcmtk-3.6.6/dcmjpeg/libijg16/jdcoefct.c 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmjpeg/libijg16/jdcoefct.c 2022-04-28 13:47:25.000000000 +0000 @@ -229,6 +229,7 @@ METHODDEF(int) dummy_consume_data (j_decompress_ptr cinfo) { + (void)cinfo; return JPEG_SUSPENDED; /* Always indicate nothing was done */ } diff -Nru dcmtk-3.6.6/dcmjpeg/libijg16/jdcolor.c dcmtk-3.6.7/dcmjpeg/libijg16/jdcolor.c --- dcmtk-3.6.6/dcmjpeg/libijg16/jdcolor.c 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmjpeg/libijg16/jdcolor.c 2022-04-28 13:47:25.000000000 +0000 @@ -309,6 +309,7 @@ METHODDEF(void) start_pass_dcolor (j_decompress_ptr cinfo) { + (void)cinfo; /* no work needed */ } diff -Nru dcmtk-3.6.6/dcmjpeg/libijg16/jddiffct.c dcmtk-3.6.7/dcmjpeg/libijg16/jddiffct.c --- dcmtk-3.6.6/dcmjpeg/libijg16/jddiffct.c 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmjpeg/libijg16/jddiffct.c 2022-04-28 13:47:25.000000000 +0000 @@ -238,6 +238,7 @@ METHODDEF(int) dummy_consume_data (j_decompress_ptr cinfo) { + (void)cinfo; return JPEG_SUSPENDED; /* Always indicate nothing was done */ } diff -Nru dcmtk-3.6.6/dcmjpeg/libijg16/jdhuff.c dcmtk-3.6.7/dcmjpeg/libijg16/jdhuff.c --- dcmtk-3.6.6/dcmjpeg/libijg16/jdhuff.c 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmjpeg/libijg16/jdhuff.c 2022-04-28 13:47:25.000000000 +0000 @@ -137,7 +137,11 @@ for (i = 0; i < numsymbols; i++) { int sym = htbl->huffval[i]; if (sym < 0 || sym > 16) +#ifdef DCMTK_ENABLE_STRICT_HUFFMAN_TABLE_CHECK ERREXIT(cinfo, JERR_BAD_HUFF_TABLE); +#else + TRACEMS1(cinfo, 1, JTRC_UNOPT_HUFF_TABLE, sym); +#endif } } } diff -Nru dcmtk-3.6.6/dcmjpeg/libijg16/jdmarker.c dcmtk-3.6.7/dcmjpeg/libijg16/jdmarker.c --- dcmtk-3.6.6/dcmjpeg/libijg16/jdmarker.c 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmjpeg/libijg16/jdmarker.c 2022-04-28 13:47:25.000000000 +0000 @@ -344,6 +344,12 @@ TRACEMS3(cinfo, 1, JTRC_SOS_COMPONENT, cc, compptr->dc_tbl_no, compptr->ac_tbl_no); + + /* This CSi (cc) should differ from the previous CSi */ + for (ci = 0; ci < i; ci++) { + if (cinfo->cur_comp_info[ci] == compptr) + ERREXIT1(cinfo, JERR_BAD_COMPONENT_ID, cc); + } } /* Collect the additional scan parameters Ss, Se, Ah/Al. */ diff -Nru dcmtk-3.6.6/dcmjpeg/libijg16/jdmerge.c dcmtk-3.6.7/dcmjpeg/libijg16/jdmerge.c --- dcmtk-3.6.6/dcmjpeg/libijg16/jdmerge.c 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmjpeg/libijg16/jdmerge.c 2022-04-28 13:47:25.000000000 +0000 @@ -171,6 +171,7 @@ JDIMENSION out_rows_avail) /* 2:1 vertical sampling case: may need a spare row. */ { + (void) in_row_groups_avail; my_upsample_ptr upsample = (my_upsample_ptr) cinfo->upsample; JSAMPROW work_ptrs[2]; JDIMENSION num_rows; /* number of rows returned to caller */ @@ -220,6 +221,8 @@ JDIMENSION out_rows_avail) /* 1:1 vertical sampling case: much easier, never need a spare row. */ { + (void) in_row_groups_avail; + (void) out_rows_avail; my_upsample_ptr upsample = (my_upsample_ptr) cinfo->upsample; /* Just do the upsampling. */ diff -Nru dcmtk-3.6.6/dcmjpeg/libijg16/jdpostct.c dcmtk-3.6.7/dcmjpeg/libijg16/jdpostct.c --- dcmtk-3.6.6/dcmjpeg/libijg16/jdpostct.c 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmjpeg/libijg16/jdpostct.c 2022-04-28 13:47:25.000000000 +0000 @@ -161,6 +161,8 @@ JSAMPARRAY output_buf, JDIMENSION *out_row_ctr, JDIMENSION out_rows_avail) { + (void) output_buf; + (void) out_rows_avail; my_post_ptr post = (my_post_ptr) cinfo->post; JDIMENSION old_next_row, num_rows; @@ -205,6 +207,9 @@ JSAMPARRAY output_buf, JDIMENSION *out_row_ctr, JDIMENSION out_rows_avail) { + (void) input_buf; + (void) in_row_group_ctr; + (void) in_row_groups_avail; my_post_ptr post = (my_post_ptr) cinfo->post; JDIMENSION num_rows, max_rows; diff -Nru dcmtk-3.6.6/dcmjpeg/libijg16/jdpred.c dcmtk-3.6.7/dcmjpeg/libijg16/jdpred.c --- dcmtk-3.6.6/dcmjpeg/libijg16/jdpred.c 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmjpeg/libijg16/jdpred.c 2022-04-28 13:47:25.000000000 +0000 @@ -101,6 +101,8 @@ const JDIFFROW diff_buf, const JDIFFROW prev_row, JDIFFROW undiff_buf, JDIMENSION width) { + (void)cinfo; + (void)comp_index; UNDIFFERENCE_1D(INITIAL_PREDICTOR2); } @@ -109,7 +111,9 @@ const JDIFFROW diff_buf, const JDIFFROW prev_row, JDIFFROW undiff_buf, JDIMENSION width) { - UNDIFFERENCE_2D(PREDICTOR2); + (void)cinfo; + (void)comp_index; + UNDIFFERENCE_2D(PREDICTOR2); JPEG_UNUSED(Rc); JPEG_UNUSED(Rb); } @@ -119,6 +123,8 @@ const JDIFFROW diff_buf, const JDIFFROW prev_row, JDIFFROW undiff_buf, JDIMENSION width) { + (void)cinfo; + (void)comp_index; UNDIFFERENCE_2D(PREDICTOR3); JPEG_UNUSED(Rc); JPEG_UNUSED(Rb); @@ -129,6 +135,8 @@ const JDIFFROW diff_buf, const JDIFFROW prev_row, JDIFFROW undiff_buf, JDIMENSION width) { + (void)cinfo; + (void)comp_index; UNDIFFERENCE_2D(PREDICTOR4A); JPEG_UNUSED(Rc); JPEG_UNUSED(Rb); @@ -139,6 +147,8 @@ const JDIFFROW diff_buf, const JDIFFROW prev_row, JDIFFROW undiff_buf, JDIMENSION width) { + (void)cinfo; + (void)comp_index; UNDIFFERENCE_2D(PREDICTOR4); JPEG_UNUSED(Rc); JPEG_UNUSED(Rb); @@ -149,6 +159,8 @@ const JDIFFROW diff_buf, const JDIFFROW prev_row, JDIFFROW undiff_buf, JDIMENSION width) { + (void)cinfo; + (void)comp_index; SHIFT_TEMPS UNDIFFERENCE_2D(PREDICTOR5); JPEG_UNUSED(Rc); @@ -160,6 +172,8 @@ const JDIFFROW diff_buf, const JDIFFROW prev_row, JDIFFROW undiff_buf, JDIMENSION width) { + (void)cinfo; + (void)comp_index; SHIFT_TEMPS UNDIFFERENCE_2D(PREDICTOR5A); JPEG_UNUSED(Rc); @@ -171,6 +185,8 @@ const JDIFFROW diff_buf, const JDIFFROW prev_row, JDIFFROW undiff_buf, JDIMENSION width) { + (void)cinfo; + (void)comp_index; SHIFT_TEMPS UNDIFFERENCE_2D(PREDICTOR6); JPEG_UNUSED(Rc); @@ -182,6 +198,8 @@ const JDIFFROW diff_buf, const JDIFFROW prev_row, JDIFFROW undiff_buf, JDIMENSION width) { + (void)cinfo; + (void)comp_index; SHIFT_TEMPS UNDIFFERENCE_2D(PREDICTOR6A); JPEG_UNUSED(Rc); @@ -193,6 +211,8 @@ const JDIFFROW diff_buf, const JDIFFROW prev_row, JDIFFROW undiff_buf, JDIMENSION width) { + (void)cinfo; + (void)comp_index; SHIFT_TEMPS UNDIFFERENCE_2D(PREDICTOR7); JPEG_UNUSED(Rc); @@ -204,6 +224,8 @@ const JDIFFROW diff_buf, const JDIFFROW prev_row, JDIFFROW undiff_buf, JDIMENSION width) { + (void)cinfo; + (void)comp_index; SHIFT_TEMPS UNDIFFERENCE_2D(PREDICTOR7A); JPEG_UNUSED(Rc); @@ -223,6 +245,7 @@ const JDIFFROW diff_buf, JDIFFROW prev_row, JDIFFROW undiff_buf, JDIMENSION width) { + (void)prev_row; j_lossless_d_ptr losslsd = (j_lossless_d_ptr) cinfo->codec; UNDIFFERENCE_1D(INITIAL_PREDICTORx); diff -Nru dcmtk-3.6.6/dcmjpeg/libijg16/jdsample.c dcmtk-3.6.7/dcmjpeg/libijg16/jdsample.c --- dcmtk-3.6.6/dcmjpeg/libijg16/jdsample.c 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmjpeg/libijg16/jdsample.c 2022-04-28 13:47:25.000000000 +0000 @@ -92,6 +92,7 @@ JSAMPARRAY output_buf, JDIMENSION *out_row_ctr, JDIMENSION out_rows_avail) { + (void)in_row_groups_avail; my_upsample_ptr upsample = (my_upsample_ptr) cinfo->upsample; int ci; jpeg_component_info * compptr; @@ -157,6 +158,8 @@ fullsize_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr, JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr) { + (void)cinfo; + (void)compptr; *output_data_ptr = input_data; } @@ -170,6 +173,9 @@ noop_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr, JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr) { + (void)cinfo; + (void)compptr; + (void)input_data; *output_data_ptr = NULL; /* safety check */ } @@ -233,6 +239,7 @@ h2v1_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr, JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr) { + (void)compptr; JSAMPARRAY output_data = *output_data_ptr; register JSAMPROW inptr, outptr; register JSAMPLE invalue; @@ -261,6 +268,7 @@ h2v2_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr, JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr) { + (void)compptr; JSAMPARRAY output_data = *output_data_ptr; register JSAMPROW inptr, outptr; register JSAMPLE invalue; diff -Nru dcmtk-3.6.6/dcmjpeg/libijg16/jdscale.c dcmtk-3.6.7/dcmjpeg/libijg16/jdscale.c --- dcmtk-3.6.6/dcmjpeg/libijg16/jdscale.c 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmjpeg/libijg16/jdscale.c 2022-04-28 13:47:25.000000000 +0000 @@ -67,6 +67,7 @@ const JDIFFROW diff_buf, JSAMPROW output_buf, JDIMENSION width) { + (void)cinfo; unsigned int xindex; for (xindex = 0; xindex < width; xindex++) diff -Nru dcmtk-3.6.6/dcmjpeg/libijg16/jerror16.h dcmtk-3.6.7/dcmjpeg/libijg16/jerror16.h --- dcmtk-3.6.6/dcmjpeg/libijg16/jerror16.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmjpeg/libijg16/jerror16.h 2022-04-28 13:47:25.000000000 +0000 @@ -181,6 +181,7 @@ "Unrecognized component IDs %d %d %d, assuming RGB") JMESSAGE(JTRC_UNKNOWN_LOSSY_IDS, "Unrecognized component IDs %d %d %d, assuming YCbCr") +JMESSAGE(JTRC_UNOPT_HUFF_TABLE, "Symbol %d indicates un-optimized Huffman table") JMESSAGE(JTRC_XMS_CLOSE, "Freed XMS handle %u") JMESSAGE(JTRC_XMS_OPEN, "Obtained XMS handle %u") JMESSAGE(JWRN_ADOBE_XFORM, "Unknown Adobe color transform code %d") diff -Nru dcmtk-3.6.6/dcmjpeg/libijg16/jmemmgr.c dcmtk-3.6.7/dcmjpeg/libijg16/jmemmgr.c --- dcmtk-3.6.6/dcmjpeg/libijg16/jmemmgr.c 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmjpeg/libijg16/jmemmgr.c 2022-04-28 13:47:25.000000000 +0000 @@ -29,6 +29,7 @@ #include "jinclude16.h" #include "jpeglib16.h" #include "jmemsys16.h" /* import the system-dependent declarations */ +#include "dcmtk/ofstd/ofdiag.h" /* for DCMTK_DIAGNOSTIC macros */ #ifndef NO_GETENV #ifndef HAVE_STDLIB_H /* should declare getenv() */ @@ -483,8 +484,6 @@ } -#ifdef NEED_DARRAY - /* * Creation of 2-D difference arrays. * This is essentially the same as the code for sample arrays, above. @@ -532,8 +531,6 @@ return result; } -#endif - /* * About virtual array management: @@ -1071,6 +1068,7 @@ jpeg_mem_term(cinfo); /* system-dependent cleanup */ } +#include DCMTK_DIAGNOSTIC_IGNORE_CONST_EXPRESSION_WARNING /* * Memory manager initialization. @@ -1121,9 +1119,7 @@ mem->pub.alloc_large = alloc_large; mem->pub.alloc_sarray = alloc_sarray; mem->pub.alloc_barray = alloc_barray; -#ifdef NEED_DARRAY mem->pub.alloc_darray = alloc_darray; -#endif mem->pub.request_virt_sarray = request_virt_sarray; mem->pub.request_virt_barray = request_virt_barray; mem->pub.realize_virt_arrays = realize_virt_arrays; diff -Nru dcmtk-3.6.6/dcmjpeg/libijg16/jmemnobs.c dcmtk-3.6.7/dcmjpeg/libijg16/jmemnobs.c --- dcmtk-3.6.6/dcmjpeg/libijg16/jmemnobs.c 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmjpeg/libijg16/jmemnobs.c 2022-04-28 13:47:25.000000000 +0000 @@ -34,12 +34,15 @@ GLOBAL(void *) jpeg_get_small (j_common_ptr cinfo, size_t sizeofobject) { + (void) cinfo; return (void *) malloc(sizeofobject); } GLOBAL(void) jpeg_free_small (j_common_ptr cinfo, void * object, size_t sizeofobject) { + (void) cinfo; + (void) sizeofobject; free(object); } @@ -54,12 +57,15 @@ GLOBAL(void FAR *) jpeg_get_large (j_common_ptr cinfo, size_t sizeofobject) { + (void) cinfo; return (void FAR *) malloc(sizeofobject); } GLOBAL(void) jpeg_free_large (j_common_ptr cinfo, void FAR * object, size_t sizeofobject) { + (void) cinfo; + (void) sizeofobject; free(object); } @@ -73,6 +79,9 @@ jpeg_mem_available (j_common_ptr cinfo, long min_bytes_needed, long max_bytes_needed, long already_allocated) { + (void) cinfo; + (void) min_bytes_needed; + (void) already_allocated; return max_bytes_needed; } @@ -87,6 +96,8 @@ jpeg_open_backing_store (j_common_ptr cinfo, backing_store_ptr info, long total_bytes_needed) { + (void) info; + (void) total_bytes_needed; ERREXIT(cinfo, JERR_NO_BACKING_STORE); } @@ -99,11 +110,13 @@ GLOBAL(long) jpeg_mem_init (j_common_ptr cinfo) { + (void) cinfo; return 0; /* just set max_memory_to_use to 0 */ } GLOBAL(void) jpeg_mem_term (j_common_ptr cinfo) { + (void) cinfo; /* no work */ } diff -Nru dcmtk-3.6.6/dcmjpeg/libijg16/jpeglib16.h dcmtk-3.6.7/dcmjpeg/libijg16/jpeglib16.h --- dcmtk-3.6.6/dcmjpeg/libijg16/jpeglib16.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmjpeg/libijg16/jpeglib16.h 2022-04-28 13:47:25.000000000 +0000 @@ -783,14 +783,6 @@ typedef struct jvirt_barray_control * jvirt_barray_ptr; -#ifdef C_LOSSLESS_SUPPORTED -#define NEED_DARRAY -#else -#ifdef D_LOSSLESS_SUPPORTED -#define NEED_DARRAY -#endif -#endif - struct jpeg_memory_mgr { /* Method pointers */ JMETHOD(void *, alloc_small, (j_common_ptr cinfo, int pool_id, @@ -803,11 +795,9 @@ JMETHOD(JBLOCKARRAY, alloc_barray, (j_common_ptr cinfo, int pool_id, JDIMENSION blocksperrow, JDIMENSION numrows)); -#ifdef NEED_DARRAY JMETHOD(JDIFFARRAY, alloc_darray, (j_common_ptr cinfo, int pool_id, JDIMENSION diffsperrow, JDIMENSION numrows)); -#endif JMETHOD(jvirt_sarray_ptr, request_virt_sarray, (j_common_ptr cinfo, int pool_id, boolean pre_zero, diff -Nru dcmtk-3.6.6/dcmjpeg/libijg16/jquant1.c dcmtk-3.6.7/dcmjpeg/libijg16/jquant1.c --- dcmtk-3.6.6/dcmjpeg/libijg16/jquant1.c 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmjpeg/libijg16/jquant1.c 2022-04-28 13:47:25.000000000 +0000 @@ -251,6 +251,8 @@ * (Forcing the upper and lower values to the limits ensures that * dithering can't produce a color outside the selected gamut.) */ + (void) cinfo; + (void) ci; return (int) (((IJG_INT32) j * MAXJSAMPLE + maxj/2) / maxj); } @@ -260,6 +262,8 @@ /* Return largest input value that should map to j'th output value */ /* Must have largest(j=0) >= 0, and largest(j=maxj) >= MAXJSAMPLE */ { + (void) cinfo; + (void) ci; /* Breakpoints are halfway between values returned by output_value */ return (int) (((IJG_INT32) (2*j + 1) * MAXJSAMPLE + maxj) / (2*maxj)); } @@ -740,6 +744,7 @@ METHODDEF(void) start_pass_1_quant (j_decompress_ptr cinfo, boolean is_pre_scan) { + (void) is_pre_scan; my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize; size_t arraysize; int i; @@ -797,6 +802,7 @@ METHODDEF(void) finish_pass_1_quant (j_decompress_ptr cinfo) { + (void) cinfo; /* no work in 1-pass case */ } diff -Nru dcmtk-3.6.6/dcmjpeg/libijg16/jquant2.c dcmtk-3.6.7/dcmjpeg/libijg16/jquant2.c --- dcmtk-3.6.6/dcmjpeg/libijg16/jquant2.c 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmjpeg/libijg16/jquant2.c 2022-04-28 13:47:25.000000000 +0000 @@ -224,6 +224,7 @@ prescan_quantize (j_decompress_ptr cinfo, JSAMPARRAY input_buf, JSAMPARRAY output_buf, int num_rows) { + (void) output_buf; my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize; register JSAMPROW ptr; register histptr histp; @@ -1155,6 +1156,7 @@ METHODDEF(void) finish_pass2 (j_decompress_ptr cinfo) { + (void) cinfo; /* no work */ } diff -Nru dcmtk-3.6.6/dcmjpeg/libijg16/Makefile.dep dcmtk-3.6.7/dcmjpeg/libijg16/Makefile.dep --- dcmtk-3.6.6/dcmjpeg/libijg16/Makefile.dep 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmjpeg/libijg16/Makefile.dep 2022-04-28 13:47:25.000000000 +0000 @@ -211,7 +211,8 @@ jmemmgr.o: jmemmgr.c jinclude16.h jconfig16.h \ ../../config/include/dcmtk/config/osconfig.h jpeglib16.h jmorecfg16.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h jpegint16.h jerror16.h \ - jmemsys16.h + jmemsys16.h ../../ofstd/include/dcmtk/ofstd/ofdiag.h \ + ../../ofstd/include/dcmtk/ofstd/diag/constexp.def jmemnobs.o: jmemnobs.c jinclude16.h jconfig16.h \ ../../config/include/dcmtk/config/osconfig.h jpeglib16.h jmorecfg16.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h jpegint16.h jerror16.h \ diff -Nru dcmtk-3.6.6/dcmjpeg/libijg8/CMakeLists.txt dcmtk-3.6.7/dcmjpeg/libijg8/CMakeLists.txt --- dcmtk-3.6.6/dcmjpeg/libijg8/CMakeLists.txt 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmjpeg/libijg8/CMakeLists.txt 2022-04-28 13:47:25.000000000 +0000 @@ -1,2 +1,67 @@ # create library from source files -DCMTK_ADD_LIBRARY(ijg8 jaricom jcapimin jcapistd jcarith jccoefct jccolor jcdctmgr jcdiffct jchuff jcinit jclhuff jclossls jclossy jcmainct jcmarker jcmaster jcodec jcomapi jcparam jcphuff jcpred jcprepct jcsample jcscale jcshuff jctrans jdapimin jdapistd jdarith jdatadst jdatasrc jdcoefct jdcolor jddctmgr jddiffct jdhuff jdinput jdlhuff jdlossls jdlossy jdmainct jdmarker jdmaster jdmerge jdphuff jdpostct jdpred jdsample jdscale jdshuff jdtrans jerror jfdctflt jfdctfst jfdctint jidctflt jidctfst jidctint jidctred jmemmgr jmemnobs jquant1 jquant2 jutils) +DCMTK_ADD_LIBRARY(ijg8 + jaricom.c + jcapimin.c + jcapistd.c + jcarith.c + jccoefct.c + jccolor.c + jcdctmgr.c + jcdiffct.c + jchuff.c + jcinit.c + jclhuff.c + jclossls.c + jclossy.c + jcmainct.c + jcmarker.c + jcmaster.c + jcodec.c + jcomapi.c + jcparam.c + jcphuff.c + jcpred.c + jcprepct.c + jcsample.c + jcscale.c + jcshuff.c + jctrans.c + jdapimin.c + jdapistd.c + jdarith.c + jdatadst.c + jdatasrc.c + jdcoefct.c + jdcolor.c + jddctmgr.c + jddiffct.c + jdhuff.c + jdinput.c + jdlhuff.c + jdlossls.c + jdlossy.c + jdmainct.c + jdmarker.c + jdmaster.c + jdmerge.c + jdphuff.c + jdpostct.c + jdpred.c + jdsample.c + jdscale.c + jdshuff.c + jdtrans.c + jerror.c + jfdctflt.c + jfdctfst.c + jfdctint.c + jidctflt.c + jidctfst.c + jidctint.c + jidctred.c + jmemmgr.c + jmemnobs.c + jquant1.c + jquant2.c + jutils.c +) diff -Nru dcmtk-3.6.6/dcmjpeg/libijg8/jccoefct.c dcmtk-3.6.7/dcmjpeg/libijg8/jccoefct.c --- dcmtk-3.6.6/dcmjpeg/libijg8/jccoefct.c 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmjpeg/libijg8/jccoefct.c 2022-04-28 13:47:25.000000000 +0000 @@ -343,6 +343,7 @@ METHODDEF(boolean) compress_output (j_compress_ptr cinfo, JSAMPIMAGE input_buf) { + (void)input_buf; j_lossy_c_ptr lossyc = (j_lossy_c_ptr) cinfo->codec; c_coef_ptr coef = (c_coef_ptr) lossyc->coef_private; JDIMENSION MCU_col_num; /* index of current MCU within row */ @@ -414,7 +415,7 @@ coef = (c_coef_ptr) (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, SIZEOF(c_coef_controller)); - lossyc->coef_private = (struct jpeg_c_coef_controller *) coef; + lossyc->coef_private = (void *) coef; lossyc->coef_start_pass = start_pass_coef; /* Create the coefficient buffer. */ diff -Nru dcmtk-3.6.6/dcmjpeg/libijg8/jccolor.c dcmtk-3.6.7/dcmjpeg/libijg8/jccolor.c --- dcmtk-3.6.6/dcmjpeg/libijg8/jccolor.c 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmjpeg/libijg8/jccolor.c 2022-04-28 13:47:25.000000000 +0000 @@ -340,6 +340,7 @@ METHODDEF(void) null_method (j_compress_ptr cinfo) { + (void) cinfo; /* no work needed */ } diff -Nru dcmtk-3.6.6/dcmjpeg/libijg8/jcdctmgr.c dcmtk-3.6.7/dcmjpeg/libijg8/jcdctmgr.c --- dcmtk-3.6.6/dcmjpeg/libijg8/jcdctmgr.c 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmjpeg/libijg8/jcdctmgr.c 2022-04-28 13:47:25.000000000 +0000 @@ -353,7 +353,7 @@ fdct = (fdct_ptr) (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, SIZEOF(fdct_controller)); - lossyc->fdct_private = (struct jpeg_forward_dct *) fdct; + lossyc->fdct_private = (void *) fdct; lossyc->fdct_start_pass = start_pass_fdctmgr; switch (cinfo->dct_method) { diff -Nru dcmtk-3.6.6/dcmjpeg/libijg8/jcdiffct.c dcmtk-3.6.7/dcmjpeg/libijg8/jcdiffct.c --- dcmtk-3.6.6/dcmjpeg/libijg8/jcdiffct.c 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmjpeg/libijg8/jcdiffct.c 2022-04-28 13:47:25.000000000 +0000 @@ -302,6 +302,7 @@ METHODDEF(boolean) compress_output (j_compress_ptr cinfo, JSAMPIMAGE input_buf) { + (void)input_buf; j_lossless_c_ptr losslsc = (j_lossless_c_ptr) cinfo->codec; c_diff_ptr diff = (c_diff_ptr) losslsc->diff_private; /* JDIMENSION MCU_col_num; */ /* index of current MCU within row */ diff -Nru dcmtk-3.6.6/dcmjpeg/libijg8/jclhuff.c dcmtk-3.6.7/dcmjpeg/libijg8/jclhuff.c --- dcmtk-3.6.6/dcmjpeg/libijg8/jclhuff.c 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmjpeg/libijg8/jclhuff.c 2022-04-28 13:47:25.000000000 +0000 @@ -569,6 +569,7 @@ METHODDEF(boolean) need_optimization_pass (j_compress_ptr cinfo) { + (void)cinfo; return TRUE; } @@ -587,7 +588,7 @@ entropy = (lhuff_entropy_ptr) (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, SIZEOF(lhuff_entropy_encoder)); - losslsc->entropy_private = (struct jpeg_entropy_encoder *) entropy; + losslsc->entropy_private = (void *) entropy; losslsc->pub.entropy_start_pass = start_pass_huff; losslsc->pub.need_optimization_pass = need_optimization_pass; diff -Nru dcmtk-3.6.6/dcmjpeg/libijg8/jcmarker.c dcmtk-3.6.7/dcmjpeg/libijg8/jcmarker.c --- dcmtk-3.6.6/dcmjpeg/libijg8/jcmarker.c 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmjpeg/libijg8/jcmarker.c 2022-04-28 13:47:25.000000000 +0000 @@ -224,6 +224,7 @@ /* Since the useful info is so small, we want to emit all the tables in */ /* one DAC marker. Therefore this routine does its own scan of the table. */ { + (void)cinfo; #ifdef C_ARITH_CODING_SUPPORTED char dc_in_use[NUM_ARITH_TBLS]; char ac_in_use[NUM_ARITH_TBLS]; diff -Nru dcmtk-3.6.6/dcmjpeg/libijg8/jcphuff.c dcmtk-3.6.7/dcmjpeg/libijg8/jcphuff.c --- dcmtk-3.6.6/dcmjpeg/libijg8/jcphuff.c 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmjpeg/libijg8/jcphuff.c 2022-04-28 13:47:25.000000000 +0000 @@ -833,7 +833,7 @@ entropy = (phuff_entropy_ptr) (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, SIZEOF(phuff_entropy_encoder)); - lossyc->entropy_private = (struct jpeg_entropy_encoder *) entropy; + lossyc->entropy_private = (void *) entropy; lossyc->pub.entropy_start_pass = start_pass_phuff; lossyc->pub.need_optimization_pass = need_optimization_pass; diff -Nru dcmtk-3.6.6/dcmjpeg/libijg8/jcpred.c dcmtk-3.6.7/dcmjpeg/libijg8/jcpred.c --- dcmtk-3.6.6/dcmjpeg/libijg8/jcpred.c 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmjpeg/libijg8/jcpred.c 2022-04-28 13:47:25.000000000 +0000 @@ -213,6 +213,7 @@ const JSAMPROW input_buf, JSAMPROW prev_row, JDIFFROW diff_buf, JDIMENSION width) { + (void)prev_row; DIFFERENCE_1D(INITIAL_PREDICTORx); /* diff -Nru dcmtk-3.6.6/dcmjpeg/libijg8/jcsample.c dcmtk-3.6.7/dcmjpeg/libijg8/jcsample.c --- dcmtk-3.6.6/dcmjpeg/libijg8/jcsample.c 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmjpeg/libijg8/jcsample.c 2022-04-28 13:47:25.000000000 +0000 @@ -74,6 +74,7 @@ METHODDEF(void) start_pass_downsample (j_compress_ptr cinfo) { + (void)cinfo; /* no work for now */ } diff -Nru dcmtk-3.6.6/dcmjpeg/libijg8/jcscale.c dcmtk-3.6.7/dcmjpeg/libijg8/jcscale.c --- dcmtk-3.6.6/dcmjpeg/libijg8/jcscale.c 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmjpeg/libijg8/jcscale.c 2022-04-28 13:47:25.000000000 +0000 @@ -34,6 +34,7 @@ noscale(j_compress_ptr cinfo, JSAMPROW input_buf, JSAMPROW output_buf, JDIMENSION width) { + (void)cinfo; MEMCOPY(output_buf, input_buf, width * SIZEOF(JSAMPLE)); return; } diff -Nru dcmtk-3.6.6/dcmjpeg/libijg8/jcshuff.c dcmtk-3.6.7/dcmjpeg/libijg8/jcshuff.c --- dcmtk-3.6.6/dcmjpeg/libijg8/jcshuff.c 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmjpeg/libijg8/jcshuff.c 2022-04-28 13:47:25.000000000 +0000 @@ -629,6 +629,7 @@ METHODDEF(boolean) need_optimization_pass (j_compress_ptr cinfo) { + (void)cinfo; return TRUE; } @@ -647,7 +648,7 @@ entropy = (shuff_entropy_ptr) (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, SIZEOF(shuff_entropy_encoder)); - lossyc->entropy_private = (struct jpeg_entropy_encoder *) entropy; + lossyc->entropy_private = (void *) entropy; lossyc->pub.entropy_start_pass = start_pass_huff; lossyc->pub.need_optimization_pass = need_optimization_pass; diff -Nru dcmtk-3.6.6/dcmjpeg/libijg8/jctrans.c dcmtk-3.6.7/dcmjpeg/libijg8/jctrans.c --- dcmtk-3.6.6/dcmjpeg/libijg8/jctrans.c 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmjpeg/libijg8/jctrans.c 2022-04-28 13:47:25.000000000 +0000 @@ -267,6 +267,7 @@ METHODDEF(boolean) compress_output (j_compress_ptr cinfo, JSAMPIMAGE input_buf) { + (void)input_buf; j_lossy_c_ptr lossyc = (j_lossy_c_ptr) cinfo->codec; c_coef_ptr coef = (c_coef_ptr) lossyc->coef_private; JDIMENSION MCU_col_num; /* index of current MCU within row */ @@ -362,7 +363,7 @@ coef = (c_coef_ptr) (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, SIZEOF(c_coef_controller)); - lossyc->coef_private = (struct jpeg_c_coef_controller *) coef; + lossyc->coef_private = (void *) coef; /* Save pointer to virtual arrays */ coef->whole_image = coef_arrays; diff -Nru dcmtk-3.6.6/dcmjpeg/libijg8/jdatasrc.c dcmtk-3.6.7/dcmjpeg/libijg8/jdatasrc.c --- dcmtk-3.6.6/dcmjpeg/libijg8/jdatasrc.c 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmjpeg/libijg8/jdatasrc.c 2022-04-28 13:47:25.000000000 +0000 @@ -168,6 +168,7 @@ METHODDEF(void) term_source (j_decompress_ptr cinfo) { + (void)cinfo; /* no work necessary here */ } diff -Nru dcmtk-3.6.6/dcmjpeg/libijg8/jdcoefct.c dcmtk-3.6.7/dcmjpeg/libijg8/jdcoefct.c --- dcmtk-3.6.6/dcmjpeg/libijg8/jdcoefct.c 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmjpeg/libijg8/jdcoefct.c 2022-04-28 13:47:25.000000000 +0000 @@ -229,6 +229,7 @@ METHODDEF(int) dummy_consume_data (j_decompress_ptr cinfo) { + (void)cinfo; return JPEG_SUSPENDED; /* Always indicate nothing was done */ } diff -Nru dcmtk-3.6.6/dcmjpeg/libijg8/jdcolor.c dcmtk-3.6.7/dcmjpeg/libijg8/jdcolor.c --- dcmtk-3.6.6/dcmjpeg/libijg8/jdcolor.c 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmjpeg/libijg8/jdcolor.c 2022-04-28 13:47:25.000000000 +0000 @@ -309,6 +309,7 @@ METHODDEF(void) start_pass_dcolor (j_decompress_ptr cinfo) { + (void)cinfo; /* no work needed */ } diff -Nru dcmtk-3.6.6/dcmjpeg/libijg8/jddiffct.c dcmtk-3.6.7/dcmjpeg/libijg8/jddiffct.c --- dcmtk-3.6.6/dcmjpeg/libijg8/jddiffct.c 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmjpeg/libijg8/jddiffct.c 2022-04-28 13:47:25.000000000 +0000 @@ -238,6 +238,7 @@ METHODDEF(int) dummy_consume_data (j_decompress_ptr cinfo) { + (void)cinfo; return JPEG_SUSPENDED; /* Always indicate nothing was done */ } diff -Nru dcmtk-3.6.6/dcmjpeg/libijg8/jdhuff.c dcmtk-3.6.7/dcmjpeg/libijg8/jdhuff.c --- dcmtk-3.6.6/dcmjpeg/libijg8/jdhuff.c 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmjpeg/libijg8/jdhuff.c 2022-04-28 13:47:25.000000000 +0000 @@ -138,7 +138,11 @@ for (i = 0; i < numsymbols; i++) { int sym = htbl->huffval[i]; if (sym < 0 || sym > 16) +#ifdef DCMTK_ENABLE_STRICT_HUFFMAN_TABLE_CHECK ERREXIT(cinfo, JERR_BAD_HUFF_TABLE); +#else + TRACEMS1(cinfo, 1, JTRC_UNOPT_HUFF_TABLE, sym); +#endif } } } diff -Nru dcmtk-3.6.6/dcmjpeg/libijg8/jdmarker.c dcmtk-3.6.7/dcmjpeg/libijg8/jdmarker.c --- dcmtk-3.6.6/dcmjpeg/libijg8/jdmarker.c 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmjpeg/libijg8/jdmarker.c 2022-04-28 13:47:25.000000000 +0000 @@ -344,6 +344,12 @@ TRACEMS3(cinfo, 1, JTRC_SOS_COMPONENT, cc, compptr->dc_tbl_no, compptr->ac_tbl_no); + + /* This CSi (cc) should differ from the previous CSi */ + for (ci = 0; ci < i; ci++) { + if (cinfo->cur_comp_info[ci] == compptr) + ERREXIT1(cinfo, JERR_BAD_COMPONENT_ID, cc); + } } /* Collect the additional scan parameters Ss, Se, Ah/Al. */ diff -Nru dcmtk-3.6.6/dcmjpeg/libijg8/jdmerge.c dcmtk-3.6.7/dcmjpeg/libijg8/jdmerge.c --- dcmtk-3.6.6/dcmjpeg/libijg8/jdmerge.c 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmjpeg/libijg8/jdmerge.c 2022-04-28 13:47:25.000000000 +0000 @@ -148,6 +148,7 @@ JDIMENSION out_rows_avail) /* 2:1 vertical sampling case: may need a spare row. */ { + (void) in_row_groups_avail; my_upsample_ptr upsample = (my_upsample_ptr) cinfo->upsample; JSAMPROW work_ptrs[2]; JDIMENSION num_rows; /* number of rows returned to caller */ @@ -197,6 +198,8 @@ JDIMENSION out_rows_avail) /* 1:1 vertical sampling case: much easier, never need a spare row. */ { + (void) in_row_groups_avail; + (void) out_rows_avail; my_upsample_ptr upsample = (my_upsample_ptr) cinfo->upsample; /* Just do the upsampling. */ diff -Nru dcmtk-3.6.6/dcmjpeg/libijg8/jdpostct.c dcmtk-3.6.7/dcmjpeg/libijg8/jdpostct.c --- dcmtk-3.6.6/dcmjpeg/libijg8/jdpostct.c 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmjpeg/libijg8/jdpostct.c 2022-04-28 13:47:25.000000000 +0000 @@ -161,6 +161,8 @@ JSAMPARRAY output_buf, JDIMENSION *out_row_ctr, JDIMENSION out_rows_avail) { + (void) output_buf; + (void) out_rows_avail; my_post_ptr post = (my_post_ptr) cinfo->post; JDIMENSION old_next_row, num_rows; @@ -205,6 +207,9 @@ JSAMPARRAY output_buf, JDIMENSION *out_row_ctr, JDIMENSION out_rows_avail) { + (void) input_buf; + (void) in_row_group_ctr; + (void) in_row_groups_avail; my_post_ptr post = (my_post_ptr) cinfo->post; JDIMENSION num_rows, max_rows; diff -Nru dcmtk-3.6.6/dcmjpeg/libijg8/jdpred.c dcmtk-3.6.7/dcmjpeg/libijg8/jdpred.c --- dcmtk-3.6.6/dcmjpeg/libijg8/jdpred.c 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmjpeg/libijg8/jdpred.c 2022-04-28 13:47:25.000000000 +0000 @@ -101,6 +101,8 @@ const JDIFFROW diff_buf, const JDIFFROW prev_row, JDIFFROW undiff_buf, JDIMENSION width) { + (void)cinfo; + (void)comp_index; UNDIFFERENCE_1D(INITIAL_PREDICTOR2); } @@ -109,6 +111,8 @@ const JDIFFROW diff_buf, const JDIFFROW prev_row, JDIFFROW undiff_buf, JDIMENSION width) { + (void)cinfo; + (void)comp_index; UNDIFFERENCE_2D(PREDICTOR2); JPEG_UNUSED(Rc); JPEG_UNUSED(Rb); @@ -119,6 +123,8 @@ const JDIFFROW diff_buf, const JDIFFROW prev_row, JDIFFROW undiff_buf, JDIMENSION width) { + (void)cinfo; + (void)comp_index; UNDIFFERENCE_2D(PREDICTOR3); JPEG_UNUSED(Rc); JPEG_UNUSED(Rb); @@ -129,6 +135,8 @@ const JDIFFROW diff_buf, const JDIFFROW prev_row, JDIFFROW undiff_buf, JDIMENSION width) { + (void)cinfo; + (void)comp_index; UNDIFFERENCE_2D(PREDICTOR4); JPEG_UNUSED(Rc); JPEG_UNUSED(Rb); @@ -139,6 +147,8 @@ const JDIFFROW diff_buf, const JDIFFROW prev_row, JDIFFROW undiff_buf, JDIMENSION width) { + (void)cinfo; + (void)comp_index; SHIFT_TEMPS UNDIFFERENCE_2D(PREDICTOR5); JPEG_UNUSED(Rc); @@ -150,6 +160,8 @@ const JDIFFROW diff_buf, const JDIFFROW prev_row, JDIFFROW undiff_buf, JDIMENSION width) { + (void)cinfo; + (void)comp_index; SHIFT_TEMPS UNDIFFERENCE_2D(PREDICTOR6); JPEG_UNUSED(Rc); @@ -161,6 +173,8 @@ const JDIFFROW diff_buf, const JDIFFROW prev_row, JDIFFROW undiff_buf, JDIMENSION width) { + (void)cinfo; + (void)comp_index; SHIFT_TEMPS UNDIFFERENCE_2D(PREDICTOR7); JPEG_UNUSED(Rc); @@ -180,6 +194,7 @@ const JDIFFROW diff_buf, JDIFFROW prev_row, JDIFFROW undiff_buf, JDIMENSION width) { + (void)prev_row; j_lossless_d_ptr losslsd = (j_lossless_d_ptr) cinfo->codec; UNDIFFERENCE_1D(INITIAL_PREDICTORx); diff -Nru dcmtk-3.6.6/dcmjpeg/libijg8/jdsample.c dcmtk-3.6.7/dcmjpeg/libijg8/jdsample.c --- dcmtk-3.6.6/dcmjpeg/libijg8/jdsample.c 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmjpeg/libijg8/jdsample.c 2022-04-28 13:47:25.000000000 +0000 @@ -92,6 +92,7 @@ JSAMPARRAY output_buf, JDIMENSION *out_row_ctr, JDIMENSION out_rows_avail) { + (void)in_row_groups_avail; my_upsample_ptr upsample = (my_upsample_ptr) cinfo->upsample; int ci; jpeg_component_info * compptr; @@ -157,6 +158,8 @@ fullsize_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr, JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr) { + (void)cinfo; + (void)compptr; *output_data_ptr = input_data; } @@ -170,6 +173,9 @@ noop_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr, JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr) { + (void)cinfo; + (void)compptr; + (void)input_data; *output_data_ptr = NULL; /* safety check */ } @@ -233,6 +239,7 @@ h2v1_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr, JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr) { + (void)compptr; JSAMPARRAY output_data = *output_data_ptr; register JSAMPROW inptr, outptr; register JSAMPLE invalue; @@ -261,6 +268,7 @@ h2v2_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr, JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr) { + (void)compptr; JSAMPARRAY output_data = *output_data_ptr; register JSAMPROW inptr, outptr; register JSAMPLE invalue; diff -Nru dcmtk-3.6.6/dcmjpeg/libijg8/jdscale.c dcmtk-3.6.7/dcmjpeg/libijg8/jdscale.c --- dcmtk-3.6.6/dcmjpeg/libijg8/jdscale.c 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmjpeg/libijg8/jdscale.c 2022-04-28 13:47:25.000000000 +0000 @@ -67,6 +67,7 @@ const JDIFFROW diff_buf, JSAMPROW output_buf, JDIMENSION width) { + (void)cinfo; unsigned int xindex; for (xindex = 0; xindex < width; xindex++) diff -Nru dcmtk-3.6.6/dcmjpeg/libijg8/jerror8.h dcmtk-3.6.7/dcmjpeg/libijg8/jerror8.h --- dcmtk-3.6.6/dcmjpeg/libijg8/jerror8.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmjpeg/libijg8/jerror8.h 2022-04-28 13:47:25.000000000 +0000 @@ -181,6 +181,7 @@ "Unrecognized component IDs %d %d %d, assuming RGB") JMESSAGE(JTRC_UNKNOWN_LOSSY_IDS, "Unrecognized component IDs %d %d %d, assuming YCbCr") +JMESSAGE(JTRC_UNOPT_HUFF_TABLE, "Symbol %d indicates un-optimized Huffman table") JMESSAGE(JTRC_XMS_CLOSE, "Freed XMS handle %u") JMESSAGE(JTRC_XMS_OPEN, "Obtained XMS handle %u") JMESSAGE(JWRN_ADOBE_XFORM, "Unknown Adobe color transform code %d") diff -Nru dcmtk-3.6.6/dcmjpeg/libijg8/jmemmgr.c dcmtk-3.6.7/dcmjpeg/libijg8/jmemmgr.c --- dcmtk-3.6.6/dcmjpeg/libijg8/jmemmgr.c 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmjpeg/libijg8/jmemmgr.c 2022-04-28 13:47:25.000000000 +0000 @@ -29,6 +29,7 @@ #include "jinclude8.h" #include "jpeglib8.h" #include "jmemsys8.h" /* import the system-dependent declarations */ +#include "dcmtk/ofstd/ofdiag.h" /* for DCMTK_DIAGNOSTIC macros */ #ifndef NO_GETENV #ifndef HAVE_STDLIB_H /* should declare getenv() */ @@ -483,8 +484,6 @@ } -#ifdef NEED_DARRAY - /* * Creation of 2-D difference arrays. * This is essentially the same as the code for sample arrays, above. @@ -532,7 +531,6 @@ return result; } -#endif /* @@ -1071,6 +1069,7 @@ jpeg_mem_term(cinfo); /* system-dependent cleanup */ } +#include DCMTK_DIAGNOSTIC_IGNORE_CONST_EXPRESSION_WARNING /* * Memory manager initialization. @@ -1121,9 +1120,7 @@ mem->pub.alloc_large = alloc_large; mem->pub.alloc_sarray = alloc_sarray; mem->pub.alloc_barray = alloc_barray; -#ifdef NEED_DARRAY mem->pub.alloc_darray = alloc_darray; -#endif mem->pub.request_virt_sarray = request_virt_sarray; mem->pub.request_virt_barray = request_virt_barray; mem->pub.realize_virt_arrays = realize_virt_arrays; @@ -1172,3 +1169,4 @@ #endif } + diff -Nru dcmtk-3.6.6/dcmjpeg/libijg8/jmemnobs.c dcmtk-3.6.7/dcmjpeg/libijg8/jmemnobs.c --- dcmtk-3.6.6/dcmjpeg/libijg8/jmemnobs.c 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmjpeg/libijg8/jmemnobs.c 2022-04-28 13:47:25.000000000 +0000 @@ -34,12 +34,15 @@ GLOBAL(void *) jpeg_get_small (j_common_ptr cinfo, size_t sizeofobject) { + (void) cinfo; return (void *) malloc(sizeofobject); } GLOBAL(void) jpeg_free_small (j_common_ptr cinfo, void * object, size_t sizeofobject) { + (void) cinfo; + (void) sizeofobject; free(object); } @@ -54,14 +57,16 @@ GLOBAL(void FAR *) jpeg_get_large (j_common_ptr cinfo, size_t sizeofobject) { + (void) cinfo; return (void FAR *) malloc(sizeofobject); } GLOBAL(void) jpeg_free_large (j_common_ptr cinfo, void FAR * object, size_t sizeofobject) { - - free(object); + (void) cinfo; + (void) sizeofobject; + free(object); } @@ -74,6 +79,9 @@ jpeg_mem_available (j_common_ptr cinfo, long min_bytes_needed, long max_bytes_needed, long already_allocated) { + (void) cinfo; + (void) min_bytes_needed; + (void) already_allocated; return max_bytes_needed; } @@ -88,6 +96,8 @@ jpeg_open_backing_store (j_common_ptr cinfo, backing_store_ptr info, long total_bytes_needed) { + (void) info; + (void) total_bytes_needed; ERREXIT(cinfo, JERR_NO_BACKING_STORE); } @@ -100,11 +110,13 @@ GLOBAL(long) jpeg_mem_init (j_common_ptr cinfo) { + (void) cinfo; return 0; /* just set max_memory_to_use to 0 */ } GLOBAL(void) jpeg_mem_term (j_common_ptr cinfo) { + (void) cinfo; /* no work */ } diff -Nru dcmtk-3.6.6/dcmjpeg/libijg8/jpeglib8.h dcmtk-3.6.7/dcmjpeg/libijg8/jpeglib8.h --- dcmtk-3.6.6/dcmjpeg/libijg8/jpeglib8.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmjpeg/libijg8/jpeglib8.h 2022-04-28 13:47:25.000000000 +0000 @@ -780,14 +780,6 @@ typedef struct jvirt_barray_control * jvirt_barray_ptr; -#ifdef C_LOSSLESS_SUPPORTED -#define NEED_DARRAY -#else -#ifdef D_LOSSLESS_SUPPORTED -#define NEED_DARRAY -#endif -#endif - struct jpeg_memory_mgr { /* Method pointers */ JMETHOD(void *, alloc_small, (j_common_ptr cinfo, int pool_id, @@ -800,11 +792,9 @@ JMETHOD(JBLOCKARRAY, alloc_barray, (j_common_ptr cinfo, int pool_id, JDIMENSION blocksperrow, JDIMENSION numrows)); -#ifdef NEED_DARRAY JMETHOD(JDIFFARRAY, alloc_darray, (j_common_ptr cinfo, int pool_id, JDIMENSION diffsperrow, JDIMENSION numrows)); -#endif JMETHOD(jvirt_sarray_ptr, request_virt_sarray, (j_common_ptr cinfo, int pool_id, boolean pre_zero, diff -Nru dcmtk-3.6.6/dcmjpeg/libijg8/jquant1.c dcmtk-3.6.7/dcmjpeg/libijg8/jquant1.c --- dcmtk-3.6.6/dcmjpeg/libijg8/jquant1.c 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmjpeg/libijg8/jquant1.c 2022-04-28 13:47:25.000000000 +0000 @@ -251,6 +251,8 @@ * (Forcing the upper and lower values to the limits ensures that * dithering can't produce a color outside the selected gamut.) */ + (void) cinfo; + (void) ci; return (int) (((IJG_INT32) j * MAXJSAMPLE + maxj/2) / maxj); } @@ -260,6 +262,8 @@ /* Return largest input value that should map to j'th output value */ /* Must have largest(j=0) >= 0, and largest(j=maxj) >= MAXJSAMPLE */ { + (void) cinfo; + (void) ci; /* Breakpoints are halfway between values returned by output_value */ return (int) (((IJG_INT32) (2*j + 1) * MAXJSAMPLE + maxj) / (2*maxj)); } @@ -740,6 +744,7 @@ METHODDEF(void) start_pass_1_quant (j_decompress_ptr cinfo, boolean is_pre_scan) { + (void) is_pre_scan; my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize; size_t arraysize; int i; @@ -797,6 +802,7 @@ METHODDEF(void) finish_pass_1_quant (j_decompress_ptr cinfo) { + (void) cinfo; /* no work in 1-pass case */ } diff -Nru dcmtk-3.6.6/dcmjpeg/libijg8/jquant2.c dcmtk-3.6.7/dcmjpeg/libijg8/jquant2.c --- dcmtk-3.6.6/dcmjpeg/libijg8/jquant2.c 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmjpeg/libijg8/jquant2.c 2022-04-28 13:47:25.000000000 +0000 @@ -224,6 +224,7 @@ prescan_quantize (j_decompress_ptr cinfo, JSAMPARRAY input_buf, JSAMPARRAY output_buf, int num_rows) { + (void) output_buf; my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize; register JSAMPROW ptr; register histptr histp; @@ -1155,6 +1156,7 @@ METHODDEF(void) finish_pass2 (j_decompress_ptr cinfo) { + (void) cinfo; /* no work */ } diff -Nru dcmtk-3.6.6/dcmjpeg/libijg8/Makefile.dep dcmtk-3.6.7/dcmjpeg/libijg8/Makefile.dep --- dcmtk-3.6.6/dcmjpeg/libijg8/Makefile.dep 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmjpeg/libijg8/Makefile.dep 2022-04-28 13:47:25.000000000 +0000 @@ -204,7 +204,8 @@ jmemmgr.o: jmemmgr.c jinclude8.h jconfig8.h \ ../../config/include/dcmtk/config/osconfig.h jpeglib8.h jmorecfg8.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h jpegint8.h jerror8.h \ - jmemsys8.h + jmemsys8.h ../../ofstd/include/dcmtk/ofstd/ofdiag.h \ + ../../ofstd/include/dcmtk/ofstd/diag/constexp.def jmemnobs.o: jmemnobs.c jinclude8.h jconfig8.h \ ../../config/include/dcmtk/config/osconfig.h jpeglib8.h jmorecfg8.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h jpegint8.h jerror8.h \ diff -Nru dcmtk-3.6.6/dcmjpeg/libsrc/CMakeLists.txt dcmtk-3.6.7/dcmjpeg/libsrc/CMakeLists.txt --- dcmtk-3.6.6/dcmjpeg/libsrc/CMakeLists.txt 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmjpeg/libsrc/CMakeLists.txt 2022-04-28 13:47:25.000000000 +0000 @@ -2,6 +2,35 @@ 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) +DCMTK_ADD_LIBRARY(dcmjpeg + ddpiimpl.cc + dipijpeg.cc + djcodecd.cc + djcodece.cc + djcparam.cc + djdecbas.cc + djdecext.cc + djdeclol.cc + djdecode.cc + djdecpro.cc + djdecsps.cc + djdecsv1.cc + djdijg12.cc + djdijg8.cc + djdijg16.cc + djeijg12.cc + djeijg8.cc + djeijg16.cc + djencbas.cc + djencext.cc + djenclol.cc + djencode.cc + djencpro.cc + djencsps.cc + djencsv1.cc + djrplol.cc + djrploss.cc + djutils.cc +) DCMTK_TARGET_LINK_MODULES(dcmjpeg ofstd oflog dcmdata dcmimgle dcmimage ijg8 ijg12 ijg16) diff -Nru dcmtk-3.6.6/dcmjpeg/libsrc/dipijpeg.cc dcmtk-3.6.7/dcmjpeg/libsrc/dipijpeg.cc --- dcmtk-3.6.6/dcmjpeg/libsrc/dipijpeg.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmjpeg/libsrc/dipijpeg.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2001-2014, OFFIS e.V. + * Copyright (C) 2001-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -24,10 +24,9 @@ #include "dcmtk/dcmdata/dctypes.h" #include "dcmtk/dcmimgle/diimage.h" #include "dcmtk/dcmjpeg/dipijpeg.h" - -#define INCLUDE_CSETJMP -#define INCLUDE_CSTDIO #include "dcmtk/ofstd/ofstdinc.h" +#include "dcmtk/ofstd/ofdiag.h" +#include BEGIN_EXTERN_C #define boolean ijg_boolean @@ -42,11 +41,12 @@ #undef const #endif -#ifdef USE_STD_CXX_INCLUDES // Solaris defines longjmp() in namespace std, other compilers don't... -namespace std { } -using namespace std; -#endif +using STD_NAMESPACE longjmp; +using STD_NAMESPACE jmp_buf; + +#include DCMTK_DIAGNOSTIC_PUSH +#include DCMTK_DIAGNOSTIC_IGNORE_VISUAL_STUDIO_DECLSPEC_PADDING_WARNING // private error handler struct struct DIEIJG8ErrorStruct @@ -59,6 +59,8 @@ const DiJPEGPlugin *instance; }; +#include DCMTK_DIAGNOSTIC_POP + // callback forward declarations void DIEIJG8ErrorExit(j_common_ptr); void DIEIJG8OutputMessage(j_common_ptr cinfo); @@ -137,6 +139,8 @@ } } +#include DCMTK_DIAGNOSTIC_PUSH +#include DCMTK_DIAGNOSTIC_IGNORE_VISUAL_STUDIO_OBJECT_DESTRUCTION_WARNING int DiJPEGPlugin::write(DiImage *image, FILE *stream, @@ -239,6 +243,8 @@ return result; } +#include DCMTK_DIAGNOSTIC_POP + OFString DiJPEGPlugin::getLibraryVersionString() { diff -Nru dcmtk-3.6.6/dcmjpeg/libsrc/djcodece.cc dcmtk-3.6.7/dcmjpeg/libsrc/djcodece.cc --- dcmtk-3.6.6/dcmjpeg/libsrc/djcodece.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmjpeg/libsrc/djcodece.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2001-2020, OFFIS e.V. + * Copyright (C) 2001-2022, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -47,9 +47,7 @@ // dcmimgle includes #include "dcmtk/dcmimgle/dcmimage.h" /* for class DicomImage */ -#define INCLUDE_CMATH -#include "dcmtk/ofstd/ofstdinc.h" - +#include DJCodecEncoder::DJCodecEncoder() : DcmCodec() @@ -174,16 +172,17 @@ // YCbCr color image result = encodeColorImage(OFTrue, OFreinterpret_cast(DcmItem*, dataset), toRepParam, pixSeq, djcp, compressionRatio); break; - case EPI_Unknown: - // unknown color model - bail out - result = EJ_UnsupportedPhotometricInterpretation; - break; case EPI_Missing: // photometric interpretation missing. If ACR-NEMA compatibility is activated, we treat this as MONOCHOME2, otherwise we report an error if (djcp->getAcrNemaCompatibility()) result = encodeMonochromeImage(OFreinterpret_cast(DcmItem*, dataset), toRepParam, pixSeq, djcp, compressionRatio); else result = EJ_UnsupportedPhotometricInterpretation; break; + case EPI_Unknown: + default: + // unknown color model - bail out + result = EJ_UnsupportedPhotometricInterpretation; + break; } // the following operations do not affect the Image Pixel Module @@ -491,7 +490,7 @@ { DcmItem *datsetItem = OFreinterpret_cast(DcmItem*, dataset); double compressionRatio = 0.0; - const Uint16* pixelData; + const Uint16* pixelData = NULL; size_t length = 0; Uint16 bitsAllocated = 0; Uint16 bitsStored = 0; @@ -508,7 +507,7 @@ OFBool planConfSwitched = OFFalse; // true if planar configuration was toggled DcmOffsetList offsetList; OFString photometricInterpretation; - DcmElement *dummyElem; + DcmElement *dummyElem = NULL; // get relevant attributes for encoding from dataset result = datsetItem->findAndGetUint16(DCM_BitsStored, bitsStored); @@ -523,7 +522,8 @@ if (result.good()) { result = datsetItem->findAndGetSint32(DCM_NumberOfFrames, numberOfFrames); - if (result.bad() || numberOfFrames < 1) numberOfFrames = 1; + if (result.bad() || numberOfFrames < 1) + numberOfFrames = 1; result = EC_Normal; } if (result.bad()) @@ -544,7 +544,7 @@ } // make sure that all the descriptive attributes have sensible values - if ((columns < 1)||(rows < 1)||(samplesPerPixel < 1)) + if ((columns < 1) || (rows < 1) || (samplesPerPixel < 1)) { DCMJPEG_ERROR("True lossless encoder: Invalid attribute values in pixel module"); return EC_CannotChangeRepresentation; @@ -574,10 +574,10 @@ interpr = EPI_Unknown; // IJG libs need "color by pixel", transform if required - if (result.good() && (samplesPerPixel > 1) ) + if (result.good() && (samplesPerPixel > 1)) { result = datsetItem->findAndGetUint16(DCM_PlanarConfiguration, planarConfiguration); - if ( result.good() && (planarConfiguration == 1) ) + if (result.good() && (planarConfiguration == 1)) { if (bytesAllocated == 1) result = togglePlanarConfiguration8(OFreinterpret_cast(Uint8*, OFconst_cast(Uint16*, pixelData)), length, samplesPerPixel, OFstatic_cast(Uint16, 1) /* switch to "by pixel"*/); @@ -603,7 +603,7 @@ if ((gLocalByteOrder == EBO_BigEndian) && (bitsAllocated == 8)) { result = swapIfNecessary(EBO_LittleEndian, gLocalByteOrder, OFconst_cast(Uint16*, pixelData), OFstatic_cast(Uint32, length), sizeof(Uint16)); - if ( result.bad() ) + if (result.bad()) { DCMJPEG_ERROR("True lossless encoder: Unable to swap bytes to respect local byte ordering"); return EC_CannotChangeRepresentation; @@ -617,13 +617,16 @@ if (result.good()) { pixelSequence = new DcmPixelSequence(DCM_PixelSequenceTag); - if (pixelSequence == NULL) result = EC_MemoryExhausted; + if (pixelSequence == NULL) + result = EC_MemoryExhausted; else { // create empty offset table offsetTable = new DcmPixelItem(DCM_PixelItemTag); - if (offsetTable == NULL) result = EC_MemoryExhausted; - else pixelSequence->insert(offsetTable); + if (offsetTable == NULL) + result = EC_MemoryExhausted; + else + pixelSequence->insert(offsetTable); } } @@ -638,7 +641,7 @@ if (jpeg) { // main loop for compression: compress each frame - for (unsigned int i=0; iencode(columns, rows, interpr, samplesPerPixel, OFreinterpret_cast(Uint16*, OFconst_cast(Uint8*, framePointer)), jpegData, jpegLen); } // update variables - compressedSize+=jpegLen; - framePointer+=frameSize; + compressedSize += jpegLen; + framePointer += frameSize; if (jpegLen == 0) { DCMJPEG_ERROR("True lossless encoder: Error encoding frame"); @@ -678,7 +681,7 @@ delete pixelSequence; delete jpeg; // encoder no longer in use - if ((result.good()) && (djcp->getCreateOffsetTable())) + if (result.good() && djcp->getCreateOffsetTable()) { // create offset table result = offsetTable->createOffsetTable(offsetList); @@ -688,30 +691,34 @@ // but other modules such as SOP Common. We only perform these // changes if we're on the main level of the datsetItem, // which should always identify itself as datsetItem, not as item. - - // update derivation description reflecting the JPEG compression applied - result = updateDerivationDescription(datsetItem, toRepParam, djcp, OFstatic_cast(Uint8, bitsAllocated), compressionRatio); - - if ( (datsetItem->ident() == EVR_dataset) && result.good() ) + if (datsetItem->ident() == EVR_dataset) { - // convert to Secondary Capture if requested by user. - // This method creates a new SOP class UID, so it should be executed - // after the call to newInstance() which creates a Source Image Sequence. - if ( djcp->getConvertToSC() || (djcp->getUIDCreation() == EUC_always) ) + if (result.good()) { - if (djcp->getConvertToSC()) + // update derivation description reflecting the JPEG compression applied + result = updateDerivationDescription(datsetItem, toRepParam, djcp, OFstatic_cast(Uint8, bitsAllocated), compressionRatio); + } + if (result.good()) + { + // convert to Secondary Capture if requested by user. + // This method creates a new SOP class UID, so it should be executed + // after the call to newInstance() which creates a Source Image Sequence. + if (djcp->getConvertToSC() || (djcp->getUIDCreation() == EUC_always)) { - result = DcmCodec::convertToSecondaryCapture(datsetItem); + if (djcp->getConvertToSC()) + { + result = DcmCodec::convertToSecondaryCapture(datsetItem); + } + // update image type (set to DERIVED) + if (result.good()) + result = DcmCodec::updateImageType(datsetItem); + if (result.good()) + result = DcmCodec::newInstance(OFreinterpret_cast(DcmItem*, datsetItem), "DCM", "121320", "Uncompressed predecessor"); } - // update image type (set to DERIVED) - if (result.good()) - result = DcmCodec::updateImageType(datsetItem); - if (result.good()) - result = DcmCodec::newInstance(OFreinterpret_cast(DcmItem*, datsetItem), "DCM", "121320", "Uncompressed predecessor"); } } // switch _original_ pixel data back to "color by plane", if required - if (planConfSwitched) + if (result.good() && planConfSwitched) { if (bytesAllocated == 1) result = togglePlanarConfiguration8(OFreinterpret_cast(Uint8*, OFconst_cast(Uint16*, pixelData)), length, samplesPerPixel, OFstatic_cast(Uint16, 0) /*switch to "by plane"*/); diff -Nru dcmtk-3.6.6/dcmjpeg/libsrc/djdijg12.cc dcmtk-3.6.7/dcmjpeg/libsrc/djdijg12.cc --- dcmtk-3.6.6/dcmjpeg/libsrc/djdijg12.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmjpeg/libsrc/djdijg12.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2001-2014, OFFIS e.V. + * Copyright (C) 2001-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -23,11 +23,9 @@ #include "dcmtk/dcmjpeg/djdijg12.h" #include "dcmtk/dcmjpeg/djcparam.h" #include "dcmtk/dcmdata/dcerror.h" - -#define INCLUDE_CSTDIO -#define INCLUDE_CSETJMP -#define INCLUDE_CSTRING #include "dcmtk/ofstd/ofstdinc.h" +#include "dcmtk/ofstd/ofdiag.h" +#include // These two macros are re-defined in the IJG header files. // We undefine them here and hope that IJG's configure has @@ -50,11 +48,12 @@ #undef const #endif -#ifdef USE_STD_CXX_INCLUDES // Solaris defines longjmp() in namespace std, other compilers don't... -namespace std { } -using namespace std; -#endif +using STD_NAMESPACE longjmp; +using STD_NAMESPACE jmp_buf; + +#include DCMTK_DIAGNOSTIC_PUSH +#include DCMTK_DIAGNOSTIC_IGNORE_VISUAL_STUDIO_DECLSPEC_PADDING_WARNING // private error handler struct struct DJDIJG12ErrorStruct @@ -69,6 +68,8 @@ DJDecompressIJG12Bit *instance; }; +#include DCMTK_DIAGNOSTIC_POP + // private source manager struct struct DJDIJG12SourceManagerStruct { @@ -202,6 +203,8 @@ cleanup(); } +#include DCMTK_DIAGNOSTIC_PUSH +#include DCMTK_DIAGNOSTIC_IGNORE_VISUAL_STUDIO_OBJECT_DESTRUCTION_WARNING OFCondition DJDecompressIJG12Bit::init() { @@ -449,6 +452,8 @@ return EC_Normal; } +#include DCMTK_DIAGNOSTIC_POP + void DJDecompressIJG12Bit::emitMessage(int msg_level) const { // This is how we map the message levels: diff -Nru dcmtk-3.6.6/dcmjpeg/libsrc/djdijg16.cc dcmtk-3.6.7/dcmjpeg/libsrc/djdijg16.cc --- dcmtk-3.6.6/dcmjpeg/libsrc/djdijg16.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmjpeg/libsrc/djdijg16.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2001-2018, OFFIS e.V. + * Copyright (C) 2001-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -23,11 +23,9 @@ #include "dcmtk/dcmjpeg/djdijg16.h" #include "dcmtk/dcmjpeg/djcparam.h" #include "dcmtk/dcmdata/dcerror.h" - -#define INCLUDE_CSTDIO -#define INCLUDE_CSETJMP -#define INCLUDE_CSTRING #include "dcmtk/ofstd/ofstdinc.h" +#include "dcmtk/ofstd/ofdiag.h" +#include // These two macros are re-defined in the IJG header files. // We undefine them here and hope that IJG's configure has @@ -50,11 +48,12 @@ #undef const #endif -#ifdef USE_STD_CXX_INCLUDES // Solaris defines longjmp() in namespace std, other compilers don't... -namespace std { } -using namespace std; -#endif +using STD_NAMESPACE longjmp; +using STD_NAMESPACE jmp_buf; + +#include DCMTK_DIAGNOSTIC_PUSH +#include DCMTK_DIAGNOSTIC_IGNORE_VISUAL_STUDIO_DECLSPEC_PADDING_WARNING // private error handler struct struct DJDIJG16ErrorStruct @@ -69,6 +68,8 @@ DJDecompressIJG16Bit *instance; }; +#include DCMTK_DIAGNOSTIC_POP + // private source manager struct struct DJDIJG16SourceManagerStruct { @@ -202,6 +203,8 @@ cleanup(); } +#include DCMTK_DIAGNOSTIC_PUSH +#include DCMTK_DIAGNOSTIC_IGNORE_VISUAL_STUDIO_OBJECT_DESTRUCTION_WARNING OFCondition DJDecompressIJG16Bit::init() { @@ -452,6 +455,8 @@ return EC_Normal; } +#include DCMTK_DIAGNOSTIC_POP + void DJDecompressIJG16Bit::emitMessage(int msg_level) const { // This is how we map the message levels: diff -Nru dcmtk-3.6.6/dcmjpeg/libsrc/djdijg8.cc dcmtk-3.6.7/dcmjpeg/libsrc/djdijg8.cc --- dcmtk-3.6.6/dcmjpeg/libsrc/djdijg8.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmjpeg/libsrc/djdijg8.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2001-2014, OFFIS e.V. + * Copyright (C) 2001-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -23,11 +23,9 @@ #include "dcmtk/dcmjpeg/djdijg8.h" #include "dcmtk/dcmjpeg/djcparam.h" #include "dcmtk/dcmdata/dcerror.h" - -#define INCLUDE_CSTDIO -#define INCLUDE_CSETJMP -#define INCLUDE_CSTRING #include "dcmtk/ofstd/ofstdinc.h" +#include "dcmtk/ofstd/ofdiag.h" +#include // These two macros are re-defined in the IJG header files. // We undefine them here and hope that IJG's configure has @@ -50,11 +48,13 @@ #undef const #endif -#ifdef USE_STD_CXX_INCLUDES // Solaris defines longjmp() in namespace std, other compilers don't... -namespace std { } -using namespace std; -#endif +using STD_NAMESPACE longjmp; +using STD_NAMESPACE jmp_buf; + +#include DCMTK_DIAGNOSTIC_PUSH +#include DCMTK_DIAGNOSTIC_IGNORE_VISUAL_STUDIO_DECLSPEC_PADDING_WARNING +#include DCMTK_DIAGNOSTIC_IGNORE_VISUAL_STUDIO_OBJECT_DESTRUCTION_WARNING // private error handler struct struct DJDIJG8ErrorStruct @@ -69,6 +69,8 @@ DJDecompressIJG8Bit *instance; }; +#include DCMTK_DIAGNOSTIC_POP + // private source manager struct struct DJDIJG8SourceManagerStruct { @@ -202,6 +204,8 @@ cleanup(); } +#include DCMTK_DIAGNOSTIC_PUSH +#include DCMTK_DIAGNOSTIC_IGNORE_VISUAL_STUDIO_OBJECT_DESTRUCTION_WARNING OFCondition DJDecompressIJG8Bit::init() { @@ -449,6 +453,8 @@ return EC_Normal; } +#include DCMTK_DIAGNOSTIC_POP + void DJDecompressIJG8Bit::emitMessage(int msg_level) const { // This is how we map the message levels: diff -Nru dcmtk-3.6.6/dcmjpeg/libsrc/djeijg12.cc dcmtk-3.6.7/dcmjpeg/libsrc/djeijg12.cc --- dcmtk-3.6.6/dcmjpeg/libsrc/djeijg12.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmjpeg/libsrc/djeijg12.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1997-2018, OFFIS e.V. + * Copyright (C) 1997-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -23,11 +23,9 @@ #include "dcmtk/dcmjpeg/djeijg12.h" #include "dcmtk/dcmjpeg/djcparam.h" #include "dcmtk/dcmdata/dcerror.h" - -#define INCLUDE_CSTDIO -#define INCLUDE_CSETJMP -#define INCLUDE_CSTRING #include "dcmtk/ofstd/ofstdinc.h" +#include "dcmtk/ofstd/ofdiag.h" +#include // These two macros are re-defined in the IJG header files. // We undefine them here and hope that IJG's configure has @@ -54,11 +52,12 @@ #undef const #endif -#ifdef USE_STD_CXX_INCLUDES // Solaris defines longjmp() in namespace std, other compilers don't... -namespace std { } -using namespace std; -#endif +using STD_NAMESPACE longjmp; +using STD_NAMESPACE jmp_buf; + +#include DCMTK_DIAGNOSTIC_PUSH +#include DCMTK_DIAGNOSTIC_IGNORE_VISUAL_STUDIO_DECLSPEC_PADDING_WARNING // private error handler struct struct DJEIJG12ErrorStruct @@ -73,6 +72,8 @@ DJCompressIJG12Bit *instance; }; +#include DCMTK_DIAGNOSTIC_POP + // callback forward declarations void DJEIJG12ErrorExit(j_common_ptr); void DJEIJG12EmitMessage(j_common_ptr cinfo, int msg_level); @@ -336,6 +337,9 @@ return EC_IllegalCall; } +#include DCMTK_DIAGNOSTIC_PUSH +#include DCMTK_DIAGNOSTIC_IGNORE_VISUAL_STUDIO_OBJECT_DESTRUCTION_WARNING + OFCondition DJCompressIJG12Bit::encode( Uint16 columns, Uint16 rows, @@ -488,6 +492,8 @@ return EC_Normal; } +#include DCMTK_DIAGNOSTIC_POP + void DJCompressIJG12Bit::initDestination(jpeg_compress_struct *cinfo) { cleanup(); // erase old list of compressed blocks, if any diff -Nru dcmtk-3.6.6/dcmjpeg/libsrc/djeijg16.cc dcmtk-3.6.7/dcmjpeg/libsrc/djeijg16.cc --- dcmtk-3.6.6/dcmjpeg/libsrc/djeijg16.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmjpeg/libsrc/djeijg16.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1997-2018, OFFIS e.V. + * Copyright (C) 1997-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -23,11 +23,9 @@ #include "dcmtk/dcmjpeg/djeijg16.h" #include "dcmtk/dcmjpeg/djcparam.h" #include "dcmtk/dcmdata/dcerror.h" - -#define INCLUDE_CSTDIO -#define INCLUDE_CSETJMP -#define INCLUDE_CSTRING #include "dcmtk/ofstd/ofstdinc.h" +#include "dcmtk/ofstd/ofdiag.h" +#include // These two macros are re-defined in the IJG header files. // We undefine them here and hope that IJG's configure has @@ -54,11 +52,13 @@ #undef const #endif -#ifdef USE_STD_CXX_INCLUDES // Solaris defines longjmp() in namespace std, other compilers don't... -namespace std { } -using namespace std; -#endif +using STD_NAMESPACE longjmp; +using STD_NAMESPACE jmp_buf; + +#include DCMTK_DIAGNOSTIC_PUSH +#include DCMTK_DIAGNOSTIC_IGNORE_VISUAL_STUDIO_DECLSPEC_PADDING_WARNING +#include DCMTK_DIAGNOSTIC_IGNORE_VISUAL_STUDIO_DECLSPEC_PADDING_WARNING // private error handler struct struct DJEIJG16ErrorStruct @@ -73,6 +73,8 @@ DJCompressIJG16Bit *instance; }; +#include DCMTK_DIAGNOSTIC_POP + // callback forward declarations void DJEIJG16ErrorExit(j_common_ptr); void DJEIJG16EmitMessage(j_common_ptr cinfo, int msg_level); @@ -181,6 +183,9 @@ return EC_IllegalCall; } +#include DCMTK_DIAGNOSTIC_PUSH +#include DCMTK_DIAGNOSTIC_IGNORE_VISUAL_STUDIO_OBJECT_DESTRUCTION_WARNING + OFCondition DJCompressIJG16Bit::encode( Uint16 columns, Uint16 rows, @@ -324,6 +329,8 @@ return EC_Normal; } +#include DCMTK_DIAGNOSTIC_POP + void DJCompressIJG16Bit::initDestination(jpeg_compress_struct *cinfo) { cleanup(); // erase old list of compressed blocks, if any diff -Nru dcmtk-3.6.6/dcmjpeg/libsrc/djeijg8.cc dcmtk-3.6.7/dcmjpeg/libsrc/djeijg8.cc --- dcmtk-3.6.6/dcmjpeg/libsrc/djeijg8.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmjpeg/libsrc/djeijg8.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1997-2018, OFFIS e.V. + * Copyright (C) 1997-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -23,11 +23,9 @@ #include "dcmtk/dcmjpeg/djeijg8.h" #include "dcmtk/dcmjpeg/djcparam.h" #include "dcmtk/dcmdata/dcerror.h" - -#define INCLUDE_CSTDIO -#define INCLUDE_CSETJMP -#define INCLUDE_CSTRING #include "dcmtk/ofstd/ofstdinc.h" +#include "dcmtk/ofstd/ofdiag.h" +#include // These two macros are re-defined in the IJG header files. // We undefine them here and hope that IJG's configure has @@ -54,11 +52,12 @@ #undef const #endif -#ifdef USE_STD_CXX_INCLUDES // Solaris defines longjmp() in namespace std, other compilers don't... -namespace std { } -using namespace std; -#endif +using STD_NAMESPACE longjmp; +using STD_NAMESPACE jmp_buf; + +#include DCMTK_DIAGNOSTIC_PUSH +#include DCMTK_DIAGNOSTIC_IGNORE_VISUAL_STUDIO_DECLSPEC_PADDING_WARNING // private error handler struct struct DJEIJG8ErrorStruct @@ -73,6 +72,8 @@ DJCompressIJG8Bit *instance; }; +#include DCMTK_DIAGNOSTIC_POP + // callback forward declarations void DJEIJG8ErrorExit(j_common_ptr); void DJEIJG8EmitMessage(j_common_ptr cinfo, int msg_level); @@ -337,6 +338,9 @@ return EC_IllegalCall; } +#include DCMTK_DIAGNOSTIC_PUSH +#include DCMTK_DIAGNOSTIC_IGNORE_VISUAL_STUDIO_OBJECT_DESTRUCTION_WARNING + OFCondition DJCompressIJG8Bit::encode( Uint16 columns, Uint16 rows, @@ -490,6 +494,8 @@ return EC_Normal; } +#include DCMTK_DIAGNOSTIC_POP + void DJCompressIJG8Bit::initDestination(jpeg_compress_struct *cinfo) { cleanup(); // erase old list of compressed blocks, if any diff -Nru dcmtk-3.6.6/dcmjpeg/libsrc/djutils.cc dcmtk-3.6.7/dcmjpeg/libsrc/djutils.cc --- dcmtk-3.6.6/dcmjpeg/libsrc/djutils.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmjpeg/libsrc/djutils.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1997-2019, OFFIS e.V. + * Copyright (C) 1997-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -24,9 +24,6 @@ #include "dcmtk/dcmdata/dcdeftag.h" /* for tag constants */ #include "dcmtk/dcmdata/dcitem.h" /* for class DcmItem */ -#define INCLUDE_CCTYPE -#include "dcmtk/ofstd/ofstdinc.h" - OFLogger DCM_dcmjpegLogger = OFLog::getLogger("dcmtk.dcmjpeg"); makeOFConditionConst(EJ_Suspension, OFM_dcmjpeg, 1, OF_error, "IJG codec suspension return" ); diff -Nru dcmtk-3.6.6/dcmjpeg/libsrc/Makefile.dep dcmtk-3.6.7/dcmjpeg/libsrc/Makefile.dep --- dcmtk-3.6.6/dcmjpeg/libsrc/Makefile.dep 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmjpeg/libsrc/Makefile.dep 2022-04-28 13:47:25.000000000 +0000 @@ -152,9 +152,14 @@ ../include/dcmtk/dcmjpeg/dipijpeg.h \ ../../dcmimgle/include/dcmtk/dcmimgle/diplugin.h \ ../include/dcmtk/dcmjpeg/djutils.h ../include/dcmtk/dcmjpeg/djdefine.h \ + ../../ofstd/include/dcmtk/ofstd/ofdiag.h \ ../../dcmjpeg/libijg8/jpeglib8.h ../../dcmjpeg/libijg8/jconfig8.h \ ../../dcmjpeg/libijg8/jmorecfg8.h ../../dcmjpeg/libijg8/jerror8.h \ - ../../dcmjpeg/libijg8/jpegint8.h ../../dcmjpeg/libijg8/jversion8.h + ../../dcmjpeg/libijg8/jpegint8.h ../../dcmjpeg/libijg8/jversion8.h \ + ../../ofstd/include/dcmtk/ofstd/diag/push.def \ + ../../ofstd/include/dcmtk/ofstd/diag/vsdeclpd.def \ + ../../ofstd/include/dcmtk/ofstd/diag/pop.def \ + ../../ofstd/include/dcmtk/ofstd/diag/vsobjdes.def djcodecd.o: djcodecd.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmjpeg/djcodecd.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ @@ -822,8 +827,13 @@ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/oflist.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ + ../../ofstd/include/dcmtk/ofstd/ofdiag.h \ ../../dcmjpeg/libijg12/jpeglib12.h ../../dcmjpeg/libijg12/jconfig12.h \ - ../../dcmjpeg/libijg12/jmorecfg12.h ../../dcmjpeg/libijg12/jerror12.h + ../../dcmjpeg/libijg12/jmorecfg12.h ../../dcmjpeg/libijg12/jerror12.h \ + ../../ofstd/include/dcmtk/ofstd/diag/push.def \ + ../../ofstd/include/dcmtk/ofstd/diag/vsdeclpd.def \ + ../../ofstd/include/dcmtk/ofstd/diag/pop.def \ + ../../ofstd/include/dcmtk/ofstd/diag/vsobjdes.def djdijg16.o: djdijg16.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmjpeg/djdijg16.h ../include/dcmtk/dcmjpeg/djdecabs.h \ ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \ @@ -872,8 +882,13 @@ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/oflist.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ + ../../ofstd/include/dcmtk/ofstd/ofdiag.h \ ../../dcmjpeg/libijg16/jpeglib16.h ../../dcmjpeg/libijg16/jconfig16.h \ - ../../dcmjpeg/libijg16/jmorecfg16.h ../../dcmjpeg/libijg16/jerror16.h + ../../dcmjpeg/libijg16/jmorecfg16.h ../../dcmjpeg/libijg16/jerror16.h \ + ../../ofstd/include/dcmtk/ofstd/diag/push.def \ + ../../ofstd/include/dcmtk/ofstd/diag/vsdeclpd.def \ + ../../ofstd/include/dcmtk/ofstd/diag/pop.def \ + ../../ofstd/include/dcmtk/ofstd/diag/vsobjdes.def djdijg8.o: djdijg8.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmjpeg/djdijg8.h ../include/dcmtk/dcmjpeg/djdecabs.h \ ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \ @@ -922,8 +937,13 @@ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/oflist.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ + ../../ofstd/include/dcmtk/ofstd/ofdiag.h \ ../../dcmjpeg/libijg8/jpeglib8.h ../../dcmjpeg/libijg8/jconfig8.h \ - ../../dcmjpeg/libijg8/jmorecfg8.h ../../dcmjpeg/libijg8/jerror8.h + ../../dcmjpeg/libijg8/jmorecfg8.h ../../dcmjpeg/libijg8/jerror8.h \ + ../../ofstd/include/dcmtk/ofstd/diag/push.def \ + ../../ofstd/include/dcmtk/ofstd/diag/vsdeclpd.def \ + ../../ofstd/include/dcmtk/ofstd/diag/vsobjdes.def \ + ../../ofstd/include/dcmtk/ofstd/diag/pop.def djeijg12.o: djeijg12.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmjpeg/djeijg12.h \ ../../ofstd/include/dcmtk/ofstd/oflist.h \ @@ -973,9 +993,14 @@ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ + ../../ofstd/include/dcmtk/ofstd/ofdiag.h \ ../../dcmjpeg/libijg12/jpeglib12.h ../../dcmjpeg/libijg12/jconfig12.h \ ../../dcmjpeg/libijg12/jmorecfg12.h ../../dcmjpeg/libijg12/jerror12.h \ - ../../dcmjpeg/libijg12/jpegint12.h + ../../dcmjpeg/libijg12/jpegint12.h \ + ../../ofstd/include/dcmtk/ofstd/diag/push.def \ + ../../ofstd/include/dcmtk/ofstd/diag/vsdeclpd.def \ + ../../ofstd/include/dcmtk/ofstd/diag/pop.def \ + ../../ofstd/include/dcmtk/ofstd/diag/vsobjdes.def djeijg16.o: djeijg16.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmjpeg/djeijg16.h \ ../../ofstd/include/dcmtk/ofstd/oflist.h \ @@ -1025,9 +1050,14 @@ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ + ../../ofstd/include/dcmtk/ofstd/ofdiag.h \ ../../dcmjpeg/libijg16/jpeglib16.h ../../dcmjpeg/libijg16/jconfig16.h \ ../../dcmjpeg/libijg16/jmorecfg16.h ../../dcmjpeg/libijg16/jerror16.h \ - ../../dcmjpeg/libijg16/jpegint16.h + ../../dcmjpeg/libijg16/jpegint16.h \ + ../../ofstd/include/dcmtk/ofstd/diag/push.def \ + ../../ofstd/include/dcmtk/ofstd/diag/vsdeclpd.def \ + ../../ofstd/include/dcmtk/ofstd/diag/pop.def \ + ../../ofstd/include/dcmtk/ofstd/diag/vsobjdes.def djeijg8.o: djeijg8.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmjpeg/djeijg8.h \ ../../ofstd/include/dcmtk/ofstd/oflist.h \ @@ -1077,9 +1107,14 @@ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ + ../../ofstd/include/dcmtk/ofstd/ofdiag.h \ ../../dcmjpeg/libijg8/jpeglib8.h ../../dcmjpeg/libijg8/jconfig8.h \ ../../dcmjpeg/libijg8/jmorecfg8.h ../../dcmjpeg/libijg8/jerror8.h \ - ../../dcmjpeg/libijg8/jpegint8.h + ../../dcmjpeg/libijg8/jpegint8.h \ + ../../ofstd/include/dcmtk/ofstd/diag/push.def \ + ../../ofstd/include/dcmtk/ofstd/diag/vsdeclpd.def \ + ../../ofstd/include/dcmtk/ofstd/diag/pop.def \ + ../../ofstd/include/dcmtk/ofstd/diag/vsobjdes.def djencbas.o: djencbas.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmjpeg/djencbas.h ../include/dcmtk/dcmjpeg/djcodece.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ diff -Nru dcmtk-3.6.6/dcmjpls/apps/CMakeLists.txt dcmtk-3.6.7/dcmjpls/apps/CMakeLists.txt --- dcmtk-3.6.6/dcmjpls/apps/CMakeLists.txt 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmjpls/apps/CMakeLists.txt 2022-04-28 13:47:25.000000000 +0000 @@ -3,7 +3,7 @@ # declare executables foreach(PROGRAM dcmcjpls dcmdjpls dcml2pnm) - DCMTK_ADD_EXECUTABLE(${PROGRAM} ${PROGRAM}) + DCMTK_ADD_EXECUTABLE(${PROGRAM} ${PROGRAM}.cc) endforeach() # make sure executables are linked to the corresponding libraries diff -Nru dcmtk-3.6.6/dcmjpls/apps/dcmcjpls.cc dcmtk-3.6.7/dcmjpls/apps/dcmcjpls.cc --- dcmtk-3.6.6/dcmjpls/apps/dcmcjpls.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmjpls/apps/dcmcjpls.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2007-2020, OFFIS e.V. + * Copyright (C) 2007-2022, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -21,11 +21,6 @@ #include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ -#define INCLUDE_CSTDLIB -#define INCLUDE_CSTDIO -#define INCLUDE_CSTRING -#include "dcmtk/ofstd/ofstdinc.h" - #include "dcmtk/dcmdata/dctk.h" #include "dcmtk/dcmdata/cmdlnarg.h" #include "dcmtk/ofstd/ofconapp.h" @@ -447,7 +442,7 @@ OFLOG_INFO(dcmcjplsLogger, "DICOM file is already compressed, converting to uncompressed transfer syntax first"); if (EC_Normal != dataset->chooseRepresentation(EXS_LittleEndianExplicit, NULL)) { - OFLOG_FATAL(dcmcjplsLogger, "No conversion from compressed original to uncompressed transfer syntax possible!"); + OFLOG_FATAL(dcmcjplsLogger, "no conversion from compressed original to uncompressed transfer syntax possible"); return 1; } } @@ -463,7 +458,7 @@ } } - OFLOG_INFO(dcmcjplsLogger, "Convert DICOM file to compressed transfer syntax"); + OFLOG_INFO(dcmcjplsLogger, "converting DICOM file to compressed transfer syntax"); //create representation parameter DJLSRepresentationParameter rp(OFstatic_cast(Uint16, opt_nearlossless_deviation), opt_useLosslessProcess); @@ -478,9 +473,9 @@ } if (dataset->canWriteXfer(opt_oxfer)) { - OFLOG_INFO(dcmcjplsLogger, "Output transfer syntax " << opt_oxferSyn.getXferName() << " can be written"); + OFLOG_INFO(dcmcjplsLogger, "output transfer syntax " << opt_oxferSyn.getXferName() << " can be written"); } else { - OFLOG_FATAL(dcmcjplsLogger, "No conversion to transfer syntax " << opt_oxferSyn.getXferName() << " possible!"); + OFLOG_FATAL(dcmcjplsLogger, "no conversion to transfer syntax " << opt_oxferSyn.getXferName() << " possible"); return 1; } diff -Nru dcmtk-3.6.6/dcmjpls/apps/dcmdjpls.cc dcmtk-3.6.7/dcmjpls/apps/dcmdjpls.cc --- dcmtk-3.6.6/dcmjpls/apps/dcmdjpls.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmjpls/apps/dcmdjpls.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2007-2020, OFFIS e.V. + * Copyright (C) 2007-2022, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -21,11 +21,6 @@ #include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ -#define INCLUDE_CSTDLIB -#define INCLUDE_CSTDIO -#define INCLUDE_CSTRING -#include "dcmtk/ofstd/ofstdinc.h" - #include "dcmtk/dcmdata/dctk.h" #include "dcmtk/dcmdata/cmdlnarg.h" #include "dcmtk/ofstd/ofconapp.h" @@ -303,7 +298,7 @@ { OFLOG_FATAL(dcmdjplsLogger, error.text() << ": decompressing file: " << opt_ifname); if (error == EC_CannotChangeRepresentation) - OFLOG_FATAL(dcmdjplsLogger, "Input transfer syntax " << original_xfer.getXferName() << " not supported"); + OFLOG_FATAL(dcmdjplsLogger, "input transfer syntax " << original_xfer.getXferName() << " not supported"); return 1; } diff -Nru dcmtk-3.6.6/dcmjpls/apps/Makefile.dep dcmtk-3.6.7/dcmjpls/apps/Makefile.dep --- dcmtk-3.6.6/dcmjpls/apps/Makefile.dep 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmjpls/apps/Makefile.dep 2022-04-28 13:47:25.000000000 +0000 @@ -1,5 +1,4 @@ dcmcjpls.o: dcmcjpls.cc ../../config/include/dcmtk/config/osconfig.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../dcmdata/include/dcmtk/dcmdata/dctk.h \ ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \ ../../oflog/include/dcmtk/oflog/oflog.h \ @@ -8,6 +7,7 @@ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../oflog/include/dcmtk/oflog/config/defines.h \ ../../oflog/include/dcmtk/oflog/helpers/threadcf.h \ ../../oflog/include/dcmtk/oflog/loglevel.h \ @@ -127,7 +127,6 @@ ../../dcmdata/include/dcmtk/dcmdata/dccodec.h \ ../include/dcmtk/dcmjpls/djrparam.h dcmdjpls.o: dcmdjpls.cc ../../config/include/dcmtk/config/osconfig.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../dcmdata/include/dcmtk/dcmdata/dctk.h \ ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \ ../../oflog/include/dcmtk/oflog/oflog.h \ @@ -136,6 +135,7 @@ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../oflog/include/dcmtk/oflog/config/defines.h \ ../../oflog/include/dcmtk/oflog/helpers/threadcf.h \ ../../oflog/include/dcmtk/oflog/loglevel.h \ @@ -254,7 +254,6 @@ ../include/dcmtk/dcmjpls/djdecode.h dcml2pnm.o: dcml2pnm.cc ../../dcmimage/apps/dcm2pnm.cc \ ../../config/include/dcmtk/config/osconfig.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../dcmdata/include/dcmtk/dcmdata/dctk.h \ ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \ ../../oflog/include/dcmtk/oflog/oflog.h \ @@ -263,6 +262,7 @@ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../oflog/include/dcmtk/oflog/config/defines.h \ ../../oflog/include/dcmtk/oflog/helpers/threadcf.h \ ../../oflog/include/dcmtk/oflog/loglevel.h \ diff -Nru dcmtk-3.6.6/dcmjpls/docs/dcmcjpls.man dcmtk-3.6.7/dcmjpls/docs/dcmcjpls.man --- dcmtk-3.6.6/dcmjpls/docs/dcmcjpls.man 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmjpls/docs/dcmcjpls.man 2022-04-28 13:47:25.000000000 +0000 @@ -183,7 +183,6 @@ # end of image segment marker, i.e. FF D9 00. This is not DICOM conformant # but required for interoperability with the HP LOCO reference implementation, # which does not support extended JPEG-LS bitstreams. - \endverbatim \subsection dcmcjpls_enc_pix_data_encoding_opt encapsulated pixel data encoding options @@ -235,7 +234,7 @@ +ud --uid-default assign new UID if lossy compression (default) - # Assigns a new SOP instance UID if the compression is lossy JPEG. + # Assigns a new SOP instance UID if the compression is lossy JPEG-LS. +ua --uid-always always assign new UID @@ -388,6 +387,6 @@ \section dcmcjpls_copyright COPYRIGHT -Copyright (C) 2009-2020 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany. +Copyright (C) 2009-2022 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany. */ diff -Nru dcmtk-3.6.6/dcmjpls/docs/dcmdjpls.man dcmtk-3.6.7/dcmjpls/docs/dcmdjpls.man --- dcmtk-3.6.6/dcmjpls/docs/dcmdjpls.man 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmjpls/docs/dcmdjpls.man 2022-04-28 13:47:25.000000000 +0000 @@ -280,6 +280,6 @@ \section dcmdjpls_copyright COPYRIGHT -Copyright (C) 2009-2014 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany. +Copyright (C) 2009-2022 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany. */ diff -Nru dcmtk-3.6.6/dcmjpls/docs/dcml2pnm.man dcmtk-3.6.7/dcmjpls/docs/dcml2pnm.man --- dcmtk-3.6.6/dcmjpls/docs/dcml2pnm.man 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmjpls/docs/dcml2pnm.man 2022-04-28 13:47:25.000000000 +0000 @@ -404,8 +404,7 @@ The \e --write-tiff option is only available when DCMTK has been configured and compiled with support for the external \b libtiff TIFF library. The availability of the TIFF compression options depends on the \b libtiff -configuration. In particular, the patented LZW algorithm may not be -available. +configuration. The \e --write-png option is only available when DCMTK has been configured and compiled with support for the external \b libpng PNG library. Option @@ -498,6 +497,6 @@ \section dcml2pnm_copyright COPYRIGHT -Copyright (C) 2001-2020 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany. +Copyright (C) 2001-2022 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany. */ diff -Nru dcmtk-3.6.6/dcmjpls/libcharls/CMakeLists.txt dcmtk-3.6.7/dcmjpls/libcharls/CMakeLists.txt --- dcmtk-3.6.6/dcmjpls/libcharls/CMakeLists.txt 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmjpls/libcharls/CMakeLists.txt 2022-04-28 13:47:25.000000000 +0000 @@ -2,6 +2,10 @@ include_directories("${dcmjpls_SOURCE_DIR}/libcharls" "${ofstd_SOURCE_DIR}/include") # create library from source files -DCMTK_ADD_LIBRARY(dcmtkcharls header intrface jpegls) +DCMTK_ADD_LIBRARY(dcmtkcharls + header.cc + intrface.cc + jpegls.cc +) DCMTK_TARGET_LINK_MODULES(dcmtkcharls ofstd oflog) diff -Nru dcmtk-3.6.6/dcmjpls/libcharls/config.h dcmtk-3.6.7/dcmjpls/libcharls/config.h --- dcmtk-3.6.6/dcmjpls/libcharls/config.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmjpls/libcharls/config.h 2022-04-28 13:47:25.000000000 +0000 @@ -14,9 +14,8 @@ # define assert(t) { } # endif #else -#define INCLUDE_CASSERT -#include "dcmtk/ofstd/ofstdinc.h" -#define ASSERT(t) assert(t) + #include + #define ASSERT(t) assert(t) #endif #if defined(_WIN32) diff -Nru dcmtk-3.6.6/dcmjpls/libcharls/encodstr.h dcmtk-3.6.7/dcmjpls/libcharls/encodstr.h --- dcmtk-3.6.6/dcmjpls/libcharls/encodstr.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmjpls/libcharls/encodstr.h 2022-04-28 13:47:25.000000000 +0000 @@ -5,9 +5,6 @@ #ifndef CHARLS_ENCODERSTRATEGY #define CHARLS_ENCODERSTRATEGY -#define INCLUDE_NEW -#include "dcmtk/ofstd/ofstdinc.h" - #include "dcmtk/ofstd/ofmem.h" #include "dcmtk/ofstd/ofbmanip.h" #include "procline.h" diff -Nru dcmtk-3.6.6/dcmjpls/libcharls/lokuptbl.h dcmtk-3.6.7/dcmjpls/libcharls/lokuptbl.h --- dcmtk-3.6.6/dcmjpls/libcharls/lokuptbl.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmjpls/libcharls/lokuptbl.h 2022-04-28 13:47:25.000000000 +0000 @@ -5,6 +5,7 @@ #ifndef CHARLS_LOOKUPTABLE #define CHARLS_LOOKUPTABLE +#include "dcmtk/ofstd/ofdiag.h" // Tables for fast decoding of short Golomb Codes. @@ -37,11 +38,16 @@ enum { cbit = 8 } ; +#include DCMTK_DIAGNOSTIC_PUSH +#include DCMTK_DIAGNOSTIC_IGNORE_CLASS_MEMACCESS_WARNING + CTable() { ::memset(rgtype, 0, sizeof(rgtype)); } +#include DCMTK_DIAGNOSTIC_POP + void AddEntry(BYTE bvalue, Code c); inlinehint const Code& Get(LONG value) diff -Nru dcmtk-3.6.6/dcmjpls/libcharls/Makefile.dep dcmtk-3.6.7/dcmjpls/libcharls/Makefile.dep --- dcmtk-3.6.6/dcmjpls/libcharls/Makefile.dep 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmjpls/libcharls/Makefile.dep 2022-04-28 13:47:25.000000000 +0000 @@ -1,28 +1,28 @@ 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/ofmem.h \ - ../../ofstd/include/dcmtk/ofstd/ofutil.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../config/include/dcmtk/config/osconfig.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/ofstdinc.h \ + ../../ofstd/include/dcmtk/ofstd/ofstream.h pubtypes.h header.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.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 \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ - ../../config/include/dcmtk/config/osconfig.h pubtypes.h intrface.h \ - ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oflist.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../config/include/dcmtk/config/osconfig.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/ofstdinc.h \ + ../../ofstd/include/dcmtk/ofstd/ofstream.h pubtypes.h intrface.h \ + ../../ofstd/include/dcmtk/ofstd/ofstd.h \ + ../../ofstd/include/dcmtk/ofstd/oflist.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.h \ ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ @@ -35,19 +35,24 @@ ../../ofstd/include/dcmtk/ofstd/ofvector.h \ ../../ofstd/include/dcmtk/ofstd/ofbmanip.h jpegls.o: jpegls.cc config.h util.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ - ../../config/include/dcmtk/config/osconfig.h pubtypes.h streams.h \ - ../../ofstd/include/dcmtk/ofstd/ofvector.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../config/include/dcmtk/config/osconfig.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/ofstdinc.h \ + ../../ofstd/include/dcmtk/ofstd/ofstream.h pubtypes.h streams.h \ + ../../ofstd/include/dcmtk/ofstd/ofvector.h \ ../../ofstd/include/dcmtk/ofstd/ofbmanip.h header.h \ ../../ofstd/include/dcmtk/ofstd/ofmem.h \ ../../ofstd/include/dcmtk/ofstd/ofutil.h \ ../../ofstd/include/dcmtk/ofstd/oftraits.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 + ../../ofstd/include/dcmtk/ofstd/ofdiag.h \ + ../../ofstd/include/dcmtk/ofstd/diag/push.def \ + ../../ofstd/include/dcmtk/ofstd/diag/memacces.def \ + ../../ofstd/include/dcmtk/ofstd/diag/pop.def lltraits.h deftrait.h \ + scan.h ../../ofstd/include/dcmtk/ofstd/ofmap.h \ + ../../ofstd/include/dcmtk/ofstd/oflist.h \ + ../../ofstd/include/dcmtk/ofstd/diag/constexp.def diff -Nru dcmtk-3.6.6/dcmjpls/libcharls/scan.h dcmtk-3.6.7/dcmjpls/libcharls/scan.h --- dcmtk-3.6.6/dcmjpls/libcharls/scan.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmjpls/libcharls/scan.h 2022-04-28 13:47:25.000000000 +0000 @@ -7,16 +7,13 @@ #include "dcmtk/ofstd/ofmap.h" /* For OFPair */ #include "dcmtk/ofstd/oftypes.h" /* For OFTypename */ +#include "dcmtk/ofstd/ofdiag.h" #include "lokuptbl.h" // This file contains the code for handling a "scan". Usually an image is encoded as a single scan. - -#ifdef _MSC_VER -#pragma warning (disable: 4127) -#endif - +#include DCMTK_DIAGNOSTIC_IGNORE_CONST_EXPRESSION_WARNING extern CTable decodingTables[16]; extern OFVector rgquant8Ll; diff -Nru dcmtk-3.6.6/dcmjpls/libcharls/streams.h dcmtk-3.6.7/dcmjpls/libcharls/streams.h --- dcmtk-3.6.6/dcmjpls/libcharls/streams.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmjpls/libcharls/streams.h 2022-04-28 13:47:25.000000000 +0000 @@ -4,9 +4,6 @@ #ifndef CHARLS_STREAMS #define CHARLS_STREAMS -#define INCLUDE_NEW -#include "dcmtk/ofstd/ofstdinc.h" - #include "dcmtk/ofstd/ofvector.h" #include "dcmtk/ofstd/ofbmanip.h" #include "util.h" diff -Nru dcmtk-3.6.6/dcmjpls/libcharls/util.h dcmtk-3.6.7/dcmjpls/libcharls/util.h --- dcmtk-3.6.6/dcmjpls/libcharls/util.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmjpls/libcharls/util.h 2022-04-28 13:47:25.000000000 +0000 @@ -6,8 +6,9 @@ #ifndef CHARLS_UTIL #define CHARLS_UTIL -#define INCLUDE_CSTDDEF -#include "dcmtk/ofstd/ofstdinc.h" +#include +#include "dcmtk/ofstd/oftypes.h" + #include "pubtypes.h" #ifndef MAX diff -Nru dcmtk-3.6.6/dcmjpls/libsrc/CMakeLists.txt dcmtk-3.6.7/dcmjpls/libsrc/CMakeLists.txt --- dcmtk-3.6.6/dcmjpls/libsrc/CMakeLists.txt 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmjpls/libsrc/CMakeLists.txt 2022-04-28 13:47:25.000000000 +0000 @@ -2,6 +2,14 @@ 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) +DCMTK_ADD_LIBRARY(dcmjpls + djcparam.cc + djdecode.cc + djencode.cc + djrparam.cc + djcodecd.cc + djutils.cc + djcodece.cc +) DCMTK_TARGET_LINK_MODULES(dcmjpls ofstd oflog dcmdata dcmimgle dcmimage dcmtkcharls) diff -Nru dcmtk-3.6.6/dcmjpls/libsrc/djcodecd.cc dcmtk-3.6.7/dcmjpls/libsrc/djcodecd.cc --- dcmtk-3.6.6/dcmjpls/libsrc/djcodecd.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmjpls/libsrc/djcodecd.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2007-2020, OFFIS e.V. + * Copyright (C) 2007-2022, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -180,7 +180,7 @@ { // frame is incomplete. Nevertheless skip to next frame. // This permits decompression of faulty multi-frame images. - DCMJPLS_WARN("JPEG-LS bitstream invalid or incomplete, ignoring (but image is likely to be incomplete)."); + DCMJPLS_WARN("JPEG-LS bitstream invalid or incomplete, ignoring (but image is likely to be incomplete)"); result = EC_Normal; } @@ -286,7 +286,7 @@ if (result.good()) { // We got all the data we need from the dataset, let's start decoding - DCMJPLS_DEBUG("Starting to decode frame " << frameNo << " with fragment " << currentItem); + DCMJPLS_DEBUG("starting to decode frame " << frameNo << " with fragment " << currentItem); result = decodeFrame(fromPixSeq, djcp, dataset, frameNo, currentItem, buffer, bufSize, imageFrames, imageColumns, imageRows, imageSamplesPerPixel, bytesPerSample); } @@ -336,12 +336,15 @@ if (imageSamplesPerPixel > 1) { + // get planar configuration from dataset + imagePlanarConfiguration = 2; // invalid value + // warn on invalid value; should we also warn on missing attribute or value? + if (dataset->findAndGetUint16(DCM_PlanarConfiguration, imagePlanarConfiguration).good() && (imagePlanarConfiguration != 0)) + DCMJPLS_WARN("invalid value for PlanarConfiguration " << DCM_PlanarConfiguration << ", should be \"0\""); + switch (cp->getPlanarConfiguration()) { case EJLSPC_restore: - // get planar configuration from dataset - imagePlanarConfiguration = 2; // invalid value - dataset->findAndGetUint16(DCM_PlanarConfiguration, imagePlanarConfiguration); // determine auto default if not found or invalid if (imagePlanarConfiguration > 1) imagePlanarConfiguration = determinePlanarConfiguration(imageSopClass, imagePhotometricInterpretation); @@ -428,11 +431,15 @@ if (result.good() && imageSamplesPerPixel == 3) { + if (params.colorTransform != 0) + { + DCMJPLS_WARN("Color Transformation " << params.colorTransform << " is a non-standard HP/JPEG-LS extension"); + } if (imagePlanarConfiguration == 1 && params.ilv != ILV_NONE) { // The dataset says this should be planarConfiguration == 1, but // it isn't -> convert it. - DCMJPLS_WARN("different planar configuration in JPEG stream, converting to \"1\""); + DCMJPLS_DEBUG("different planar configuration in JPEG-LS bitstream, converting to \"1\""); if (bytesPerSample == 1) result = createPlanarConfiguration1Byte(OFreinterpret_cast(Uint8*, buffer), imageColumns, imageRows); else @@ -442,7 +449,7 @@ { // The dataset says this should be planarConfiguration == 0, but // it isn't -> convert it. - DCMJPLS_WARN("different planar configuration in JPEG stream, converting to \"0\""); + DCMJPLS_DEBUG("different planar configuration in JPEG-LS bitstream, converting to \"0\""); if (bytesPerSample == 1) result = createPlanarConfiguration0Byte(OFreinterpret_cast(Uint8*, buffer), imageColumns, imageRows); else diff -Nru dcmtk-3.6.6/dcmjpls/libsrc/djcodece.cc dcmtk-3.6.7/dcmjpls/libsrc/djcodece.cc --- dcmtk-3.6.6/dcmjpls/libsrc/djcodece.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmjpls/libsrc/djcodece.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2007-2020, OFFIS e.V. + * Copyright (C) 2007-2022, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -29,9 +29,6 @@ #include "dcmtk/ofstd/offile.h" /* for class OFFile */ #include "dcmtk/ofstd/ofbmanip.h" -#define INCLUDE_CMATH -#include "dcmtk/ofstd/ofstdinc.h" - // dcmdata includes #include "dcmtk/dcmdata/dcdatset.h" /* for class DcmDataset */ #include "dcmtk/dcmdata/dcdeftag.h" /* for tag constants */ @@ -722,7 +719,7 @@ if ((jls_params.ilv == ILV_NONE && (ilv == ILV_SAMPLE || ilv == ILV_LINE)) || (ilv == ILV_NONE && (jls_params.ilv == ILV_SAMPLE || jls_params.ilv == ILV_LINE))) { - DCMJPLS_DEBUG("Converting image from " << (ilv == ILV_NONE ? "color-by-plane" : "color-by-pixel") + DCMJPLS_DEBUG("converting image from " << (ilv == ILV_NONE ? "color-by-plane" : "color-by-pixel") << " to " << (jls_params.ilv == ILV_NONE ? "color-by-plane" : "color-by-pixel")); frameBuffer = new Uint8[frameSize]; @@ -784,7 +781,7 @@ if (result.good()) result = dataset->findAndGetUint16(DCM_BitsAllocated, bitsAllocated); if (result.bad()) return result; - // The cooked encoder only handles the following photometic interpretations + // The cooked encoder only handles the following photometric interpretations if (photometricInterpretation != "MONOCHROME1" && photometricInterpretation != "MONOCHROME2" && photometricInterpretation != "RGB" && @@ -822,12 +819,12 @@ if (bitsStored > 16) { - DCMJPLS_WARN("Cannot compress image with " << bitsStored << " bits/sample: JPEG-LS supports max. 16 bits."); + DCMJPLS_WARN("cannot compress image with " << bitsStored << " bits/sample: JPEG-LS supports max. 16 bits"); return EC_JLSUnsupportedBitDepth; } if (bitsStored < 2) { - DCMJPLS_WARN("Cannot compress image with " << bitsStored << " bit/sample: JPEG-LS requires at least 2 bits."); + DCMJPLS_WARN("cannot compress image with " << bitsStored << " bit/sample: JPEG-LS requires at least 2 bits"); return EC_JLSUnsupportedBitDepth; } @@ -920,8 +917,8 @@ result = dataset->putAndInsertUint16(DCM_BitsAllocated, 16); else result = dataset->putAndInsertUint16(DCM_BitsAllocated, 8); - if (result.good()) result = dataset->putAndInsertUint16(DCM_BitsStored, bitsPerSample); - if (result.good()) result = dataset->putAndInsertUint16(DCM_HighBit, bitsPerSample-1); + if (result.good()) result = dataset->putAndInsertUint16(DCM_BitsStored, OFstatic_cast(Uint16, bitsPerSample)); + if (result.good()) result = dataset->putAndInsertUint16(DCM_HighBit, OFstatic_cast(Uint16, (bitsPerSample-1))); if (result.good()) { if (photometricInterpretation == "RGB" || photometricInterpretation == "YBR_FULL") @@ -1103,7 +1100,7 @@ // Unset: jls_params.jfif (thumbnail, dpi) // set parameters T1, T2, T3, MAXVAL and RESET - setCustomParameters(jls_params.custom, depth, nearLosslessDeviation, djcp); + setCustomParameters(jls_params.custom, OFstatic_cast(Uint16, depth), nearLosslessDeviation, djcp); switch (djcp->getJplsInterleaveMode()) { @@ -1138,7 +1135,7 @@ // Do we have to convert the image to color-by-plane now? if (jls_params.ilv == ILV_NONE && jls_params.components != 1) { - DCMJPLS_DEBUG("Converting image from color-by-pixel to color-by-plane"); + DCMJPLS_DEBUG("converting image from color-by-pixel to color-by-plane"); frameBuffer = new Uint8[buffer_size]; framePointer = frameBuffer; @@ -1178,7 +1175,7 @@ Uint32 height, Uint16 bitsAllocated) const { - Uint8 bytesAllocated = bitsAllocated / 8; + Uint8 bytesAllocated = OFstatic_cast(Uint8, (bitsAllocated / 8)); Uint32 planeSize = width * height * bytesAllocated; if (bitsAllocated % 8 != 0) @@ -1203,7 +1200,7 @@ Uint32 height, Uint16 bitsAllocated) const { - Uint8 bytesAllocated = bitsAllocated / 8; + Uint8 bytesAllocated = OFstatic_cast(Uint8, (bitsAllocated / 8)); Uint32 planeSize = width * height * bytesAllocated; if (bitsAllocated % 8 != 0) diff -Nru dcmtk-3.6.6/dcmnet/apps/CMakeLists.txt dcmtk-3.6.7/dcmnet/apps/CMakeLists.txt --- dcmtk-3.6.6/dcmnet/apps/CMakeLists.txt 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmnet/apps/CMakeLists.txt 2022-04-28 13:47:25.000000000 +0000 @@ -3,7 +3,7 @@ # declare executables foreach(PROGRAM dcmrecv dcmsend echoscu findscu getscu movescu storescp storescu termscu) - DCMTK_ADD_EXECUTABLE(${PROGRAM} ${PROGRAM}) + DCMTK_ADD_EXECUTABLE(${PROGRAM} ${PROGRAM}.cc) endforeach() # declare installation files diff -Nru dcmtk-3.6.6/dcmnet/apps/echoscu.cc dcmtk-3.6.7/dcmnet/apps/echoscu.cc --- dcmtk-3.6.6/dcmnet/apps/echoscu.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmnet/apps/echoscu.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1994-2018, OFFIS e.V. + * Copyright (C) 1994-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -21,12 +21,6 @@ #include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ -#define INCLUDE_CSTDLIB -#define INCLUDE_CSTDIO -#define INCLUDE_CSTRING -#define INCLUDE_CSTDARG -#include "dcmtk/ofstd/ofstdinc.h" - #include "dcmtk/dcmnet/dimse.h" #include "dcmtk/dcmnet/diutil.h" #include "dcmtk/dcmnet/dcmtrans.h" /* for dcmSocketSend/ReceiveTimeout */ @@ -128,7 +122,7 @@ OFOStringStream optStream; int result = EXITCODE_NO_ERROR; - const char * opt_peer = NULL; + const char * opt_peer = "localhost"; OFCmdUnsignedInt opt_port = 104; const char * opt_peerTitle = PEERAPPLICATIONTITLE; const char * opt_ourTitle = APPLICATIONTITLE; @@ -141,7 +135,6 @@ int opt_acse_timeout = 30; OFCmdSignedInt opt_socket_timeout = 60; DcmTLSOptions tlsOptions(NET_REQUESTOR); - T_ASC_Network *net; T_ASC_Parameters *params; DIC_NODENAME peerHost; @@ -196,6 +189,12 @@ // add TLS specific command line options if (and only if) we are compiling with OpenSSL tlsOptions.addTLSCommandlineOptions(cmd); +#ifdef WITH_OPENSSL + cmd.addSubGroup("offline certificate verification:"); + cmd.addOption("--verify-cert", "+vc", 1, "[f]ilename: string", "verify certificate against CA settings", OFCommandLine::AF_Exclusive); + cmd.addOption("--is-root-cert", "+rc", 1, "[f]ilename: string", "check if certificate is self-signed root CA", OFCommandLine::AF_Exclusive); +#endif + /* evaluate command line */ prepareCmdLineArgs(argc, argv, OFFIS_CONSOLE_APPLICATION); if (app.parseCommandLine(cmd, argc, argv)) @@ -230,8 +229,18 @@ /* command line parameters */ +#ifdef WITH_OPENSSL + // special handling for the exclusive options that can only be evaluated + // once all other options have been processed + if ((! cmd.findOption("--verify-cert")) && (! cmd.findOption("--is-root-cert"))) + { + cmd.getParam(1, opt_peer); + app.checkParam(cmd.getParamAndCheckMinMax(2, opt_port, 1, 65535)); + } +#else cmd.getParam(1, opt_peer); app.checkParam(cmd.getParamAndCheckMinMax(2, opt_port, 1, 65535)); +#endif OFLog::configureFromCommandLine(cmd, app); @@ -308,6 +317,45 @@ exit(1); } +#ifdef WITH_OPENSSL + if (cmd.findOption( "--verify-cert" )) + { + const char *cert_filename = NULL; + app.checkValue( cmd.getValue( cert_filename ) ); + + cond = tlsOptions.verifyClientCertificate(cert_filename); + if (cond.good()) + { + COUT << "Verification of certificate '" << cert_filename << "' passed." << OFendl; + return EXITCODE_NO_ERROR; + } + else + { + COUT << "Verification of certificate '" << cert_filename << "' failed." << OFendl; + return EXITCODE_INVALID_INPUT_FILE; + } + } + + if (cmd.findOption( "--is-root-cert" )) + { + const char *cert_filename = NULL; + app.checkValue( cmd.getValue( cert_filename ) ); + + cond = tlsOptions.isRootCertificate(cert_filename); + if (cond.good()) + { + COUT << "Certificate '" << cert_filename << "' is a valid, self-signed root CA." << OFendl; + return EXITCODE_NO_ERROR; + } + else + { + COUT << "Certificate '" << cert_filename << "' is not a valid, self-signed root CA." << OFendl; + return EXITCODE_INVALID_INPUT_FILE; + } + } + +#endif + #ifdef PRIVATE_ECHOSCU_CODE PRIVATE_ECHOSCU_CODE #endif @@ -326,8 +374,8 @@ int presentationContextID = 1; /* odd byte value 1, 3, 5, .. 255 */ for (unsigned long ii=0; ii @@ -41,12 +34,15 @@ #endif END_EXTERN_C +#include + #ifdef HAVE_WINDOWS_H #include /* for _mkdir() */ #endif #include "dcmtk/ofstd/ofstd.h" #include "dcmtk/ofstd/ofconapp.h" +#include "dcmtk/ofstd/ofbmanip.h" /* for OFBitmanipTemplate */ #include "dcmtk/ofstd/ofdatime.h" #include "dcmtk/dcmnet/dicom.h" /* for DICOM_APPLICATION_ACCEPTOR */ #include "dcmtk/dcmnet/dimse.h" @@ -1871,24 +1867,31 @@ // create subdirectoryPathAndName (string with full path to new subdirectory) OFStandard::combineDirAndFilename(subdirectoryPathAndName, OFStandard::getDirNameFromPath(tmpStr, cbdata->imageFileName), subdirectoryName); - // check if the subdirectory already exists - // if it already exists dump a warning - if( OFStandard::dirExists(subdirectoryPathAndName) ) - OFLOG_WARN(storescpLogger, "subdirectory for study already exists: " << subdirectoryPathAndName); - else - { - // if it does not exist create it - OFLOG_INFO(storescpLogger, "creating new subdirectory for study: " << subdirectoryPathAndName); + // create the subdirectory and then check errno, in order to avoid a "time of check to time of use" (TOC-TOU) race condition. #ifdef HAVE_WINDOWS_H - if( _mkdir( subdirectoryPathAndName.c_str() ) == -1 ) + int mkdirStatus = _mkdir( subdirectoryPathAndName.c_str() ); #else - if( mkdir( subdirectoryPathAndName.c_str(), S_IRWXU | S_IRWXG | S_IRWXO ) == -1 ) + int mkdirStatus = mkdir( subdirectoryPathAndName.c_str(), S_IRWXU | S_IRWXG | S_IRWXO ); #endif + + if( mkdirStatus == -1 ) + { + if (errno == EEXIST) + { + // If the subdirectory already exists, then re-use it. It might have been created by another + // process receiving images in parallel. + OFLOG_INFO(storescpLogger, "using existing subdirectory for study: " << subdirectoryPathAndName); + } + else { OFLOG_ERROR(storescpLogger, "could not create subdirectory for study: " << subdirectoryPathAndName); rsp->DimseStatus = STATUS_STORE_Error_CannotUnderstand; return; } + } + else + { + OFLOG_INFO(storescpLogger, "created new subdirectory for study: " << subdirectoryPathAndName); // all objects of a study have been received, so a new subdirectory is started. // ->timename counter can be reset, because the next filename can't cause a duplicate. // if no reset would be done, files of a new study (->new directory) would start with a counter in filename @@ -2422,8 +2425,13 @@ #endif } - +#ifdef HAVE_WAITPID static void cleanChildren(pid_t pid, OFBool synch) +#elif defined(HAVE_WAIT3) +static void cleanChildren(pid_t /* pid */, OFBool synch) +#else +static void cleanChildren(pid_t /* pid */, OFBool /* synch */) +#endif /* * This function removes child processes that have terminated, * i.e. converted to zombies. Should be called now and then. diff -Nru dcmtk-3.6.6/dcmnet/apps/storescu.cc dcmtk-3.6.7/dcmnet/apps/storescu.cc --- dcmtk-3.6.6/dcmnet/apps/storescu.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmnet/apps/storescu.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1996-2019, OFFIS e.V. + * Copyright (C) 1996-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -21,12 +21,6 @@ #include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ -#define INCLUDE_CSTDLIB -#define INCLUDE_CSTDIO -#define INCLUDE_CSTRING -#define INCLUDE_CCTYPE -#include "dcmtk/ofstd/ofstdinc.h" - BEGIN_EXTERN_C #ifdef HAVE_SYS_FILE_H #include @@ -53,6 +47,9 @@ #include "dcmtk/dcmdata/dcuid.h" /* for dcmtk version name */ #include "dcmtk/dcmdata/dcostrmz.h" /* for dcmZlibCompressionLevel */ #include "dcmtk/dcmtls/tlsopt.h" /* for DcmTLSOptions */ +#include "dcmtk/ofstd/ofstdinc.h" +#include + #ifdef ON_THE_FLY_COMPRESSION #include "dcmtk/dcmjpeg/djdecode.h" /* for JPEG decoders */ @@ -863,8 +860,8 @@ cond = ASC_abortAssociation(assoc); if (cond.bad()) { OFLOG_ERROR(storescuLogger, "Association Abort Failed: " << DimseCondition::dump(temp_str, cond)); - return 1; } + return 1; } /* destroy the association, i.e. free memory of T_ASC_Association* structure. This */ @@ -894,7 +891,7 @@ if (opt_haltOnUnsuccessfulStore && unsuccessfulStoreEncountered) { if (lastStatusCode == STATUS_Success) { // there must have been some kind of general network error - exitCode = 0xff; + exitCode = 10; } else { exitCode = (lastStatusCode >> 8); // only the least significant byte is relevant as exit code } @@ -944,7 +941,7 @@ T_ASC_SC_ROLE proposedRole = ASC_SC_ROLE_DEFAULT) { const char *c_p = transferSyntax.c_str(); - OFCondition cond = ASC_addPresentationContext(params, presentationContextId, + OFCondition cond = ASC_addPresentationContext(params, OFstatic_cast(T_ASC_PresentationContextID, presentationContextId), abstractSyntax.c_str(), &c_p, 1, proposedRole); return cond; } @@ -966,7 +963,7 @@ ++s_cur; } - OFCondition cond = ASC_addPresentationContext(params, presentationContextId, + OFCondition cond = ASC_addPresentationContext(params, OFstatic_cast(T_ASC_PresentationContextID, presentationContextId), abstractSyntax.c_str(), transferSyntaxes, transferSyntaxCount, proposedRole); delete[] transferSyntaxes; @@ -1377,7 +1374,7 @@ #endif /* prepare the transmission of data */ - bzero(OFreinterpret_cast(char *, &req), sizeof(req)); + memset(OFreinterpret_cast(char *, &req), 0, sizeof(req)); req.MessageID = msgId; OFStandard::strlcpy(req.AffectedSOPClassUID, sopClass, sizeof(req.AffectedSOPClassUID)); OFStandard::strlcpy(req.AffectedSOPInstanceUID, sopInstance, sizeof(req.AffectedSOPInstanceUID)); diff -Nru dcmtk-3.6.6/dcmnet/apps/termscu.cc dcmtk-3.6.7/dcmnet/apps/termscu.cc --- dcmtk-3.6.6/dcmnet/apps/termscu.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmnet/apps/termscu.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2005-2017, OFFIS e.V. + * Copyright (C) 2005-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -24,12 +24,6 @@ #include "dcmtk/config/osconfig.h" -#define INCLUDE_CSTDLIB -#define INCLUDE_CSTDIO -#define INCLUDE_CSTRING -#define INCLUDE_CSTDARG -#include "dcmtk/ofstd/ofstdinc.h" - #include "dcmtk/ofstd/ofcmdln.h" #include "dcmtk/ofstd/ofconapp.h" #include "dcmtk/dcmdata/cmdlnarg.h" diff -Nru dcmtk-3.6.6/dcmnet/docs/cptscp.dox dcmtk-3.6.7/dcmnet/docs/cptscp.dox --- dcmtk-3.6.6/dcmnet/docs/cptscp.dox 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmnet/docs/cptscp.dox 2022-04-28 13:47:25.000000000 +0000 @@ -26,7 +26,7 @@ * TCP/IP connection is already accepted, while the ACSE negotiation * is not already done but must be implemented by this method. * @param assoc The association to run. - @param EC_Normal if association could be handled, error otherwise + * @return EC_Normal if association could be handled, error otherwise */ OFCondition run( T_ASC_Association* assoc ); diff -Nru dcmtk-3.6.6/dcmnet/docs/dcmrecv.man dcmtk-3.6.7/dcmnet/docs/dcmrecv.man --- dcmtk-3.6.6/dcmnet/docs/dcmrecv.man 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmnet/docs/dcmrecv.man 2022-04-28 13:47:25.000000000 +0000 @@ -127,13 +127,23 @@ +cd --add-cert-dir [d]irectory: string add certificates in d to list of certificates -security profile: + +crl --add-crl-file [f]ilename: string + add certificate revocation list file + (implies --enable-crl-vfy) - +px --profile-bcp195 - BCP 195 TLS Profile (default) + +crv --enable-crl-vfy + enable leaf CRL verification + + +cra --enable-crl-all + enable full chain CRL verification + +security profile: +py --profile-bcp195-nd - Non-downgrading BCP 195 TLS Profile + Non-downgrading BCP 195 TLS Profile (default) + + +px --profile-bcp195 + BCP 195 TLS Profile +pz --profile-bcp195-ex Extended BCP 195 TLS Profile @@ -448,6 +458,6 @@ \section dcmrecv_copyright COPYRIGHT -Copyright (C) 2013-2020 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany. +Copyright (C) 2013-2022 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany. */ diff -Nru dcmtk-3.6.6/dcmnet/docs/dcmsend.man dcmtk-3.6.7/dcmnet/docs/dcmsend.man --- dcmtk-3.6.6/dcmnet/docs/dcmsend.man 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmnet/docs/dcmsend.man 2022-04-28 13:47:25.000000000 +0000 @@ -305,10 +305,10 @@ the corresponding SOP instance will be rejected (if needed). Please note, however, that the size of the decompressed pixel data is not checked. -Please note, however, that the default transfer syntax for "Lossless JPEG -Compression", "Lossy JPEG Compression" and so on are not always proposed as -also required by the DICOM standard. The same limitation applies to other -compression schemes. See DICOM PS 3.5 section 10 for details. +The default transfer syntax for "Lossless JPEG Compression", "Lossy JPEG +Compression" and so on are not always proposed as also required by the DICOM +standard. The same limitation applies to other compression schemes. See DICOM +PS 3.5 section 10 for details. \section dcmsend_logging LOGGING @@ -409,6 +409,6 @@ \section dcmsend_copyright COPYRIGHT -Copyright (C) 2011-2018 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany. +Copyright (C) 2011-2022 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany. */ diff -Nru dcmtk-3.6.6/dcmnet/docs/echoscu.man dcmtk-3.6.7/dcmnet/docs/echoscu.man --- dcmtk-3.6.6/dcmnet/docs/echoscu.man 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmnet/docs/echoscu.man 2022-04-28 13:47:25.000000000 +0000 @@ -139,13 +139,23 @@ +cd --add-cert-dir [d]irectory: string add certificates in d to list of certificates -security profile: + +crl --add-crl-file [f]ilename: string + add certificate revocation list file + (implies --enable-crl-vfy) - +px --profile-bcp195 - BCP 195 TLS Profile (default) + +crv --enable-crl-vfy + enable leaf CRL verification + + +cra --enable-crl-all + enable full chain CRL verification + +security profile: +py --profile-bcp195-nd - Non-downgrading BCP 195 TLS Profile + Non-downgrading BCP 195 TLS Profile (default) + + +px --profile-bcp195 + BCP 195 TLS Profile +pz --profile-bcp195-ex Extended BCP 195 TLS Profile @@ -186,6 +196,20 @@ -ic --ignore-peer-cert don't verify peer certificate + +offline certificate verification: + + +vc --verify-cert [f]ilename: string + verify certificate against CA settings + + # Load a client certificate and check whether it would be accepted + # when received during a TLS handshake. Print result and exit. + + +rc --is-root-cert [f]ilename: string + check if certificate is self-signed root CA + + # Load a client certificate and check whether it is a valid, + # self-signed root CA certificate. Print result and exit. \endverbatim \section echoscu_notes NOTES @@ -260,6 +284,7 @@ \subsection echoscu_exit_codes_input_file_errors input file errors \verbatim EXITCODE_CANNOT_READ_INPUT_FILE 20 (*) +EXITCODE_INVALID_INPUT_FILE 22 \endverbatim \subsection echoscu_exit_codes_output_file_errors output file errors @@ -294,6 +319,6 @@ \section echoscu_copyright COPYRIGHT -Copyright (C) 1994-2020 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany. +Copyright (C) 1994-2022 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany. */ diff -Nru dcmtk-3.6.6/dcmnet/docs/findscu.man dcmtk-3.6.7/dcmnet/docs/findscu.man --- dcmtk-3.6.6/dcmnet/docs/findscu.man 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmnet/docs/findscu.man 2022-04-28 13:47:25.000000000 +0000 @@ -190,13 +190,23 @@ +cd --add-cert-dir [d]irectory: string add certificates in d to list of certificates -security profile: + +crl --add-crl-file [f]ilename: string + add certificate revocation list file + (implies --enable-crl-vfy) - +px --profile-bcp195 - BCP 195 TLS Profile (default) + +crv --enable-crl-vfy + enable leaf CRL verification + + +cra --enable-crl-all + enable full chain CRL verification + +security profile: +py --profile-bcp195-nd - Non-downgrading BCP 195 TLS Profile + Non-downgrading BCP 195 TLS Profile (default) + + +px --profile-bcp195 + BCP 195 TLS Profile +pz --profile-bcp195-ex Extended BCP 195 TLS Profile @@ -455,6 +465,6 @@ \section findscu_copyright COPYRIGHT -Copyright (C) 1994-2020 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany. +Copyright (C) 1994-2022 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany. */ diff -Nru dcmtk-3.6.6/dcmnet/docs/getscu.man dcmtk-3.6.7/dcmnet/docs/getscu.man --- dcmtk-3.6.6/dcmnet/docs/getscu.man 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmnet/docs/getscu.man 2022-04-28 13:47:25.000000000 +0000 @@ -551,6 +551,6 @@ \section getscu_copyright COPYRIGHT -Copyright (C) 2011-2018 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany. +Copyright (C) 2011-2022 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany. */ diff -Nru dcmtk-3.6.6/dcmnet/docs/movescu.man dcmtk-3.6.7/dcmnet/docs/movescu.man --- dcmtk-3.6.6/dcmnet/docs/movescu.man 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmnet/docs/movescu.man 2022-04-28 13:47:25.000000000 +0000 @@ -568,7 +568,9 @@ PatientRadiationDoseSRStorage 1.2.840.10008.5.1.4.1.1.88.73 PlannedImagingAgentAdministrationSRStorage 1.2.840.10008.5.1.4.1.1.88.74 PerformedImagingAgentAdministrationSRStorage 1.2.840.10008.5.1.4.1.1.88.75 +EnhancedXRayRadiationDoseSRStorage 1.2.840.10008.5.1.4.1.1.88.76 ContentAssessmentResultsStorage 1.2.840.10008.5.1.4.1.1.90.1 +MicroscopyBulkSimpleAnnotationsStorage 1.2.840.10008.5.1.4.1.1.91.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 EncapsulatedSTLStorage 1.2.840.10008.5.1.4.1.1.104.3 @@ -580,6 +582,7 @@ EnhancedPETImageStorage 1.2.840.10008.5.1.4.1.1.130 BasicStructuredDisplayStorage 1.2.840.10008.5.1.4.1.1.131 CTPerformedProcedureProtocolStorage 1.2.840.10008.5.1.4.1.1.200.2 +XAPerformedProcedureProtocolStorage 1.2.840.10008.5.1.4.1.1.200.8 RTImageStorage 1.2.840.10008.5.1.4.1.1.481.1 RTDoseStorage 1.2.840.10008.5.1.4.1.1.481.2 RTStructureSetStorage 1.2.840.10008.5.1.4.1.1.481.3 @@ -600,6 +603,8 @@ TomotherapeuticRadiationRecordStorage 1.2.840.10008.5.1.4.1.1.481.18 CArmPhotonElectronRadiationRecordStorage 1.2.840.10008.5.1.4.1.1.481.19 RoboticRadiationRecordStorage 1.2.840.10008.5.1.4.1.1.481.20 +RTRadiationSetDeliveryInstructionStorage 1.2.840.10008.5.1.4.1.1.481.21 +RTTreatmentPreparationStorage 1.2.840.10008.5.1.4.1.1.481.22 DICOS_CTImageStorage 1.2.840.10008.5.1.4.1.1.501.1 DICOS_DigitalXRayImageStorageForPresentation 1.2.840.10008.5.1.4.1.1.501.2.1 DICOS_DigitalXRayImageStorageForProcessing 1.2.840.10008.5.1.4.1.1.501.2.2 @@ -781,6 +786,6 @@ \section movescu_copyright COPYRIGHT -Copyright (C) 1994-2020 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany. +Copyright (C) 1994-2022 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany. */ diff -Nru dcmtk-3.6.6/dcmnet/docs/storescp.man dcmtk-3.6.7/dcmnet/docs/storescp.man --- dcmtk-3.6.6/dcmnet/docs/storescp.man 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmnet/docs/storescp.man 2022-04-28 13:47:25.000000000 +0000 @@ -247,13 +247,23 @@ +cd --add-cert-dir [d]irectory: string add certificates in d to list of certificates -security profile: + +crl --add-crl-file [f]ilename: string + add certificate revocation list file + (implies --enable-crl-vfy) - +px --profile-bcp195 - BCP 195 TLS Profile (default) + +crv --enable-crl-vfy + enable leaf CRL verification + + +cra --enable-crl-all + enable full chain CRL verification + +security profile: +py --profile-bcp195-nd - Non-downgrading BCP 195 TLS Profile + Non-downgrading BCP 195 TLS Profile (default) + + +px --profile-bcp195 + BCP 195 TLS Profile +pz --profile-bcp195-ex Extended BCP 195 TLS Profile @@ -732,7 +742,9 @@ PatientRadiationDoseSRStorage 1.2.840.10008.5.1.4.1.1.88.73 PlannedImagingAgentAdministrationSRStorage 1.2.840.10008.5.1.4.1.1.88.74 PerformedImagingAgentAdministrationSRStorage 1.2.840.10008.5.1.4.1.1.88.75 +EnhancedXRayRadiationDoseSRStorage 1.2.840.10008.5.1.4.1.1.88.76 ContentAssessmentResultsStorage 1.2.840.10008.5.1.4.1.1.90.1 +MicroscopyBulkSimpleAnnotationsStorage 1.2.840.10008.5.1.4.1.1.91.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 EncapsulatedSTLStorage 1.2.840.10008.5.1.4.1.1.104.3 @@ -744,6 +756,7 @@ EnhancedPETImageStorage 1.2.840.10008.5.1.4.1.1.130 BasicStructuredDisplayStorage 1.2.840.10008.5.1.4.1.1.131 CTPerformedProcedureProtocolStorage 1.2.840.10008.5.1.4.1.1.200.2 +XAPerformedProcedureProtocolStorage 1.2.840.10008.5.1.4.1.1.200.8 RTImageStorage 1.2.840.10008.5.1.4.1.1.481.1 RTDoseStorage 1.2.840.10008.5.1.4.1.1.481.2 RTStructureSetStorage 1.2.840.10008.5.1.4.1.1.481.3 @@ -764,6 +777,8 @@ TomotherapeuticRadiationRecordStorage 1.2.840.10008.5.1.4.1.1.481.18 CArmPhotonElectronRadiationRecordStorage 1.2.840.10008.5.1.4.1.1.481.19 RoboticRadiationRecordStorage 1.2.840.10008.5.1.4.1.1.481.20 +RTRadiationSetDeliveryInstructionStorage 1.2.840.10008.5.1.4.1.1.481.21 +RTTreatmentPreparationStorage 1.2.840.10008.5.1.4.1.1.481.22 DICOS_CTImageStorage 1.2.840.10008.5.1.4.1.1.501.1 DICOS_DigitalXRayImageStorageForPresentation 1.2.840.10008.5.1.4.1.1.501.2.1 DICOS_DigitalXRayImageStorageForProcessing 1.2.840.10008.5.1.4.1.1.501.2.2 @@ -936,6 +951,6 @@ \section storescp_copyright COPYRIGHT -Copyright (C) 1996-2020 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany. +Copyright (C) 1996-2022 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany. */ diff -Nru dcmtk-3.6.6/dcmnet/docs/storescu.man dcmtk-3.6.7/dcmnet/docs/storescu.man --- dcmtk-3.6.6/dcmnet/docs/storescu.man 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmnet/docs/storescu.man 2022-04-28 13:47:25.000000000 +0000 @@ -329,13 +329,23 @@ +cd --add-cert-dir [d]irectory: string add certificates in d to list of certificates -security profile: + +crl --add-crl-file [f]ilename: string + add certificate revocation list file + (implies --enable-crl-vfy) - +px --profile-bcp195 - BCP 195 TLS Profile (default) + +crv --enable-crl-vfy + enable leaf CRL verification + + +cra --enable-crl-all + enable full chain CRL verification + +security profile: +py --profile-bcp195-nd - Non-downgrading BCP 195 TLS Profile + Non-downgrading BCP 195 TLS Profile (default) + + +px --profile-bcp195 + BCP 195 TLS Profile +pz --profile-bcp195-ex Extended BCP 195 TLS Profile @@ -580,6 +590,6 @@ \section storescu_copyright COPYRIGHT -Copyright (C) 1996-2020 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany. +Copyright (C) 1996-2022 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany. */ diff -Nru dcmtk-3.6.6/dcmnet/docs/termscu.man dcmtk-3.6.7/dcmnet/docs/termscu.man --- dcmtk-3.6.6/dcmnet/docs/termscu.man 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmnet/docs/termscu.man 2022-04-28 13:47:25.000000000 +0000 @@ -143,6 +143,6 @@ \section termscu_copyright COPYRIGHT -Copyright (C) 2005-2017 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany. +Copyright (C) 2005-2022 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany. */ diff -Nru dcmtk-3.6.6/dcmnet/etc/storescp.cfg dcmtk-3.6.7/dcmnet/etc/storescp.cfg --- dcmtk-3.6.6/dcmnet/etc/storescp.cfg 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmnet/etc/storescp.cfg 2022-04-28 13:47:25.000000000 +0000 @@ -1,5 +1,5 @@ # -# Copyright (C) 2003-2020, OFFIS e.V. +# Copyright (C) 2003-2021, OFFIS e.V. # All rights reserved. See COPYRIGHT file for details. # # This software and supporting documentation were developed by @@ -221,12 +221,14 @@ # - EncapsulatedMTLStorage # - EncapsulatedOBJStorage # - EncapsulatedSTLStorage +# - EnhancedXRayRadiationDoseSRStorage # - ExtensibleSRStorage # - GrayscalePlanarMPRVolumetricPresentationStateStorage # - HangingProtocolStorage # - LegacyConvertedEnhancedCTImageStorage # - LegacyConvertedEnhancedMRImageStorage # - LegacyConvertedEnhancedPETImageStorage +# - MicroscopyBulkSimpleAnnotationsStorage # - MultichannelRespiratoryWaveformStorage # - MultipleVolumeRenderingVolumetricPresentationStateStorage # - OphthalmicOpticalCoherenceTomographyBscanVolumeAnalysisStorage @@ -244,8 +246,10 @@ # - RTPhysicianIntentStorage # - RTRadiationRecordSetStorage # - RTRadiationSalvageRecordStorage +# - RTRadiationSetDeliveryInstructionStorage # - RTRadiationSetStorage # - RTSegmentAnnotationStorage +# - RTTreatmentPreparationStorage # - SegmentedVolumeRenderingVolumetricPresentationStateStorage # - SimplifiedAdultEchoSRStorage # - SleepElectroencephalogramWaveformStorage @@ -255,6 +259,8 @@ # - VolumeRenderingVolumetricPresentationStateStorage # - WideFieldOphthalmicPhotographyStereographicProjectionImageStorage # - WideFieldOphthalmicPhotography3DCoordinatesImageStorage +# - XADefinedProcedureProtocolStorage +# - XAPerformedProcedureProtocolStorage # # - DICOS_2DAITStorage # - DICOS_3DAITStorage @@ -424,6 +430,8 @@ # - EncapsulatedMTLStorage # - EncapsulatedOBJStorage # - EncapsulatedSTLStorage +# - EnhancedXRayRadiationDoseSRStorage +# - MicroscopyBulkSimpleAnnotationsStorage # - MultichannelRespiratoryWaveformStorage # - MultipleVolumeRenderingVolumetricPresentationStateStorage # - OphthalmicOpticalCoherenceTomographyBscanVolumeAnalysisStorage @@ -438,13 +446,17 @@ # - RTPhysicianIntentStorage # - RTRadiationRecordSetStorage # - RTRadiationSalvageRecordStorage +# - RTRadiationSetDeliveryInstructionStorage # - RTRadiationSetStorage # - RTSegmentAnnotationStorage +# - RTTreatmentPreparationStorage # - SegmentedVolumeRenderingVolumetricPresentationStateStorage # - SleepElectroencephalogramWaveformStorage # - TomotherapeuticRadiationRecordStorage # - TomotherapeuticRadiationStorage # - VolumeRenderingVolumetricPresentationStateStorage +# - XADefinedProcedureProtocolStorage +# - XAPerformedProcedureProtocolStorage # # - RETIRED_HardcopyColorImageStorage # - RETIRED_HardcopyGrayscaleImageStorage diff -Nru dcmtk-3.6.6/dcmnet/etc/storescu.cfg dcmtk-3.6.7/dcmnet/etc/storescu.cfg --- dcmtk-3.6.6/dcmnet/etc/storescu.cfg 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmnet/etc/storescu.cfg 2022-04-28 13:47:25.000000000 +0000 @@ -1,5 +1,5 @@ # -# Copyright (C) 2003-2020, OFFIS e.V. +# Copyright (C) 2003-2021, OFFIS e.V. # All rights reserved. See COPYRIGHT file for details. # # This software and supporting documentation were developed by @@ -228,6 +228,7 @@ # - EnhancedMRColorImageStorage # - EnhancedPETImageStorage # - EnhancedUSVolumeStorage +# - EnhancedXRayRadiationDoseSRStorage # - ExtensibleSRStorage # - GeneralAudioWaveformStorage # - GenericImplantTemplateStorage @@ -244,6 +245,7 @@ # - LegacyConvertedEnhancedPETImageStorage # - LensometryMeasurementsStorage # - MacularGridThicknessAndVolumeReportStorage +# - MicroscopyBulkSimpleAnnotationsStorage # - MultichannelRespiratoryWaveformStorage # - MultipleVolumeRenderingVolumetricPresentationStateStorage # - OphthalmicAxialMeasurementsStorage @@ -270,8 +272,10 @@ # - RTPhysicianIntentStorage # - RTRadiationRecordSetStorage # - RTRadiationSalvageRecordStorage +# - RTRadiationSetDeliveryInstructionStorage # - RTRadiationSetStorage # - RTSegmentAnnotationStorage +# - RTTreatmentPreparationStorage # - SegmentationStorage # - SegmentedVolumeRenderingVolumetricPresentationStateStorage # - SimplifiedAdultEchoSRStorage @@ -289,6 +293,8 @@ # - VolumeRenderingVolumetricPresentationStateStorage # - WideFieldOphthalmicPhotographyStereographicProjectionImageStorage # - WideFieldOphthalmicPhotography3DCoordinatesImageStorage +# - XADefinedProcedureProtocolStorage +# - XAPerformedProcedureProtocolStorage # - XAXRFGrayscaleSoftcopyPresentationStateStorage # - XRay3DAngiographicImageStorage # - XRay3DCraniofacialImageStorage diff -Nru dcmtk-3.6.6/dcmnet/include/dcmtk/dcmnet/assoc.h dcmtk-3.6.7/dcmnet/include/dcmtk/dcmnet/assoc.h --- dcmtk-3.6.6/dcmnet/include/dcmtk/dcmnet/assoc.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmnet/include/dcmtk/dcmnet/assoc.h 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1994-2018, OFFIS e.V. + * Copyright (C) 1994-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were partly developed by @@ -708,6 +708,9 @@ ASC_dropAssociation(T_ASC_Association * association); DCMTK_DCMNET_EXPORT OFCondition +ASC_closeTransportConnection(T_ASC_Association * association); + +DCMTK_DCMNET_EXPORT OFCondition ASC_destroyAssociation(T_ASC_Association ** association); /// @deprecated Please use OFString& ASC_printRejectParameters(OFString&, T_ASC_RejectParameters*) instead. @@ -761,5 +764,6 @@ DCMTK_DCMNET_EXPORT DUL_SC_ROLE ascRole2dulRole(const T_ASC_SC_ROLE role); - +DCMTK_DCMNET_EXPORT void +destroyDULParamPresentationContextList(LST_HEAD ** lst); #endif diff -Nru dcmtk-3.6.6/dcmnet/include/dcmtk/dcmnet/cond.h dcmtk-3.6.7/dcmnet/include/dcmtk/dcmnet/cond.h --- dcmtk-3.6.6/dcmnet/include/dcmtk/dcmnet/cond.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmnet/include/dcmtk/dcmnet/cond.h 2022-04-28 13:47:25.000000000 +0000 @@ -246,6 +246,11 @@ * Instead of maintaining a global condition stack (which is difficult * in multi-threaded applications), the error text of the sub-condition * is appended to the newly created condition. + * @param aModule the module for the condition + * @param aCode the code for the condition + * @param aStatus the status for the condition + * @param aText the error text + * @param subCondition the sub-condition */ static OFCondition push( unsigned short aModule, @@ -259,6 +264,8 @@ * Instead of maintaining a global condition stack (which is difficult * in multi-threaded applications), the error text of the sub-condition * is appended to the newly created condition. + * @param newCondition the condition + * @param subCondition the sub-condition */ static OFCondition push( OFCondition newCondition, diff -Nru dcmtk-3.6.6/dcmnet/include/dcmtk/dcmnet/dcasccff.h dcmtk-3.6.7/dcmnet/include/dcmtk/dcmnet/dcasccff.h --- dcmtk-3.6.6/dcmnet/include/dcmtk/dcmnet/dcasccff.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmnet/include/dcmtk/dcmnet/dcasccff.h 2022-04-28 13:47:25.000000000 +0000 @@ -51,7 +51,7 @@ /** parses the transfer syntax lists in the config file. * @param cfg association configuration object to initialize - * @param filename name of config file + * @param config filename name of config file * @return EC_Normal if successful, an error code otherwise */ static OFCondition parseTransferSyntaxes( @@ -60,7 +60,7 @@ /** parses the presentation context lists in the config file. * @param cfg association configuration object to initialize - * @param filename name of config file + * @param config filename name of config file * @return EC_Normal if successful, an error code otherwise */ static OFCondition parsePresentationContexts( @@ -69,7 +69,7 @@ /** parses the role selection lists in the config file. * @param cfg association configuration object to initialize - * @param filename name of config file + * @param config filename name of config file * @return EC_Normal if successful, an error code otherwise */ static OFCondition parseRoleSelectionItems( @@ -78,7 +78,7 @@ /** parses the extended negotiation lists in the config file. * @param cfg association configuration object to initialize - * @param filename name of config file + * @param config filename name of config file * @return EC_Normal if successful, an error code otherwise */ static OFCondition parseExtendedNegotiationItems( @@ -87,7 +87,7 @@ /** parses the association configuration profile lists in the config file. * @param cfg association configuration object to initialize - * @param filename name of config file + * @param config filename name of config file * @return EC_Normal if successful, an error code otherwise */ static OFCondition parseProfiles( diff -Nru dcmtk-3.6.6/dcmnet/include/dcmtk/dcmnet/dcasccfg.h dcmtk-3.6.7/dcmnet/include/dcmtk/dcmnet/dcasccfg.h --- dcmtk-3.6.6/dcmnet/include/dcmtk/dcmnet/dcasccfg.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmnet/include/dcmtk/dcmnet/dcasccfg.h 2022-04-28 13:47:25.000000000 +0000 @@ -58,10 +58,14 @@ /// destructor ~DcmAssociationConfiguration(); - /// Copy constructor, performs deep copy + /** Copy constructor, performs deep copy + * @param arg the DcmAC to copy + */ DcmAssociationConfiguration(const DcmAssociationConfiguration& arg); - /// Copy assignment operator, performs deep copy + /** Copy assignment operator, performs deep copy + * @param arg the DcmAC to copy + */ DcmAssociationConfiguration& operator=(const DcmAssociationConfiguration& arg); /// Reset configuration. @@ -69,7 +73,7 @@ /** this method prepares a T_ASC_Parameters structure according to the settings * of a profile maintained by this object. It is used by an association initiator. - * @param symbolic profile name, must not be NULL + * @param profile symbolic profile name, must not be NULL * @param params T_ASC_Parameters structure to be filled * @return EC_Normal if successful, an error code otherwise */ @@ -79,7 +83,7 @@ /** this method evaluates an incoming association request according to the settings * of a profile maintained by this object. It is used by an association acceptor. - * @param symbolic profile name, must not be NULL + * @param profile symbolic profile name, must not be NULL * @param assoc T_ASC_Association structure to be evaluated * @return EC_Normal if successful, an error code otherwise */ diff -Nru dcmtk-3.6.6/dcmnet/include/dcmtk/dcmnet/dccfenmp.h dcmtk-3.6.7/dcmnet/include/dcmtk/dcmnet/dccfenmp.h --- dcmtk-3.6.6/dcmnet/include/dcmtk/dcmnet/dccfenmp.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmnet/include/dcmtk/dcmnet/dccfenmp.h 2022-04-28 13:47:25.000000000 +0000 @@ -48,13 +48,17 @@ const unsigned char *data, Uint32 length); - /// copy constructor + /** copy constructor + * @param arg the item to copy + */ DcmExtendedNegotiationItem(const DcmExtendedNegotiationItem& arg); /// destructor ~DcmExtendedNegotiationItem(); - /// assignment operator + /** assignment operator + * @param arg the item to assign + */ DcmExtendedNegotiationItem& operator=(const DcmExtendedNegotiationItem& arg); /** checks if the given argument matches the abstract syntax UID @@ -135,10 +139,14 @@ /// destructor ~DcmExtendedNegotiationMap(); - /// Copy constructor, performs deep copy + /** Copy constructor, performs deep copy + * @param arg the map to copy + */ DcmExtendedNegotiationMap(const DcmExtendedNegotiationMap& arg); - /// Copy assignment operator, performs deep copy + /** Copy assignment operator, performs deep copy + * @param arg the map to assign + */ DcmExtendedNegotiationMap& operator=(const DcmExtendedNegotiationMap& arg); /** Resets DcmExtendedNegotiationMap and frees any allocated memory diff -Nru dcmtk-3.6.6/dcmnet/include/dcmtk/dcmnet/dcmlayer.h dcmtk-3.6.7/dcmnet/include/dcmtk/dcmnet/dcmlayer.h --- dcmtk-3.6.6/dcmnet/include/dcmtk/dcmnet/dcmlayer.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmnet/include/dcmtk/dcmnet/dcmlayer.h 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1998-2018, OFFIS e.V. + * Copyright (C) 1998-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -28,8 +28,6 @@ #include "dcmtk/ofstd/oftypes.h" #include "dcmtk/ofstd/ofstring.h" -#define INCLUDE_UNISTD -#include "dcmtk/ofstd/ofstdinc.h" #include "dcmtk/ofstd/ofutil.h" #include "dcmtk/dcmnet/dndefine.h" @@ -39,33 +37,6 @@ * @brief type definitions and classes for transport connections */ -/** this enum represents the result of a transport layer operation - * which may be a transparent TCP/IP or a secure TLS operation. - */ -enum DcmTransportLayerStatus -{ - /** successful operation - */ - TCS_ok, - - /** operation cannot be performed because transport connection - * object was not allocated. - */ - TCS_noConnection, - - /** operation failed due to an error within the TLS protocol layer - */ - TCS_tlsError, - - /** operation failed because an illegal parameter was passed - */ - TCS_illegalCall, - - /** unspecified error - */ - TCS_unspecifiedError -}; - class DcmTransportConnection; /** factory class which creates transport layer connections. diff -Nru dcmtk-3.6.6/dcmnet/include/dcmtk/dcmnet/dcmtrans.h dcmtk-3.6.7/dcmnet/include/dcmtk/dcmnet/dcmtrans.h --- dcmtk-3.6.6/dcmnet/include/dcmtk/dcmnet/dcmtrans.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmnet/include/dcmtk/dcmnet/dcmtrans.h 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1998-2018, OFFIS e.V. + * Copyright (C) 1998-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -25,13 +25,12 @@ #include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ +#include "dcmtk/ofstd/ofcond.h" /* for OFCondition */ #include "dcmtk/ofstd/ofglobal.h" /* for OFGlobal */ #include "dcmtk/ofstd/oftypes.h" /* for OFBool */ #include "dcmtk/ofstd/ofstream.h" /* for ostream */ -#include "dcmtk/dcmnet/dcmlayer.h" /* for DcmTransportLayerStatus */ - -#define INCLUDE_UNISTD -#include "dcmtk/ofstd/ofstdinc.h" +#include "dcmtk/dcmnet/dndefine.h" /* for DCMTK_DCMNET_EXPORT */ +#include "dcmtk/dcmnet/dntypes.h" /* for DcmNativeSocketType */ // include this file in doxygen documentation @@ -81,24 +80,24 @@ /** performs server side handshake on established socket. * This function is used to establish a secure transport connection * over the established TCP connection. Abstract method. - * @return TCS_ok if successful, an error code otherwise. + * @return EC_Normal if successful, an error code otherwise. */ - virtual DcmTransportLayerStatus serverSideHandshake() = 0; + virtual OFCondition serverSideHandshake() = 0; /** performs client side handshake on established socket. * This function is used to establish a secure transport connection * over the established TCP connection. Abstract method. - * @return TCS_ok if successful, an error code otherwise. + * @return EC_Normal if successful, an error code otherwise. */ - virtual DcmTransportLayerStatus clientSideHandshake() = 0; + virtual OFCondition clientSideHandshake() = 0; /** performs a re-negotiation of the connection with different * connection parameters. Used to change the parameters of the * secure transport connection. Abstract method. * @param newSuite string identifying the ciphersuite to be negotiated. - * @return TCS_ok if successful, an error code otherwise. + * @return EC_Normal if successful, an error code otherwise. */ - virtual DcmTransportLayerStatus renegotiate(const char *newSuite) = 0; + virtual OFCondition renegotiate(const char *newSuite) = 0; /** attempts to read nbyte bytes from the transport connection and * writes them into the given buffer. Abstract method. @@ -122,6 +121,12 @@ */ virtual void close() = 0; + /** Closes the transport connection directly. If a secure connection + * is used, a closure alert is NOT sent before the connection + * is closed. Abstract method. + */ + virtual void closeTransportConnection() = 0; + /** returns the size in bytes of the peer certificate of a secure connection. * May return 0 if connection is transparent TCP/IP. * @return peer certificate length in bytes @@ -163,12 +168,6 @@ */ void dumpConnectionParameters(STD_NAMESPACE ostream& out); - /** returns an error string for a given error code. - * @param code error code - * @return description for error code - */ - virtual const char *errorString(DcmTransportLayerStatus code) = 0; - /** indicates which of the specified transport connections is ready for * reading. If none of the specified transport connections is ready * for reading, this method blocks up to the specified timeout interval @@ -266,24 +265,24 @@ /** performs server side handshake on established socket. * This function is used to establish a secure transport connection * over the established TCP connection. - * @return TCS_ok if successful, an error code otherwise. + * @return EC_Normal if successful, an error code otherwise. */ - virtual DcmTransportLayerStatus serverSideHandshake(); + virtual OFCondition serverSideHandshake(); /** performs client side handshake on established socket. * This function is used to establish a secure transport connection * over the established TCP connection. - * @return TCS_ok if successful, an error code otherwise. + * @return EC_Normal if successful, an error code otherwise. */ - virtual DcmTransportLayerStatus clientSideHandshake(); + virtual OFCondition clientSideHandshake(); /** performs a re-negotiation of the connection with different * connection parameters. Used to change the parameters of the * secure transport connection. * @param newSuite string identifying the ciphersuite to be negotiated. - * @return TCS_ok if successful, an error code otherwise. + * @return EC_Normal if successful, an error code otherwise. */ - virtual DcmTransportLayerStatus renegotiate(const char *newSuite); + virtual OFCondition renegotiate(const char *newSuite); /** attempts to read nbyte bytes from the transport connection and * writes them into the given buffer. @@ -307,6 +306,12 @@ */ virtual void close(); + /** Closes the transport connection directly. If a secure connection + * is used, a closure alert is NOT sent before the connection + * is closed. + */ + virtual void closeTransportConnection(); + /** returns the size in bytes of the peer certificate of a secure connection. * May return 0 if connection is transparent TCP/IP. * @return peer certificate length in bytes @@ -340,12 +345,6 @@ */ virtual OFString& dumpConnectionParameters(OFString& str); - /** returns an error string for a given error code. - * @param code error code - * @return description for error code - */ - virtual const char *errorString(DcmTransportLayerStatus code); - private: /// private undefined copy constructor diff -Nru dcmtk-3.6.6/dcmnet/include/dcmtk/dcmnet/dcompat.h dcmtk-3.6.7/dcmnet/include/dcmtk/dcmnet/dcompat.h --- dcmtk-3.6.6/dcmnet/include/dcmtk/dcmnet/dcompat.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmnet/include/dcmtk/dcmnet/dcompat.h 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1994-2017, OFFIS e.V. + * Copyright (C) 1994-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were partly developed by @@ -80,16 +80,8 @@ #define DCOMPAT_H #include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ -#include "dcmtk/ofstd/ofbmanip.h" /* for bzero workaround */ #include "dcmtk/dcmnet/dndefine.h" - -#define INCLUDE_CSTDLIB -#define INCLUDE_CTIME -#define INCLUDE_CSTRING -#define INCLUDE_CERRNO -#define INCLUDE_LIBC -#define INCLUDE_UNISTD -#include "dcmtk/ofstd/ofstdinc.h" +#include #ifdef HAVE_WINDOWS_H #ifndef WIN32_LEAN_AND_MEAN @@ -181,12 +173,6 @@ #endif /* !HAVE_FLOCK */ #endif -#ifndef HAVE_BZERO -#ifndef bzero -#define bzero(p,len) memset((void*)(p), 0, (len)); -#endif -#endif - #ifndef HAVE_PROTOTYPE_GETHOSTNAME #ifdef HAVE_GETHOSTNAME /* gethostname is in the libraries but we have no prototype */ diff -Nru dcmtk-3.6.6/dcmnet/include/dcmtk/dcmnet/dfindscu.h dcmtk-3.6.7/dcmnet/include/dcmtk/dcmnet/dfindscu.h --- dcmtk-3.6.6/dcmnet/include/dcmtk/dcmnet/dfindscu.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmnet/include/dcmtk/dcmnet/dfindscu.h 2022-04-28 13:47:25.000000000 +0000 @@ -123,10 +123,14 @@ private: - /// private undefined copy constructor. + /** private undefined copy constructor. + * @param other documented to avoid doxygen warnings + */ DcmFindSCUCallback(const DcmFindSCUCallback& other); - /// private undefined assignment operator. + /** private undefined assignment operator. + * @param other documented to avoid doxygen warnings + */ DcmFindSCUCallback& operator=(const DcmFindSCUCallback& other); }; @@ -379,10 +383,14 @@ const char *outputDirectory = NULL, STD_NAMESPACE ofstream *outputStream = NULL) const; - /// Private undefined copy constructor + /** Private undefined copy constructor + * @param other documented to avoid doxygen warnings + */ DcmFindSCU(const DcmFindSCU& other); - /// Private undefined assignment operator + /** Private undefined assignment operator + * @param other documented to avoid doxygen warnings + */ DcmFindSCU& operator=(const DcmFindSCU& other); private: diff -Nru dcmtk-3.6.6/dcmnet/include/dcmtk/dcmnet/dicom.h dcmtk-3.6.7/dcmnet/include/dcmtk/dcmnet/dicom.h --- dcmtk-3.6.6/dcmnet/include/dcmtk/dcmnet/dicom.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmnet/include/dcmtk/dcmnet/dicom.h 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1994-2018, OFFIS e.V. + * Copyright (C) 1994-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were partly developed by @@ -91,12 +91,6 @@ #include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ -#define INCLUDE_CSTDLIB -#define INCLUDE_CSTDIO -#define INCLUDE_LIBC -#define INCLUDE_UNISTD -#include "dcmtk/ofstd/ofstdinc.h" - #include "dcmtk/dcmnet/cond.h" /* condition typedefs */ #include "dcmtk/dcmnet/dcompat.h" /* compatibility routines */ #include "dcmtk/dcmdata/dctypes.h" /* dcmdata toolkit basic types */ diff -Nru dcmtk-3.6.6/dcmnet/include/dcmtk/dcmnet/dul.h dcmtk-3.6.7/dcmnet/include/dcmtk/dcmnet/dul.h --- dcmtk-3.6.6/dcmnet/include/dcmtk/dcmnet/dul.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmnet/include/dcmtk/dcmnet/dul.h 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1994-2019, OFFIS e.V. + * Copyright (C) 1994-2022, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were partly developed by @@ -402,7 +402,7 @@ */ #define DUL_DULCOMPAT 2768240730UL -#define DUL_DIMSECOMPAT 1048576UL +#define DUL_DIMSECOMPAT 1114095UL #define DUL_MAXPDUCOMPAT 4278190335UL /* Define the function prototypes for this facility. @@ -453,6 +453,7 @@ */ DCMTK_DCMNET_EXPORT OFCondition DUL_AbortAssociation(DUL_ASSOCIATIONKEY ** association); DCMTK_DCMNET_EXPORT OFCondition DUL_DropAssociation(DUL_ASSOCIATIONKEY ** association); +DCMTK_DCMNET_EXPORT OFCondition DUL_CloseTransportConnection(DUL_ASSOCIATIONKEY ** association); DCMTK_DCMNET_EXPORT OFCondition DUL_DropNetwork(DUL_NETWORKKEY ** network); DCMTK_DCMNET_EXPORT OFCondition DUL_ReleaseAssociation(DUL_ASSOCIATIONKEY ** association); DCMTK_DCMNET_EXPORT OFCondition DUL_AcknowledgeRelease(DUL_ASSOCIATIONKEY ** association); diff -Nru dcmtk-3.6.6/dcmnet/include/dcmtk/dcmnet/dulstruc.h dcmtk-3.6.7/dcmnet/include/dcmtk/dcmnet/dulstruc.h --- dcmtk-3.6.6/dcmnet/include/dcmtk/dcmnet/dulstruc.h 1970-01-01 00:00:00.000000000 +0000 +++ dcmtk-3.6.7/dcmnet/include/dcmtk/dcmnet/dulstruc.h 2022-04-28 13:47:25.000000000 +0000 @@ -0,0 +1,333 @@ +/* + * + * Copyright (C) 1994-2017, OFFIS e.V. + * All rights reserved. See COPYRIGHT file for details. + * + * This software and supporting documentation were partly developed by + * + * OFFIS e.V. + * R&D Division Health + * Escherweg 2 + * D-26121 Oldenburg, Germany + * + * For further copyrights, see the following paragraphs. + * + */ + +/* + Copyright (C) 1993, 1994, RSNA and Washington University + + The software and supporting documentation for the Radiological + Society of North America (RSNA) 1993, 1994 Digital Imaging and + Communications in Medicine (DICOM) Demonstration were developed + at the + Electronic Radiology Laboratory + Mallinckrodt Institute of Radiology + Washington University School of Medicine + 510 S. Kingshighway Blvd. + St. Louis, MO 63110 + as part of the 1993, 1994 DICOM Central Test Node project for, and + under contract with, the Radiological Society of North America. + + THIS SOFTWARE IS MADE AVAILABLE, AS IS, AND NEITHER RSNA NOR + WASHINGTON UNIVERSITY MAKE ANY WARRANTY ABOUT THE SOFTWARE, ITS + PERFORMANCE, ITS MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR + USE, FREEDOM FROM ANY COMPUTER DISEASES OR ITS CONFORMITY TO ANY + SPECIFICATION. THE ENTIRE RISK AS TO QUALITY AND PERFORMANCE OF + THE SOFTWARE IS WITH THE USER. + + Copyright of the software and supporting documentation is + jointly owned by RSNA and Washington University, and free access + is hereby granted as a license to use this software, copy this + software and prepare derivative works based upon this software. + However, any distribution of this software source code or + supporting documentation or derivative works (source code and + supporting documentation) must include the three paragraphs of + the copyright notice. +*/ + +/* +** DICOM 93 +** Electronic Radiology Laboratory +** Mallinckrodt Institute of Radiology +** Washington University School of Medicine +** +** Module Name(s): +** Author, Date: Stephen M. Moore, 19-May-93 +** Intent: +** This header contains private typedefs for the DICOM Upper Layer +** (DUL) protocol package. This is to be used to compile the DUL +** package and is not intended to be seen by the applications programmer. +** Files at the package level should include this file to get the +** proper typedefs and include the public file "dulprotocol.h" to +** get the public definitions and function prototypes. I have omitted +** the public definitions and prototypes on purpose so that they +** exist in only one location. +*/ + +#ifndef DULSTRUC_H +#define DULSTRUC_H + +#include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ +#include "dcmtk/dcmnet/extneg.h" +#include "dcmtk/dcmnet/dcuserid.h" +#include "dcmtk/dcmnet/dicom.h" +#include "dcmtk/dcmnet/dntypes.h" +#include "dcmtk/dcmnet/dul.h" +#include "dcmtk/dcmnet/lst.h" + + +class DcmTransportConnection; +class DcmTransportLayer; + +#define NETWORK_DISCONNECTED 2 +#define NETWORK_CONNECTED 3 + +typedef enum { + DUL_ASSOC_WAITINGFORACK, + DUL_ASSOC_ESTABLISHED, + DUL_ASSOC_RELEASED, + DUL_ASSOC_ABORTED, + DUL_ASSOC_DROPPED +} DUL_ASSOC_STATE; + +#define ASSOCIATION_DISCONNECTED 2 +#define ASSOCIATION_ABORTED 4 +#define ASSOCIATION_RELEASED 5 + +typedef struct { + char keyType[40]; + int applicationFunction; + int networkState; + int protocolState; + int timeout; + unsigned long options; + union { + struct { + int port; + DcmNativeSocketType listenSocket; + DcmTransportLayer *tLayer; + int tLayerOwned; + } TCP; + } networkSpecific; +} PRIVATE_NETWORKKEY; + +typedef struct { + char keyType[40]; + int applicationFunction; + char remoteNode[64]; + DUL_ASSOC_STATE associationState; + int protocolState; + int networkState; + int timeout; + time_t timerStart; + unsigned long maxPDVRequestor; + unsigned long maxPDVAcceptor; + unsigned long maxPDV; + unsigned long maxPDVInput; + unsigned long receiveQp1; + unsigned long receiveQp2; + char calledAPTitle[20]; + char callingAPTitle[20]; + char applicationContextName[68]; + char abstractSyntaxName[68]; + void *receivePDUQueue; + DUL_PRESENTATIONCONTEXTID presentationContextID; + DcmTransportConnection *connection; + DUL_PDVLIST pdvList; + int inputPDU; + unsigned char pduHead[6]; + unsigned char nextPDUType; + unsigned char nextPDUReserved; + unsigned long nextPDULength; + unsigned long compatibilityMode; + int pdvCount; + int pdvIndex; + void *logHandle; + int associatePDUFlag; + void *associatePDU; + unsigned long associatePDULength; + DUL_PDV currentPDV; + unsigned char *pdvPointer; + unsigned long fragmentBufferLength; + unsigned char *fragmentBuffer; + DUL_ModeCallback *modeCallback; +} PRIVATE_ASSOCIATIONKEY; + +#define KEY_NETWORK "KEY NETWORK" +#define KEY_ASSOCIATION "KEY ASSOCIATION" + +#define AE_REQUESTOR "AE REQUESTOR" +#define AE_ACCEPTOR "AE ACCEPTOR" +#define AE_BOTH "AE BOTH" + +#define NO_PDU 1 +#define PDU_HEAD 2 +#define PDU_DATA 2 + +/* Default timeout for waiting for PDUs. 100 seconds is high, +** but used for development so we have time to do things with the +** debugger. A lower value would be used in a production system. +*/ + +#define DEFAULT_TIMEOUT 100 + +/* Private definitions */ + +typedef struct dul_subitem { + void *reserved[2]; + unsigned char type; + unsigned char rsv1; + unsigned short length; + char data[DICOM_UI_LENGTH + 1]; +} DUL_SUBITEM; + +typedef struct dul_maxlength { + void *reserved[2]; + unsigned char type; + unsigned char rsv1; + unsigned short length; + unsigned long maxLength; +} DUL_MAXLENGTH; + +typedef struct { + unsigned char type; + unsigned char rsv1; + unsigned short length; + unsigned short maximumOperationsInvoked; + unsigned short maximumOperationsProvided; +} PRV_ASYNCOPERATIONS; + +typedef struct { + unsigned char type; + unsigned char rsv1; + unsigned short length; + char implementationClassUID[DICOM_UI_LENGTH + 1]; +} PRV_IMPLEMENTATIONCLASSUID; + +typedef struct { + unsigned char type; + unsigned char rsv1; + unsigned short length; + char implementationVersionName[16 + 1]; +} PRV_IMPLEMENTATIONVERSIONNAME; + +typedef struct { + void *reserved[2]; + unsigned char type; + unsigned char rsv1; + unsigned short length; + unsigned short UIDLength; + char SOPClassUID[DICOM_UI_LENGTH + 1]; + unsigned char SCURole; + unsigned char SCPRole; +} PRV_SCUSCPROLE; + +typedef struct dul_presentationcontext { + void *reserved[2]; + unsigned char type; + unsigned char rsv1; + unsigned short length; + unsigned char contextID; + unsigned char rsv2; + unsigned char result; + unsigned char rsv3; + + DUL_SUBITEM abstractSyntax; + LST_HEAD *transferSyntaxList; +} PRV_PRESENTATIONCONTEXTITEM; + +typedef struct user_info { + void *reserved[2]; + unsigned char type; + unsigned char rsv1; + unsigned short length; + DUL_MAXLENGTH maxLength; // 51H: maximum length + PRV_ASYNCOPERATIONS asyncOperations; // 53H: async operations (not yet implemented!) + DUL_SUBITEM implementationClassUID; // 52H: implementation class UID + DUL_SUBITEM implementationVersionName; // 55H: implementation version name + LST_HEAD *SCUSCPRoleList; // 54H: SCP/SCU role selection + SOPClassExtendedNegotiationSubItemList *extNegList; // 56H: extended negotiation + // 57H: SOP CLASS COMMON EXTENDED NEGOTIATION (not implemented) + UserIdentityNegotiationSubItem *usrIdent; // 58H: user identity negotiation RQ or AC +} DUL_USERINFO; + +typedef struct dul_associatepdu { + void *reserved[2]; + unsigned char type; + unsigned char rsv1; + unsigned long length; + unsigned short protocol; + unsigned char rsv2[2]; + char calledAPTitle[18]; + char callingAPTitle[18]; + unsigned char rsv3[32]; + + DUL_SUBITEM applicationContext; + LST_HEAD *presentationContextList; + DUL_USERINFO userInfo; +} PRV_ASSOCIATEPDU; + +typedef struct dul_rejectreleaseabortpdu { + void *reserved[2]; + unsigned char type; + unsigned char rsv1; + unsigned long length; + unsigned char rsv2; + unsigned char result; + unsigned char source; + unsigned char reason; +} DUL_REJECTRELEASEABORTPDU; + +typedef struct dul_presentationdatavalue { + void *reserved[2]; + unsigned long length; + unsigned char presentationContextID; + unsigned char messageControlHeader; + void *data; +} DUL_PRESENTATIONDATAVALUE; + +typedef struct dul_datapdu { + void *reserved[2]; + unsigned char type; + unsigned char rsv1; + unsigned long length; + DUL_PRESENTATIONDATAVALUE presentationDataValue; +} DUL_DATAPDU; + + + + +#define DUL_PROTOCOL (unsigned short) 0x01 + +#define DUL_TYPEAPPLICATIONCONTEXT (unsigned char)0x10 +#define DUL_TYPEPRESENTATIONCONTEXTRQ (unsigned char)0x20 +#define DUL_TYPEPRESENTATIONCONTEXTAC (unsigned char)0x21 +#define DUL_TYPEABSTRACTSYNTAX (unsigned char)0x30 +#define DUL_TYPETRANSFERSYNTAX (unsigned char)0x40 +#define DUL_TYPEUSERINFO (unsigned char)0x50 +#define DUL_TYPEMAXLENGTH (unsigned char)0x51 +#define DUL_TYPEIMPLEMENTATIONCLASSUID (unsigned char)0x52 +#define DUL_TYPEASYNCOPERATIONS (unsigned char)0x53 +#define DUL_TYPESCUSCPROLE (unsigned char)0x54 +#define DUL_TYPEIMPLEMENTATIONVERSIONNAME (unsigned char)0x55 + +#define COPY_LONG_BIG(A,B) { \ + (B)[0] = (unsigned char)((A)>>24); \ + (B)[1] = (unsigned char)((A)>>16) ; \ + (B)[2] = (unsigned char)((A)>>8) ; \ + (B)[3] = (unsigned char)(A) ; } +#define COPY_SHORT_BIG(A,B) { \ + (B)[0] = (unsigned char)((A)>>8); \ + (B)[1] = (unsigned char)(A) ; } + +#define EXTRACT_LONG_BIG(A,B) { \ + (B) = (unsigned long)(A)[3] \ + | (((unsigned long)(A)[2]) << 8) \ + | (((unsigned long)(A)[1]) << 16) \ + | (((unsigned long)(A)[0]) << 24); \ + } + +#define EXTRACT_SHORT_BIG(A,B) { (B) = (unsigned short)(A)[1] | (((unsigned short)(A)[0]) << 8); } + +#endif // #ifndef DULSTRUC_H diff -Nru dcmtk-3.6.6/dcmnet/include/dcmtk/dcmnet/helpers.h dcmtk-3.6.7/dcmnet/include/dcmtk/dcmnet/helpers.h --- dcmtk-3.6.6/dcmnet/include/dcmtk/dcmnet/helpers.h 1970-01-01 00:00:00.000000000 +0000 +++ dcmtk-3.6.7/dcmnet/include/dcmtk/dcmnet/helpers.h 2022-04-28 13:47:25.000000000 +0000 @@ -0,0 +1,44 @@ +/* + * + * Copyright (C) 2021, OFFIS e.V. + * All rights reserved. See COPYRIGHT file for details. + * + * This software and supporting documentation were partly developed by + * + * OFFIS e.V. + * R&D Division Health + * Escherweg 2 + * D-26121 Oldenburg, Germany + * + * + * Module: dcmnet + * + * Author: Michael Onken + * + * Purpose: Collection of helper functions + * + */ + +#ifndef DCMNET_HELPERS_H +#define DCMNET_HELPERS_H + +#include "dcmtk/ofstd/ofcond.h" +#include "dcmtk/dcmnet/dulstruc.h" + +struct T_ASC_Parameters; +class LST_HEAD; + +/** Destroys presentationContextList as used in dul_associatepdu + * @param pcList The presentation context list to free (must not be NULL) + */ +void +destroyAssociatePDUPresentationContextList(LST_HEAD ** pcList); + + +/** Destroys userInfo as used in dul_associatepdu + * @param userInfo The user information lists to free (must not be NULL) + */ +void +destroyUserInformationLists(DUL_USERINFO * userInfo); + +#endif diff -Nru dcmtk-3.6.6/dcmnet/include/dcmtk/dcmnet/scp.h dcmtk-3.6.7/dcmnet/include/dcmtk/dcmnet/scp.h --- dcmtk-3.6.6/dcmnet/include/dcmtk/dcmnet/scp.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmnet/include/dcmtk/dcmnet/scp.h 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2009-2020, OFFIS e.V. + * Copyright (C) 2009-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -102,8 +102,8 @@ DcmPresentationContextInfo() : presentationContextID(0) , abstractSyntax() - , proposedSCRole(0) - , acceptedSCRole(0) + , proposedSCRole(DUL_SC_ROLE_NONE) + , acceptedSCRole(DUL_SC_ROLE_NONE) , acceptedTransferSyntax() { } @@ -113,9 +113,9 @@ /// Abstract Syntax name (UID) as proposed by SCU OFString abstractSyntax; /// SCP role as proposed from SCU - Uint8 proposedSCRole; + DUL_SC_ROLE proposedSCRole; /// Role accepted by SCP for this Presentation Context - Uint8 acceptedSCRole; + DUL_SC_ROLE acceptedSCRole; /// Transfer Syntax accepted for this Presentation Context (UID) OFString acceptedTransferSyntax; // Fields "reserved" and "result" not included from DUL_PRESENTATIONCONTEXT diff -Nru dcmtk-3.6.6/dcmnet/libsrc/assoc.cc dcmtk-3.6.7/dcmnet/libsrc/assoc.cc --- dcmtk-3.6.6/dcmnet/libsrc/assoc.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmnet/libsrc/assoc.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1994-2020, OFFIS e.V. + * Copyright (C) 1994-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were partly developed by @@ -99,13 +99,6 @@ #include "dcmtk/dcmnet/assoc.h" /* always include the module header */ #include "dcmtk/dcmnet/diutil.h" -#define INCLUDE_CSTDLIB -#define INCLUDE_CSTDIO -#define INCLUDE_CSTRING -#define INCLUDE_CSTDARG -#define INCLUDE_CERRNO -#include "dcmtk/ofstd/ofstdinc.h" - #ifdef HAVE_SYS_TIME_H #include #endif @@ -125,6 +118,7 @@ #include "dcmtk/ofstd/ofconsol.h" #include "dcmtk/ofstd/ofstd.h" #include "dcmtk/dcmnet/dcmtrans.h" +#include "dcmtk/dcmnet/helpers.h" /* ** Constant Definitions @@ -284,7 +278,7 @@ *params = (T_ASC_Parameters *) malloc(sizeof(**params)); if (*params == NULL) return EC_MemoryExhausted; - bzero((char*)*params, sizeof(**params)); + memset((char*)*params, 0, sizeof(**params)); OFStandard::strlcpy((*params)->ourImplementationClassUID, OFFIS_IMPLEMENTATION_CLASS_UID, @@ -343,36 +337,17 @@ return EC_Normal; } -static void -destroyPresentationContextList(LST_HEAD ** lst) -{ - DUL_PRESENTATIONCONTEXT *pc; - DUL_TRANSFERSYNTAX *ts; - - if ((lst == NULL) || (*lst == NULL)) - return; - while ((pc = (DUL_PRESENTATIONCONTEXT*) LST_Dequeue(lst)) != NULL) { - if (pc->proposedTransferSyntax != NULL) { - while ((ts = (DUL_TRANSFERSYNTAX*) LST_Dequeue(&pc->proposedTransferSyntax)) != NULL) { - free(ts); - } - LST_Destroy(&pc->proposedTransferSyntax); - } - free(pc); - } - LST_Destroy(lst); -} OFCondition ASC_destroyAssociationParameters(T_ASC_Parameters ** params) { /* free the elements in the requested presentation context list */ - destroyPresentationContextList( + destroyDULParamPresentationContextList( &((*params)->DULparams.requestedPresentationContext)); /* free the elements in the accepted presentation context list */ - destroyPresentationContextList( + destroyDULParamPresentationContextList( &((*params)->DULparams.acceptedPresentationContext)); /* free DUL parameters */ @@ -474,14 +449,57 @@ { int reason; if (rejectParameters) { - rejectParameters->result = - (T_ASC_RejectParametersResult) params->DULparams.result; - rejectParameters->source = - (T_ASC_RejectParametersSource) params->DULparams.resultSource; + + switch (params->DULparams.result) + { + case ASC_RESULT_REJECTEDPERMANENT: + case ASC_RESULT_REJECTEDTRANSIENT: + rejectParameters->result = + (T_ASC_RejectParametersResult) params->DULparams.result; + break; + default: + DCMNET_ERROR("Received invalid A-ASSOCIATE-RJ reject result 0x" << STD_NAMESPACE hex << STD_NAMESPACE setfill('0') + << STD_NAMESPACE setw(4) << params->DULparams.result << ", using default."); + rejectParameters->result = ASC_RESULT_REJECTEDPERMANENT; + break; + } + + switch (params->DULparams.resultSource) + { + case ASC_SOURCE_SERVICEUSER: + case ASC_SOURCE_SERVICEPROVIDER_ACSE_RELATED: + case ASC_SOURCE_SERVICEPROVIDER_PRESENTATION_RELATED: + rejectParameters->source = + (T_ASC_RejectParametersSource) params->DULparams.resultSource; + break; + default: + DCMNET_ERROR("Received invalid A-ASSOCIATE-RJ reject source 0x" << STD_NAMESPACE hex << STD_NAMESPACE setfill('0') + << STD_NAMESPACE setw(4) << params->DULparams.resultSource << ", using default."); + rejectParameters->source = ASC_SOURCE_SERVICEUSER; + break; + } reason = params->DULparams.diagnostic | ((params->DULparams.resultSource & 0xff) << 8); - rejectParameters->reason = (T_ASC_RejectParametersReason) reason; + + switch (reason) + { + case ASC_REASON_SU_NOREASON: + case ASC_REASON_SU_APPCONTEXTNAMENOTSUPPORTED: + case ASC_REASON_SU_CALLINGAETITLENOTRECOGNIZED: + case ASC_REASON_SU_CALLEDAETITLENOTRECOGNIZED: + case ASC_REASON_SP_ACSE_NOREASON: + case ASC_REASON_SP_ACSE_PROTOCOLVERSIONNOTSUPPORTED: + case ASC_REASON_SP_PRES_TEMPORARYCONGESTION: + case ASC_REASON_SP_PRES_LOCALLIMITEXCEEDED: + rejectParameters->reason = (T_ASC_RejectParametersReason) reason; + break; + default: + DCMNET_ERROR("Received invalid A-ASSOCIATE-RJ reject reason 0x" << STD_NAMESPACE hex << STD_NAMESPACE setfill('0') + << STD_NAMESPACE setw(4) << reason << ", using default."); + rejectParameters->reason = ASC_REASON_SU_NOREASON; + break; + } } return EC_Normal; } @@ -743,7 +761,7 @@ int count = 0; /* make the presentation context structure clean */ - bzero((char*)presentationContext, sizeof(*presentationContext)); + memset((char*)presentationContext, 0, sizeof(*presentationContext)); if (params->DULparams.requestedPresentationContext == NULL) { @@ -804,7 +822,7 @@ transfer = (DUL_TRANSFERSYNTAX*) LST_Next(l); } - presentationContext->transferSyntaxCount = count; + presentationContext->transferSyntaxCount = OFstatic_cast(unsigned char, count); return EC_Normal; } @@ -911,7 +929,7 @@ if (proposedContext == NULL) return ASC_BADPRESENTATIONCONTEXTID; /* we want to mark this proposed context as being refused */ - proposedContext->result = resultReason; + proposedContext->result = OFstatic_cast(unsigned char, resultReason); acceptedContext = findPresentationContextID( params->DULparams.acceptedPresentationContext, @@ -919,7 +937,7 @@ if (acceptedContext != NULL) { /* it is already in the list, mark it as refused */ - acceptedContext->result = resultReason; + acceptedContext->result = OFstatic_cast(unsigned char, resultReason); OFStandard::strlcpy(acceptedContext->abstractSyntax, proposedContext->abstractSyntax, sizeof(acceptedContext->abstractSyntax)); /* we must send back a transfer syntax even though this @@ -943,7 +961,7 @@ cond = DUL_MakePresentationCtx( &acceptedContext, DUL_SC_ROLE_DEFAULT, DUL_SC_ROLE_DEFAULT, - presentationContextID, resultReason, + presentationContextID, OFstatic_cast(unsigned char, resultReason), proposedContext->abstractSyntax, UID_LittleEndianImplicitTransferSyntax, NULL); if (cond.bad()) return cond; @@ -1002,7 +1020,7 @@ presentationContext->proposedRole = dulRole2ascRole(pc->proposedSCRole); presentationContext->acceptedRole = dulRole2ascRole(pc->acceptedSCRole); - presentationContext->transferSyntaxCount = count; + presentationContext->transferSyntaxCount = OFstatic_cast(unsigned char, count); OFStandard::strlcpy(presentationContext->acceptedTransferSyntax, pc->acceptedTransferSyntax, sizeof(DIC_UI)); return EC_Normal; @@ -1706,8 +1724,7 @@ } if ((*association)->params != NULL) { - cond = ASC_destroyAssociationParameters(&(*association)->params); - if (cond.bad()) return cond; + ASC_destroyAssociationParameters(&(*association)->params); } if ((*association)->sendPDVBuffer != NULL) @@ -1753,7 +1770,7 @@ ASC_destroyAssociationParameters(¶ms); return EC_MemoryExhausted; } - bzero((char*)*assoc, sizeof(**assoc)); + memset((char*)*assoc, 0, sizeof(**assoc)); (*assoc)->params = params; (*assoc)->nextMsgID = 1; @@ -1890,7 +1907,7 @@ *assoc = (T_ASC_Association *) malloc(sizeof(**assoc)); if (*assoc == NULL) return EC_MemoryExhausted; - bzero((char*)*assoc, sizeof(**assoc)); + memset((char*)*assoc, 0, sizeof(**assoc)); (*assoc)->params = params; (*assoc)->nextMsgID = 1; @@ -2130,7 +2147,6 @@ } - OFCondition ASC_dropAssociation(T_ASC_Association * association) { @@ -2143,6 +2159,16 @@ } +OFCondition +ASC_closeTransportConnection(T_ASC_Association * association) +{ + /* if already dead don't worry */ + if (association == NULL) return EC_Normal; + if (association->DULassociation == NULL) return EC_Normal; + + return DUL_CloseTransportConnection(&association->DULassociation); +} + OFCondition ASC_setTransportLayerType( @@ -2216,3 +2242,23 @@ ASC_dumpConnectionParameters(str, association); outstream << str << OFendl; } + +void +destroyDULParamPresentationContextList(LST_HEAD ** lst) +{ + DUL_PRESENTATIONCONTEXT *pc; + DUL_TRANSFERSYNTAX *ts; + + if ((lst == NULL) || (*lst == NULL)) + return; + while ((pc = (DUL_PRESENTATIONCONTEXT*) LST_Dequeue(lst)) != NULL) { + if (pc->proposedTransferSyntax != NULL) { + while ((ts = (DUL_TRANSFERSYNTAX*) LST_Dequeue(&pc->proposedTransferSyntax)) != NULL) { + free(ts); + } + LST_Destroy(&pc->proposedTransferSyntax); + } + free(pc); + } + LST_Destroy(lst); +} diff -Nru dcmtk-3.6.6/dcmnet/libsrc/CMakeLists.txt dcmtk-3.6.7/dcmnet/libsrc/CMakeLists.txt --- dcmtk-3.6.6/dcmnet/libsrc/CMakeLists.txt 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmnet/libsrc/CMakeLists.txt 2022-04-28 13:47:25.000000000 +0000 @@ -1,5 +1,49 @@ # create library from source files -DCMTK_ADD_LIBRARY(dcmnet assoc cond dcasccff dcasccfg dccfenmp dccfpcmp dccfprmp dccfrsmp dccftsmp dccfuidh dcmlayer dcmtrans dcompat dimcancl dimcmd dimdump dimecho dimfind dimget dimmove dimse dimstore diutil dul dulconst dulextra dulfsm dulparse dulpres extneg lst dfindscu dstorscp dstorscu dcuserid scu scp scpthrd scpcfg scppool dwrap) +DCMTK_ADD_LIBRARY(dcmnet + assoc.cc + cond.cc + dcasccff.cc + dcasccfg.cc + dccfenmp.cc + dccfpcmp.cc + dccfprmp.cc + dccfrsmp.cc + dccftsmp.cc + dccfuidh.cc + dcmlayer.cc + dcmtrans.cc + dcompat.cc + dcuserid.cc + dfindscu.cc + dimcancl.cc + dimcmd.cc + dimdump.cc + dimecho.cc + dimfind.cc + dimget.cc + dimmove.cc + dimse.cc + dimstore.cc + diutil.cc + dstorscp.cc + dstorscu.cc + dul.cc + dulconst.cc + dulextra.cc + dulfsm.cc + dulparse.cc + dulpres.cc + dwrap.c + extneg.cc + helpers.cc + lst.cc + scp.cc + scpcfg.cc + scppool.cc + scpthrd.cc + scu.cc +) DCMTK_TARGET_LINK_MODULES(dcmnet ofstd oflog dcmdata) DCMTK_TARGET_LINK_LIBRARIES(dcmnet ${WRAP_LIBS}) +set_property(TARGET dcmnet PROPERTY OUTPUT_NAME "dcmnet${DCMTK_TLS_LIBRARY_POSTFIX}") diff -Nru dcmtk-3.6.6/dcmnet/libsrc/cond.cc dcmtk-3.6.7/dcmnet/libsrc/cond.cc --- dcmtk-3.6.6/dcmnet/libsrc/cond.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmnet/libsrc/cond.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1994-2018, OFFIS e.V. + * Copyright (C) 1994-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -23,8 +23,8 @@ #include "dcmtk/dcmnet/cond.h" #include "dcmtk/ofstd/ofstream.h" -#define INCLUDE_CSTDIO -#include "dcmtk/ofstd/ofstdinc.h" +// #define INCLUDE_CSTDIO +// #include "dcmtk/ofstd/ofstdinc.h" makeOFConditionConst(ASC_BADPRESENTATIONCONTEXTID, OFM_dcmnet, ASCC_BADPRESENTATIONCONTEXTID, OF_error, "ASC Bad presentation context ID"); makeOFConditionConst(ASC_MISSINGTRANSFERSYNTAX, OFM_dcmnet, ASCC_MISSINGTRANSFERSYNTAX, OF_error, "ASC Missing transfer syntax"); diff -Nru dcmtk-3.6.6/dcmnet/libsrc/dcasccff.cc dcmtk-3.6.7/dcmnet/libsrc/dcasccff.cc --- dcmtk-3.6.6/dcmnet/libsrc/dcasccff.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmnet/libsrc/dcasccff.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2003-2013, OFFIS e.V. + * Copyright (C) 2003-2021, 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/dcmdata/dcerror.h" /* for EC_IllegalCall */ #include "dcmtk/ofstd/ofconfig.h" /* for class OFConfigFile */ -#define INCLUDE_CCTYPE -#include "dcmtk/ofstd/ofstdinc.h" - - /* config file keys for the association configuration */ #define L2_EXTENDEDNEGOTIATION "EXTENDEDNEGOTIATION" diff -Nru dcmtk-3.6.6/dcmnet/libsrc/dccfenmp.cc dcmtk-3.6.7/dcmnet/libsrc/dccfenmp.cc --- dcmtk-3.6.6/dcmnet/libsrc/dccfenmp.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmnet/libsrc/dccfenmp.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2003-2012, OFFIS e.V. + * Copyright (C) 2003-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -162,9 +162,10 @@ OFMap::iterator it = map_.find(skey); DcmExtendedNegotiationList * const *value = NULL; + DcmExtendedNegotiationList *newentry = NULL; if (it == map_.end()) { - DcmExtendedNegotiationList *newentry = new DcmExtendedNegotiationList(); + newentry = new DcmExtendedNegotiationList(); map_.insert(OFPair(skey, newentry)); value = &newentry; } diff -Nru dcmtk-3.6.6/dcmnet/libsrc/dccfrsmp.cc dcmtk-3.6.7/dcmnet/libsrc/dccfrsmp.cc --- dcmtk-3.6.6/dcmnet/libsrc/dccfrsmp.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmnet/libsrc/dccfrsmp.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2003-2017, OFFIS e.V. + * Copyright (C) 2003-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -123,10 +123,11 @@ DcmRoleSelectionList * const *value = NULL; OFString skey(key); OFMap::iterator it = map_.find(skey); + DcmRoleSelectionList *newentry = NULL; if (it == map_.end()) { - DcmRoleSelectionList *newentry = new DcmRoleSelectionList(); + newentry = new DcmRoleSelectionList(); map_.insert(OFPair(skey, newentry)); value = &newentry; } diff -Nru dcmtk-3.6.6/dcmnet/libsrc/dccfuidh.cc dcmtk-3.6.7/dcmnet/libsrc/dccfuidh.cc --- dcmtk-3.6.6/dcmnet/libsrc/dccfuidh.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmnet/libsrc/dccfuidh.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1994-2013, OFFIS e.V. + * Copyright (C) 1994-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -26,9 +26,6 @@ #include "dcmtk/dcmdata/dcuid.h" /* for dcmFindUIDFromName() */ #include "dcmtk/dcmdata/dcxfer.h" /* for gLocalByteOrder */ -#define INCLUDE_CSTRING /* for strcmp() */ -#include "dcmtk/ofstd/ofstdinc.h" - #define SymbolicUID_LocalEndianExplicit "LocalEndianExplicit" #define SymbolicUID_OppositeEndianExplicit "OppositeEndianExplicit" diff -Nru dcmtk-3.6.6/dcmnet/libsrc/dcmtrans.cc dcmtk-3.6.7/dcmnet/libsrc/dcmtrans.cc --- dcmtk-3.6.6/dcmnet/libsrc/dcmtrans.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmnet/libsrc/dcmtrans.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1998-2018, OFFIS e.V. + * Copyright (C) 1998-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -32,13 +32,6 @@ #include "dcmtk/dcmnet/diutil.h" #include "dcmtk/ofstd/ofvector.h" -#define INCLUDE_CSTDLIB -#define INCLUDE_CSTDIO -#define INCLUDE_CSTRING -#define INCLUDE_CTIME -#define INCLUDE_CERRNO -#define INCLUDE_CSIGNAL -#include "dcmtk/ofstd/ofstdinc.h" #include "dcmtk/ofstd/oftimer.h" BEGIN_EXTERN_C @@ -75,9 +68,15 @@ { if (theSocket >= 0) { + #ifdef DISABLE_SEND_TIMEOUT +#ifdef _MSC_VER +#pragma message("Warning: The macro DISABLE_SEND_TIMEOUT is not supported anymore. See 'macros.txt' for details.") +#else #warning The macro DISABLE_SEND_TIMEOUT is not supported anymore. See "macros.txt" for details. #endif +#endif + /* get global timeout for the send() function */ const Sint32 sendTimeout = dcmSocketSendTimeout.get(); if (sendTimeout >= 0) @@ -105,8 +104,13 @@ } } #ifdef DISABLE_RECV_TIMEOUT +#ifdef _MSC_VER +#pragma message("Warning: The macro DISABLE_RECV_TIMEOUT is not supported anymore. See 'macros.txt' for details.") +#else #warning The macro DISABLE_RECV_TIMEOUT is not supported anymore. See "macros.txt" for details. #endif +#endif + /* get global timeout for the recv() function */ const Sint32 recvTimeout = dcmSocketReceiveTimeout.get(); if (recvTimeout >= 0) @@ -319,19 +323,19 @@ close(); } -DcmTransportLayerStatus DcmTCPConnection::serverSideHandshake() +OFCondition DcmTCPConnection::serverSideHandshake() { - return TCS_ok; + return EC_Normal; } -DcmTransportLayerStatus DcmTCPConnection::clientSideHandshake() +OFCondition DcmTCPConnection::clientSideHandshake() { - return TCS_ok; + return EC_Normal; } -DcmTransportLayerStatus DcmTCPConnection::renegotiate(const char * /* newSuite */ ) +OFCondition DcmTCPConnection::renegotiate(const char * /* newSuite */ ) { - return TCS_ok; + return EC_Normal; } ssize_t DcmTCPConnection::read(void *buf, size_t nbyte) @@ -354,7 +358,12 @@ void DcmTCPConnection::close() { - if (getSocket() != -1) + closeTransportConnection(); +} + +void DcmTCPConnection::closeTransportConnection() +{ + if (getSocket() != OFstatic_cast(DcmNativeSocketType, (-1))) { #ifdef HAVE_WINSOCK_H (void) shutdown(getSocket(), 1 /* SD_SEND */); @@ -363,7 +372,7 @@ (void) ::close(getSocket()); #endif /* forget about this socket (now closed) */ - setSocket(-1); + setSocket(OFstatic_cast(DcmNativeSocketType, (-1))); } } @@ -404,7 +413,7 @@ t.tv_usec = 0; #ifdef DCMTK_HAVE_POLL - struct pollfd pfd[] = + struct pollfd pfd[] = { { getSocket(), POLLIN, 0 } }; @@ -463,27 +472,3 @@ str = "Transport connection: TCP/IP, unencrypted."; return str; } - -const char *DcmTCPConnection::errorString(DcmTransportLayerStatus code) -{ - switch (code) - { - case TCS_ok: - return "no error"; - /* break; */ - case TCS_noConnection: - return "no secure connection in place"; - /* break; */ - case TCS_tlsError: - return "TLS error"; - /* break; */ - case TCS_illegalCall: - return "illegal call"; - /* break; */ - case TCS_unspecifiedError: - return "unspecified error"; - /* break; */ - } - return "unknown error code"; -} - diff -Nru dcmtk-3.6.6/dcmnet/libsrc/dcompat.cc dcmtk-3.6.7/dcmnet/libsrc/dcompat.cc --- dcmtk-3.6.6/dcmnet/libsrc/dcompat.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmnet/libsrc/dcompat.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1994-2017, OFFIS e.V. + * Copyright (C) 1994-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were partly developed by @@ -88,12 +88,6 @@ #include "dcmtk/ofstd/ofstd.h" #include "dcmtk/dcmnet/diutil.h" -#define INCLUDE_CSTDLIB -#define INCLUDE_CSTDIO -#define INCLUDE_CSTRING -#define INCLUDE_UNISTD -#include "dcmtk/ofstd/ofstdinc.h" - #ifdef HAVE_UNIX_H #if defined(macintosh) && defined (HAVE_WINSOCK_H) /* unix.h defines timeval incompatible with winsock.h */ @@ -306,7 +300,7 @@ struct utsname uts; int rc; - bzero(&uts, sizeof(uts)); + memset(&uts, 0, sizeof(uts)); rc = utsname(&uts); if (rc >= 0) { strncpy(name, uts.nodename, namelen); diff -Nru dcmtk-3.6.6/dcmnet/libsrc/dcuserid.cc dcmtk-3.6.7/dcmnet/libsrc/dcuserid.cc --- dcmtk-3.6.6/dcmnet/libsrc/dcuserid.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmnet/libsrc/dcuserid.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1997-2018, OFFIS e.V. + * Copyright (C) 1997-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -23,7 +23,7 @@ #include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ #include "dcmtk/dcmnet/dcuserid.h" #include "dcmtk/dcmnet/dul.h" -#include "dulstruc.h" +#include "dcmtk/dcmnet/dulstruc.h" /* ************************************************************************* */ /* Implementation of class UserIdentityNegotiationSubItem */ diff -Nru dcmtk-3.6.6/dcmnet/libsrc/dfindscu.cc dcmtk-3.6.7/dcmnet/libsrc/dfindscu.cc --- dcmtk-3.6.6/dcmnet/libsrc/dfindscu.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmnet/libsrc/dfindscu.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1994-2020, OFFIS e.V. + * Copyright (C) 1994-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -23,12 +23,6 @@ #include "dcmtk/dcmnet/dfindscu.h" -#define INCLUDE_CSTDLIB -#define INCLUDE_CSTDIO -#define INCLUDE_CSTRING -#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" @@ -153,23 +147,28 @@ { OFCondition cond = EC_Normal; size_t writeFlags = 0; + OFString csetString; DCMNET_DEBUG("Writing response dataset to XML file"); /* expect that (0008,0005) is set if extended characters are used */ - if (responseIdentifiers->tagExistsWithValue(DCM_SpecificCharacterSet)) + if (responseIdentifiers->findAndGetOFStringArray(DCM_SpecificCharacterSet, csetString).good()) { + /* for ASCII and UTF-8, there is no need to convert the character strings */ + if (!csetString.empty() && (csetString != "ISO_IR 192")) + { #ifdef DCMTK_ENABLE_CHARSET_CONVERSION - DCMNET_DEBUG("Converting all element values that are affected by SpecificCharacterSet (0008,0005) to UTF-8"); - cond = responseIdentifiers->convertToUTF8(); + DCMNET_DEBUG("Converting all element values that are affected by SpecificCharacterSet (0008,0005) to UTF-8"); + cond = responseIdentifiers->convertToUTF8(); #else - if (responseIdentifiers->containsExtendedCharacters(OFFalse /*checkAllStrings*/)) - { - DCMNET_WARN("No support for character set conversion available ... quoting non-ASCII characters"); - /* make sure that non-ASCII characters are quoted appropriately */ - writeFlags |= DCMTypes::XF_convertNonASCII; - } else { - DCMNET_DEBUG("No support for character set conversion available"); - } + if (responseIdentifiers->containsExtendedCharacters(OFFalse /*checkAllStrings*/)) + { + DCMNET_WARN("No support for character set conversion available ... quoting non-ASCII characters"); + /* make sure that non-ASCII characters are quoted appropriately */ + writeFlags |= DCMTypes::XF_convertNonASCII; + } else { + DCMNET_DEBUG("No support for character set conversion available"); + } #endif + } } /* write response dataset to XML file */ if (cond.good()) @@ -711,7 +710,7 @@ int n = repeatCount; /* prepare C-FIND-RQ message */ - bzero(OFreinterpret_cast(char*, &req), sizeof(req)); + memset(OFreinterpret_cast(char*, &req), 0, sizeof(req)); OFStandard::strlcpy(req.AffectedSOPClassUID, abstractSyntax, sizeof(req.AffectedSOPClassUID)); req.DataSetType = DIMSE_DATASET_PRESENT; req.Priority = DIMSE_PRIORITY_MEDIUM; diff -Nru dcmtk-3.6.6/dcmnet/libsrc/dimcancl.cc dcmtk-3.6.7/dcmnet/libsrc/dimcancl.cc --- dcmtk-3.6.6/dcmnet/libsrc/dimcancl.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmnet/libsrc/dimcancl.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1994-2010, OFFIS e.V. + * Copyright (C) 1994-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were partly developed by @@ -81,12 +81,6 @@ #include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ -#define INCLUDE_CSTDLIB -#define INCLUDE_CSTDIO -#define INCLUDE_CSTRING -#define INCLUDE_CSTDARG -#include "dcmtk/ofstd/ofstdinc.h" - #ifdef HAVE_FCNTL_H #include #endif @@ -100,7 +94,7 @@ T_ASC_PresentationContextID presId, DIC_US msgId) { T_DIMSE_Message req; - bzero((char*)&req, sizeof(req)); + memset((char*)&req, 0, sizeof(req)); req.CommandField = DIMSE_C_CANCEL_RQ; req.msg.CCancelRQ.MessageIDBeingRespondedTo = msgId; diff -Nru dcmtk-3.6.6/dcmnet/libsrc/dimcmd.cc dcmtk-3.6.7/dcmnet/libsrc/dimcmd.cc --- dcmtk-3.6.6/dcmnet/libsrc/dimcmd.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmnet/libsrc/dimcmd.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1994-2018, OFFIS e.V. + * Copyright (C) 1994-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were partly developed by @@ -81,13 +81,6 @@ #include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ -#define INCLUDE_CSTDLIB -#define INCLUDE_CSTDIO -#define INCLUDE_CSTRING -#define INCLUDE_CSTDARG -#define INCLUDE_CERRNO -#include "dcmtk/ofstd/ofstdinc.h" - #ifdef HAVE_FCNTL_H #include #endif @@ -483,7 +476,7 @@ static OFCondition buildCEchoRQ(T_DIMSE_C_EchoRQ * e, DcmDataset * obj) { - OFCondition cond = buildCommonRQ(obj, DIMSE_C_ECHO_RQ, e->MessageID, e->DataSetType); RET(cond); + OFCondition cond = buildCommonRQ(obj, DIMSE_C_ECHO_RQ, e->MessageID, OFstatic_cast(Uint16, e->DataSetType)); RET(cond); cond = addString(obj, DCM_AffectedSOPClassUID, e->AffectedSOPClassUID, OFFalse); RET(cond); return cond; @@ -523,7 +516,7 @@ { OFCondition cond = buildCommonRSP(obj, DIMSE_C_ECHO_RSP, e->MessageIDBeingRespondedTo, - e->DataSetType, e->DimseStatus); RET(cond); + OFstatic_cast(Uint16, e->DataSetType), e->DimseStatus); RET(cond); /* build optional items */ if (e->opts & O_ECHO_AFFECTEDSOPCLASSUID) { @@ -571,7 +564,7 @@ buildCStoreRQ(T_DIMSE_C_StoreRQ * e, DcmDataset * obj) { OFCondition cond = buildCommonRQ(obj, DIMSE_C_STORE_RQ, e->MessageID, - e->DataSetType); RET(cond); + OFstatic_cast(Uint16, e->DataSetType)); RET(cond); /* build other mandatory items */ cond = addString(obj, DCM_AffectedSOPClassUID, @@ -579,7 +572,7 @@ cond = addString(obj, DCM_AffectedSOPInstanceUID, e->AffectedSOPInstanceUID, OFFalse); RET(cond); cond = addUS(obj, DCM_Priority, - e->Priority); RET(cond); + OFstatic_cast(Uint16, e->Priority)); RET(cond); /* build optional items */ if (e->opts & O_STORE_MOVEORIGINATORAETITLE) { @@ -646,7 +639,7 @@ { OFCondition cond = buildCommonRSP(obj, DIMSE_C_STORE_RSP, e->MessageIDBeingRespondedTo, - e->DataSetType, e->DimseStatus); RET(cond); + OFstatic_cast(Uint16, e->DataSetType), e->DimseStatus); RET(cond); /* build optional items */ if (e->opts & O_STORE_AFFECTEDSOPCLASSUID) { @@ -711,13 +704,13 @@ { OFCondition cond = buildCommonRQ(obj, DIMSE_C_FIND_RQ, e->MessageID, - e->DataSetType); RET(cond); + OFstatic_cast(Uint16, e->DataSetType)); RET(cond); /* build other mandatory items */ cond = addString(obj, DCM_AffectedSOPClassUID, e->AffectedSOPClassUID, OFFalse); RET(cond); cond = addUS(obj, DCM_Priority, - e->Priority); RET(cond); + OFstatic_cast(Uint16, e->Priority)); RET(cond); return cond; } @@ -760,7 +753,7 @@ { OFCondition cond = buildCommonRSP(obj, DIMSE_C_FIND_RSP, e->MessageIDBeingRespondedTo, - e->DataSetType, e->DimseStatus); RET(cond); + OFstatic_cast(Uint16, e->DataSetType), e->DimseStatus); RET(cond); /* build optional items */ if (e->opts & O_FIND_AFFECTEDSOPCLASSUID) { @@ -808,13 +801,13 @@ buildCGetRQ(T_DIMSE_C_GetRQ * e, DcmDataset * obj) { OFCondition cond = buildCommonRQ(obj, DIMSE_C_GET_RQ, e->MessageID, - e->DataSetType); RET(cond); + OFstatic_cast(Uint16, e->DataSetType)); RET(cond); /* build other mandatory items */ cond = addString(obj, DCM_AffectedSOPClassUID, e->AffectedSOPClassUID, OFFalse); RET(cond); cond = addUS(obj, DCM_Priority, - e->Priority); RET(cond); + OFstatic_cast(Uint16, e->Priority)); RET(cond); return cond; } @@ -857,7 +850,7 @@ { OFCondition cond = buildCommonRSP(obj, DIMSE_C_GET_RSP, e->MessageIDBeingRespondedTo, - e->DataSetType, e->DimseStatus); RET(cond); + OFstatic_cast(Uint16, e->DataSetType), e->DimseStatus); RET(cond); /* build optional items */ if (e->opts & O_GET_AFFECTEDSOPCLASSUID) { @@ -937,12 +930,12 @@ buildCMoveRQ(T_DIMSE_C_MoveRQ * e, DcmDataset * obj) { OFCondition cond = buildCommonRQ(obj, DIMSE_C_MOVE_RQ, e->MessageID, - e->DataSetType); RET(cond); + OFstatic_cast(Uint16, e->DataSetType)); RET(cond); /* build other mandatory items */ cond = addString(obj, DCM_AffectedSOPClassUID, e->AffectedSOPClassUID, OFFalse); RET(cond); - cond = addUS(obj, DCM_Priority, e->Priority); RET(cond); + cond = addUS(obj, DCM_Priority, OFstatic_cast(Uint16, e->Priority)); RET(cond); cond = addString(obj, DCM_MoveDestination, e->MoveDestination, OFFalse); RET(cond); return cond; @@ -988,7 +981,7 @@ { OFCondition cond = buildCommonRSP(obj, DIMSE_C_MOVE_RSP, e->MessageIDBeingRespondedTo, - e->DataSetType, e->DimseStatus); RET(cond); + OFstatic_cast(Uint16, e->DataSetType), e->DimseStatus); RET(cond); /* build optional items */ if (e->opts & O_MOVE_AFFECTEDSOPCLASSUID) { @@ -1070,7 +1063,7 @@ OFCondition cond = addUS(obj, DCM_CommandField, DIMSE_C_CANCEL_RQ); RET(cond); cond = addUS(obj, DCM_MessageIDBeingRespondedTo, e->MessageIDBeingRespondedTo); RET(cond); - cond = addUS(obj, DCM_CommandDataSetType, e->DataSetType); RET(cond); + cond = addUS(obj, DCM_CommandDataSetType, OFstatic_cast(Uint16, e->DataSetType)); RET(cond); return EC_Normal; } @@ -1109,7 +1102,7 @@ buildNEventReportRQ(T_DIMSE_N_EventReportRQ * e, DcmDataset * obj) { OFCondition cond = buildCommonRQ(obj, DIMSE_N_EVENT_REPORT_RQ, e->MessageID, - e->DataSetType); RET(cond); + OFstatic_cast(Uint16, e->DataSetType)); RET(cond); cond = addString(obj, DCM_AffectedSOPClassUID, e->AffectedSOPClassUID, OFFalse); RET(cond); cond = addString(obj, DCM_AffectedSOPInstanceUID, @@ -1158,7 +1151,7 @@ { OFCondition cond = buildCommonRSP(obj, DIMSE_N_EVENT_REPORT_RSP, e->MessageIDBeingRespondedTo, - e->DataSetType, e->DimseStatus); RET(cond); + OFstatic_cast(Uint16, e->DataSetType), e->DimseStatus); RET(cond); /* build optional items */ if (e->opts & O_NEVENTREPORT_AFFECTEDSOPCLASSUID) { @@ -1221,7 +1214,7 @@ buildNGetRQ(T_DIMSE_N_GetRQ * e, DcmDataset * obj) { OFCondition cond = buildCommonRQ(obj, DIMSE_N_GET_RQ, e->MessageID, - e->DataSetType); RET(cond); + OFstatic_cast(Uint16, e->DataSetType)); RET(cond); cond = addString(obj, DCM_RequestedSOPClassUID, e->RequestedSOPClassUID, OFFalse); RET(cond); cond = addString(obj, DCM_RequestedSOPInstanceUID, @@ -1274,7 +1267,7 @@ buildNGetRSP(T_DIMSE_N_GetRSP * e, DcmDataset * obj) { OFCondition cond = buildCommonRSP(obj, DIMSE_N_GET_RSP, e->MessageIDBeingRespondedTo, - e->DataSetType, e->DimseStatus); RET(cond); + OFstatic_cast(Uint16, e->DataSetType), e->DimseStatus); RET(cond); /* build optional items */ if (e->opts & O_NGET_AFFECTEDSOPCLASSUID) { @@ -1330,7 +1323,7 @@ buildNSetRQ(T_DIMSE_N_SetRQ * e, DcmDataset * obj) { OFCondition cond = buildCommonRQ(obj, DIMSE_N_SET_RQ, e->MessageID, - e->DataSetType); RET(cond); + OFstatic_cast(Uint16, e->DataSetType)); RET(cond); cond = addString(obj, DCM_RequestedSOPClassUID, e->RequestedSOPClassUID, OFFalse); RET(cond); cond = addString(obj, DCM_RequestedSOPInstanceUID, @@ -1373,7 +1366,7 @@ buildNSetRSP(T_DIMSE_N_SetRSP * e, DcmDataset * obj) { OFCondition cond = buildCommonRSP(obj, DIMSE_N_SET_RSP, e->MessageIDBeingRespondedTo, - e->DataSetType, e->DimseStatus); RET(cond); + OFstatic_cast(Uint16, e->DataSetType), e->DimseStatus); RET(cond); /* build optional items */ if (e->opts & O_NSET_AFFECTEDSOPCLASSUID) { @@ -1429,7 +1422,7 @@ buildNActionRQ(T_DIMSE_N_ActionRQ * e, DcmDataset * obj) { OFCondition cond = buildCommonRQ(obj, DIMSE_N_ACTION_RQ, e->MessageID, - e->DataSetType); RET(cond); + OFstatic_cast(Uint16, e->DataSetType)); RET(cond); cond = addString(obj, DCM_RequestedSOPClassUID, e->RequestedSOPClassUID, OFFalse); RET(cond); cond = addString(obj, DCM_RequestedSOPInstanceUID, @@ -1478,7 +1471,7 @@ { OFCondition cond = buildCommonRSP(obj, DIMSE_N_ACTION_RSP, e->MessageIDBeingRespondedTo, - e->DataSetType, e->DimseStatus); RET(cond); + OFstatic_cast(Uint16, e->DataSetType), e->DimseStatus); RET(cond); /* build optional items */ if (e->opts & O_NACTION_AFFECTEDSOPCLASSUID) { @@ -1541,7 +1534,7 @@ buildNCreateRQ(T_DIMSE_N_CreateRQ * e, DcmDataset * obj) { OFCondition cond = buildCommonRQ(obj, DIMSE_N_CREATE_RQ, e->MessageID, - e->DataSetType); RET(cond); + OFstatic_cast(Uint16, e->DataSetType)); RET(cond); cond = addString(obj, DCM_AffectedSOPClassUID, e->AffectedSOPClassUID, OFFalse); RET(cond); /* build optional items */ @@ -1593,7 +1586,7 @@ { OFCondition cond = buildCommonRSP(obj, DIMSE_N_CREATE_RSP, e->MessageIDBeingRespondedTo, - e->DataSetType, e->DimseStatus); RET(cond); + OFstatic_cast(Uint16, e->DataSetType), e->DimseStatus); RET(cond); /* build optional items */ if (e->opts & O_NCREATE_AFFECTEDSOPCLASSUID) { @@ -1649,7 +1642,7 @@ buildNDeleteRQ(T_DIMSE_N_DeleteRQ * e, DcmDataset * obj) { OFCondition cond = buildCommonRQ(obj, DIMSE_N_DELETE_RQ, e->MessageID, - e->DataSetType); RET(cond); + OFstatic_cast(Uint16, e->DataSetType)); RET(cond); cond = addString(obj, DCM_RequestedSOPClassUID, e->RequestedSOPClassUID, OFFalse); RET(cond); cond = addString(obj, DCM_RequestedSOPInstanceUID, @@ -1693,7 +1686,7 @@ { OFCondition cond = buildCommonRSP(obj, DIMSE_N_DELETE_RSP, e->MessageIDBeingRespondedTo, - e->DataSetType, e->DimseStatus); RET(cond); + OFstatic_cast(Uint16, e->DataSetType), e->DimseStatus); RET(cond); /* build optional items */ if (e->opts & O_NDELETE_AFFECTEDSOPCLASSUID) { @@ -1881,7 +1874,7 @@ } /* initialize msg structure */ - bzero((char*)msg, sizeof(*msg)); + memset((char*)msg, 0, sizeof(*msg)); msg->CommandField = (T_DIMSE_Command)cmd; /* depending on the command, parse the rest of obj */ diff -Nru dcmtk-3.6.6/dcmnet/libsrc/dimdump.cc dcmtk-3.6.7/dcmnet/libsrc/dimdump.cc --- dcmtk-3.6.6/dcmnet/libsrc/dimdump.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmnet/libsrc/dimdump.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1993-2020, OFFIS e.V. + * Copyright (C) 1993-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -30,12 +30,6 @@ #include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ -#define INCLUDE_CSTDLIB -#define INCLUDE_CSTDIO -#define INCLUDE_CSTRING -#define INCLUDE_CSTDARG -#include "dcmtk/ofstd/ofstdinc.h" - #ifdef HAVE_FCNTL_H #include #endif diff -Nru dcmtk-3.6.6/dcmnet/libsrc/dimecho.cc dcmtk-3.6.7/dcmnet/libsrc/dimecho.cc --- dcmtk-3.6.6/dcmnet/libsrc/dimecho.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmnet/libsrc/dimecho.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1994-2018, OFFIS e.V. + * Copyright (C) 1994-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were partly developed by @@ -82,11 +82,6 @@ #include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ -#define INCLUDE_CSTDLIB -#define INCLUDE_CSTDIO -#define INCLUDE_CSTRING -#include "dcmtk/ofstd/ofstdinc.h" - #include "dcmtk/dcmnet/diutil.h" #include "dcmtk/dcmnet/dimse.h" /* always include the module header */ #include "dcmtk/dcmnet/cond.h" @@ -117,8 +112,8 @@ return makeDcmnetCondition(DIMSEC_NOVALIDPRESENTATIONCONTEXTID, OF_error, buf); } - bzero((char*)&req, sizeof(req)); - bzero((char*)&rsp, sizeof(rsp)); + memset((char*)&req, 0, sizeof(req)); + memset((char*)&rsp, 0, sizeof(rsp)); req.CommandField = DIMSE_C_ECHO_RQ; req.msg.CEchoRQ.MessageID = msgId; @@ -159,7 +154,7 @@ { T_DIMSE_Message rsp; - bzero((char*)&rsp, sizeof(rsp)); + memset((char*)&rsp, 0, sizeof(rsp)); rsp.CommandField = DIMSE_C_ECHO_RSP; rsp.msg.CEchoRSP.MessageIDBeingRespondedTo = req->MessageID; diff -Nru dcmtk-3.6.6/dcmnet/libsrc/dimfind.cc dcmtk-3.6.7/dcmnet/libsrc/dimfind.cc --- dcmtk-3.6.6/dcmnet/libsrc/dimfind.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmnet/libsrc/dimfind.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1994-2020, OFFIS e.V. + * Copyright (C) 1994-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were partly developed by @@ -81,12 +81,6 @@ #include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ -#define INCLUDE_CSTDLIB -#define INCLUDE_CSTDIO -#define INCLUDE_CSTRING -#define INCLUDE_CSTDARG -#include "dcmtk/ofstd/ofstdinc.h" - #ifdef HAVE_FCNTL_H #include #endif @@ -150,8 +144,8 @@ if (requestIdentifiers == NULL) return DIMSE_NULLKEY; /* initialize the variables which represent DIMSE C-FIND-RQ and DIMSE C-FIND-RSP messages */ - bzero((char*)&req, sizeof(req)); - bzero((char*)&rsp, sizeof(rsp)); + memset((char*)&req, 0, sizeof(req)); + memset((char*)&rsp, 0, sizeof(rsp)); /* set corresponding values in the request message variable */ req.CommandField = DIMSE_C_FIND_RQ; @@ -172,7 +166,7 @@ while (cond == EC_Normal && DICOM_PENDING_STATUS(status)) { /* initialize the response to collect */ - bzero((char*)&rsp, sizeof(rsp)); + memset((char*)&rsp, 0, sizeof(rsp)); if (rspIds != NULL) { delete rspIds; rspIds = NULL; @@ -297,7 +291,7 @@ T_DIMSE_Message rsp; /* create response message */ - bzero((char*)&rsp, sizeof(rsp)); + memset((char*)&rsp, 0, sizeof(rsp)); rsp.CommandField = DIMSE_C_FIND_RSP; rsp.msg.CFindRSP = *response; rsp.msg.CFindRSP.MessageIDBeingRespondedTo = request->MessageID; @@ -375,7 +369,7 @@ { /* if the IDs are the same go ahead */ /* initialize the C-FIND-RSP message variable */ - bzero((char*)&rsp, sizeof(rsp)); + memset((char*)&rsp, 0, sizeof(rsp)); rsp.DimseStatus = STATUS_FIND_Pending_MatchesAreContinuing; /* as long as no error occurred and the status of the C-FIND-RSP message which will */ diff -Nru dcmtk-3.6.6/dcmnet/libsrc/dimget.cc dcmtk-3.6.7/dcmnet/libsrc/dimget.cc --- dcmtk-3.6.6/dcmnet/libsrc/dimget.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmnet/libsrc/dimget.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1998-2020, OFFIS e.V. + * Copyright (C) 1998-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were partly developed by @@ -24,12 +24,6 @@ #include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ -#define INCLUDE_CSTDLIB -#define INCLUDE_CSTDIO -#define INCLUDE_CSTRING -#define INCLUDE_CSTDARG -#include "dcmtk/ofstd/ofstdinc.h" - #ifdef HAVE_FCNTL_H #include #endif @@ -104,8 +98,8 @@ if (requestIdentifiers == NULL) return DIMSE_NULLKEY; - bzero((char*)&req, sizeof(req)); - bzero((char*)&rsp, sizeof(rsp)); + memset((char*)&req, 0, sizeof(req)); + memset((char*)&rsp, 0, sizeof(rsp)); req.CommandField = DIMSE_C_GET_RQ; request->DataSetType = DIMSE_DATASET_PRESENT; @@ -157,7 +151,7 @@ /* break; */ // never reached after continue statement } - bzero((char*)&rsp, sizeof(rsp)); + memset((char*)&rsp, 0, sizeof(rsp)); cond = DIMSE_receiveCommand(assoc, blockMode, timeout, &presID, &rsp, statusDetail); @@ -233,7 +227,7 @@ T_DIMSE_Message rsp; unsigned int opts; - bzero((char*)&rsp, sizeof(rsp)); + memset((char*)&rsp, 0, sizeof(rsp)); rsp.CommandField = DIMSE_C_GET_RSP; rsp.msg.CGetRSP = *response; /* copy over stuff from request */ @@ -314,7 +308,7 @@ } else { - bzero((char*)&rsp, sizeof(rsp)); + memset((char*)&rsp, 0, sizeof(rsp)); rsp.DimseStatus = STATUS_GET_Pending_SubOperationsAreContinuing; /* assume */ while (cond == EC_Normal && rsp.DimseStatus == STATUS_GET_Pending_SubOperationsAreContinuing && normal) diff -Nru dcmtk-3.6.6/dcmnet/libsrc/dimmove.cc dcmtk-3.6.7/dcmnet/libsrc/dimmove.cc --- dcmtk-3.6.6/dcmnet/libsrc/dimmove.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmnet/libsrc/dimmove.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1994-2020, OFFIS e.V. + * Copyright (C) 1994-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were partly developed by @@ -80,12 +80,6 @@ #include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ -#define INCLUDE_CSTDLIB -#define INCLUDE_CSTDIO -#define INCLUDE_CSTRING -#define INCLUDE_CSTDARG -#include "dcmtk/ofstd/ofstdinc.h" - #include "dcmtk/ofstd/oftimer.h" #ifdef HAVE_FCNTL_H @@ -170,8 +164,8 @@ if (requestIdentifiers == NULL) return DIMSE_NULLKEY; - bzero((char*)&req, sizeof(req)); - bzero((char*)&rsp, sizeof(rsp)); + memset((char*)&req, 0, sizeof(req)); + memset((char*)&rsp, 0, sizeof(rsp)); req.CommandField = DIMSE_C_MOVE_RQ; request->DataSetType = DIMSE_DATASET_PRESENT; @@ -215,7 +209,7 @@ continue; /* continue with main loop */ } - bzero((char*)&rsp, sizeof(rsp)); + memset((char*)&rsp, 0, sizeof(rsp)); cond = DIMSE_receiveCommand(assoc, blockMode, timeout, &presID, &rsp, statusDetail); if (cond != EC_Normal) { @@ -308,7 +302,7 @@ T_DIMSE_Message rsp; unsigned int opts; - bzero((char*)&rsp, sizeof(rsp)); + memset((char*)&rsp, 0, sizeof(rsp)); rsp.CommandField = DIMSE_C_MOVE_RSP; rsp.msg.CMoveRSP = *response; /* copy over stuff from request */ @@ -388,7 +382,7 @@ if (presIdData != presIdCmd) { cond = makeDcmnetCondition(DIMSEC_INVALIDPRESENTATIONCONTEXTID, OF_error, "DIMSE: Presentation Contexts of Command and Data Differ"); } else { - bzero((char*)&rsp, sizeof(rsp)); + memset((char*)&rsp, 0, sizeof(rsp)); rsp.DimseStatus = STATUS_MOVE_Pending_SubOperationsAreContinuing; /* assume */ while (cond == EC_Normal && rsp.DimseStatus == STATUS_MOVE_Pending_SubOperationsAreContinuing && normal) { diff -Nru dcmtk-3.6.6/dcmnet/libsrc/dimse.cc dcmtk-3.6.7/dcmnet/libsrc/dimse.cc --- dcmtk-3.6.6/dcmnet/libsrc/dimse.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmnet/libsrc/dimse.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1994-2019, OFFIS e.V. + * Copyright (C) 1994-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were partly developed by @@ -80,13 +80,6 @@ #include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ -#define INCLUDE_CSTDLIB -#define INCLUDE_CSTDIO -#define INCLUDE_CSTRING -#define INCLUDE_CSTDARG -#define INCLUDE_UNISTD -#include "dcmtk/ofstd/ofstdinc.h" - #ifdef HAVE_UNIX_H #if defined(macintosh) && defined (HAVE_WINSOCK_H) /* unix.h defines timeval incompatible with winsock.h */ @@ -688,8 +681,11 @@ Uint32 bytesTransmitted = 0; DUL_PDVLIST pdvList; DUL_PDV pdv; + +#if 0 /* the following variable is currently unused, leave it for future use */ unsigned long pdvCount = 0; +#endif DcmWriteCache wcache; /* initialize some local variables (we want to use the association's send buffer */ @@ -807,7 +803,9 @@ /* count the bytes and the amount of PDVs which were transmitted */ bytesTransmitted += OFstatic_cast(Uint32, rtnLength); +#if 0 pdvCount += pdvList.count; +#endif /* execute callback function to indicate progress */ if (callback) { @@ -1515,7 +1513,7 @@ DcmDataset *dset = NULL; DUL_PDV pdv; T_ASC_PresentationContextID pid = 0; - E_TransferSyntax xferSyntax; + E_TransferSyntax xferSyntax = EXS_Unknown; OFBool last = OFFalse; DIC_UL pdvCount = 0; DIC_UL bytesRead = 0; diff -Nru dcmtk-3.6.6/dcmnet/libsrc/dimstore.cc dcmtk-3.6.7/dcmnet/libsrc/dimstore.cc --- dcmtk-3.6.6/dcmnet/libsrc/dimstore.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmnet/libsrc/dimstore.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1994-2020, OFFIS e.V. + * Copyright (C) 1994-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were partly developed by @@ -81,12 +81,6 @@ #include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ -#define INCLUDE_CSTDLIB -#define INCLUDE_CSTDIO -#define INCLUDE_CSTRING -#define INCLUDE_CSTDARG -#include "dcmtk/ofstd/ofstdinc.h" - #ifdef HAVE_FCNTL_H #include #endif @@ -180,13 +174,17 @@ DIMSE_PrivateUserContext callbackCtx; DIMSE_ProgressCallback privCallback = NULL; T_DIMSE_StoreProgress progress; + progress.state = DIMSE_StoreBegin; + progress.callbackCount = 0; + progress.progressBytes = 0; + progress.totalBytes = 0; /* if there is no image file or no data set, no data can be sent */ if (imageFileName == NULL && imageDataSet == NULL) return DIMSE_NULLKEY; /* initialize the variables which represent DIMSE C-STORE request and DIMSE C-STORE response messages */ - bzero((char*)&req, sizeof(req)); - bzero((char*)&rsp, sizeof(rsp)); + memset((char*)&req, 0, sizeof(req)); + memset((char*)&rsp, 0, sizeof(rsp)); /* set corresponding values in the request message variable */ req.CommandField = DIMSE_C_STORE_RQ; @@ -319,7 +317,7 @@ T_DIMSE_Message rsp; /* create response message */ - bzero((char*)&rsp, sizeof(rsp)); + memset((char*)&rsp, 0, sizeof(rsp)); rsp.CommandField = DIMSE_C_STORE_RSP; response->MessageIDBeingRespondedTo = request->MessageID; OFStandard::strlcpy(response->AffectedSOPClassUID, request->AffectedSOPClassUID, sizeof(response->AffectedSOPClassUID)); @@ -404,8 +402,14 @@ DcmDataset *statusDetail = NULL; T_DIMSE_StoreProgress progress; + /* initialize progress struct */ + progress.state = DIMSE_StoreBegin; + progress.callbackCount = 1; + progress.progressBytes = 0; + progress.totalBytes = 0; + /* initialize the C-STORE-RSP message variable */ - bzero((char*)&response, sizeof(response)); + memset((char*)&response, 0, sizeof(response)); response.DimseStatus = STATUS_STORE_Success; /* assume */ response.MessageIDBeingRespondedTo = request->MessageID; response.DataSetType = DIMSE_DATASET_NULL; /* always for C-STORE-RSP */ @@ -420,9 +424,6 @@ /* only if caller requires */ privCallback = privateProviderCallback; /* function defined above */ callbackCtx.callbackData = callbackData; - progress.state = DIMSE_StoreBegin; - progress.callbackCount = 1; - progress.progressBytes = 0; progress.totalBytes = dcmGuessModalityBytes(request->AffectedSOPClassUID); callbackCtx.progress = &progress; callbackCtx.request = request; diff -Nru dcmtk-3.6.6/dcmnet/libsrc/diutil.cc dcmtk-3.6.7/dcmnet/libsrc/diutil.cc --- dcmtk-3.6.6/dcmnet/libsrc/diutil.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmnet/libsrc/diutil.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1994-2019, OFFIS e.V. + * Copyright (C) 1994-2022, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were partly developed by @@ -78,12 +78,6 @@ #include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ -#define INCLUDE_CSTDLIB -#define INCLUDE_CSTDIO -#define INCLUDE_CSTRING -#define INCLUDE_CCTYPE -#include "dcmtk/ofstd/ofstdinc.h" - #ifdef HAVE_UNIX_H #if defined(macintosh) && defined (HAVE_WINSOCK_H) /* unix.h defines timeval incompatible with winsock.h */ @@ -177,7 +171,8 @@ s[0] = '\0'; } else { ec = elem->getString(aString); - OFStandard::strlcpy(s, aString, bufsize); + if (ec == EC_Normal) + OFStandard::strlcpy(s, aString, bufsize); } } return (ec == EC_Normal); @@ -366,8 +361,8 @@ case STATUS_FIND_Refused_SOPClassNotSupported: s = "Refused: SOPClassNotSupported"; break; - case STATUS_FIND_Failed_IdentifierDoesNotMatchSOPClass: - s = "Failed: IdentifierDoesNotMatchSOPClass"; + case STATUS_FIND_Error_DataSetDoesNotMatchSOPClass: + s = "Error: DataSetDoesNotMatchSOPClass"; break; case STATUS_FIND_Cancel_MatchingTerminatedDueToCancelRequest: s = "Cancel: MatchingTerminatedDueToCancelRequest"; @@ -410,14 +405,14 @@ case STATUS_MOVE_Refused_OutOfResourcesSubOperations: s = "Refused: OutOfResourcesSubOperations"; break; - case STATUS_MOVE_Failed_SOPClassNotSupported: - s = "Failed: SOPClassNotSupported"; + case STATUS_MOVE_Refused_SOPClassNotSupported: + s = "Refused: SOPClassNotSupported"; break; - case STATUS_MOVE_Failed_MoveDestinationUnknown: - s = "Failed: MoveDestinationUnknown"; + case STATUS_MOVE_Refused_MoveDestinationUnknown: + s = "Refused: MoveDestinationUnknown"; break; - case STATUS_MOVE_Failed_IdentifierDoesNotMatchSOPClass: - s = "Failed: IdentifierDoesNotMatchSOPClass"; + case STATUS_MOVE_Error_DataSetDoesNotMatchSOPClass: + s = "Error: DataSetDoesNotMatchSOPClass"; break; case STATUS_MOVE_Cancel_SubOperationsTerminatedDueToCancelIndication: s = "Cancel: SubOperationsTerminatedDueToCancelIndication"; @@ -461,11 +456,11 @@ case STATUS_GET_Refused_OutOfResourcesSubOperations: s = "Refused: OutOfResourcesSubOperations"; break; - case STATUS_GET_Failed_SOPClassNotSupported: - s = "Failed: SOPClassNotSupported"; + case STATUS_GET_Refused_SOPClassNotSupported: + s = "Refused: SOPClassNotSupported"; break; - case STATUS_GET_Failed_IdentifierDoesNotMatchSOPClass: - s = "Failed: IdentifierDoesNotMatchSOPClass"; + case STATUS_GET_Error_DataSetDoesNotMatchSOPClass: + s = "Error: DataSetDoesNotMatchSOPClass"; break; case STATUS_GET_Cancel_SubOperationsTerminatedDueToCancelIndication: s = "Cancel: SubOperationsTerminatedDueToCancelIndication"; @@ -512,8 +507,8 @@ case STATUS_N_InvalidAttributeValue: s = "Failure: InvalidAttributeValue"; break; - case STATUS_N_InvalidObjectInstance: - s = "Failure: InvalidObjectInstance"; + case STATUS_N_InvalidSOPInstance: + s = "Failure: InvalidSOPInstance"; break; case STATUS_N_MissingAttribute: s = "Failure: MissingAttribute"; @@ -530,8 +525,8 @@ case STATUS_N_NoSuchSOPClass: s = "Failure: NoSuchSOPClass"; break; - case STATUS_N_NoSuchObjectInstance: - s = "Failure: NoSuchObjectInstance"; + case STATUS_N_NoSuchSOPInstance: + s = "Failure: NoSuchSOPInstance"; break; case STATUS_N_ProcessingFailure: s = "Failure: ProcessingFailure"; @@ -577,8 +572,8 @@ case STATUS_N_DuplicateInvocation: s = "Failure: DuplicateInvocation"; break; - case STATUS_N_InvalidObjectInstance: - s = "Failure: InvalidObjectInstance"; + case STATUS_N_InvalidSOPInstance: + s = "Failure: InvalidSOPInstance"; break; case STATUS_N_MistypedArgument: s = "Failure: MistypedArgument"; @@ -586,8 +581,8 @@ case STATUS_N_NoSuchSOPClass: s = "Failure: NoSuchSOPClass"; break; - case STATUS_N_NoSuchObjectInstance: - s = "Failure: NoSuchObjectInstance"; + case STATUS_N_NoSuchSOPInstance: + s = "Failure: NoSuchSOPInstance"; break; case STATUS_N_ProcessingFailure: s = "Failure: ProcessingFailure"; @@ -639,8 +634,8 @@ case STATUS_N_MistypedArgument: s = "Failure: MistypedArgument"; break; - case STATUS_N_InvalidObjectInstance: - s = "Failure: InvalidObjectInstance"; + case STATUS_N_InvalidSOPInstance: + s = "Failure: InvalidSOPInstance"; break; case STATUS_N_MissingAttributeValue: s = "Failure: MissingAttributeValue"; @@ -651,8 +646,8 @@ case STATUS_N_NoSuchSOPClass: s = "Failure: NoSuchSOPClass"; break; - case STATUS_N_NoSuchObjectInstance: - s = "Failure: NoSuchObjectInstance"; + case STATUS_N_NoSuchSOPInstance: + s = "Failure: NoSuchSOPInstance"; break; case STATUS_N_ProcessingFailure: s = "Failure: ProcessingFailure"; @@ -701,8 +696,8 @@ case STATUS_N_InvalidArgumentValue: s = "Failure: InvalidArgumentValue"; break; - case STATUS_N_InvalidObjectInstance: - s = "Failure: InvalidObjectInstance"; + case STATUS_N_InvalidSOPInstance: + s = "Failure: InvalidSOPInstance"; break; case STATUS_N_MistypedArgument: s = "Failure: MistypedArgument"; @@ -716,8 +711,8 @@ case STATUS_N_NoSuchSOPClass: s = "Failure: NoSuchSOPClass"; break; - case STATUS_N_NoSuchObjectInstance: - s = "Failure: NoSuchObjectInstance"; + case STATUS_N_NoSuchSOPInstance: + s = "Failure: NoSuchSOPInstance"; break; case STATUS_N_ProcessingFailure: s = "Failure: ProcessingFailure"; @@ -760,8 +755,8 @@ case STATUS_N_DuplicateInvocation: s = "Failure: DuplicateInvocation"; break; - case STATUS_N_InvalidObjectInstance: - s = "Failure: InvalidObjectInstance"; + case STATUS_N_InvalidSOPInstance: + s = "Failure: InvalidSOPInstance"; break; case STATUS_N_MistypedArgument: s = "Failure: MistypedArgument"; @@ -769,8 +764,8 @@ case STATUS_N_NoSuchSOPClass: s = "Failure: NoSuchSOPClass"; break; - case STATUS_N_NoSuchObjectInstance: - s = "Failure: NoSuchObjectInstance"; + case STATUS_N_NoSuchSOPInstance: + s = "Failure: NoSuchSOPInstance"; break; case STATUS_N_ProcessingFailure: s = "Failure: ProcessingFailure"; @@ -816,8 +811,8 @@ case STATUS_N_InvalidArgumentValue: s = "Failure: InvalidArgumentValue"; break; - case STATUS_N_InvalidObjectInstance: - s = "Failure: InvalidObjectInstance"; + case STATUS_N_InvalidSOPInstance: + s = "Failure: InvalidSOPInstance"; break; case STATUS_N_MistypedArgument: s = "Failure: MistypedArgument"; @@ -831,8 +826,8 @@ case STATUS_N_NoSuchSOPClass: s = "Failure: NoSuchSOPClass"; break; - case STATUS_N_NoSuchObjectInstance: - s = "Failure: NoSuchObjectInstance"; + case STATUS_N_NoSuchSOPInstance: + s = "Failure: NoSuchSOPInstance"; break; case STATUS_N_ProcessingFailure: s = "Failure: ProcessingFailure"; diff -Nru dcmtk-3.6.6/dcmnet/libsrc/dstorscp.cc dcmtk-3.6.7/dcmnet/libsrc/dstorscp.cc --- dcmtk-3.6.6/dcmnet/libsrc/dstorscp.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmnet/libsrc/dstorscp.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2013-2017, OFFIS e.V. + * Copyright (C) 2013-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -24,6 +24,8 @@ #include "dcmtk/dcmnet/dstorscp.h" #include "dcmtk/dcmnet/diutil.h" +#include "dcmtk/ofstd/ofstdinc.h" +#include // constant definitions diff -Nru dcmtk-3.6.6/dcmnet/libsrc/dstorscu.cc dcmtk-3.6.7/dcmnet/libsrc/dstorscu.cc --- dcmtk-3.6.6/dcmnet/libsrc/dstorscu.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmnet/libsrc/dstorscu.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2011-2019, OFFIS e.V. + * Copyright (C) 2011-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -28,6 +28,8 @@ #include "dcmtk/dcmdata/dcdatutl.h" #include "dcmtk/dcmnet/dstorscu.h" #include "dcmtk/dcmnet/diutil.h" +#include "dcmtk/ofstd/ofstdinc.h" +#include // these are private DIMSE status codes of the class "pending" diff -Nru dcmtk-3.6.6/dcmnet/libsrc/dul.cc dcmtk-3.6.7/dcmnet/libsrc/dul.cc --- dcmtk-3.6.6/dcmnet/libsrc/dul.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmnet/libsrc/dul.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1994-2020, OFFIS e.V. + * Copyright (C) 1994-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were partly developed by @@ -79,14 +79,6 @@ #include "dcmtk/dcmnet/diutil.h" -#define INCLUDE_CSTDLIB -#define INCLUDE_CSTDIO -#define INCLUDE_CSTRING -#define INCLUDE_CERRNO -#define INCLUDE_CSIGNAL -#define INCLUDE_CTIME -#include "dcmtk/ofstd/ofstdinc.h" - BEGIN_EXTERN_C #ifdef HAVE_SYS_TIME_H #include @@ -109,23 +101,13 @@ #endif #ifdef WITH_TCPWRAPPER #include /* for hosts_ctl */ - -BEGIN_EXTERN_C int dcmtk_hosts_access(struct request_info *req); -END_EXTERN_C -#endif -#ifdef HAVE_SIGNAL_H -// On Solaris with Sun Workshop 11, declares signal() but does not -#include #endif -END_EXTERN_C - -BEGIN_EXTERN_C /* declare extern "C" typedef for signal handler function pointer */ #ifdef SIGNAL_HANDLER_WITH_ELLIPSE -typedef void (*mySIG_TYP)(...); +typedef void(*mySIG_TYP)(...); #else -typedef void (*mySIG_TYP)(int); +typedef void(*mySIG_TYP)(int); #endif END_EXTERN_C @@ -133,6 +115,7 @@ #include #endif + #include "dcmtk/ofstd/ofstream.h" #include "dcmtk/dcmnet/dcompat.h" #include "dcmtk/dcmnet/dicom.h" @@ -142,7 +125,7 @@ #include "dcmtk/ofstd/ofstd.h" #include "dcmtk/dcmnet/dul.h" -#include "dulstruc.h" +#include "dcmtk/dcmnet/dulstruc.h" #include "dulpriv.h" #include "dulfsm.h" #include "dcmtk/dcmnet/dcmtrans.h" @@ -542,7 +525,7 @@ */ OFCondition cond2 = PRV_StateMachine(network, association, TRANS_CONN_CLOSED, (*association)->protocolState, NULL); destroyAssociationKey(association); - return makeDcmnetSubCondition(DULC_REQUESTASSOCIATIONFAILED, OF_error, "Failed to establish association", DimseCondition::push(cond2, cond)); + return cond; } cond = PRV_StateMachine(network, association, TRANS_CONN_CONFIRM_LOCAL_USER, (*association)->protocolState, params); @@ -937,6 +920,40 @@ } +/* DUL_CloseTransportConnection +** +** Purpose: +** This function closes the transport connection of an Association +** without notifying the peer application. This routine should only +** be used by the parent process after an association has been +** delegated to a forked child. +** +** Parameter Dictionary: +** callerAssociation Caller's handle to the Association that is to +** be dropped. +** +** Return Values: +** +** +*/ +OFCondition +DUL_CloseTransportConnection(DUL_ASSOCIATIONKEY ** callerAssociation) +{ + PRIVATE_ASSOCIATIONKEY ** association = (PRIVATE_ASSOCIATIONKEY **) callerAssociation; + OFCondition cond = checkAssociation(association); + if (cond.bad()) return cond; + + if ((*association)->connection) + { + (*association)->connection->closeTransportConnection(); + delete (*association)->connection; + (*association)->connection = NULL; + } + destroyAssociationKey(association); + return EC_Normal; +} + + /* DUL_ReleaseAssociation ** ** Purpose: @@ -1773,8 +1790,8 @@ * '"\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] == '\\')) + size_t len2 = strlen(command_argv[i]); + if ((len2 > 0) && (command_argv[i][len2 - 1] == '\\')) { cmdLine += "\\"; } @@ -1923,8 +1940,12 @@ */ #ifdef DONT_DISABLE_NAGLE_ALGORITHM +#ifdef _MSC_VER +#pragma message("The macro DONT_DISABLE_NAGLE_ALGORITHM is not supported anymore. See 'macros.txt' for details.") +#else #warning The macro DONT_DISABLE_NAGLE_ALGORITHM is not supported anymore. See "macros.txt" for details. #endif +#endif #ifdef DISABLE_NAGLE_ALGORITHM int tcpNoDelay = 1; // disable @@ -2046,15 +2067,7 @@ return makeDcmnetCondition(DULC_TCPINITERROR, OF_error, msg.c_str()); } - DcmTransportLayerStatus tcsStatus; - if (TCS_ok != (tcsStatus = (*association)->connection->serverSideHandshake())) - { - OFString msg = "DUL secure transport layer: "; - msg += (*association)->connection->errorString(tcsStatus); - return makeDcmnetCondition(DULC_TLSERROR, OF_error, msg.c_str()); - } - - return EC_Normal; + return (*association)->connection->serverSideHandshake(); } @@ -2212,7 +2225,7 @@ /* 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); + server.sin_port = (unsigned short) htons(OFstatic_cast(u_short, ((*key)->networkSpecific.TCP.port))); if (bind(sock, (struct sockaddr *) & server, sizeof(server))) { OFString msg = "TCP Initialization Error: "; diff -Nru dcmtk-3.6.6/dcmnet/libsrc/dulconst.cc dcmtk-3.6.7/dcmnet/libsrc/dulconst.cc --- dcmtk-3.6.6/dcmnet/libsrc/dulconst.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmnet/libsrc/dulconst.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1994-2018, OFFIS e.V. + * Copyright (C) 1994-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were partly developed by @@ -67,17 +67,12 @@ #include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ -#define INCLUDE_CSTDLIB -#define INCLUDE_CSTDIO -#define INCLUDE_CSTRING -#include "dcmtk/ofstd/ofstdinc.h" - #include "dcmtk/dcmnet/dicom.h" #include "dcmtk/dcmnet/cond.h" #include "dcmtk/dcmnet/diutil.h" #include "dcmtk/dcmnet/lst.h" #include "dcmtk/dcmnet/dul.h" -#include "dulstruc.h" +#include "dcmtk/dcmnet/dulstruc.h" #include "dulpriv.h" #include "dcmtk/ofstd/ofconsol.h" @@ -669,7 +664,7 @@ if (strlen(name) < 1 || strlen(name) > 64) { char buf[1024]; - sprintf(buf,"Illegal service parameter: %s", name); + OFStandard::snprintf(buf, 1024, "Illegal service parameter: %s", name); return makeDcmnetCondition(DULC_ILLEGALSERVICEPARAMETER, OF_error, buf); } subItem->type = type; @@ -1141,7 +1136,7 @@ if (strlen(name) < 1 || strlen(name) > 64) { char buf[1024]; - sprintf(buf,"Illegal service parameter: %s", name); + OFStandard::snprintf(buf, 1024, "Illegal service parameter: %s", name); return makeDcmnetCondition(DULC_ILLEGALSERVICEPARAMETER, OF_error, buf); } diff -Nru dcmtk-3.6.6/dcmnet/libsrc/dulextra.cc dcmtk-3.6.7/dcmnet/libsrc/dulextra.cc --- dcmtk-3.6.6/dcmnet/libsrc/dulextra.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmnet/libsrc/dulextra.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1994-2018, OFFIS e.V. + * Copyright (C) 1994-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were partly developed by @@ -79,12 +79,6 @@ #include #endif -#define INCLUDE_CSTDLIB -#define INCLUDE_CSTDIO -#define INCLUDE_CSTRING -#define INCLUDE_CERRNO -#include "dcmtk/ofstd/ofstdinc.h" - #ifdef HAVE_SYS_TIME_H #include #endif @@ -102,7 +96,7 @@ #include "dcmtk/dcmnet/lst.h" #include "dcmtk/dcmnet/cond.h" #include "dcmtk/dcmnet/dul.h" -#include "dulstruc.h" +#include "dcmtk/dcmnet/dulstruc.h" #include "dulpriv.h" #include "dcmtk/dcmnet/dcmtrans.h" #include "dcmtk/dcmnet/diutil.h" diff -Nru dcmtk-3.6.6/dcmnet/libsrc/dulfsm.cc dcmtk-3.6.7/dcmnet/libsrc/dulfsm.cc --- dcmtk-3.6.6/dcmnet/libsrc/dulfsm.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmnet/libsrc/dulfsm.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1994-2018, OFFIS e.V. + * Copyright (C) 1994-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were partly developed by @@ -71,15 +71,6 @@ #include #endif -#define INCLUDE_CSTDLIB -#define INCLUDE_CSTDIO -#define INCLUDE_CSTRING -#define INCLUDE_CERRNO -#define INCLUDE_CSIGNAL -#define INCLUDE_CTIME -#define INCLUDE_UNISTD -#include "dcmtk/ofstd/ofstdinc.h" - #ifdef HAVE_SYS_TIME_H #include #endif @@ -109,11 +100,12 @@ #endif #include "dcmtk/ofstd/ofstream.h" +#include "dcmtk/ofstd/ofstdinc.h" #include "dcmtk/dcmnet/dicom.h" #include "dcmtk/dcmnet/lst.h" #include "dcmtk/dcmnet/cond.h" #include "dcmtk/dcmnet/dul.h" -#include "dulstruc.h" +#include "dcmtk/dcmnet/dulstruc.h" #include "dulpriv.h" #include "dulfsm.h" #include "dcmtk/ofstd/ofbmanip.h" @@ -122,7 +114,10 @@ #include "dcmtk/dcmnet/dcmtrans.h" #include "dcmtk/dcmnet/dcmlayer.h" #include "dcmtk/dcmnet/diutil.h" +#include "dcmtk/dcmnet/helpers.h" #include "dcmtk/ofstd/ofsockad.h" /* for class OFSockAddr */ +#include + /* At least Solaris doesn't define this */ #ifndef INADDR_NONE @@ -310,9 +305,6 @@ PRV_SCUSCPROLE * findSCUSCPRole(LST_HEAD ** lst, char *abstractSyntax); -void destroyPresentationContextList(LST_HEAD ** l); -void destroyUserInformationLists(DUL_USERINFO * userInfo); - static volatile FSM_Event_Description Event_Table[] = { {A_ASSOCIATE_REQ_LOCAL_USER, "A-ASSOCIATE request (local user)"}, {TRANS_CONN_CONFIRM_LOCAL_USER, "Transport conn confirmation (local)"}, @@ -1021,7 +1013,7 @@ } - destroyPresentationContextList(&assoc.presentationContextList); + destroyAssociatePDUPresentationContextList(&assoc.presentationContextList); destroyUserInformationLists(&assoc.userInfo); service->peerMaxPDU = assoc.userInfo.maxLength.maxLength; (*association)->maxPDV = assoc.userInfo.maxLength.maxLength; @@ -1238,7 +1230,7 @@ assoc.userInfo.implementationVersionName.data, 16 + 1); (*association)->associationState = DUL_ASSOC_ESTABLISHED; - destroyPresentationContextList(&assoc.presentationContextList); + destroyAssociatePDUPresentationContextList(&assoc.presentationContextList); destroyUserInformationLists(&assoc.userInfo); /* If this PDU is ok with us */ @@ -2266,7 +2258,7 @@ return makeDcmnetCondition(DULC_UNKNOWNHOST, OF_error, buf2); } } - server.setPort(OFstatic_cast(unsigned short, htons(port))); + server.setPort(OFstatic_cast(unsigned short, htons(OFstatic_cast(unsigned short, port)))); // get global connection timeout Sint32 connectTimeout = dcmConnectionTimeout.get(); @@ -2486,8 +2478,12 @@ */ #ifdef DONT_DISABLE_NAGLE_ALGORITHM +#ifdef _MSC_VER +#pragma message("The macro DONT_DISABLE_NAGLE_ALGORITHM is not supported anymore. See 'macros.txt' for details.") +#else #warning The macro DONT_DISABLE_NAGLE_ALGORITHM is not supported anymore. See "macros.txt" for details. #endif +#endif #ifdef DISABLE_NAGLE_ALGORITHM int tcpNoDelay = 1; // disable @@ -2522,15 +2518,7 @@ #endif } - DcmTransportLayerStatus tcsStatus; - if (TCS_ok != (tcsStatus = (*association)->connection->clientSideHandshake())) - { - DCMNET_ERROR("TLS client handshake failed"); - OFString msg = "DUL secure transport layer: "; - msg += (*association)->connection->errorString(tcsStatus); - return makeDcmnetCondition(DULC_TLSERROR, OF_error, msg.c_str()); - } - return EC_Normal; + return (*association)->connection->clientSideHandshake(); } } @@ -2599,7 +2587,7 @@ } } - destroyPresentationContextList(&associateRequest.presentationContextList); + destroyAssociatePDUPresentationContextList(&associateRequest.presentationContextList); destroyUserInformationLists(&associateRequest.userInfo); if (cond.bad()) return cond; @@ -2682,7 +2670,7 @@ } } - destroyPresentationContextList(&associateReply.presentationContextList); + destroyAssociatePDUPresentationContextList(&associateReply.presentationContextList); destroyUserInformationLists(&associateReply.userInfo); if (cond.bad()) return cond; @@ -3692,6 +3680,19 @@ /* we actually did receive data or an error occurred */ do { +#if 0 + /* the original patch submitted for DCMTK issue #1006 contains a sleep statement here + * that should actually not be necessary. We're leaving it in the code for now + * with this comment. If your code (in non-blocking mode, on Windows) works if + * and only if this gets enabled, please let us know: */ +#ifdef HAVE_WINSOCK_H + if (OFStandard::getLastNetworkErrorCode().value() == WSAEWOULDBLOCK) + { + Sleep(1); + } +#endif +#endif + /* if DUL_NOBLOCK is specified as a blocking option, we only want to wait a certain * time for receiving data over the network. If no data was received during that time, * DUL_READTIMEOUT shall be returned. Note that if DUL_BLOCK is specified the application @@ -3710,7 +3711,11 @@ /* data has become available, now call read(). */ bytesRead = connection->read((char*)b, size_t(l)); - } while (bytesRead == -1 && OFStandard::getLastNetworkErrorCode().value() == DCMNET_EINTR); + } while ((bytesRead == -1 && OFStandard::getLastNetworkErrorCode().value() == DCMNET_EINTR) +#ifdef HAVE_WINSOCK_H + || (bytesRead == -1 && (OFStandard::getLastNetworkErrorCode().value() == WSAEWOULDBLOCK)) +#endif + ); /* 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 */ @@ -3988,48 +3993,3 @@ } return NULL; } - -void -destroyPresentationContextList(LST_HEAD ** l) -{ - PRV_PRESENTATIONCONTEXTITEM - * prvCtx; - DUL_SUBITEM - * subItem; - - if (*l == NULL) - return; - - prvCtx = (PRV_PRESENTATIONCONTEXTITEM*)LST_Dequeue(l); - while (prvCtx != NULL) { - subItem = (DUL_SUBITEM*)LST_Dequeue(&prvCtx->transferSyntaxList); - while (subItem != NULL) { - free(subItem); - subItem = (DUL_SUBITEM*)LST_Dequeue(&prvCtx->transferSyntaxList); - } - LST_Destroy(&prvCtx->transferSyntaxList); - free(prvCtx); - prvCtx = (PRV_PRESENTATIONCONTEXTITEM*)LST_Dequeue(l); - } - LST_Destroy(l); -} - -void -destroyUserInformationLists(DUL_USERINFO * userInfo) -{ - PRV_SCUSCPROLE - * role; - - role = (PRV_SCUSCPROLE*)LST_Dequeue(&userInfo->SCUSCPRoleList); - while (role != NULL) { - free(role); - role = (PRV_SCUSCPROLE*)LST_Dequeue(&userInfo->SCUSCPRoleList); - } - LST_Destroy(&userInfo->SCUSCPRoleList); - - /* extended negotiation */ - delete userInfo->extNegList; userInfo->extNegList = NULL; - - /* user identity negotiation */ - delete userInfo->usrIdent; userInfo->usrIdent = NULL; -} diff -Nru dcmtk-3.6.6/dcmnet/libsrc/dulparse.cc dcmtk-3.6.7/dcmnet/libsrc/dulparse.cc --- dcmtk-3.6.6/dcmnet/libsrc/dulparse.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmnet/libsrc/dulparse.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1994-2020, OFFIS e.V. + * Copyright (C) 1994-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were partly developed by @@ -63,11 +63,6 @@ #include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ -#define INCLUDE_CSTDLIB -#define INCLUDE_CSTDIO -#define INCLUDE_CSTRING -#include "dcmtk/ofstd/ofstdinc.h" - #include "dcmtk/ofstd/ofstream.h" #include "dcmtk/ofstd/ofstd.h" // for OFStandard::safeSubtract() and safeAdd() #include "dcmtk/dcmnet/dicom.h" @@ -75,7 +70,8 @@ #include "dcmtk/dcmnet/lst.h" #include "dcmtk/dcmnet/dul.h" #include "dcmtk/dcmnet/diutil.h" -#include "dulstruc.h" +#include "dcmtk/dcmnet/dulstruc.h" +#include "dcmtk/dcmnet/helpers.h" #include "dulpriv.h" #include "dcmtk/ofstd/ofconsol.h" @@ -102,6 +98,7 @@ unsigned long *length, unsigned long availData); static void trim_trailing_spaces(char *s); + static OFCondition parseExtNeg(SOPClassExtendedNegotiationSubItem* extNeg, unsigned char *buf, unsigned long *length, unsigned long availData); @@ -147,9 +144,6 @@ * context; (void) memset(assoc, 0, sizeof(*assoc)); - if ((assoc->presentationContextList = LST_Create()) == NULL) return EC_MemoryExhausted; - if ((assoc->userInfo.SCUSCPRoleList = LST_Create()) == NULL) return EC_MemoryExhausted; - // Check if the PDU actually is long enough for the fields we read if (pduLength < 2 + 2 + 16 + 16 + 32) return makeLengthError("associate PDU", pduLength, 2 + 2 + 16 + 16 + 32); @@ -210,6 +204,8 @@ << "Called AP Title: " << assoc->calledAPTitle << OFendl << "Calling AP Title: " << assoc->callingAPTitle); } + if ((assoc->presentationContextList = LST_Create()) == NULL) return EC_MemoryExhausted; + if ((assoc->userInfo.SCUSCPRoleList = LST_Create()) == NULL) return EC_MemoryExhausted; while ((cond.good()) && (pduLength > 0)) { type = *buf; @@ -224,44 +220,80 @@ { buf += itemLength; if (!OFStandard::safeSubtract(pduLength, itemLength, pduLength)) - return makeUnderflowError("Application Context item", pduLength, itemLength); - DCMNET_TRACE("Successfully parsed Application Context"); + { + cond = makeUnderflowError("Application Context item", pduLength, itemLength); + } + else + { + DCMNET_TRACE("Successfully parsed Application Context"); + } } break; case DUL_TYPEPRESENTATIONCONTEXTRQ: case DUL_TYPEPRESENTATIONCONTEXTAC: context = (PRV_PRESENTATIONCONTEXTITEM*)malloc(sizeof(PRV_PRESENTATIONCONTEXTITEM)); - if (context == NULL) return EC_MemoryExhausted; - (void) memset(context, 0, sizeof(*context)); - cond = parsePresentationContext(type, context, buf, &itemLength, pduLength); - if (cond.bad()) return cond; - buf += itemLength; - if (!OFStandard::safeSubtract(pduLength, itemLength, pduLength)) - return makeUnderflowError("Presentation Context item", pduLength, itemLength); - LST_Enqueue(&assoc->presentationContextList, (LST_NODE*)context); - DCMNET_TRACE("Successfully parsed Presentation Context"); + if (context != NULL) + { + (void) memset(context, 0, sizeof(*context)); + cond = parsePresentationContext(type, context, buf, &itemLength, pduLength); + if (cond.bad()) + { + free(context); + } + else + { + buf += itemLength; + if (!OFStandard::safeSubtract(pduLength, itemLength, pduLength)) + { + cond = makeUnderflowError("Presentation Context item", pduLength, itemLength); + } + else + { + LST_Enqueue(&assoc->presentationContextList, (LST_NODE*)context); + DCMNET_TRACE("Successfully parsed Presentation Context"); + } + } + } + else + { + cond = EC_MemoryExhausted; + } break; case DUL_TYPEUSERINFO: // parse user info, which can contain several sub-items like User // Identity Negotiation or SOP Class Extended Negotiation cond = parseUserInfo(&assoc->userInfo, buf, &itemLength, assoc->type, pduLength); - if (cond.bad()) - return cond; - buf += itemLength; - if (!OFStandard::safeSubtract(pduLength, itemLength, pduLength)) - return makeUnderflowError("User Information item", pduLength, itemLength); - DCMNET_TRACE("Successfully parsed User Information"); + if (cond.good()) + { + buf += itemLength; + if (!OFStandard::safeSubtract(pduLength, itemLength, pduLength)) + { + cond = makeUnderflowError("User Information item", pduLength, itemLength); + } + else + { + DCMNET_TRACE("Successfully parsed User Information"); + } + } break; default: cond = parseDummy(buf, &itemLength, pduLength); - if (cond.bad()) - return cond; - buf += itemLength; - if (!OFStandard::safeSubtract(pduLength, itemLength, pduLength)) - return makeUnderflowError("unknown item type", pduLength, itemLength); + if (cond.good()) + { + buf += itemLength; + if (!OFStandard::safeSubtract(pduLength, itemLength, pduLength)) + { + cond = makeUnderflowError("unknown item type", pduLength, itemLength); + } + } break; } } + if (cond.bad()) + { + destroyAssociatePDUPresentationContextList(&assoc->presentationContextList); + destroyUserInformationLists(&assoc->userInfo); + } return cond; } @@ -409,7 +441,11 @@ subItem = (DUL_SUBITEM*)malloc(sizeof(DUL_SUBITEM)); if (subItem == NULL) return EC_MemoryExhausted; cond = parseSubItem(subItem, buf, &length, presentationLength); - if (cond.bad()) return cond; + if (cond.bad()) + { + free(subItem); + return cond; + } LST_Enqueue(&context->transferSyntaxList, (LST_NODE*)subItem); buf += length; if (!OFStandard::safeSubtract(presentationLength, length, presentationLength)) @@ -530,7 +566,11 @@ role = (PRV_SCUSCPROLE*)malloc(sizeof(PRV_SCUSCPROLE)); if (role == NULL) return EC_MemoryExhausted; cond = parseSCUSCPRole(role, buf, &length, userLength); - if (cond.bad()) return cond; + if (cond.bad()) + { + free(role); + return cond; + } LST_Enqueue(&userInfo->SCUSCPRoleList, (LST_NODE*)role); buf += length; if (!OFStandard::safeSubtract(userLength, OFstatic_cast(short unsigned int, length), userLength)) @@ -810,7 +850,7 @@ int remain = (int)(*length - (buf - bufStart)); - extNeg->serviceClassAppInfoLength = remain; + extNeg->serviceClassAppInfoLength = OFstatic_cast(unsigned short, remain); extNeg->serviceClassAppInfo = new unsigned char[remain]; for (int i=0; iserviceClassAppInfo[i] = *buf++; diff -Nru dcmtk-3.6.6/dcmnet/libsrc/dulpres.cc dcmtk-3.6.7/dcmnet/libsrc/dulpres.cc --- dcmtk-3.6.6/dcmnet/libsrc/dulpres.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmnet/libsrc/dulpres.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1994-2019, OFFIS e.V. + * Copyright (C) 1994-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were partly developed by @@ -62,19 +62,11 @@ #include "dcmtk/ofstd/ofcond.h" #include "dcmtk/ofstd/ofstd.h" -#define INCLUDE_CSTDLIB -#define INCLUDE_CSTDIO -#define INCLUDE_CSTRING -#define INCLUDE_CERRNO -#define INCLUDE_CSIGNAL -#define INCLUDE_CSTDARG -#include "dcmtk/ofstd/ofstdinc.h" - #include "dcmtk/dcmnet/dicom.h" #include "dcmtk/dcmnet/cond.h" #include "dcmtk/dcmnet/lst.h" #include "dcmtk/dcmnet/dul.h" -#include "dulstruc.h" +#include "dcmtk/dcmnet/dulstruc.h" #include "dulpriv.h" #include "dulfsm.h" diff -Nru dcmtk-3.6.6/dcmnet/libsrc/dulstruc.h dcmtk-3.6.7/dcmnet/libsrc/dulstruc.h --- dcmtk-3.6.6/dcmnet/libsrc/dulstruc.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmnet/libsrc/dulstruc.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,325 +0,0 @@ -/* - * - * Copyright (C) 1994-2017, OFFIS e.V. - * All rights reserved. See COPYRIGHT file for details. - * - * This software and supporting documentation were partly developed by - * - * OFFIS e.V. - * R&D Division Health - * Escherweg 2 - * D-26121 Oldenburg, Germany - * - * For further copyrights, see the following paragraphs. - * - */ - -/* - Copyright (C) 1993, 1994, RSNA and Washington University - - The software and supporting documentation for the Radiological - Society of North America (RSNA) 1993, 1994 Digital Imaging and - Communications in Medicine (DICOM) Demonstration were developed - at the - Electronic Radiology Laboratory - Mallinckrodt Institute of Radiology - Washington University School of Medicine - 510 S. Kingshighway Blvd. - St. Louis, MO 63110 - as part of the 1993, 1994 DICOM Central Test Node project for, and - under contract with, the Radiological Society of North America. - - THIS SOFTWARE IS MADE AVAILABLE, AS IS, AND NEITHER RSNA NOR - WASHINGTON UNIVERSITY MAKE ANY WARRANTY ABOUT THE SOFTWARE, ITS - PERFORMANCE, ITS MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR - USE, FREEDOM FROM ANY COMPUTER DISEASES OR ITS CONFORMITY TO ANY - SPECIFICATION. THE ENTIRE RISK AS TO QUALITY AND PERFORMANCE OF - THE SOFTWARE IS WITH THE USER. - - Copyright of the software and supporting documentation is - jointly owned by RSNA and Washington University, and free access - is hereby granted as a license to use this software, copy this - software and prepare derivative works based upon this software. - However, any distribution of this software source code or - supporting documentation or derivative works (source code and - supporting documentation) must include the three paragraphs of - the copyright notice. -*/ - -/* -** DICOM 93 -** Electronic Radiology Laboratory -** Mallinckrodt Institute of Radiology -** Washington University School of Medicine -** -** Module Name(s): -** Author, Date: Stephen M. Moore, 19-May-93 -** Intent: -** This header contains private typedefs for the DICOM Upper Layer -** (DUL) protocol package. This is to be used to compile the DUL -** package and is not intended to be seen by the applications programmer. -** Files at the package level should include this file to get the -** proper typedefs and include the public file "dulprotocol.h" to -** get the public definitions and function prototypes. I have omitted -** the public definitions and prototypes on purpose so that they -** exist in only one location. -*/ - -#ifndef DULSTRUC_H -#define DULSTRUC_H - -#include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ -#include "dcmtk/dcmnet/extneg.h" -#include "dcmtk/dcmnet/dcuserid.h" - -class DcmTransportConnection; -class DcmTransportLayer; - -#define NETWORK_DISCONNECTED 2 -#define NETWORK_CONNECTED 3 - -typedef enum { - DUL_ASSOC_WAITINGFORACK, - DUL_ASSOC_ESTABLISHED, - DUL_ASSOC_RELEASED, - DUL_ASSOC_ABORTED, - DUL_ASSOC_DROPPED -} DUL_ASSOC_STATE; - -#define ASSOCIATION_DISCONNECTED 2 -#define ASSOCIATION_ABORTED 4 -#define ASSOCIATION_RELEASED 5 - -typedef struct { - char keyType[40]; - int applicationFunction; - int networkState; - int protocolState; - int timeout; - unsigned long options; - union { - struct { - int port; - DcmNativeSocketType listenSocket; - DcmTransportLayer *tLayer; - int tLayerOwned; - } TCP; - } networkSpecific; -} PRIVATE_NETWORKKEY; - -typedef struct { - char keyType[40]; - int applicationFunction; - char remoteNode[64]; - DUL_ASSOC_STATE associationState; - int protocolState; - int networkState; - int timeout; - time_t timerStart; - unsigned long maxPDVRequestor; - unsigned long maxPDVAcceptor; - unsigned long maxPDV; - unsigned long maxPDVInput; - unsigned long receiveQp1; - unsigned long receiveQp2; - char calledAPTitle[20]; - char callingAPTitle[20]; - char applicationContextName[68]; - char abstractSyntaxName[68]; - void *receivePDUQueue; - DUL_PRESENTATIONCONTEXTID presentationContextID; - DcmTransportConnection *connection; - DUL_PDVLIST pdvList; - int inputPDU; - unsigned char pduHead[6]; - unsigned char nextPDUType; - unsigned char nextPDUReserved; - unsigned long nextPDULength; - unsigned long compatibilityMode; - int pdvCount; - int pdvIndex; - void *logHandle; - int associatePDUFlag; - void *associatePDU; - unsigned long associatePDULength; - DUL_PDV currentPDV; - unsigned char *pdvPointer; - unsigned long fragmentBufferLength; - unsigned char *fragmentBuffer; - DUL_ModeCallback *modeCallback; -} PRIVATE_ASSOCIATIONKEY; - -#define KEY_NETWORK "KEY NETWORK" -#define KEY_ASSOCIATION "KEY ASSOCIATION" - -#define AE_REQUESTOR "AE REQUESTOR" -#define AE_ACCEPTOR "AE ACCEPTOR" -#define AE_BOTH "AE BOTH" - -#define NO_PDU 1 -#define PDU_HEAD 2 -#define PDU_DATA 2 - -/* Default timeout for waiting for PDUs. 100 seconds is high, -** but used for development so we have time to do things with the -** debugger. A lower value would be used in a production system. -*/ - -#define DEFAULT_TIMEOUT 100 - -/* Private definitions */ - -typedef struct dul_subitem { - void *reserved[2]; - unsigned char type; - unsigned char rsv1; - unsigned short length; - char data[DICOM_UI_LENGTH + 1]; -} DUL_SUBITEM; - -typedef struct dul_maxlength { - void *reserved[2]; - unsigned char type; - unsigned char rsv1; - unsigned short length; - unsigned long maxLength; -} DUL_MAXLENGTH; - -typedef struct { - unsigned char type; - unsigned char rsv1; - unsigned short length; - unsigned short maximumOperationsInvoked; - unsigned short maximumOperationsProvided; -} PRV_ASYNCOPERATIONS; - -typedef struct { - unsigned char type; - unsigned char rsv1; - unsigned short length; - char implementationClassUID[DICOM_UI_LENGTH + 1]; -} PRV_IMPLEMENTATIONCLASSUID; - -typedef struct { - unsigned char type; - unsigned char rsv1; - unsigned short length; - char implementationVersionName[16 + 1]; -} PRV_IMPLEMENTATIONVERSIONNAME; - -typedef struct { - void *reserved[2]; - unsigned char type; - unsigned char rsv1; - unsigned short length; - unsigned short UIDLength; - char SOPClassUID[DICOM_UI_LENGTH + 1]; - unsigned char SCURole; - unsigned char SCPRole; -} PRV_SCUSCPROLE; - -typedef struct dul_presentationcontext { - void *reserved[2]; - unsigned char type; - unsigned char rsv1; - unsigned short length; - unsigned char contextID; - unsigned char rsv2; - unsigned char result; - unsigned char rsv3; - - DUL_SUBITEM abstractSyntax; - LST_HEAD *transferSyntaxList; -} PRV_PRESENTATIONCONTEXTITEM; - -typedef struct user_info { - void *reserved[2]; - unsigned char type; - unsigned char rsv1; - unsigned short length; - DUL_MAXLENGTH maxLength; // 51H: maximum length - PRV_ASYNCOPERATIONS asyncOperations; // 53H: async operations (not yet implemented!) - DUL_SUBITEM implementationClassUID; // 52H: implementation class UID - DUL_SUBITEM implementationVersionName; // 55H: implementation version name - LST_HEAD *SCUSCPRoleList; // 54H: SCP/SCU role selection - SOPClassExtendedNegotiationSubItemList *extNegList; // 56H: extended negotiation - // 57H: SOP CLASS COMMON EXTENDED NEGOTIATION (not implemented) - UserIdentityNegotiationSubItem *usrIdent; // 58H: user identity negotiation RQ or AC -} DUL_USERINFO; - -typedef struct dul_associatepdu { - void *reserved[2]; - unsigned char type; - unsigned char rsv1; - unsigned long length; - unsigned short protocol; - unsigned char rsv2[2]; - char calledAPTitle[18]; - char callingAPTitle[18]; - unsigned char rsv3[32]; - - DUL_SUBITEM applicationContext; - LST_HEAD *presentationContextList; - DUL_USERINFO userInfo; -} PRV_ASSOCIATEPDU; - -typedef struct dul_rejectreleaseabortpdu { - void *reserved[2]; - unsigned char type; - unsigned char rsv1; - unsigned long length; - unsigned char rsv2; - unsigned char result; - unsigned char source; - unsigned char reason; -} DUL_REJECTRELEASEABORTPDU; - -typedef struct dul_presentationdatavalue { - void *reserved[2]; - unsigned long length; - unsigned char presentationContextID; - unsigned char messageControlHeader; - void *data; -} DUL_PRESENTATIONDATAVALUE; - -typedef struct dul_datapdu { - void *reserved[2]; - unsigned char type; - unsigned char rsv1; - unsigned long length; - DUL_PRESENTATIONDATAVALUE presentationDataValue; -} DUL_DATAPDU; - -#define DUL_PROTOCOL (unsigned short) 0x01 - -#define DUL_TYPEAPPLICATIONCONTEXT (unsigned char)0x10 -#define DUL_TYPEPRESENTATIONCONTEXTRQ (unsigned char)0x20 -#define DUL_TYPEPRESENTATIONCONTEXTAC (unsigned char)0x21 -#define DUL_TYPEABSTRACTSYNTAX (unsigned char)0x30 -#define DUL_TYPETRANSFERSYNTAX (unsigned char)0x40 -#define DUL_TYPEUSERINFO (unsigned char)0x50 -#define DUL_TYPEMAXLENGTH (unsigned char)0x51 -#define DUL_TYPEIMPLEMENTATIONCLASSUID (unsigned char)0x52 -#define DUL_TYPEASYNCOPERATIONS (unsigned char)0x53 -#define DUL_TYPESCUSCPROLE (unsigned char)0x54 -#define DUL_TYPEIMPLEMENTATIONVERSIONNAME (unsigned char)0x55 - -#define COPY_LONG_BIG(A,B) { \ - (B)[0] = (unsigned char)((A)>>24); \ - (B)[1] = (unsigned char)((A)>>16) ; \ - (B)[2] = (unsigned char)((A)>>8) ; \ - (B)[3] = (unsigned char)(A) ; } -#define COPY_SHORT_BIG(A,B) { \ - (B)[0] = (unsigned char)((A)>>8); \ - (B)[1] = (unsigned char)(A) ; } - -#define EXTRACT_LONG_BIG(A,B) { \ - (B) = (unsigned long)(A)[3] \ - | (((unsigned long)(A)[2]) << 8) \ - | (((unsigned long)(A)[1]) << 16) \ - | (((unsigned long)(A)[0]) << 24); \ - } - -#define EXTRACT_SHORT_BIG(A,B) { (B) = (unsigned short)(A)[1] | (((unsigned short)(A)[0]) << 8); } - -#endif // #ifndef DULSTRUC_H diff -Nru dcmtk-3.6.6/dcmnet/libsrc/helpers.cc dcmtk-3.6.7/dcmnet/libsrc/helpers.cc --- dcmtk-3.6.6/dcmnet/libsrc/helpers.cc 1970-01-01 00:00:00.000000000 +0000 +++ dcmtk-3.6.7/dcmnet/libsrc/helpers.cc 2022-04-28 13:47:25.000000000 +0000 @@ -0,0 +1,73 @@ +/* + * + * Copyright (C) 2021, OFFIS e.V. + * All rights reserved. See COPYRIGHT file for details. + * + * This software and supporting documentation were partly developed by + * + * OFFIS e.V. + * R&D Division Health + * Escherweg 2 + * D-26121 Oldenburg, Germany + * + * + * Module: dcmnet + * + * Author: Michael Onken + * + * Purpose: Collection of helper functions + * + */ + +#include "dcmtk/dcmnet/helpers.h" +#include "dcmtk/dcmnet/lst.h" +#include "dcmtk/dcmnet/assoc.h" +#include "dcmtk/dcmnet/dulstruc.h" + +void +destroyAssociatePDUPresentationContextList(LST_HEAD ** pcList) +{ + PRV_PRESENTATIONCONTEXTITEM + * prvCtx; + DUL_SUBITEM + * subItem; + + if (*pcList == NULL) + return; + + prvCtx = (PRV_PRESENTATIONCONTEXTITEM*)LST_Dequeue(pcList); + while (prvCtx != NULL) { + subItem = (DUL_SUBITEM*)LST_Dequeue(&prvCtx->transferSyntaxList); + while (subItem != NULL) { + free(subItem); + subItem = (DUL_SUBITEM*)LST_Dequeue(&prvCtx->transferSyntaxList); + } + LST_Destroy(&prvCtx->transferSyntaxList); + free(prvCtx); + prvCtx = (PRV_PRESENTATIONCONTEXTITEM*)LST_Dequeue(pcList); + } + LST_Destroy(pcList); +} + + +void +destroyUserInformationLists(DUL_USERINFO * userInfo) +{ + PRV_SCUSCPROLE + * role; + + role = (PRV_SCUSCPROLE*)LST_Dequeue(&userInfo->SCUSCPRoleList); + while (role != NULL) { + free(role); + role = (PRV_SCUSCPROLE*)LST_Dequeue(&userInfo->SCUSCPRoleList); + } + LST_Destroy(&userInfo->SCUSCPRoleList); + + /* extended negotiation */ + delete userInfo->extNegList; + userInfo->extNegList = NULL; + + /* user identity negotiation */ + delete userInfo->usrIdent; + userInfo->usrIdent = NULL; +} diff -Nru dcmtk-3.6.6/dcmnet/libsrc/Makefile.dep dcmtk-3.6.7/dcmnet/libsrc/Makefile.dep --- dcmtk-3.6.6/dcmnet/libsrc/Makefile.dep 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmnet/libsrc/Makefile.dep 2022-04-28 13:47:25.000000000 +0000 @@ -1,9 +1,9 @@ assoc.o: assoc.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmnet/assoc.h ../include/dcmtk/dcmnet/dicom.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../include/dcmtk/dcmnet/cond.h \ ../../ofstd/include/dcmtk/ofstd/ofconsol.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ @@ -14,7 +14,6 @@ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../include/dcmtk/dcmnet/dndefine.h ../include/dcmtk/dcmnet/dcompat.h \ - ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \ ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \ ../../oflog/include/dcmtk/oflog/oflog.h \ ../../oflog/include/dcmtk/oflog/logger.h \ @@ -62,17 +61,17 @@ ../../dcmdata/include/dcmtk/dcmdata/dclist.h \ ../../dcmdata/include/dcmtk/dcmdata/dcpcache.h \ ../include/dcmtk/dcmnet/dimse.h ../include/dcmtk/dcmnet/dcmtrans.h \ - ../include/dcmtk/dcmnet/dcmlayer.h + ../include/dcmtk/dcmnet/helpers.h ../include/dcmtk/dcmnet/dulstruc.h cond.o: cond.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmnet/cond.h \ ../../ofstd/include/dcmtk/ofstd/ofconsol.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.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/ofstring.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ @@ -96,7 +95,6 @@ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../include/dcmtk/dcmnet/dcompat.h \ - ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \ ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \ ../../oflog/include/dcmtk/oflog/oflog.h \ ../../oflog/include/dcmtk/oflog/logger.h \ @@ -151,7 +149,6 @@ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../include/dcmtk/dcmnet/dndefine.h ../include/dcmtk/dcmnet/dcompat.h \ - ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \ ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \ ../../oflog/include/dcmtk/oflog/oflog.h \ ../../oflog/include/dcmtk/oflog/logger.h \ @@ -265,7 +262,6 @@ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../include/dcmtk/dcmnet/dcompat.h \ - ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \ ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \ ../../oflog/include/dcmtk/oflog/oflog.h \ ../../oflog/include/dcmtk/oflog/logger.h \ @@ -368,12 +364,12 @@ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../include/dcmtk/dcmnet/dndefine.h ../include/dcmtk/dcmnet/dntypes.h \ ../include/dcmtk/dcmnet/dcmtrans.h \ + ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h dcmtrans.o: dcmtrans.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmnet/dcmtrans.h \ - ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ - ../../ofstd/include/dcmtk/ofstd/ofthread.h \ + ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ @@ -381,18 +377,13 @@ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.h \ - ../include/dcmtk/dcmnet/dcmlayer.h \ - ../../ofstd/include/dcmtk/ofstd/ofutil.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ - ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ + ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ + ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../include/dcmtk/dcmnet/dndefine.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 \ + ../include/dcmtk/dcmnet/dcompat.h ../include/dcmtk/dcmnet/diutil.h \ + ../include/dcmtk/dcmnet/dicom.h ../include/dcmtk/dcmnet/cond.h \ ../../ofstd/include/dcmtk/ofstd/ofconsol.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ - ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \ ../../oflog/include/dcmtk/oflog/oflog.h \ @@ -407,6 +398,9 @@ ../../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 \ @@ -439,16 +433,14 @@ ../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 \ - ../../ofstd/include/dcmtk/ofstd/ofcast.h \ + ../include/dcmtk/dcmnet/dcompat.h ../include/dcmtk/dcmnet/dndefine.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 \ - ../include/dcmtk/dcmnet/dndefine.h ../include/dcmtk/dcmnet/dicom.h \ - ../include/dcmtk/dcmnet/cond.h \ + ../include/dcmtk/dcmnet/dicom.h ../include/dcmtk/dcmnet/cond.h \ ../../ofstd/include/dcmtk/ofstd/ofconsol.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.h \ @@ -482,6 +474,7 @@ ../../oflog/include/dcmtk/oflog/helpers/snprintf.h \ ../../oflog/include/dcmtk/oflog/tracelog.h \ ../../dcmdata/include/dcmtk/dcmdata/dcuid.h \ + ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ ../../ofstd/include/dcmtk/ofstd/oflist.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ @@ -524,7 +517,6 @@ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../include/dcmtk/dcmnet/dcompat.h \ - ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \ ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \ ../../oflog/include/dcmtk/oflog/oflog.h \ ../../oflog/include/dcmtk/oflog/logger.h \ @@ -552,7 +544,8 @@ ../../oflog/include/dcmtk/oflog/helpers/snprintf.h \ ../../oflog/include/dcmtk/oflog/tracelog.h \ ../../dcmdata/include/dcmtk/dcmdata/dcuid.h \ - ../include/dcmtk/dcmnet/dntypes.h dulstruc.h + ../include/dcmtk/dcmnet/dntypes.h ../include/dcmtk/dcmnet/dulstruc.h \ + ../include/dcmtk/dcmnet/lst.h dfindscu.o: dfindscu.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmnet/dfindscu.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ @@ -599,7 +592,6 @@ ../../ofstd/include/dcmtk/ofstd/ofconsol.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ ../include/dcmtk/dcmnet/dndefine.h ../include/dcmtk/dcmnet/dcompat.h \ - ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \ ../../dcmdata/include/dcmtk/dcmdata/dcuid.h \ ../include/dcmtk/dcmnet/lst.h ../../ofstd/include/dcmtk/ofstd/oflist.h \ ../include/dcmtk/dcmnet/dul.h ../include/dcmtk/dcmnet/extneg.h \ @@ -632,11 +624,11 @@ ../../ofstd/include/dcmtk/ofstd/ofexbl.h \ ../../ofstd/include/dcmtk/ofstd/ofexit.h dimcancl.o: dimcancl.cc ../../config/include/dcmtk/config/osconfig.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../include/dcmtk/dcmnet/diutil.h ../include/dcmtk/dcmnet/dicom.h \ ../include/dcmtk/dcmnet/cond.h \ ../../ofstd/include/dcmtk/ofstd/ofconsol.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ @@ -647,7 +639,6 @@ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../include/dcmtk/dcmnet/dndefine.h ../include/dcmtk/dcmnet/dcompat.h \ - ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \ ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \ ../../oflog/include/dcmtk/oflog/oflog.h \ ../../oflog/include/dcmtk/oflog/logger.h \ @@ -697,7 +688,6 @@ ../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 \ ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ @@ -705,6 +695,7 @@ ../../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/ofstring.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ @@ -757,18 +748,17 @@ ../include/dcmtk/dcmnet/cond.h \ ../../ofstd/include/dcmtk/ofstd/ofconsol.h \ ../include/dcmtk/dcmnet/dndefine.h ../include/dcmtk/dcmnet/dcompat.h \ - ../../ofstd/include/dcmtk/ofstd/ofbmanip.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/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 \ ../include/dcmtk/dcmnet/cond.h \ ../../ofstd/include/dcmtk/ofstd/ofconsol.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ @@ -779,7 +769,6 @@ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../include/dcmtk/dcmnet/dndefine.h ../include/dcmtk/dcmnet/dcompat.h \ - ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \ ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \ ../../oflog/include/dcmtk/oflog/oflog.h \ ../../oflog/include/dcmtk/oflog/logger.h \ @@ -829,11 +818,11 @@ ../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 \ ../include/dcmtk/dcmnet/cond.h \ ../../ofstd/include/dcmtk/ofstd/ofconsol.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ @@ -844,7 +833,6 @@ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../include/dcmtk/dcmnet/dndefine.h ../include/dcmtk/dcmnet/dcompat.h \ - ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \ ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \ ../../oflog/include/dcmtk/oflog/oflog.h \ ../../oflog/include/dcmtk/oflog/logger.h \ @@ -894,11 +882,11 @@ ../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 \ ../include/dcmtk/dcmnet/cond.h \ ../../ofstd/include/dcmtk/ofstd/ofconsol.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ @@ -909,7 +897,6 @@ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../include/dcmtk/dcmnet/dndefine.h ../include/dcmtk/dcmnet/dcompat.h \ - ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \ ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \ ../../oflog/include/dcmtk/oflog/oflog.h \ ../../oflog/include/dcmtk/oflog/logger.h \ @@ -959,11 +946,11 @@ ../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 \ ../include/dcmtk/dcmnet/cond.h \ ../../ofstd/include/dcmtk/ofstd/ofconsol.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ @@ -974,7 +961,6 @@ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../include/dcmtk/dcmnet/dndefine.h ../include/dcmtk/dcmnet/dcompat.h \ - ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \ ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \ ../../oflog/include/dcmtk/oflog/oflog.h \ ../../oflog/include/dcmtk/oflog/logger.h \ @@ -1024,9 +1010,9 @@ ../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 \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ @@ -1040,7 +1026,6 @@ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../include/dcmtk/dcmnet/dndefine.h ../include/dcmtk/dcmnet/dcompat.h \ - ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \ ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \ ../../oflog/include/dcmtk/oflog/oflog.h \ ../../oflog/include/dcmtk/oflog/logger.h \ @@ -1090,11 +1075,11 @@ ../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 \ ../include/dcmtk/dcmnet/cond.h \ ../../ofstd/include/dcmtk/ofstd/ofconsol.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ @@ -1105,7 +1090,6 @@ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../include/dcmtk/dcmnet/dndefine.h ../include/dcmtk/dcmnet/dcompat.h \ - ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \ ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \ ../../oflog/include/dcmtk/oflog/oflog.h \ ../../oflog/include/dcmtk/oflog/logger.h \ @@ -1177,11 +1161,11 @@ ../../dcmdata/include/dcmtk/dcmdata/dcfcache.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrui.h dimstore.o: dimstore.cc ../../config/include/dcmtk/config/osconfig.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../include/dcmtk/dcmnet/diutil.h ../include/dcmtk/dcmnet/dicom.h \ ../include/dcmtk/dcmnet/cond.h \ ../../ofstd/include/dcmtk/ofstd/ofconsol.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ @@ -1192,7 +1176,6 @@ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../include/dcmtk/dcmnet/dndefine.h ../include/dcmtk/dcmnet/dcompat.h \ - ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \ ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \ ../../oflog/include/dcmtk/oflog/oflog.h \ ../../oflog/include/dcmtk/oflog/logger.h \ @@ -1244,13 +1227,13 @@ ../../dcmdata/include/dcmtk/dcmdata/dcostrmf.h \ ../../dcmdata/include/dcmtk/dcmdata/dcostrma.h diutil.o: diutil.cc ../../config/include/dcmtk/config/osconfig.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.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 \ ../../ofstd/include/dcmtk/ofstd/ofstring.h \ ../../ofstd/include/dcmtk/ofstd/oftraits.h \ @@ -1265,7 +1248,6 @@ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../include/dcmtk/dcmnet/dndefine.h ../include/dcmtk/dcmnet/dcompat.h \ - ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \ ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \ ../../oflog/include/dcmtk/oflog/oflog.h \ ../../oflog/include/dcmtk/oflog/logger.h \ @@ -1434,15 +1416,14 @@ ../include/dcmtk/dcmnet/cond.h \ ../../ofstd/include/dcmtk/ofstd/ofconsol.h \ ../include/dcmtk/dcmnet/dndefine.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/dntypes.h \ - ../include/dcmtk/dcmnet/dimse.h ../include/dcmtk/dcmnet/diutil.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/lst.h ../include/dcmtk/dcmnet/dul.h \ + ../include/dcmtk/dcmnet/extneg.h ../include/dcmtk/dcmnet/dcuserid.h \ + ../include/dcmtk/dcmnet/dntypes.h ../include/dcmtk/dcmnet/dimse.h \ + ../include/dcmtk/dcmnet/diutil.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 dstorscu.o: dstorscu.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofdatime.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.h \ @@ -1564,8 +1545,7 @@ ../include/dcmtk/dcmnet/dcasccfg.h ../include/dcmtk/dcmnet/assoc.h \ ../include/dcmtk/dcmnet/dicom.h ../include/dcmtk/dcmnet/cond.h \ ../../ofstd/include/dcmtk/ofstd/ofconsol.h \ - ../include/dcmtk/dcmnet/dcompat.h \ - ../../ofstd/include/dcmtk/ofstd/ofbmanip.h ../include/dcmtk/dcmnet/lst.h \ + ../include/dcmtk/dcmnet/dcompat.h ../include/dcmtk/dcmnet/lst.h \ ../include/dcmtk/dcmnet/dul.h ../include/dcmtk/dcmnet/extneg.h \ ../include/dcmtk/dcmnet/dcuserid.h ../include/dcmtk/dcmnet/dntypes.h \ ../include/dcmtk/dcmnet/dccftsmp.h ../include/dcmtk/dcmnet/dccfuidh.h \ @@ -1574,10 +1554,10 @@ ../include/dcmtk/dcmnet/dimse.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 \ ../include/dcmtk/dcmnet/cond.h \ ../../ofstd/include/dcmtk/ofstd/ofconsol.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ @@ -1588,7 +1568,6 @@ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../include/dcmtk/dcmnet/dndefine.h ../include/dcmtk/dcmnet/dcompat.h \ - ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \ ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \ ../../oflog/include/dcmtk/oflog/oflog.h \ ../../oflog/include/dcmtk/oflog/logger.h \ @@ -1636,13 +1615,14 @@ ../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/dntypes.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/assoc.h ../include/dcmtk/dcmnet/dulstruc.h \ + dulpriv.h dulfsm.h ../include/dcmtk/dcmnet/dcmtrans.h \ + ../include/dcmtk/dcmnet/dcmlayer.h dulconst.o: dulconst.cc ../../config/include/dcmtk/config/osconfig.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../include/dcmtk/dcmnet/dicom.h ../include/dcmtk/dcmnet/cond.h \ ../../ofstd/include/dcmtk/ofstd/ofconsol.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ @@ -1653,7 +1633,6 @@ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../include/dcmtk/dcmnet/dndefine.h ../include/dcmtk/dcmnet/dcompat.h \ - ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \ ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \ ../../oflog/include/dcmtk/oflog/oflog.h \ ../../oflog/include/dcmtk/oflog/logger.h \ @@ -1702,12 +1681,13 @@ ../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/dntypes.h \ - ../include/dcmtk/dcmnet/assoc.h dulstruc.h dulpriv.h + ../include/dcmtk/dcmnet/assoc.h ../include/dcmtk/dcmnet/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 \ ../../ofstd/include/dcmtk/ofstd/ofconsol.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ @@ -1718,7 +1698,6 @@ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../include/dcmtk/dcmnet/dndefine.h ../include/dcmtk/dcmnet/dcompat.h \ - ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \ ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \ ../../oflog/include/dcmtk/oflog/oflog.h \ ../../oflog/include/dcmtk/oflog/logger.h \ @@ -1749,8 +1728,8 @@ ../include/dcmtk/dcmnet/lst.h ../../ofstd/include/dcmtk/ofstd/oflist.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/dntypes.h dulstruc.h dulpriv.h \ - ../include/dcmtk/dcmnet/dcmtrans.h ../include/dcmtk/dcmnet/dcmlayer.h \ + ../include/dcmtk/dcmnet/dntypes.h ../include/dcmtk/dcmnet/dulstruc.h \ + dulpriv.h ../include/dcmtk/dcmnet/dcmtrans.h \ ../include/dcmtk/dcmnet/diutil.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdatset.h \ ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \ @@ -1769,8 +1748,8 @@ ../../dcmdata/include/dcmtk/dcmdata/dcpcache.h \ ../include/dcmtk/dcmnet/dimse.h ../include/dcmtk/dcmnet/assoc.h dulfsm.o: dulfsm.cc ../../config/include/dcmtk/config/osconfig.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../include/dcmtk/dcmnet/dicom.h ../include/dcmtk/dcmnet/cond.h \ ../../ofstd/include/dcmtk/ofstd/ofconsol.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ @@ -1783,7 +1762,6 @@ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../include/dcmtk/dcmnet/dndefine.h ../include/dcmtk/dcmnet/dcompat.h \ - ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \ ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \ ../../oflog/include/dcmtk/oflog/oflog.h \ ../../oflog/include/dcmtk/oflog/logger.h \ @@ -1814,7 +1792,8 @@ ../include/dcmtk/dcmnet/lst.h ../../ofstd/include/dcmtk/ofstd/oflist.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/dntypes.h dulstruc.h dulpriv.h dulfsm.h \ + ../include/dcmtk/dcmnet/dntypes.h ../include/dcmtk/dcmnet/dulstruc.h \ + dulpriv.h dulfsm.h ../../ofstd/include/dcmtk/ofstd/ofbmanip.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 \ @@ -1832,11 +1811,11 @@ ../../dcmdata/include/dcmtk/dcmdata/dcstack.h \ ../../dcmdata/include/dcmtk/dcmdata/dclist.h \ ../../dcmdata/include/dcmtk/dcmdata/dcpcache.h \ - ../include/dcmtk/dcmnet/dimse.h \ + ../include/dcmtk/dcmnet/dimse.h ../include/dcmtk/dcmnet/helpers.h \ ../../ofstd/include/dcmtk/ofstd/ofsockad.h dulparse.o: dulparse.cc ../../config/include/dcmtk/config/osconfig.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ ../../ofstd/include/dcmtk/ofstd/oflist.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ @@ -1855,7 +1834,6 @@ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../include/dcmtk/dcmnet/dndefine.h ../include/dcmtk/dcmnet/dcompat.h \ - ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \ ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \ ../../oflog/include/dcmtk/oflog/oflog.h \ ../../oflog/include/dcmtk/oflog/logger.h \ @@ -1898,7 +1876,8 @@ ../../dcmdata/include/dcmtk/dcmdata/dclist.h \ ../../dcmdata/include/dcmtk/dcmdata/dcpcache.h \ ../include/dcmtk/dcmnet/dimse.h ../include/dcmtk/dcmnet/assoc.h \ - dulstruc.h dulpriv.h + ../include/dcmtk/dcmnet/dulstruc.h ../include/dcmtk/dcmnet/helpers.h \ + dulpriv.h dulpres.o: dulpres.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ @@ -1920,7 +1899,6 @@ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../include/dcmtk/dcmnet/dndefine.h ../include/dcmtk/dcmnet/dcompat.h \ - ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \ ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \ ../../oflog/include/dcmtk/oflog/oflog.h \ ../../oflog/include/dcmtk/oflog/logger.h \ @@ -1950,7 +1928,8 @@ ../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/dntypes.h dulstruc.h dulpriv.h dulfsm.h + ../include/dcmtk/dcmnet/dntypes.h ../include/dcmtk/dcmnet/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 \ @@ -1962,6 +1941,55 @@ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../../ofstd/include/dcmtk/ofstd/oflist.h \ ../include/dcmtk/dcmnet/dndefine.h +helpers.o: helpers.cc ../include/dcmtk/dcmnet/helpers.h \ + ../../ofstd/include/dcmtk/ofstd/ofcond.h \ + ../../config/include/dcmtk/config/osconfig.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/ofstring.h \ + ../include/dcmtk/dcmnet/dulstruc.h ../include/dcmtk/dcmnet/extneg.h \ + ../../ofstd/include/dcmtk/ofstd/oflist.h \ + ../include/dcmtk/dcmnet/dndefine.h ../include/dcmtk/dcmnet/dcuserid.h \ + ../include/dcmtk/dcmnet/dicom.h ../include/dcmtk/dcmnet/cond.h \ + ../../ofstd/include/dcmtk/ofstd/ofconsol.h \ + ../../ofstd/include/dcmtk/ofstd/ofthread.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ + ../include/dcmtk/dcmnet/dcompat.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 \ + ../../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/oftraits.h \ + ../../ofstd/include/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 \ + ../../dcmdata/include/dcmtk/dcmdata/dcuid.h \ + ../include/dcmtk/dcmnet/dntypes.h ../include/dcmtk/dcmnet/dul.h \ + ../../ofstd/include/dcmtk/ofstd/ofglobal.h ../include/dcmtk/dcmnet/lst.h \ + ../include/dcmtk/dcmnet/assoc.h lst.o: lst.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmnet/lst.h ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ @@ -2026,7 +2054,6 @@ ../../ofstd/include/dcmtk/ofstd/ofconsol.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ ../include/dcmtk/dcmnet/dndefine.h ../include/dcmtk/dcmnet/dcompat.h \ - ../../ofstd/include/dcmtk/ofstd/ofbmanip.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 \ @@ -2101,7 +2128,11 @@ ../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/dccfprmp.h \ + ../../dcmtls/include/dcmtk/dcmtls/tlslayer.h \ + ../include/dcmtk/dcmnet/dcmlayer.h \ + ../../dcmtls/include/dcmtk/dcmtls/tlsdefin.h \ + ../../dcmtls/include/dcmtk/dcmtls/tlsciphr.h scpcfg.o: scpcfg.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmnet/scpcfg.h ../include/dcmtk/dcmnet/dcasccff.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ @@ -2120,7 +2151,6 @@ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../include/dcmtk/dcmnet/dcompat.h \ - ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \ ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \ ../../oflog/include/dcmtk/oflog/oflog.h \ ../../oflog/include/dcmtk/oflog/logger.h \ @@ -2292,15 +2322,18 @@ ../include/dcmtk/dcmnet/cond.h \ ../../ofstd/include/dcmtk/ofstd/ofconsol.h \ ../include/dcmtk/dcmnet/dndefine.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/dntypes.h \ - ../include/dcmtk/dcmnet/dimse.h ../include/dcmtk/dcmnet/diutil.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/lst.h ../include/dcmtk/dcmnet/dul.h \ + ../include/dcmtk/dcmnet/extneg.h ../include/dcmtk/dcmnet/dcuserid.h \ + ../include/dcmtk/dcmnet/dntypes.h ../include/dcmtk/dcmnet/dimse.h \ + ../include/dcmtk/dcmnet/diutil.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 \ + ../../dcmtls/include/dcmtk/dcmtls/tlslayer.h \ + ../include/dcmtk/dcmnet/dcmlayer.h \ + ../../dcmtls/include/dcmtk/dcmtls/tlsdefin.h \ + ../../dcmtls/include/dcmtk/dcmtls/tlsciphr.h scpthrd.o: scpthrd.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmnet/scpthrd.h ../include/dcmtk/dcmnet/scp.h \ ../../dcmdata/include/dcmtk/dcmdata/dctk.h \ @@ -2420,15 +2453,14 @@ ../include/dcmtk/dcmnet/cond.h \ ../../ofstd/include/dcmtk/ofstd/ofconsol.h \ ../include/dcmtk/dcmnet/dndefine.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/dntypes.h \ - ../include/dcmtk/dcmnet/dimse.h ../include/dcmtk/dcmnet/diutil.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/lst.h ../include/dcmtk/dcmnet/dul.h \ + ../include/dcmtk/dcmnet/extneg.h ../include/dcmtk/dcmnet/dcuserid.h \ + ../include/dcmtk/dcmnet/dntypes.h ../include/dcmtk/dcmnet/dimse.h \ + ../include/dcmtk/dcmnet/diutil.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 scu.o: scu.cc ../../config/include/dcmtk/config/osconfig.h \ ../../dcmdata/include/dcmtk/dcmdata/dcostrmf.h \ ../../dcmdata/include/dcmtk/dcmdata/dcostrma.h \ @@ -2483,7 +2515,6 @@ ../../ofstd/include/dcmtk/ofstd/ofconsol.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ ../include/dcmtk/dcmnet/dndefine.h ../include/dcmtk/dcmnet/dcompat.h \ - ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdatset.h \ ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \ ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \ diff -Nru dcmtk-3.6.6/dcmnet/libsrc/Makefile.in dcmtk-3.6.7/dcmnet/libsrc/Makefile.in --- dcmtk-3.6.6/dcmnet/libsrc/Makefile.in 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmnet/libsrc/Makefile.in 2022-04-28 13:47:25.000000000 +0000 @@ -25,7 +25,7 @@ dulfsm.o dulparse.o dulpres.o dul.o lst.o extneg.o dimget.o dcmlayer.o \ dcmtrans.o dcasccfg.o dcasccff.o dccfuidh.o dccftsmp.o dccfpcmp.o \ dccfrsmp.o dccfenmp.o dccfprmp.o dfindscu.o dstorscp.o dstorscu.o \ - dcuserid.o scu.o scp.o scpcfg.o scpthrd.o scppool.o dwrap.o + dcuserid.o helpers.o scu.o scp.o scpcfg.o scpthrd.o scppool.o dwrap.o library = libdcmnet.$(LIBEXT) diff -Nru dcmtk-3.6.6/dcmnet/libsrc/scp.cc dcmtk-3.6.7/dcmnet/libsrc/scp.cc --- dcmtk-3.6.6/dcmnet/libsrc/scp.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmnet/libsrc/scp.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2009-2020, OFFIS e.V. + * Copyright (C) 2009-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -853,7 +853,7 @@ // Send back response T_DIMSE_Message response; // Make sure everything is zeroed (especially options) - bzero((char*)&response, sizeof(response)); + memset((char*)&response, 0, sizeof(response)); T_DIMSE_C_StoreRSP& storeRsp = response.msg.CStoreRSP; response.CommandField = DIMSE_C_STORE_RSP; storeRsp.MessageIDBeingRespondedTo = messageID; @@ -968,7 +968,7 @@ // Send back response T_DIMSE_Message response; // Make sure everything is zeroed (especially options) - bzero((char*)&response, sizeof(response)); + memset((char*)&response, 0, sizeof(response)); T_DIMSE_C_FindRSP& findRsp = response.msg.CFindRSP; response.CommandField = DIMSE_C_FIND_RSP; findRsp.MessageIDBeingRespondedTo = messageID; @@ -1090,7 +1090,7 @@ // Send back response T_DIMSE_Message response; // Make sure everything is zeroed (especially options) - bzero((char*)&response, sizeof(response)); + memset((char*)&response, 0, sizeof(response)); T_DIMSE_C_MoveRSP& moveRsp = response.msg.CMoveRSP; response.CommandField = DIMSE_C_MOVE_RSP; moveRsp.MessageIDBeingRespondedTo = messageID; @@ -1212,7 +1212,7 @@ // Send back response T_DIMSE_Message response; // Make sure everything is zeroed (especially options) - bzero((char*)&response, sizeof(response)); + memset((char*)&response, 0, sizeof(response)); T_DIMSE_N_ActionRSP& actionRsp = response.msg.NActionRSP; response.CommandField = DIMSE_N_ACTION_RSP; actionRsp.MessageIDBeingRespondedTo = messageID; @@ -1312,7 +1312,7 @@ // Send back response T_DIMSE_Message response; // Make sure everything is zeroed (especially options) - bzero((char*)&response, sizeof(response)); + memset((char*)&response, 0, sizeof(response)); T_DIMSE_N_EventReportRSP& eventReportRsp = response.msg.NEventReportRSP; response.CommandField = DIMSE_N_EVENT_REPORT_RSP; eventReportRsp.MessageIDBeingRespondedTo = reqMessage.MessageID; @@ -1367,7 +1367,7 @@ T_ASC_PresentationContextID pcid = presID; T_DIMSE_Message request; // Make sure everything is zeroed (especially options) - bzero((char*)&request, sizeof(request)); + memset((char*)&request, 0, sizeof(request)); T_DIMSE_N_EventReportRQ& eventReportReq = request.msg.NEventReportRQ; DcmDataset* statusDetail = NULL; diff -Nru dcmtk-3.6.6/dcmnet/libsrc/scu.cc dcmtk-3.6.7/dcmnet/libsrc/scu.cc --- dcmtk-3.6.6/dcmnet/libsrc/scu.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmnet/libsrc/scu.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2008-2019, OFFIS e.V. + * Copyright (C) 2008-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -27,6 +27,7 @@ #include "dcmtk/dcmnet/scu.h" #include "dcmtk/ofstd/ofmem.h" /* for OFunique_ptr */ + #ifdef WITH_ZLIB #include /* for zlibVersion() */ #endif @@ -601,7 +602,7 @@ /* Now, assemble DIMSE message */ T_DIMSE_Message msg; // Make sure everything is zeroed (especially options) - bzero((char*)&msg, sizeof(msg)); + memset((char*)&msg, 0, sizeof(msg)); T_DIMSE_C_EchoRQ* req = &(msg.msg.CEchoRQ); // Set type of message msg.CommandField = DIMSE_C_ECHO_RQ; @@ -633,7 +634,7 @@ /* Receive response */ T_DIMSE_Message rsp; // Make sure everything is zeroed (especially options) - bzero((char*)&rsp, sizeof(rsp)); + memset((char*)&rsp, 0, sizeof(rsp)); DcmDataset* statusDetail = NULL; cond = receiveDIMSECommand(&pcid, &rsp, &statusDetail, NULL /* not interested in the command set */); @@ -695,7 +696,7 @@ DcmDataset* statusDetail = NULL; T_DIMSE_Message msg; // Make sure everything is zeroed (especially options) - bzero((char*)&msg, sizeof(msg)); + memset((char*)&msg, 0, sizeof(msg)); T_DIMSE_C_StoreRQ* req = &(msg.msg.CStoreRQ); // Set type of message @@ -834,7 +835,7 @@ /* Receive response */ T_DIMSE_Message rsp; // Make sure everything is zeroed (especially options) - bzero((char*)&rsp, sizeof(rsp)); + memset((char*)&rsp, 0, sizeof(rsp)); cond = receiveDIMSECommand(&pcid, &rsp, &statusDetail, NULL /* not interested in the command set */); if (cond.bad()) { @@ -896,7 +897,7 @@ T_ASC_PresentationContextID pcid = presID; T_DIMSE_Message msg; // make sure everything is zeroed (especially options) - bzero((char*)&msg, sizeof(msg)); + memset((char*)&msg, 0, sizeof(msg)); DcmDataset* statusDetail = NULL; T_DIMSE_C_MoveRQ* req = &(msg.msg.CMoveRQ); // Set type of message @@ -940,7 +941,7 @@ { T_DIMSE_Message rsp; // Make sure everything is zeroed, especially options - bzero((char*)&rsp, sizeof(rsp)); + memset((char*)&rsp, 0, sizeof(rsp)); statusDetail = NULL; // Receive command set @@ -1064,7 +1065,7 @@ T_ASC_PresentationContextID pcid = presID; T_DIMSE_Message msg; // Make sure everything is zeroed (especially options) - bzero((char*)&msg, sizeof(msg)); + memset((char*)&msg, 0, sizeof(msg)); T_DIMSE_C_GetRQ* req = &(msg.msg.CGetRQ); // Set type of message msg.CommandField = DIMSE_C_GET_RQ; @@ -1118,7 +1119,7 @@ { T_DIMSE_Message rsp; // Make sure everything is zeroed (especially options) - bzero((char*)&rsp, sizeof(rsp)); + memset((char*)&rsp, 0, sizeof(rsp)); DcmDataset* statusDetail = NULL; T_ASC_PresentationContextID pcid = 0; @@ -1373,7 +1374,7 @@ // Send back response T_DIMSE_Message response; // Make sure everything is zeroed (especially options) - bzero((char*)&response, sizeof(response)); + memset((char*)&response, 0, sizeof(response)); T_DIMSE_C_StoreRSP& storeRsp = response.msg.CStoreRSP; response.CommandField = DIMSE_C_STORE_RSP; storeRsp.MessageIDBeingRespondedTo = request.MessageID; @@ -1470,7 +1471,7 @@ T_ASC_PresentationContextID pcid = presID; T_DIMSE_Message msg; // Make sure everything is zeroed (especially options) - bzero((char*)&msg, sizeof(msg)); + memset((char*)&msg, 0, sizeof(msg)); DcmDataset* statusDetail = NULL; T_DIMSE_C_FindRQ* req = &(msg.msg.CFindRQ); @@ -1513,7 +1514,7 @@ { T_DIMSE_Message rsp; // Make sure everything is zeroed (especially options) - bzero((char*)&rsp, sizeof(rsp)); + memset((char*)&rsp, 0, sizeof(rsp)); statusDetail = NULL; @@ -1621,7 +1622,7 @@ T_ASC_PresentationContextID pcid = presID; T_DIMSE_Message msg; // Make sure everything is zeroed (especially options) - bzero((char*)&msg, sizeof(msg)); + memset((char*)&msg, 0, sizeof(msg)); T_DIMSE_C_CancelRQ* req = &(msg.msg.CCancelRQ); // Set type of message msg.CommandField = DIMSE_C_CANCEL_RQ; @@ -1687,7 +1688,7 @@ T_ASC_PresentationContextID pcid = presID; T_DIMSE_Message request; // Make sure everything is zeroed (especially options) - bzero((char*)&request, sizeof(request)); + memset((char*)&request, 0, sizeof(request)); T_DIMSE_N_ActionRQ& actionReq = request.msg.NActionRQ; DcmDataset* statusDetail = NULL; @@ -1728,7 +1729,7 @@ // Receive response T_DIMSE_Message response; - bzero((char*)&response, sizeof(response)); + memset((char*)&response, 0, sizeof(response)); cond = receiveDIMSECommand(&pcid, &response, &statusDetail, NULL /* commandSet */); if (cond.bad()) { @@ -1822,7 +1823,7 @@ T_ASC_PresentationContextID pcid = presID; T_DIMSE_Message request; // Make sure everything is zeroed (especially options) - bzero((char*)&request, sizeof(request)); + memset((char*)&request, 0, sizeof(request)); T_DIMSE_N_EventReportRQ& eventReportReq = request.msg.NEventReportRQ; DcmDataset* statusDetail = NULL; @@ -1867,7 +1868,7 @@ // Receive response T_DIMSE_Message response; // Make sure everything is zeroed (especially options) - bzero((char*)&response, sizeof(response)); + memset((char*)&response, 0, sizeof(response)); cond = receiveDIMSECommand(&pcid, &response, &statusDetail, NULL /* commandSet */); if (cond.bad()) @@ -1952,7 +1953,7 @@ T_ASC_PresentationContextID presIDdset; T_DIMSE_Message request; // Make sure everything is zeroed (especially options) - bzero((char*)&request, sizeof(request)); + memset((char*)&request, 0, sizeof(request)); T_DIMSE_N_EventReportRQ& eventReportReq = request.msg.NEventReportRQ; DcmDataset* dataset = NULL; DcmDataset* statusDetail = NULL; @@ -2038,7 +2039,7 @@ // Send back response T_DIMSE_Message response; // Make sure everything is zeroed (especially options) - bzero((char*)&response, sizeof(response)); + memset((char*)&response, 0, sizeof(response)); T_DIMSE_N_EventReportRSP& eventReportRsp = response.msg.NEventReportRSP; response.CommandField = DIMSE_N_EVENT_REPORT_RSP; @@ -2171,7 +2172,7 @@ delete m_openDIMSERequest; m_openDIMSERequest = new T_DIMSE_Message; // Make sure everyhting is zeroed (especially options) - bzero((char*)&m_openDIMSERequest, sizeof(m_openDimseRequest)); + memset((char*)&m_openDIMSERequest, 0, sizeof(m_openDimseRequest)); memcpy((char*)m_openDIMSERequest, msg, sizeof(*m_openDIMSERequest)); } #endif diff -Nru dcmtk-3.6.6/dcmnet/tests/CMakeLists.txt dcmtk-3.6.7/dcmnet/tests/CMakeLists.txt --- dcmtk-3.6.6/dcmnet/tests/CMakeLists.txt 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmnet/tests/CMakeLists.txt 2022-04-28 13:47:25.000000000 +0000 @@ -1,5 +1,12 @@ # declare executables -DCMTK_ADD_EXECUTABLE(dcmnet_tests tests tdump tdimse tpool tscuscp tscusession) +DCMTK_ADD_EXECUTABLE(dcmnet_tests + tdimse.cc + tdump.cc + tests.cc + tpool.cc + tscuscp.cc + tscusession.cc +) # make sure executables are linked to the corresponding libraries DCMTK_TARGET_LINK_MODULES(dcmnet_tests dcmnet) diff -Nru dcmtk-3.6.6/dcmnet/tests/Makefile.dep dcmtk-3.6.7/dcmnet/tests/Makefile.dep --- dcmtk-3.6.6/dcmnet/tests/Makefile.dep 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmnet/tests/Makefile.dep 2022-04-28 13:47:25.000000000 +0000 @@ -1,3 +1,73 @@ +tdimse.o: tdimse.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/ofexbl.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.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/ofcond.h \ + ../../ofstd/include/dcmtk/ofstd/oflimits.h \ + ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ + ../../ofstd/include/dcmtk/ofstd/ofexit.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/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/dcmnet/dimse.h ../include/dcmtk/dcmnet/dicom.h \ + ../include/dcmtk/dcmnet/cond.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ + ../include/dcmtk/dcmnet/dndefine.h ../include/dcmtk/dcmnet/dcompat.h \ + ../../dcmdata/include/dcmtk/dcmdata/dctypes.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/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 \ + ../../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 \ + ../../ofstd/include/dcmtk/ofstd/ofdiag.h \ + ../../ofstd/include/dcmtk/ofstd/diag/constexp.def tdump.o: tdump.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/oftest.h \ ../../ofstd/include/dcmtk/ofstd/ofconapp.h \ @@ -60,10 +130,11 @@ ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \ ../../dcmdata/include/dcmtk/dcmdata/dcstack.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcdict.h \ + ../../dcmdata/include/dcmtk/dcmdata/dchashdi.h \ ../include/dcmtk/dcmnet/dimse.h ../include/dcmtk/dcmnet/dicom.h \ ../include/dcmtk/dcmnet/cond.h ../include/dcmtk/dcmnet/dndefine.h \ - ../include/dcmtk/dcmnet/dcompat.h \ - ../../ofstd/include/dcmtk/ofstd/ofbmanip.h ../include/dcmtk/dcmnet/lst.h \ + ../include/dcmtk/dcmnet/dcompat.h ../include/dcmtk/dcmnet/lst.h \ ../include/dcmtk/dcmnet/dul.h ../include/dcmtk/dcmnet/extneg.h \ ../include/dcmtk/dcmnet/dcuserid.h ../include/dcmtk/dcmnet/dntypes.h \ ../include/dcmtk/dcmnet/assoc.h \ @@ -243,8 +314,7 @@ ../../dcmdata/include/dcmtk/dcmdata/cmdlnarg.h \ ../include/dcmtk/dcmnet/assoc.h ../include/dcmtk/dcmnet/dicom.h \ ../include/dcmtk/dcmnet/cond.h ../include/dcmtk/dcmnet/dndefine.h \ - ../include/dcmtk/dcmnet/dcompat.h \ - ../../ofstd/include/dcmtk/ofstd/ofbmanip.h ../include/dcmtk/dcmnet/lst.h \ + ../include/dcmtk/dcmnet/dcompat.h ../include/dcmtk/dcmnet/lst.h \ ../include/dcmtk/dcmnet/dul.h ../include/dcmtk/dcmnet/extneg.h \ ../include/dcmtk/dcmnet/dcuserid.h ../include/dcmtk/dcmnet/dntypes.h \ ../include/dcmtk/dcmnet/dimse.h ../include/dcmtk/dcmnet/diutil.h \ @@ -254,13 +324,13 @@ ../include/dcmtk/dcmnet/dccfrsmp.h ../include/dcmtk/dcmnet/dccfenmp.h \ ../include/dcmtk/dcmnet/dccfprmp.h ../include/dcmtk/dcmnet/scu.h tscuscp.o: tscuscp.cc ../../config/include/dcmtk/config/osconfig.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.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/ofexbl.h \ @@ -376,8 +446,7 @@ ../../dcmdata/include/dcmtk/dcmdata/cmdlnarg.h \ ../include/dcmtk/dcmnet/assoc.h ../include/dcmtk/dcmnet/dicom.h \ ../include/dcmtk/dcmnet/cond.h ../include/dcmtk/dcmnet/dndefine.h \ - ../include/dcmtk/dcmnet/dcompat.h \ - ../../ofstd/include/dcmtk/ofstd/ofbmanip.h ../include/dcmtk/dcmnet/lst.h \ + ../include/dcmtk/dcmnet/dcompat.h ../include/dcmtk/dcmnet/lst.h \ ../include/dcmtk/dcmnet/dul.h ../include/dcmtk/dcmnet/extneg.h \ ../include/dcmtk/dcmnet/dcuserid.h ../include/dcmtk/dcmnet/dntypes.h \ ../include/dcmtk/dcmnet/dimse.h ../include/dcmtk/dcmnet/diutil.h \ @@ -505,16 +574,15 @@ ../include/dcmtk/dcmnet/cond.h \ ../../ofstd/include/dcmtk/ofstd/ofconsol.h \ ../include/dcmtk/dcmnet/dndefine.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/dntypes.h \ - ../include/dcmtk/dcmnet/dimse.h ../include/dcmtk/dcmnet/diutil.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/scu.h \ - ../../ofstd/include/dcmtk/ofstd/oftest.h \ + ../include/dcmtk/dcmnet/lst.h ../include/dcmtk/dcmnet/dul.h \ + ../include/dcmtk/dcmnet/extneg.h ../include/dcmtk/dcmnet/dcuserid.h \ + ../include/dcmtk/dcmnet/dntypes.h ../include/dcmtk/dcmnet/dimse.h \ + ../include/dcmtk/dcmnet/diutil.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/scu.h ../../ofstd/include/dcmtk/ofstd/oftest.h \ ../../ofstd/include/dcmtk/ofstd/ofconapp.h \ ../../ofstd/include/dcmtk/ofstd/ofcmdln.h \ ../../ofstd/include/dcmtk/ofstd/ofexbl.h \ diff -Nru dcmtk-3.6.6/dcmnet/tests/tdimse.cc dcmtk-3.6.7/dcmnet/tests/tdimse.cc --- dcmtk-3.6.6/dcmnet/tests/tdimse.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmnet/tests/tdimse.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2020, J. Riesmeier, Oldenburg, Germany + * Copyright (C) 2020-2021, J. Riesmeier, Oldenburg, Germany * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation are maintained by @@ -24,7 +24,8 @@ #include "dcmtk/ofstd/oftest.h" #include "dcmtk/dcmnet/dimse.h" - +#include "dcmtk/ofstd/ofdiag.h" +#include DCMTK_DIAGNOSTIC_IGNORE_CONST_EXPRESSION_WARNING OFTEST(dcmnet_dimseStatusClass) { diff -Nru dcmtk-3.6.6/dcmnet/tests/tscuscp.cc dcmtk-3.6.7/dcmnet/tests/tscuscp.cc --- dcmtk-3.6.6/dcmnet/tests/tscuscp.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmnet/tests/tscuscp.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2017, OFFIS e.V. + * Copyright (C) 2017-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -23,38 +23,15 @@ #ifdef WITH_THREADS -#define INCLUDE_CMATH -#include "dcmtk/ofstd/ofstdinc.h" #include "dcmtk/ofstd/oftest.h" #include "dcmtk/ofstd/oftimer.h" #include "dcmtk/dcmnet/scp.h" #include "dcmtk/dcmnet/scu.h" - +#include static OFLogger t_scuscp_logger= OFLog::getLogger("dcmtk.test.tscuscp"); -/** Method that ensures that the current thread is actually sleeping for the - * defined number of seconds (at least). - * The problem with the regular sleep() function called from OFStandard::sleep - * is that it might be interrupted by signals or a network timeout (depending - * on the operating system). This methods re-executes OFStandard'S sleep method - * until the desired number of seconds have elapsed. - * @param sleep The number of seconds to sleep (at least) - */ -static void force_sleep(Uint32 sleep) -{ - OFTimer timer; - double elapsed = timer.getDiff(); - while (elapsed < (double)sleep) - { - // Use ceiling since otherwise we could wait too short - OFStandard::sleep(OFstatic_cast(unsigned int, ceil(sleep-elapsed))); - elapsed = timer.getDiff(); - } -} - - /** SCP derived from DcmSCP in order to test two types of virtual methods: *
    *
  • Notifiers: Called for some events happening in DcmSCP. So far @@ -225,7 +202,7 @@ const int secs_after_echo = 0) { // make sure server is up - force_sleep(2); + OFStandard::forceSleep(2); DcmSCU scu; scu.setAETitle("TEST_SCU"); scu.setPeerAETitle(called_ae_title); @@ -243,7 +220,7 @@ OFCHECK(result.good()); result = scu.sendECHORequest(1); OFCHECK(result.good()); - force_sleep(secs_after_echo); + OFStandard::forceSleep(secs_after_echo); if (do_release) { result = scu.releaseAssociation(); @@ -275,7 +252,7 @@ // Send ECHO, and wait to be sure SCP has time to exit scu_sends_echo("STOP_AFTER_ASSOC"); // Make sure server would have time to return - force_sleep(2); + OFStandard::forceSleep(2); // Check whether all test variables have the correct values OFCHECK(scp.m_listen_result == EC_NotYetImplemented); // still listening @@ -288,7 +265,7 @@ scp.clear(); scp.m_set_stop_after_assoc = OFTrue; scu_sends_echo("STOP_AFTER_ASSOC"); - force_sleep(2); + OFStandard::forceSleep(2); // Check whether all test variables have the correct values OFCHECK(scp.m_listen_result == NET_EC_StopAfterAssociation); @@ -345,7 +322,7 @@ scp.start(); scu_sends_echo("REJECT_HOST", OFTrue /* expect that association is being refused */); - force_sleep(2); // make sure server would have time to return + OFStandard::forceSleep(2); // make sure server would have time to return // Check whether all test variables have the correct values OFCHECK(scp.m_listen_result == NET_EC_StopAfterAssociation); @@ -377,7 +354,7 @@ // Send echo and receive response scu_sends_echo("TEST_BUILTIN_VER"); // make sure server would have time to return - force_sleep(1); + OFStandard::forceSleep(1); // Check whether all test variables have the correct values OFCHECK(scp.m_listen_result == NET_EC_StopAfterAssociation); @@ -402,7 +379,7 @@ config.setConnectionTimeout(5); scp.m_set_stop_after_timeout = OFTrue; scp.start(); - force_sleep(1); + OFStandard::forceSleep(1); scu_sends_echo("STOP_ON_TIMEOUT"); // Wait for server to return after connection has been served and timeout // has been reached @@ -435,7 +412,7 @@ // Check whether all test variables have the correct values, especially that // timeout occurred but did not lead to a stop - force_sleep(5); + OFStandard::forceSleep(5); OFCHECK(scp.m_listen_result == EC_NotYetImplemented); // still listening OFCHECK(scp.m_stop_after_assoc_result == OFFalse); OFCHECK(scp.m_stop_after_timeout_result == OFFalse); @@ -462,7 +439,7 @@ scu_sends_echo("NO_STOP_BLOCK"); // Give some time to SCP so it could return - force_sleep(3); + OFStandard::forceSleep(3); // Check whether all test variables have the correct values // SCP did not return yet (check whether it is still connected) @@ -539,7 +516,7 @@ scp.start(); // Ensure server is up and listening - force_sleep(1); + OFStandard::forceSleep(1); // Configure SCP and run it against SCP with the desired role DcmSCU scu; diff -Nru dcmtk-3.6.6/dcmnet/tests/tscusession.cc dcmtk-3.6.7/dcmnet/tests/tscusession.cc --- dcmtk-3.6.6/dcmnet/tests/tscusession.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmnet/tests/tscusession.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2019-2020, OFFIS e.V. + * Copyright (C) 2019-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -22,13 +22,13 @@ #ifdef WITH_THREADS -#define INCLUDE_CMATH #include "dcmtk/dcmnet/scp.h" #include "dcmtk/dcmnet/scu.h" -#include "dcmtk/ofstd/ofstdinc.h" #include "dcmtk/ofstd/oftest.h" #include "dcmtk/ofstd/oftimer.h" +#include + static Uint8 NUM_DIMSE_REQUESTS = 5; /** Method that ensures that the current thread is actually sleeping for the diff -Nru dcmtk-3.6.6/dcmpmap/libsrc/CMakeLists.txt dcmtk-3.6.7/dcmpmap/libsrc/CMakeLists.txt --- dcmtk-3.6.6/dcmpmap/libsrc/CMakeLists.txt 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmpmap/libsrc/CMakeLists.txt 2022-04-28 13:47:25.000000000 +0000 @@ -1,4 +1,10 @@ # create library from source files -DCMTK_ADD_LIBRARY(dcmpmap dpmtypes dpmmodparametricmapseries dpmmodparametricmapimage dpmparametricmapbase dpmparametricmapiod) +DCMTK_ADD_LIBRARY(dcmpmap + dpmmodparametricmapimage.cc + dpmmodparametricmapseries.cc + dpmparametricmapbase.cc + dpmparametricmapiod.cc + dpmtypes.cc +) DCMTK_TARGET_LINK_MODULES(dcmpmap dcmfg dcmiod dcmdata ofstd oflog) diff -Nru dcmtk-3.6.6/dcmpmap/libsrc/dpmparametricmapbase.cc dcmtk-3.6.7/dcmpmap/libsrc/dpmparametricmapbase.cc --- dcmtk-3.6.6/dcmpmap/libsrc/dpmparametricmapbase.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmpmap/libsrc/dpmparametricmapbase.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2016-2018, Open Connections GmbH + * Copyright (C) 2016-2021, Open Connections GmbH * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation are maintained by @@ -222,8 +222,16 @@ return DPMParametricMapBase::IODImage::getSOPCommon(); } - +#ifdef __SUNPRO_CC +// the SunPro compiler would complain that the DCMTK_DCMPMAP_EXPORT attribute cannot be applied +// to an explicit template instantiation. +template DPMParametricMapBase::DPMParametricMapBase(OFin_place_type_t(IODImagePixelModule)); +template DPMParametricMapBase::DPMParametricMapBase(OFin_place_type_t(IODImagePixelModule)); +template DPMParametricMapBase::DPMParametricMapBase(OFin_place_type_t(IODFloatingPointImagePixelModule)); +template DPMParametricMapBase::DPMParametricMapBase(OFin_place_type_t(IODDoubleFloatingPointImagePixelModule)); +#else template DCMTK_DCMPMAP_EXPORT DPMParametricMapBase::DPMParametricMapBase(OFin_place_type_t(IODImagePixelModule)); template DCMTK_DCMPMAP_EXPORT DPMParametricMapBase::DPMParametricMapBase(OFin_place_type_t(IODImagePixelModule)); template DCMTK_DCMPMAP_EXPORT DPMParametricMapBase::DPMParametricMapBase(OFin_place_type_t(IODFloatingPointImagePixelModule)); template DCMTK_DCMPMAP_EXPORT DPMParametricMapBase::DPMParametricMapBase(OFin_place_type_t(IODDoubleFloatingPointImagePixelModule)); +#endif diff -Nru dcmtk-3.6.6/dcmpmap/libsrc/dpmparametricmapiod.cc dcmtk-3.6.7/dcmpmap/libsrc/dpmparametricmapiod.cc --- dcmtk-3.6.6/dcmpmap/libsrc/dpmparametricmapiod.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmpmap/libsrc/dpmparametricmapiod.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2016-2019, Open Connections GmbH + * Copyright (C) 2016-2021, Open Connections GmbH * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation are maintained by @@ -1017,6 +1017,25 @@ template class DPMParametricMapIOD::Frames; template class DPMParametricMapIOD::Frames; +#ifdef __SUNPRO_CC +// the SunPro compiler would complain that the DCMTK_DCMPMAP_EXPORT attribute cannot be applied +// to an explicit template instantiation. + +// Helper macro to not to write the same thing multiple times +#define INSTANTIATE_CREATE(T) template OFvariant\ +DPMParametricMapIOD::create(const OFString& modality,\ + const OFString& seriesNumber,\ + const OFString& instanceNumber,\ + const Uint16 rows,\ + const Uint16 columns,\ + const IODEnhGeneralEquipmentModule::EquipmentInfo& equipmentInfo,\ + const ContentIdentificationMacro& contentIdentification,\ + const OFString& imageFlavor,\ + const OFString& derivedPixelContrast,\ + const DPMTypes::ContentQualification& contentQualification) + +#else + // Helper macro to not to write the same thing multiple times #define INSTANTIATE_CREATE(T) template DCMTK_DCMPMAP_EXPORT OFvariant\ DPMParametricMapIOD::create(const OFString& modality,\ @@ -1030,6 +1049,8 @@ const OFString& derivedPixelContrast,\ const DPMTypes::ContentQualification& contentQualification) +#endif + // Instantiate all four permitted create() methods INSTANTIATE_CREATE(IODImagePixelModule); INSTANTIATE_CREATE(IODImagePixelModule); diff -Nru dcmtk-3.6.6/dcmpmap/libsrc/Makefile.dep dcmtk-3.6.7/dcmpmap/libsrc/Makefile.dep --- dcmtk-3.6.6/dcmpmap/libsrc/Makefile.dep 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmpmap/libsrc/Makefile.dep 2022-04-28 13:47:25.000000000 +0000 @@ -3,12 +3,12 @@ ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \ ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.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 \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrcs.h \ ../../dcmdata/include/dcmtk/dcmdata/dcbytstr.h \ @@ -76,12 +76,12 @@ ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \ ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.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 \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrcs.h \ ../../dcmdata/include/dcmtk/dcmdata/dcbytstr.h \ @@ -353,9 +353,9 @@ ../../dcmiod/include/dcmtk/dcmiod/modimagepixelvariant.h \ ../../dcmiod/include/dcmtk/dcmiod/modimagepixelbase.h \ ../../ofstd/include/dcmtk/ofstd/ofvriant.h \ + ../../ofstd/include/dcmtk/ofstd/ofdiag.h \ ../../ofstd/include/dcmtk/ofstd/variadic/variant.h \ ../../ofstd/include/dcmtk/ofstd/variadic/helpers.h \ - ../../ofstd/include/dcmtk/ofstd/ofdiag.h \ ../../ofstd/include/dcmtk/ofstd/diag/push.def \ ../../ofstd/include/dcmtk/ofstd/diag/cnvrsn.def \ ../../ofstd/include/dcmtk/ofstd/diag/vsprfw.def \ @@ -523,9 +523,9 @@ ../../dcmiod/include/dcmtk/dcmiod/modgeneralimage.h \ ../../dcmiod/include/dcmtk/dcmiod/modimagepixelvariant.h \ ../../ofstd/include/dcmtk/ofstd/ofvriant.h \ + ../../ofstd/include/dcmtk/ofstd/ofdiag.h \ ../../ofstd/include/dcmtk/ofstd/variadic/variant.h \ ../../ofstd/include/dcmtk/ofstd/variadic/helpers.h \ - ../../ofstd/include/dcmtk/ofstd/ofdiag.h \ ../../ofstd/include/dcmtk/ofstd/diag/push.def \ ../../ofstd/include/dcmtk/ofstd/diag/cnvrsn.def \ ../../ofstd/include/dcmtk/ofstd/diag/vsprfw.def \ diff -Nru dcmtk-3.6.6/dcmpstat/apps/CMakeLists.txt dcmtk-3.6.7/dcmpstat/apps/CMakeLists.txt --- dcmtk-3.6.6/dcmpstat/apps/CMakeLists.txt 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmpstat/apps/CMakeLists.txt 2022-04-28 13:47:25.000000000 +0000 @@ -3,7 +3,7 @@ # declare executables foreach(PROGRAM dcmmkcrv dcmmklut dcmp2pgm dcmprscp dcmprscu dcmpschk dcmpsmk dcmpsprt dcmpsrcv dcmpssnd) - DCMTK_ADD_EXECUTABLE(${PROGRAM} ${PROGRAM}) + DCMTK_ADD_EXECUTABLE(${PROGRAM} ${PROGRAM}.cc) endforeach() # make sure executables are linked to the corresponding libraries diff -Nru dcmtk-3.6.6/dcmpstat/apps/dcmmklut.cc dcmtk-3.6.7/dcmpstat/apps/dcmmklut.cc --- dcmtk-3.6.6/dcmpstat/apps/dcmmklut.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmpstat/apps/dcmmklut.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1998-2019, OFFIS e.V. + * Copyright (C) 1998-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -38,12 +38,6 @@ #include "dcmtk/ofstd/ofstd.h" #include "dcmtk/ofstd/ofrand.h" -#define INCLUDE_CSTDLIB -#define INCLUDE_CSTDIO -#define INCLUDE_CMATH -#define INCLUDE_CCTYPE -#include "dcmtk/ofstd/ofstdinc.h" - #ifdef WITH_ZLIB #include /* for zlibVersion() */ #endif @@ -571,8 +565,8 @@ if (descriptor) { if (EC_Normal==result) result = descriptor->putUint16(numEntries16, 0); - if (EC_Normal==result) result = descriptor->putUint16((Uint16)firstMapped, 1); - if (EC_Normal==result) result = descriptor->putUint16(numberOfBits, 2); + if (EC_Normal==result) result = descriptor->putUint16(OFstatic_cast(Uint16, firstMapped), 1); + if (EC_Normal==result) result = descriptor->putUint16(OFstatic_cast(Uint16, numberOfBits), 2); if (EC_Normal==result) result = item.insert(descriptor, OFTrue /*replaceOld*/); } else return EC_MemoryExhausted; diff -Nru dcmtk-3.6.6/dcmpstat/apps/dcmprscp.cc dcmtk-3.6.7/dcmpstat/apps/dcmprscp.cc --- dcmtk-3.6.6/dcmpstat/apps/dcmprscp.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmpstat/apps/dcmprscp.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2000-2019, OFFIS e.V. + * Copyright (C) 2000-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -369,20 +369,20 @@ OFLOG_WARN(dcmprscpLogger, "unknown TLS profile '" << profileName << "', ignoring"); } - if (TCS_ok != tLayer->setTLSProfile(tlsProfile)) + if (tLayer->setTLSProfile(tlsProfile).bad()) { OFLOG_FATAL(dcmprscpLogger, "unable to select the TLS security profile"); return 1; } // activate cipher suites - if (TCS_ok != tLayer->activateCipherSuites()) + if (tLayer->activateCipherSuites().bad()) { OFLOG_FATAL(dcmprscpLogger, "unable to activate the selected list of TLS ciphersuites"); return 1; } - if (tlsCACertificateFolder && (TCS_ok != tLayer->addTrustedCertificateDir(tlsCACertificateFolder, keyFileFormat))) + if (tlsCACertificateFolder && (tLayer->addTrustedCertificateDir(tlsCACertificateFolder, keyFileFormat).bad())) { OFLOG_WARN(dcmprscpLogger, "unable to load certificates from directory '" << tlsCACertificateFolder << "', ignoring"); } @@ -392,12 +392,12 @@ } tLayer->setPrivateKeyPasswd(tlsPrivateKeyPassword); // never prompt on console - if (TCS_ok != tLayer->setPrivateKeyFile(tlsPrivateKeyFile.c_str(), keyFileFormat)) + if (tLayer->setPrivateKeyFile(tlsPrivateKeyFile.c_str(), keyFileFormat).bad()) { OFLOG_FATAL(dcmprscpLogger, "unable to load private TLS key from '" << tlsPrivateKeyFile<< "'"); return 1; } - if (TCS_ok != tLayer->setCertificateFile(tlsCertificateFile.c_str(), keyFileFormat)) + if (tLayer->setCertificateFile(tlsCertificateFile.c_str(), keyFileFormat).bad()) { OFLOG_FATAL(dcmprscpLogger, "unable to load certificate from '" << tlsCertificateFile << "'"); return 1; diff -Nru dcmtk-3.6.6/dcmpstat/apps/dcmprscu.cc dcmtk-3.6.7/dcmpstat/apps/dcmprscu.cc --- dcmtk-3.6.6/dcmpstat/apps/dcmprscu.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmpstat/apps/dcmprscu.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 1999-2020, OFFIS e.V. + * Copyright (C) 1999-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -22,9 +22,6 @@ #include "dcmtk/dcmnet/dcompat.h" /* compatibility code, needs to be included before dirent.h */ -#define INCLUDE_CCTYPE -#include "dcmtk/ofstd/ofstdinc.h" - BEGIN_EXTERN_C /* This #if code is suggested by the gnu autoconf documentation */ #ifdef HAVE_DIRENT_H @@ -387,7 +384,7 @@ */ static OFBool readValuePair(FILE *infile, OFString& key, OFString& value) { - int c; + int c = 0; int mode = 0; key.clear(); value.clear(); @@ -897,20 +894,20 @@ OFLOG_WARN(dcmprscuLogger, "unknown TLS profile '" << profileName << "', ignoring"); } - if (TCS_ok != tLayer->setTLSProfile(tlsProfile)) + if (tLayer->setTLSProfile(tlsProfile).bad()) { OFLOG_FATAL(dcmprscuLogger, "unable to select the TLS security profile"); return 1; } // activate cipher suites - if (TCS_ok != tLayer->activateCipherSuites()) + if (tLayer->activateCipherSuites().bad()) { OFLOG_FATAL(dcmprscuLogger, "unable to activate the selected list of TLS ciphersuites"); return 1; } - if (tlsCACertificateFolder && (TCS_ok != tLayer->addTrustedCertificateDir(tlsCACertificateFolder, keyFileFormat))) + if (tlsCACertificateFolder && (tLayer->addTrustedCertificateDir(tlsCACertificateFolder, keyFileFormat).bad())) { OFLOG_WARN(dcmprscuLogger, "unable to load certificates from directory '" << tlsCACertificateFolder << "', ignoring"); } @@ -922,12 +919,12 @@ if (!tlsPrivateKeyFile.empty() && !tlsCertificateFile.empty()) { - if (TCS_ok != tLayer->setPrivateKeyFile(tlsPrivateKeyFile.c_str(), keyFileFormat)) + if (tLayer->setPrivateKeyFile(tlsPrivateKeyFile.c_str(), keyFileFormat).bad()) { OFLOG_FATAL(dcmprscuLogger, "unable to load private TLS key from '" << tlsPrivateKeyFile<< "'"); return 1; } - if (TCS_ok != tLayer->setCertificateFile(tlsCertificateFile.c_str(), keyFileFormat)) + if (tLayer->setCertificateFile(tlsCertificateFile.c_str(), keyFileFormat).bad()) { OFLOG_FATAL(dcmprscuLogger, "unable to load certificate from '" << tlsCertificateFile << "'"); return 1; diff -Nru dcmtk-3.6.6/dcmpstat/apps/dcmpschk.cc dcmtk-3.6.7/dcmpstat/apps/dcmpschk.cc --- dcmtk-3.6.6/dcmpstat/apps/dcmpschk.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmpstat/apps/dcmpschk.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2000-2018, OFFIS e.V. + * Copyright (C) 2000-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -22,9 +22,6 @@ #include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ -#define INCLUDE_CSTDLIB -#include "dcmtk/ofstd/ofstdinc.h" - #include "dcmtk/ofstd/ofstream.h" #include "dcmtk/ofstd/ofstring.h" /* for class OFString */ #include "dcmtk/ofstd/ofconapp.h" /* for OFConsoleApplication */ diff -Nru dcmtk-3.6.6/dcmpstat/apps/dcmpsmk.cc dcmtk-3.6.7/dcmpstat/apps/dcmpsmk.cc --- dcmtk-3.6.6/dcmpstat/apps/dcmpsmk.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmpstat/apps/dcmpsmk.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1998-2018, OFFIS e.V. + * Copyright (C) 1998-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -24,11 +24,6 @@ #include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ -#define INCLUDE_CSTDLIB -#define INCLUDE_CSTDIO -#define INCLUDE_CSTRING -#include "dcmtk/ofstd/ofstdinc.h" - #include "dcmtk/ofstd/ofconapp.h" #include "dcmtk/dcmdata/dctk.h" #include "dcmtk/dcmdata/cmdlnarg.h" @@ -311,7 +306,7 @@ /* add additional image references to pstate */ if (cmd.getParamCount() > 2) { - OFLOG_INFO(dcmpsmkLogger, "adding additonal image reference(s)"); + OFLOG_INFO(dcmpsmkLogger, "adding additional image reference(s)"); const int count = cmd.getParamCount(); for (int i = 2; i < count; i++) { diff -Nru dcmtk-3.6.6/dcmpstat/apps/dcmpsprt.cc dcmtk-3.6.7/dcmpstat/apps/dcmpsprt.cc --- dcmtk-3.6.6/dcmpstat/apps/dcmpsprt.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmpstat/apps/dcmpsprt.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1999-2020, OFFIS e.V. + * Copyright (C) 1999-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -26,9 +26,6 @@ #include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ -#define INCLUDE_CCTYPE -#include "dcmtk/ofstd/ofstdinc.h" - #include "dcmtk/ofstd/ofstream.h" #include "dcmtk/dcmpstat/dviface.h" #include "dcmtk/dcmpstat/dvpssp.h" @@ -73,7 +70,6 @@ input >> ysize; if ((xpos + xsize <= width) && (ypos + ysize <= height)) { - unsigned int value; Uint16 *p = pixel + (ypos * width) + xpos; for (unsigned long ys = 0; ys < ysize; ys++) { @@ -86,7 +82,7 @@ return 0; } if (c != '0') - *p = gray; + *p = OFstatic_cast(Uint16, gray); p++; } p += (width - xsize); @@ -148,8 +144,8 @@ OFBool opt_annotationIllumination = OFTrue; const char * opt_annotationString = NULL; - OFCmdUnsignedInt opt_illumination = (OFCmdUnsignedInt)-1; - OFCmdUnsignedInt opt_reflection = (OFCmdUnsignedInt)-1; + OFCmdUnsignedInt opt_illumination = OFstatic_cast(OFCmdUnsignedInt, -1); + OFCmdUnsignedInt opt_reflection = OFstatic_cast(OFCmdUnsignedInt, -1); OFConsoleApplication app(OFFIS_CONSOLE_APPLICATION , "Read DICOM images and presentation states and render print job", rcsid); OFCommandLine cmd; @@ -478,9 +474,9 @@ OFLOG_WARN(dcmpsprtLogger, "cannot set trim, ignoring."); if (EC_Normal != dvi.getPrintHandler().setRequestedDecimateCropBehaviour(opt_decimate)) OFLOG_WARN(dcmpsprtLogger, "cannot set requested decimate/crop behaviour, ignoring."); - if ((opt_illumination != (OFCmdUnsignedInt)-1)&&(EC_Normal != dvi.getPrintHandler().setPrintIllumination((Uint16)opt_illumination))) + if ((opt_illumination != OFstatic_cast(OFCmdUnsignedInt, -1))&&(EC_Normal != dvi.getPrintHandler().setPrintIllumination(OFstatic_cast(Uint16, opt_illumination)))) OFLOG_WARN(dcmpsprtLogger, "cannot set illumination to '" << opt_illumination << "', ignoring."); - if ((opt_reflection != (OFCmdUnsignedInt)-1)&&(EC_Normal != dvi.getPrintHandler().setPrintReflectedAmbientLight((Uint16)opt_reflection))) + if ((opt_reflection != OFstatic_cast(OFCmdUnsignedInt, -1))&&(EC_Normal != dvi.getPrintHandler().setPrintReflectedAmbientLight(OFstatic_cast(Uint16, opt_reflection)))) OFLOG_WARN(dcmpsprtLogger, "cannot set reflected ambient light to '" << opt_reflection << "', ignoring."); if ((opt_copies > 0)&&(EC_Normal != dvi.setPrinterNumberOfCopies(opt_copies))) diff -Nru dcmtk-3.6.6/dcmpstat/apps/dcmpsrcv.cc dcmtk-3.6.7/dcmpstat/apps/dcmpsrcv.cc --- dcmtk-3.6.6/dcmpstat/apps/dcmpsrcv.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmpstat/apps/dcmpsrcv.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1999-2020, OFFIS e.V. + * Copyright (C) 1999-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -1140,20 +1140,20 @@ OFLOG_WARN(dcmpsrcvLogger, "unknown TLS profile '" << profileName << "', ignoring"); } - if (TCS_ok != tLayer->setTLSProfile(tlsProfile)) + if (tLayer->setTLSProfile(tlsProfile).bad()) { OFLOG_FATAL(dcmpsrcvLogger, "unable to select the TLS security profile"); return 1; } // activate cipher suites - if (TCS_ok != tLayer->activateCipherSuites()) + if (tLayer->activateCipherSuites().bad()) { OFLOG_FATAL(dcmpsrcvLogger, "unable to activate the selected list of TLS ciphersuites"); return 1; } - if (tlsCACertificateFolder && (TCS_ok != tLayer->addTrustedCertificateDir(tlsCACertificateFolder, keyFileFormat))) + if (tlsCACertificateFolder && (tLayer->addTrustedCertificateDir(tlsCACertificateFolder, keyFileFormat).bad())) { OFLOG_WARN(dcmpsrcvLogger, "unable to load certificates from directory '" << tlsCACertificateFolder << "', ignoring"); } @@ -1163,12 +1163,12 @@ } tLayer->setPrivateKeyPasswd(tlsPrivateKeyPassword); // never prompt on console - if (TCS_ok != tLayer->setPrivateKeyFile(tlsPrivateKeyFile.c_str(), keyFileFormat)) + if (tLayer->setPrivateKeyFile(tlsPrivateKeyFile.c_str(), keyFileFormat).bad()) { OFLOG_FATAL(dcmpsrcvLogger, "unable to load private TLS key from '" << tlsPrivateKeyFile<< "'"); return 1; } - if (TCS_ok != tLayer->setCertificateFile(tlsCertificateFile.c_str(), keyFileFormat)) + if (tLayer->setCertificateFile(tlsCertificateFile.c_str(), keyFileFormat).bad()) { OFLOG_FATAL(dcmpsrcvLogger, "unable to load certificate from '" << tlsCertificateFile << "'"); return 1; diff -Nru dcmtk-3.6.6/dcmpstat/apps/dcmpssnd.cc dcmtk-3.6.7/dcmpstat/apps/dcmpssnd.cc --- dcmtk-3.6.6/dcmpstat/apps/dcmpssnd.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmpstat/apps/dcmpssnd.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1999-2019, OFFIS e.V. + * Copyright (C) 1999-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -307,7 +307,7 @@ for (int i=0; isetTLSProfile(tlsProfile)) + if (tLayer->setTLSProfile(tlsProfile).bad()) { OFLOG_FATAL(dcmpssndLogger, "unable to select the TLS security profile"); return 1; } // activate cipher suites - if (TCS_ok != tLayer->activateCipherSuites()) + if (tLayer->activateCipherSuites().bad()) { OFLOG_FATAL(dcmpssndLogger, "unable to activate the selected list of TLS ciphersuites"); return 1; } - if (tlsCACertificateFolder && (TCS_ok != tLayer->addTrustedCertificateDir(tlsCACertificateFolder, keyFileFormat))) + if (tlsCACertificateFolder && (tLayer->addTrustedCertificateDir(tlsCACertificateFolder, keyFileFormat).bad())) { OFLOG_WARN(dcmpssndLogger, "unable to load certificates from directory '" << tlsCACertificateFolder << "', ignoring"); } @@ -614,12 +614,12 @@ if (!tlsPrivateKeyFile.empty() && !tlsCertificateFile.empty()) { - if (TCS_ok != tLayer->setPrivateKeyFile(tlsPrivateKeyFile.c_str(), keyFileFormat)) + if (tLayer->setPrivateKeyFile(tlsPrivateKeyFile.c_str(), keyFileFormat).bad()) { OFLOG_FATAL(dcmpssndLogger, "unable to load private TLS key from '" << tlsPrivateKeyFile<< "'"); return 1; } - if (TCS_ok != tLayer->setCertificateFile(tlsCertificateFile.c_str(), keyFileFormat)) + if (tLayer->setCertificateFile(tlsCertificateFile.c_str(), keyFileFormat).bad()) { OFLOG_FATAL(dcmpssndLogger, "unable to load certificate from '" << tlsCertificateFile << "'"); return 1; diff -Nru dcmtk-3.6.6/dcmpstat/apps/Makefile.dep dcmtk-3.6.7/dcmpstat/apps/Makefile.dep --- dcmtk-3.6.6/dcmpstat/apps/Makefile.dep 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmpstat/apps/Makefile.dep 2022-04-28 13:47:25.000000000 +0000 @@ -1,11 +1,11 @@ dcmmkcrv.o: dcmmkcrv.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.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/ofcmdln.h \ ../../ofstd/include/dcmtk/ofstd/ofexbl.h \ ../../ofstd/include/dcmtk/ofstd/oftraits.h \ @@ -119,6 +119,7 @@ ../../dcmdata/include/dcmtk/dcmdata/cmdlnarg.h dcmmklut.o: dcmmklut.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../dcmdata/include/dcmtk/dcmdata/dctk.h \ ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \ ../../oflog/include/dcmtk/oflog/oflog.h \ @@ -127,7 +128,6 @@ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../oflog/include/dcmtk/oflog/config/defines.h \ ../../oflog/include/dcmtk/oflog/helpers/threadcf.h \ ../../oflog/include/dcmtk/oflog/loglevel.h \ @@ -244,13 +244,13 @@ ../../ofstd/include/dcmtk/ofstd/ofrand.h dcmp2pgm.o: dcmp2pgm.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../include/dcmtk/dcmpstat/dviface.h ../include/dcmtk/dcmpstat/dvpscf.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.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 \ ../../oflog/include/dcmtk/oflog/oflog.h \ ../../oflog/include/dcmtk/oflog/logger.h \ ../../oflog/include/dcmtk/oflog/config.h \ @@ -373,7 +373,6 @@ ../../ofstd/include/dcmtk/ofstd/ofconsol.h \ ../../dcmnet/include/dcmtk/dcmnet/dndefine.h \ ../../dcmnet/include/dcmtk/dcmnet/dcompat.h \ - ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \ ../../dcmdata/include/dcmtk/dcmdata/dcspchrs.h \ ../../ofstd/include/dcmtk/ofstd/ofchrenc.h \ ../../dcmqrdb/include/dcmtk/dcmqrdb/dcmqrdbi.h \ @@ -412,11 +411,11 @@ ../../ofstd/include/dcmtk/ofstd/ofexit.h dcmprscp.o: dcmprscp.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../include/dcmtk/dcmpstat/dvpsdef.h ../include/dcmtk/dcmpstat/dpdefine.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 \ ../../oflog/include/dcmtk/oflog/oflog.h \ ../../oflog/include/dcmtk/oflog/logger.h \ ../../oflog/include/dcmtk/oflog/config.h \ @@ -542,7 +541,6 @@ ../../ofstd/include/dcmtk/ofstd/ofconsol.h \ ../../dcmnet/include/dcmtk/dcmnet/dndefine.h \ ../../dcmnet/include/dcmtk/dcmnet/dcompat.h \ - ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \ ../../dcmdata/include/dcmtk/dcmdata/dcspchrs.h \ ../../ofstd/include/dcmtk/ofstd/ofchrenc.h \ ../../dcmqrdb/include/dcmtk/dcmqrdb/dcmqrdbi.h \ @@ -557,6 +555,7 @@ ../../dcmnet/include/dcmtk/dcmnet/assoc.h \ ../../ofstd/include/dcmtk/ofstd/offname.h \ ../include/dcmtk/dcmpstat/dvcache.h \ + ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \ ../../dcmnet/include/dcmtk/dcmnet/diutil.h \ ../../ofstd/include/dcmtk/ofstd/ofconapp.h \ ../../ofstd/include/dcmtk/ofstd/ofcmdln.h \ @@ -569,19 +568,18 @@ ../../oflog/include/dcmtk/oflog/helpers/timehelp.h \ ../../dcmtls/include/dcmtk/dcmtls/tlstrans.h \ ../../dcmnet/include/dcmtk/dcmnet/dcmtrans.h \ - ../../dcmnet/include/dcmtk/dcmnet/dcmlayer.h \ ../../dcmtls/include/dcmtk/dcmtls/tlsdefin.h \ ../../dcmtls/include/dcmtk/dcmtls/tlslayer.h \ + ../../dcmnet/include/dcmtk/dcmnet/dcmlayer.h \ ../../dcmtls/include/dcmtk/dcmtls/tlsciphr.h dcmprscu.o: dcmprscu.cc ../../config/include/dcmtk/config/osconfig.h \ ../../dcmnet/include/dcmtk/dcmnet/dcompat.h \ - ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \ - ../../ofstd/include/dcmtk/ofstd/ofcast.h \ + ../../dcmnet/include/dcmtk/dcmnet/dndefine.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 \ - ../../dcmnet/include/dcmtk/dcmnet/dndefine.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../include/dcmtk/dcmpstat/dvpsdef.h ../include/dcmtk/dcmpstat/dpdefine.h \ ../../oflog/include/dcmtk/oflog/oflog.h \ ../../oflog/include/dcmtk/oflog/logger.h \ @@ -720,6 +718,7 @@ ../../dcmnet/include/dcmtk/dcmnet/assoc.h \ ../../ofstd/include/dcmtk/ofstd/offname.h \ ../include/dcmtk/dcmpstat/dvcache.h \ + ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \ ../../ofstd/include/dcmtk/ofstd/ofconapp.h \ ../../ofstd/include/dcmtk/ofstd/ofcmdln.h \ ../../ofstd/include/dcmtk/ofstd/ofexbl.h \ @@ -746,13 +745,13 @@ ../include/dcmtk/dcmpstat/dvpsabl.h ../include/dcmtk/dcmpstat/dvpshlp.h \ ../../dcmtls/include/dcmtk/dcmtls/tlstrans.h \ ../../dcmnet/include/dcmtk/dcmnet/dcmtrans.h \ - ../../dcmnet/include/dcmtk/dcmnet/dcmlayer.h \ ../../dcmtls/include/dcmtk/dcmtls/tlsdefin.h \ ../../dcmtls/include/dcmtk/dcmtls/tlslayer.h \ + ../../dcmnet/include/dcmtk/dcmnet/dcmlayer.h \ ../../dcmtls/include/dcmtk/dcmtls/tlsciphr.h dcmpschk.o: dcmpschk.cc ../../config/include/dcmtk/config/osconfig.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ @@ -875,7 +874,6 @@ ../../dcmnet/include/dcmtk/dcmnet/dicom.h \ ../../dcmnet/include/dcmtk/dcmnet/cond.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 \ @@ -886,12 +884,12 @@ ../include/dcmtk/dcmpstat/dvpsvwl.h ../include/dcmtk/dcmpstat/dvpsdal.h \ ../include/dcmtk/dcmpstat/dvpssvl.h ../include/dcmtk/dcmpstat/dvpspl.h dcmpsmk.o: dcmpsmk.cc ../../config/include/dcmtk/config/osconfig.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.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/ofexbl.h \ @@ -1010,7 +1008,6 @@ ../../dcmnet/include/dcmtk/dcmnet/dicom.h \ ../../dcmnet/include/dcmtk/dcmnet/cond.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 \ @@ -1022,8 +1019,8 @@ ../include/dcmtk/dcmpstat/dvpssvl.h ../include/dcmtk/dcmpstat/dvpspl.h \ ../include/dcmtk/dcmpstat/dvpshlp.h dcmpsprt.o: dcmpsprt.cc ../../config/include/dcmtk/config/osconfig.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../include/dcmtk/dcmpstat/dviface.h ../include/dcmtk/dcmpstat/dvpscf.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ @@ -1152,7 +1149,6 @@ ../../ofstd/include/dcmtk/ofstd/ofconsol.h \ ../../dcmnet/include/dcmtk/dcmnet/dndefine.h \ ../../dcmnet/include/dcmtk/dcmnet/dcompat.h \ - ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \ ../../dcmdata/include/dcmtk/dcmdata/dcspchrs.h \ ../../ofstd/include/dcmtk/ofstd/ofchrenc.h \ ../../dcmqrdb/include/dcmtk/dcmqrdb/dcmqrdbi.h \ @@ -1195,10 +1191,10 @@ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../oflog/include/dcmtk/oflog/oflog.h \ ../../oflog/include/dcmtk/oflog/logger.h \ ../../oflog/include/dcmtk/oflog/config.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../oflog/include/dcmtk/oflog/config/defines.h \ ../../oflog/include/dcmtk/oflog/helpers/threadcf.h \ ../../oflog/include/dcmtk/oflog/loglevel.h \ @@ -1349,10 +1345,10 @@ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../oflog/include/dcmtk/oflog/oflog.h \ ../../oflog/include/dcmtk/oflog/logger.h \ ../../oflog/include/dcmtk/oflog/config.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../oflog/include/dcmtk/oflog/config/defines.h \ ../../oflog/include/dcmtk/oflog/helpers/threadcf.h \ ../../oflog/include/dcmtk/oflog/loglevel.h \ @@ -1436,7 +1432,7 @@ ../include/dcmtk/dcmpstat/dvpsmsg.h \ ../../dcmtls/include/dcmtk/dcmtls/tlstrans.h \ ../../dcmnet/include/dcmtk/dcmnet/dcmtrans.h \ - ../../dcmnet/include/dcmtk/dcmnet/dcmlayer.h \ ../../dcmtls/include/dcmtk/dcmtls/tlsdefin.h \ ../../dcmtls/include/dcmtk/dcmtls/tlslayer.h \ + ../../dcmnet/include/dcmtk/dcmnet/dcmlayer.h \ ../../dcmtls/include/dcmtk/dcmtls/tlsciphr.h diff -Nru dcmtk-3.6.6/dcmpstat/docs/dcmmkcrv.man dcmtk-3.6.7/dcmpstat/docs/dcmmkcrv.man --- dcmtk-3.6.6/dcmpstat/docs/dcmmkcrv.man 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmpstat/docs/dcmmkcrv.man 2022-04-28 13:47:25.000000000 +0000 @@ -178,6 +178,6 @@ \section dcmmkcrv_copyright COPYRIGHT -Copyright (C) 1998-2014 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany. +Copyright (C) 1998-2022 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany. */ diff -Nru dcmtk-3.6.6/dcmpstat/docs/dcmmklut.man dcmtk-3.6.7/dcmpstat/docs/dcmmklut.man --- dcmtk-3.6.6/dcmpstat/docs/dcmmklut.man 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmpstat/docs/dcmmklut.man 2022-04-28 13:47:25.000000000 +0000 @@ -248,6 +248,6 @@ \section dcmmklut_copyright COPYRIGHT -Copyright (C) 1998-2014 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany. +Copyright (C) 1998-2022 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany. */ diff -Nru dcmtk-3.6.6/dcmpstat/docs/dcmp2pgm.man dcmtk-3.6.7/dcmpstat/docs/dcmp2pgm.man --- dcmtk-3.6.6/dcmpstat/docs/dcmp2pgm.man 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmpstat/docs/dcmp2pgm.man 2022-04-28 13:47:25.000000000 +0000 @@ -19,7 +19,7 @@ with 8 bits/pixel. The bitmap is stored either as "Portable Gray Map" (PGM) or as a DICOM secondary capture image object. If no presentation state is read from file, a default presentation state is created. The utility allows -to read a configuration file of the Softcopy Presentation State Viewer upon +one to read a configuration file of the Softcopy Presentation State Viewer upon startup. In this case, the settings from the configuration file affecting the rendering of the presentation state are used, e.g. a correction of the gray scale range according to Barten's model (DICOM part 14) can be @@ -170,6 +170,6 @@ \section dcmp2pgm_copyright COPYRIGHT -Copyright (C) 1998-2017 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany. +Copyright (C) 1998-2022 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany. */ diff -Nru dcmtk-3.6.6/dcmpstat/docs/dcmprscp.man dcmtk-3.6.7/dcmpstat/docs/dcmprscp.man --- dcmtk-3.6.6/dcmpstat/docs/dcmprscp.man 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmpstat/docs/dcmprscp.man 2022-04-28 13:47:25.000000000 +0000 @@ -22,7 +22,7 @@ not create real hardcopies but stores print jobs in the local DICOMscope database as a set of Stored Print objects (one per page) and Hardcopy Grayscale images (one per film box N-SET). The DICOMscope application allows -to load a Stored Print object created by \b dcmprscp and to render a screen +one 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. @@ -141,6 +141,6 @@ \section dcmprscp_copyright COPYRIGHT -Copyright (C) 1999-2014 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany. +Copyright (C) 1999-2022 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany. */ diff -Nru dcmtk-3.6.6/dcmpstat/docs/dcmprscu.man dcmtk-3.6.7/dcmpstat/docs/dcmprscu.man --- dcmtk-3.6.6/dcmpstat/docs/dcmprscu.man 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmpstat/docs/dcmprscu.man 2022-04-28 13:47:25.000000000 +0000 @@ -201,6 +201,6 @@ \section dcmprscu_copyright COPYRIGHT -Copyright (C) 1999-2014 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany. +Copyright (C) 1999-2022 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany. */ diff -Nru dcmtk-3.6.6/dcmpstat/docs/dcmpschk.man dcmtk-3.6.7/dcmpstat/docs/dcmpschk.man --- dcmtk-3.6.6/dcmpstat/docs/dcmpschk.man 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmpstat/docs/dcmpschk.man 2022-04-28 13:47:25.000000000 +0000 @@ -132,6 +132,6 @@ \section dcmpschk_copyright COPYRIGHT -Copyright (C) 2000-2014 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany. +Copyright (C) 2000-2022 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany. */ diff -Nru dcmtk-3.6.6/dcmpstat/docs/dcmpsmk.man dcmtk-3.6.7/dcmpstat/docs/dcmpsmk.man --- dcmtk-3.6.6/dcmpstat/docs/dcmpsmk.man 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmpstat/docs/dcmpsmk.man 2022-04-28 13:47:25.000000000 +0000 @@ -17,7 +17,7 @@ The \b dcmpsmk utility reads a DICOM image file and creates a grayscale softcopy presentation state object according to Supplement 33. The presentation state object is written back to file. A number of command line -options allow to specify how certain constructs that might be present in +options allow one to specify how certain constructs that might be present in the image file should be referenced or activated in the presentation state. The newly created presentation state references the source image and contains values that should allow for a "reasonable" display of the image @@ -245,6 +245,6 @@ \section dcmpsmk_copyright COPYRIGHT -Copyright (C) 1998-2014 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany. +Copyright (C) 1998-2022 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany. */ diff -Nru dcmtk-3.6.6/dcmpstat/docs/dcmpsprt.man dcmtk-3.6.7/dcmpstat/docs/dcmpsprt.man --- dcmtk-3.6.6/dcmpstat/docs/dcmpsprt.man 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmpstat/docs/dcmpsprt.man 2022-04-28 13:47:25.000000000 +0000 @@ -312,6 +312,6 @@ \section dcmpsprt_copyright COPYRIGHT -Copyright (C) 1999-2014 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany. +Copyright (C) 1999-2022 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany. */ diff -Nru dcmtk-3.6.6/dcmpstat/docs/dcmpsrcv.man dcmtk-3.6.7/dcmpstat/docs/dcmpsrcv.man --- dcmtk-3.6.6/dcmpstat/docs/dcmpsrcv.man 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmpstat/docs/dcmpsrcv.man 2022-04-28 13:47:25.000000000 +0000 @@ -130,6 +130,6 @@ \section dcmpsrcv_copyright COPYRIGHT -Copyright (C) 1998-2014 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany. +Copyright (C) 1998-2022 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany. */ diff -Nru dcmtk-3.6.6/dcmpstat/docs/dcmpssnd.man dcmtk-3.6.7/dcmpstat/docs/dcmpssnd.man --- dcmtk-3.6.6/dcmpstat/docs/dcmpssnd.man 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmpstat/docs/dcmpssnd.man 2022-04-28 13:47:25.000000000 +0000 @@ -138,6 +138,6 @@ \section dcmpssnd_copyright COPYRIGHT -Copyright (C) 1998-2014 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany. +Copyright (C) 1998-2022 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany. */ diff -Nru dcmtk-3.6.6/dcmpstat/include/dcmtk/dcmpstat/dviface.h dcmtk-3.6.7/dcmpstat/include/dcmtk/dcmpstat/dviface.h --- dcmtk-3.6.6/dcmpstat/include/dcmtk/dcmpstat/dviface.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmpstat/include/dcmtk/dcmpstat/dviface.h 2022-04-28 13:47:25.000000000 +0000 @@ -58,7 +58,7 @@ * If a non-existing filename (or NULL) is passed, an empty configuration file * is assumed. * @param useLog (optional) flag specifying whether a general log file should be used - * (config entry GENERAL\APPLICATION\LOGFILE). + * (config entry GENERAL\\APPLICATION\\LOGFILE). */ DVInterface(const char *config_file = NULL, OFBool useLog = OFFalse); @@ -1690,12 +1690,18 @@ void clearIndexCache(); /** clears specified index record (and makes pos invalid) + * @param record the index record to clear + * @param recpos the position */ void clearIndexRecord(IdxRecord &record, int &recpos); /** reads specified index record (comparing pos with oldpos to avoid redundant * loading) + * @param pos the position + * @param record the index record + * @param oldpos the old position + * @return OFTrue on success, OFFalse otherwise */ OFBool readIndexRecord(const int pos, IdxRecord &record, @@ -1707,28 +1713,46 @@ void updateStatusCache(); /** returns pointer to study struct specified by given UIDs or to current study + * @param studyUID the UID of the study + * @param seriesUID the UID of the series + * @return pointer to study struct specified by given UIDs or to current study or NULL */ DVStudyCache::ItemStruct *getStudyStruct(const char *studyUID = NULL, const char *seriesUID = NULL); /** returns pointer to series struct specified by given UIDs or to current series + * @param studyUID the UID of the study + * @param seriesUID the UID of the series + * @param instanceUID the UID of the instance + * @return pointer to series struct specified by given UIDs or to current series or NULL */ DVSeriesCache::ItemStruct *getSeriesStruct(const char *studyUID = NULL, const char *seriesUID = NULL, const char *instanceUID = NULL); /** returns pointer to instance struct specified by given UIDs or to current instance + * @param studyUID the UID of the study + * @param seriesUID the UID of the series + * @param instanceUID the UID of the instance + * @return pointer to instance struct specified by given UIDs or to current instance or NULL */ DVInstanceCache::ItemStruct *getInstanceStruct(const char *studyUID = NULL, const char *seriesUID = NULL, const char *instanceUID = NULL); /** returns index of specified study within study description record + * @param study the study description records to search in + * @param uid the id of the study + * @return the study index if found, -1 otherwise */ int findStudyIdx(StudyDescRecord *study, const char *uid); /** conditionally deletes given image file (only if file resides in index.dat directory) + * @param filename the path to the file + * @return 0: given filename is invalid + * 1: image file has been deleted + * 2: image file has not been deleted */ int deleteImageFile(const char *filename); @@ -1739,6 +1763,8 @@ /** modifies the review flag for one instance in the database (see method with three UID * parameters) + * @param idx index + * @return EC_Normal upon success, an error code otherwise */ OFCondition instanceReviewed(int pos); diff -Nru dcmtk-3.6.6/dcmpstat/include/dcmtk/dcmpstat/dvpsfs.h dcmtk-3.6.7/dcmpstat/include/dcmtk/dcmpstat/dvpsfs.h --- dcmtk-3.6.6/dcmpstat/include/dcmtk/dcmpstat/dvpsfs.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmpstat/include/dcmtk/dcmpstat/dvpsfs.h 2022-04-28 13:47:25.000000000 +0000 @@ -116,6 +116,7 @@ DVPSStoredPrint_PList& basicFilmBoxList); /** compares the SOP instance UID with the given UID string. + * @param uid the uid to compare with * @return OFTrue if UIDs are equal, OFFalse otherwise. */ OFBool isInstance(const char *uid); diff -Nru dcmtk-3.6.6/dcmpstat/include/dcmtk/dcmpstat/dvpsga.h dcmtk-3.6.7/dcmpstat/include/dcmtk/dcmpstat/dvpsga.h --- dcmtk-3.6.6/dcmpstat/include/dcmtk/dcmpstat/dvpsga.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmpstat/include/dcmtk/dcmpstat/dvpsga.h 2022-04-28 13:47:25.000000000 +0000 @@ -149,7 +149,7 @@ /** adds the given graphic object to * the list of graphic objects managed by this object. - * @param text graphic object to be inserted. + * @param graphic text graphic object to be inserted. */ void addGraphicObject(DVPSGraphicObject *graphic); diff -Nru dcmtk-3.6.6/dcmpstat/include/dcmtk/dcmpstat/dvpsgr.h dcmtk-3.6.7/dcmpstat/include/dcmtk/dcmpstat/dvpsgr.h --- dcmtk-3.6.6/dcmpstat/include/dcmtk/dcmpstat/dvpsgr.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmpstat/include/dcmtk/dcmpstat/dvpsgr.h 2022-04-28 13:47:25.000000000 +0000 @@ -115,7 +115,7 @@ OFCondition setGraphicType(DVPSGraphicType gtype); /** sets the graphic filled status for the graphic object - * @param isFilled OFTrue if graphic is filled, OFFalse otherwise. + * @param filled OFTrue if graphic is filled, OFFalse otherwise. * @return EC_Normal if successful, an error code otherwise. */ OFCondition setFilled(OFBool filled); diff -Nru dcmtk-3.6.6/dcmpstat/include/dcmtk/dcmpstat/dvpsgrl.h dcmtk-3.6.7/dcmpstat/include/dcmtk/dcmpstat/dvpsgrl.h --- dcmtk-3.6.6/dcmpstat/include/dcmtk/dcmpstat/dvpsgrl.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmpstat/include/dcmtk/dcmpstat/dvpsgrl.h 2022-04-28 13:47:25.000000000 +0000 @@ -92,7 +92,7 @@ /** adds the given graphic object to * the list of graphic objects managed by this object. - * @param text graphic object to be inserted. + * @param graphic text graphic object to be inserted. */ void addGraphicObject(DVPSGraphicObject *graphic); diff -Nru dcmtk-3.6.6/dcmpstat/include/dcmtk/dcmpstat/dvpsibl.h dcmtk-3.6.7/dcmpstat/include/dcmtk/dcmpstat/dvpsibl.h --- dcmtk-3.6.6/dcmpstat/include/dcmtk/dcmpstat/dvpsibl.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmpstat/include/dcmtk/dcmpstat/dvpsibl.h 2022-04-28 13:47:25.000000000 +0000 @@ -256,13 +256,13 @@ */ const char *getImageConfigurationInformation(size_t idx); - /** gets the current SOP Instance UID for the given registered image box.. + /** gets the current SOP Instance UID for the given registered image box. * @param idx index, must be < getNumberOfImages() * @return SOP Instance UID, may be NULL. */ const char *getSOPInstanceUID(size_t idx); - /** gets the referenced Presentation LUT SOP Instance UID for the given registered image box.. + /** gets the referenced Presentation LUT SOP Instance UID for the given registered image box. * @param idx index, must be < getNumberOfImages() * @return SOP Instance UID, may be NULL. */ diff -Nru dcmtk-3.6.6/dcmpstat/include/dcmtk/dcmpstat/dvpsmsg.h dcmtk-3.6.7/dcmpstat/include/dcmtk/dcmpstat/dvpsmsg.h --- dcmtk-3.6.6/dcmpstat/include/dcmtk/dcmpstat/dvpsmsg.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmpstat/include/dcmtk/dcmpstat/dvpsmsg.h 2022-04-28 13:47:25.000000000 +0000 @@ -65,7 +65,7 @@ void addStringToPayload(const char *str); /** adds an integer into the message payload. - * @param value to write + * @param i value to write */ void addIntToPayload(Uint32 i); @@ -176,53 +176,53 @@ virtual ~DVPSIPCClient(); /** sends ApplicationTerminates notification to server. - * @param Uint32 message status, see constants defined in DVPSIPCMessage + * @param status Uint32 message status, see constants defined in DVPSIPCMessage */ void notifyApplicationTerminates(Uint32 status); /** sends ReceivedUnencryptedDICOMConnection notification to server. - * @param Uint32 message status, see constants defined in DVPSIPCMessage + * @param status Uint32 message status, see constants defined in DVPSIPCMessage * @param txt textual description of notification for server */ void notifyReceivedUnencryptedDICOMConnection(Uint32 status, const char *txt); /** sends ReceivedEncryptedDICOMConnection notification to server. - * @param Uint32 message status, see constants defined in DVPSIPCMessage + * @param status Uint32 message status, see constants defined in DVPSIPCMessage * @param txt textual description of notification for server */ void notifyReceivedEncryptedDICOMConnection(Uint32 status, const char *txt); /** sends ConnectionClosed notification to server. - * @param Uint32 message status, see constants defined in DVPSIPCMessage + * @param status Uint32 message status, see constants defined in DVPSIPCMessage */ void notifyConnectionClosed(Uint32 status); /** sends ConnectionAborted notification to server. - * @param Uint32 message status, see constants defined in DVPSIPCMessage + * @param status Uint32 message status, see constants defined in DVPSIPCMessage * @param txt textual description of notification for server */ void notifyConnectionAborted(Uint32 status, const char *txt); /** sends RequestedUnencryptedDICOMConnection notification to server. - * @param Uint32 message status, see constants defined in DVPSIPCMessage + * @param status Uint32 message status, see constants defined in DVPSIPCMessage * @param txt textual description of notification for server */ void notifyRequestedUnencryptedDICOMConnection(Uint32 status, const char *txt); /** sends RequestedEncryptedDICOMConnection notification to server. - * @param Uint32 message status, see constants defined in DVPSIPCMessage + * @param status Uint32 message status, see constants defined in DVPSIPCMessage * @param txt textual description of notification for server */ void notifyRequestedEncryptedDICOMConnection(Uint32 status, const char *txt); /** sends ReceivedDICOMObject notification to server. - * @param Uint32 message status, see constants defined in DVPSIPCMessage + * @param status Uint32 message status, see constants defined in DVPSIPCMessage * @param txt textual description of DICOM object */ void notifyReceivedDICOMObject(Uint32 status, const char *txt); /** sends SentDICOMObject notification to server. - * @param Uint32 message status, see constants defined in DVPSIPCMessage + * @param status Uint32 message status, see constants defined in DVPSIPCMessage * @param txt textual description of DICOM object */ void notifySentDICOMObject(Uint32 status, const char *txt); diff -Nru dcmtk-3.6.6/dcmpstat/include/dcmtk/dcmpstat/dvpsovl.h dcmtk-3.6.7/dcmpstat/include/dcmtk/dcmpstat/dvpsovl.h --- dcmtk-3.6.6/dcmpstat/include/dcmtk/dcmpstat/dvpsovl.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmpstat/include/dcmtk/dcmpstat/dvpsovl.h 2022-04-28 13:47:25.000000000 +0000 @@ -117,7 +117,7 @@ * The overlay data is copied into the presentation state, i.e. the DICOM dataset * can be deleted after execution of this method. * @param overlayIOD the DICOM dataset from which the overlay is to be read - * @groupInItem the repeating group 0x6000..0x61F (even) of the overlay to be read + * @param groupInItem the repeating group 0x6000..0x61F (even) of the overlay to be read * @param newGroup repeating group number 0x6000-0x601F (even) to be used for * the overlay in the presentation state. * @return EC_Normal upon success, an error code otherwise. diff -Nru dcmtk-3.6.6/dcmpstat/include/dcmtk/dcmpstat/dvpspr.h dcmtk-3.6.7/dcmpstat/include/dcmtk/dcmpstat/dvpspr.h --- dcmtk-3.6.6/dcmpstat/include/dcmtk/dcmpstat/dvpspr.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmpstat/include/dcmtk/dcmpstat/dvpspr.h 2022-04-28 13:47:25.000000000 +0000 @@ -210,8 +210,8 @@ void setEventHandler(DVPSPrintEventHandler *handler) { eventHandler = handler; } /** sets the blocking and timeout mode for receive operations. - * @param blockMode blocking mode - * @param timeout + * @param blocking blocking mode + * @param timeOut */ void setTimeout(T_DIMSE_BlockingMode blocking, int timeOut) { blockMode=blocking; timeout=timeOut; } diff -Nru dcmtk-3.6.6/dcmpstat/include/dcmtk/dcmpstat/dvpsrs.h dcmtk-3.6.7/dcmpstat/include/dcmtk/dcmpstat/dvpsrs.h --- dcmtk-3.6.6/dcmpstat/include/dcmtk/dcmpstat/dvpsrs.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmpstat/include/dcmtk/dcmpstat/dvpsrs.h 2022-04-28 13:47:25.000000000 +0000 @@ -99,7 +99,7 @@ /** remove image reference from this series reference if present. * If an image reference with a SOP instance UID corresponding to the * passed UID is found, it is removed from this series reference. - * @param uid a pointer to the image SOP instance UID. + * @param sopinstanceuid a pointer to the image SOP instance UID. */ void removeImageReference(const char *sopinstanceuid); diff -Nru dcmtk-3.6.6/dcmpstat/include/dcmtk/dcmpstat/dvpssp.h dcmtk-3.6.7/dcmpstat/include/dcmtk/dcmpstat/dvpssp.h --- dcmtk-3.6.6/dcmpstat/include/dcmtk/dcmpstat/dvpssp.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmpstat/include/dcmtk/dcmpstat/dvpssp.h 2022-04-28 13:47:25.000000000 +0000 @@ -119,7 +119,7 @@ */ OFCondition setPrinterName(const char *name); - /** sets the image display format to 'STANDARD\columns,rows'. + /** sets the image display format to 'STANDARD\\columns,rows'. * The caller must make sure that the column and row values are * valid for the selected printer. * @param columns number of columns @@ -232,7 +232,7 @@ * are reset to default. For all registered images, magnification, smoothing type * and configuration information are also set back to default. * @param name name of the new printer (optional) - * @param aetitle of the new printer (optional) + * @param destinationAE aetitle of the new printer (optional) * @return EC_Normal if successful, an error code otherwise. */ OFCondition newPrinter(const char *name = NULL, const char *destinationAE = NULL); // short cut, delete all optional settings diff -Nru dcmtk-3.6.6/dcmpstat/include/dcmtk/dcmpstat/dvpstxl.h dcmtk-3.6.7/dcmpstat/include/dcmtk/dcmpstat/dvpstxl.h --- dcmtk-3.6.6/dcmpstat/include/dcmtk/dcmpstat/dvpstxl.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmpstat/include/dcmtk/dcmpstat/dvpstxl.h 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1998-2012, OFFIS e.V. + * Copyright (C) 1998-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -27,6 +27,8 @@ #include "dcmtk/dcmdata/dcitem.h" #include "dcmtk/dcmpstat/dpdefine.h" +#include + class DVPSTextObject; diff -Nru dcmtk-3.6.6/dcmpstat/include/dcmtk/dcmpstat/dvpstyp.h dcmtk-3.6.7/dcmpstat/include/dcmtk/dcmpstat/dvpstyp.h --- dcmtk-3.6.6/dcmpstat/include/dcmtk/dcmpstat/dvpstyp.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmpstat/include/dcmtk/dcmpstat/dvpstyp.h 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1998-2010, OFFIS e.V. + * Copyright (C) 1998-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -27,9 +27,6 @@ #include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ -#define INCLUDE_CSTDIO -#include "dcmtk/ofstd/ofstdinc.h" - /** describes how to handle overlays when creating a default presentation state * for an image. */ diff -Nru dcmtk-3.6.6/dcmpstat/include/dcmtk/dcmpstat/dvpsvl.h dcmtk-3.6.7/dcmpstat/include/dcmtk/dcmpstat/dvpsvl.h --- dcmtk-3.6.6/dcmpstat/include/dcmtk/dcmpstat/dvpsvl.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmpstat/include/dcmtk/dcmpstat/dvpsvl.h 2022-04-28 13:47:25.000000000 +0000 @@ -77,7 +77,7 @@ /** assigns the contents of this VOI LUT to the * references passed as parameters. - * @param reference to the Softcopy VOI in which the LUT is stored. + * @param voi reference to the Softcopy VOI in which the LUT is stored. */ OFCondition assign(DVPSSoftcopyVOI& voi); diff -Nru dcmtk-3.6.6/dcmpstat/include/dcmtk/dcmpstat/dvsighdl.h dcmtk-3.6.7/dcmpstat/include/dcmtk/dcmpstat/dvsighdl.h --- dcmtk-3.6.6/dcmpstat/include/dcmtk/dcmpstat/dvsighdl.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmpstat/include/dcmtk/dcmpstat/dvsighdl.h 2022-04-28 13:47:25.000000000 +0000 @@ -138,7 +138,7 @@ * separately. If main dataset is to be signed, it must be included in this stack. * @param attributesNotToSignInMainDataset list of attribute tags that should be * omitted from the signature on the main dataset level - * @param usedID user ID in configuration file, must not be NULL + * @param userID user ID in configuration file, must not be NULL * @param passwd passwd password for private key, may be NULL * @return EC_Normal if successful, an error code otherwise. */ diff -Nru dcmtk-3.6.6/dcmpstat/libsrc/CMakeLists.txt dcmtk-3.6.7/dcmpstat/libsrc/CMakeLists.txt --- dcmtk-3.6.6/dcmpstat/libsrc/CMakeLists.txt 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmpstat/libsrc/CMakeLists.txt 2022-04-28 13:47:25.000000000 +0000 @@ -1,4 +1,51 @@ # create library from source files -DCMTK_ADD_LIBRARY(dcmpstat dcmpstat dviface dvpsab dvpsabl dvpsal dvpsall dvpscf dvpscu dvpscul dvpsda dvpsdal dvpsfs dvpsga dvpsgal dvpsgl dvpsgll dvpsgr dvpsgrl dvpshlp dvpsib dvpsibl dvpsmsg dvpsov dvpsovl dvpspl dvpspl2 dvpspll dvpspr dvpsprt dvpsri dvpsril dvpsrs dvpsrsl dvpssp dvpsspl dvpssv dvpssvl dvpstat dvpstx dvpstxl dvpsvl dvpsvll dvpsvw dvpsvwl dvsighdl) +DCMTK_ADD_LIBRARY(dcmpstat + dcmpstat.cc + dviface.cc + dvpsab.cc + dvpsabl.cc + dvpsal.cc + dvpsall.cc + dvpscf.cc + dvpscu.cc + dvpscul.cc + dvpsda.cc + dvpsdal.cc + dvpsfs.cc + dvpsga.cc + dvpsgal.cc + dvpsgl.cc + dvpsgll.cc + dvpsgr.cc + dvpsgrl.cc + dvpshlp.cc + dvpsib.cc + dvpsibl.cc + dvpsmsg.cc + dvpsov.cc + dvpsovl.cc + dvpspl.cc + dvpspl2.cc + dvpspll.cc + dvpspr.cc + dvpsprt.cc + dvpsri.cc + dvpsril.cc + dvpsrs.cc + dvpsrsl.cc + dvpssp.cc + dvpsspl.cc + dvpssv.cc + dvpssvl.cc + dvpstat.cc + dvpstx.cc + dvpstxl.cc + dvpsvl.cc + dvpsvll.cc + dvpsvw.cc + dvpsvwl.cc + dvsighdl.cc +) DCMTK_TARGET_LINK_MODULES(dcmpstat ofstd oflog dcmdata dcmimgle dcmimage dcmnet dcmdsig dcmtls dcmsr dcmqrdb) +set_property(TARGET dcmpstat PROPERTY OUTPUT_NAME "dcmpstat${DCMTK_TLS_LIBRARY_POSTFIX}") diff -Nru dcmtk-3.6.6/dcmpstat/libsrc/dcmpstat.cc dcmtk-3.6.7/dcmpstat/libsrc/dcmpstat.cc --- dcmtk-3.6.6/dcmpstat/libsrc/dcmpstat.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmpstat/libsrc/dcmpstat.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1998-2018, OFFIS e.V. + * Copyright (C) 1998-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -43,15 +43,6 @@ #include "dcmtk/dcmpstat/dvpstx.h" /* for DVPSTextObject, needed by MSVC5 with STL */ #include "dcmtk/dcmpstat/dvpsgr.h" /* for DVPSGraphicObject, needed by MSVC5 with STL */ -#define INCLUDE_CSTDLIB -#define INCLUDE_CSTDIO -#define INCLUDE_CSTRING -#define INCLUDE_CMATH -#define INCLUDE_CTIME -#define INCLUDE_LIBC -#define INCLUDE_UNISTD -#include "dcmtk/ofstd/ofstdinc.h" - OFLogger DCM_dcmpstatLogger = OFLog::getLogger("dcmtk.dcmpstat"); OFLogger DCM_dcmpstatDumpLogger = OFLog::getLogger("dcmtk.dcmpstat.dump"); OFLogger DCM_dcmpstatLogfileLogger = OFLog::getLogger("dcmtk.dcmpstat.logfile"); @@ -966,7 +957,9 @@ if (result==EC_Normal) result = seriesInstanceUID.putString(dcmGenerateUniqueIdentifier(uid, SITE_SERIES_UID_ROOT)); if (result==EC_Normal) result = sOPInstanceUID.putString(dcmGenerateUniqueIdentifier(uid)); if (result==EC_Normal) result = seriesNumber.putString(DEFAULT_seriesNumber); - if (result==EC_Normal) result = specificCharacterSet.putString(DEFAULT_specificCharacterSet); + + /* If no other character set is specified by the image, we use ISO_IR 100 as the default */ + if ((result==EC_Normal) && (specificCharacterSet.getLength() == 0)) result = specificCharacterSet.putString(DEFAULT_specificCharacterSet); if (result==EC_Normal) { diff -Nru dcmtk-3.6.6/dcmpstat/libsrc/dviface.cc dcmtk-3.6.7/dcmpstat/libsrc/dviface.cc --- dcmtk-3.6.6/dcmpstat/libsrc/dviface.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmpstat/libsrc/dviface.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1998-2020, OFFIS e.V. + * Copyright (C) 1998-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -62,12 +62,6 @@ #include "dcmtk/dcmqrdb/dcmqrdbi.h" /* for DB_UpperMaxBytesPerStudy */ #include "dcmtk/dcmqrdb/dcmqrdbs.h" /* for DcmQueryRetrieveDatabaseStatus */ -#define INCLUDE_CSTDIO -#define INCLUDE_CCTYPE -#define INCLUDE_CMATH -#define INCLUDE_UNISTD -#include "dcmtk/ofstd/ofstdinc.h" - BEGIN_EXTERN_C #ifdef HAVE_SYS_TYPES_H #include /* for fork */ @@ -2004,9 +1998,16 @@ { if ((filename != NULL) && (pHandle != NULL)) { - const char *pos; - if (((pos = strrchr(filename, OFstatic_cast(int, PATH_SEPARATOR))) == NULL) || // check whether image file resides in index.dat directory - (strncmp(filename, pHandle->getStorageArea(), pos - filename) == 0)) + const char *pos = strrchr(filename, OFstatic_cast(int, PATH_SEPARATOR)); +#ifdef _WIN32 + // Windows accepts both backslash and forward slash as path separators. + const char *pos2 = strrchr(filename, OFstatic_cast(int, '/')); + + // if pos2 points to a character closer to the end of the string, use this instead of strPos + if ((pos == NULL) || ((pos2 != NULL) && (pos2 > pos))) pos = pos2; +#endif + // check whether image file resides in index.dat directory + if ((pos == NULL) || (strncmp(filename, pHandle->getStorageArea(), pos - filename) == 0)) { // DB_deleteImageFile((/*const */char *)filename); if (unlink(filename) == 0) @@ -2725,6 +2726,8 @@ if (EC_Normal==status) status = DVPSHelper::putStringValue(dataset, DCM_InstanceCreationDate, aString.c_str()); DVPSHelper::currentTime(aString); if (EC_Normal==status) status = DVPSHelper::putStringValue(dataset, DCM_InstanceCreationTime, aString.c_str()); + const char *specificCharSet = pState->getCharsetString(); + if (status.good() && specificCharSet) status = DVPSHelper::putStringValue(dataset, DCM_SpecificCharacterSet, specificCharSet); // Hardcopy Grayscale Image Module if (EC_Normal==status) status = DVPSHelper::putStringValue(dataset, DCM_PhotometricInterpretation, "MONOCHROME2"); diff -Nru dcmtk-3.6.6/dcmpstat/libsrc/dvpscf.cc dcmtk-3.6.7/dcmpstat/libsrc/dvpscf.cc --- dcmtk-3.6.6/dcmpstat/libsrc/dvpscf.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmpstat/libsrc/dvpscf.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1998-2018, OFFIS e.V. + * Copyright (C) 1998-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -26,11 +26,6 @@ #include "dcmtk/dcmpstat/dvpsdef.h" /* for constants */ #include "dcmtk/ofstd/ofstd.h" /* for class OFStandard */ -#define INCLUDE_CSTDIO -#define INCLUDE_CSTRING -#define INCLUDE_CCTYPE -#include "dcmtk/ofstd/ofstdinc.h" - #ifndef HAVE_WINDOWS_H /* some Unix operating systems do not define a prototype for strncasecmp * although the function is known. @@ -181,7 +176,7 @@ Uint32 result = 0; if (*str) result++; char c; - while ((c = *str++)) if (c == '\\') result++; + while ((c = *str++) != '\0') if (c == '\\') result++; return result; } return 0; diff -Nru dcmtk-3.6.6/dcmpstat/libsrc/dvpsda.cc dcmtk-3.6.7/dcmpstat/libsrc/dvpsda.cc --- dcmtk-3.6.6/dcmpstat/libsrc/dvpsda.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmpstat/libsrc/dvpsda.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1998-2018, OFFIS e.V. + * Copyright (C) 1998-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -30,9 +30,6 @@ #include "dcmtk/ofstd/ofstd.h" #include "dcmtk/dcmpstat/dvpsrs.h" /* for DVPSReferencedSeries, needed by MSVC5 with STL */ -#define INCLUDE_CSTRING -#include "dcmtk/ofstd/ofstdinc.h" - /* --------------- class DVPSDisplayedArea --------------- */ DVPSDisplayedArea::DVPSDisplayedArea() diff -Nru dcmtk-3.6.6/dcmpstat/libsrc/dvpsfs.cc dcmtk-3.6.7/dcmpstat/libsrc/dvpsfs.cc --- dcmtk-3.6.6/dcmpstat/libsrc/dvpsfs.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmpstat/libsrc/dvpsfs.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1998-2018, OFFIS e.V. + * Copyright (C) 1998-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -48,13 +48,10 @@ #include "dcmtk/dcmpstat/dvpsri.h" /* for DVPSReferencedImage, needed by MSVC5 with STL */ -#define INCLUDE_CSTRING -#include "dcmtk/ofstd/ofstdinc.h" - /* --------------- class DVPSFilmSession --------------- */ DVPSFilmSession::DVPSFilmSession(Uint16 illumin, Uint16 reflection) -: sopInstanceUID(NULL) +: sopInstanceUID() , numberOfCopies(DCM_NumberOfCopies) , printPriority(DCM_PrintPriority) , mediumType(DCM_MediumType) @@ -797,8 +794,15 @@ DcmElement *delem=NULL; OFCondition result = EC_Normal; - ADD_TO_DATASET(DcmUnsignedShort, illumination) - ADD_TO_DATASET(DcmUnsignedShort, reflectedAmbientLight) + if (illumination.getLength() > 0) + { + ADD_TO_DATASET(DcmUnsignedShort, illumination) + } + + if (reflectedAmbientLight.getLength() > 0) + { + ADD_TO_DATASET(DcmUnsignedShort, reflectedAmbientLight) + } if (referencedPresentationLUTInstanceUID.getLength() > 0) { diff -Nru dcmtk-3.6.6/dcmpstat/libsrc/dvpsgl.cc dcmtk-3.6.7/dcmpstat/libsrc/dvpsgl.cc --- dcmtk-3.6.6/dcmpstat/libsrc/dvpsgl.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmpstat/libsrc/dvpsgl.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1998-2018, OFFIS e.V. + * Copyright (C) 1998-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -24,8 +24,6 @@ #include "dcmtk/dcmpstat/dvpsgl.h" #include "dcmtk/dcmpstat/dvpsdef.h" /* for constants and macros */ -#define INCLUDE_CSTDIO -#include "dcmtk/ofstd/ofstdinc.h" /* --------------- class DVPSGraphicLayer --------------- */ diff -Nru dcmtk-3.6.6/dcmpstat/libsrc/dvpshlp.cc dcmtk-3.6.7/dcmpstat/libsrc/dvpshlp.cc --- dcmtk-3.6.6/dcmpstat/libsrc/dvpshlp.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmpstat/libsrc/dvpshlp.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1998-2018, OFFIS e.V. + * Copyright (C) 1998-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -26,11 +26,6 @@ #include "dcmtk/dcmnet/dcompat.h" /* compatibility routines */ #include "dcmtk/dcmdata/dctk.h" -#define INCLUDE_CSTDIO -#define INCLUDE_CERRNO -#define INCLUDE_CTIME -#include "dcmtk/ofstd/ofstdinc.h" - BEGIN_EXTERN_C #ifdef HAVE_SYS_TYPES_H #include /* for fork */ diff -Nru dcmtk-3.6.6/dcmpstat/libsrc/dvpsmsg.cc dcmtk-3.6.7/dcmpstat/libsrc/dvpsmsg.cc --- dcmtk-3.6.6/dcmpstat/libsrc/dvpsmsg.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmpstat/libsrc/dvpsmsg.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1998-2018, OFFIS e.V. + * Copyright (C) 1998-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -288,7 +288,7 @@ #endif OFSockAddr server; OFStandard::getAddressByHostname("localhost", server); - server.setPort(OFstatic_cast(unsigned short, htons(port))); + server.setPort(OFstatic_cast(unsigned short, htons(OFstatic_cast(unsigned short, port)))); if (connect(s, server.getSockaddr(), server.size()) < 0) { diff -Nru dcmtk-3.6.6/dcmpstat/libsrc/dvpspll.cc dcmtk-3.6.7/dcmpstat/libsrc/dvpspll.cc --- dcmtk-3.6.6/dcmpstat/libsrc/dvpspll.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmpstat/libsrc/dvpspll.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1999-2010, OFFIS e.V. + * Copyright (C) 1999-2022, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -42,7 +42,7 @@ OFListConstIterator(DVPSPresentationLUT *) first = arg.list_.begin(); OFListConstIterator(DVPSPresentationLUT *) last = arg.list_.end(); while (first != last) - { + { list_.push_back((*first)->clone()); ++first; } @@ -58,7 +58,7 @@ OFListIterator(DVPSPresentationLUT *) first = list_.begin(); OFListIterator(DVPSPresentationLUT *) last = list_.end(); while (first != last) - { + { delete (*first); first = list_.erase(first); } @@ -71,7 +71,7 @@ DVPSPresentationLUT *newLUT = NULL; DcmSequenceOfItems *dseq=NULL; DcmItem *ditem=NULL; - + if (EC_Normal == dset.search(DCM_RETIRED_PresentationLUTContentSequence, stack, ESM_fromHere, OFFalse)) { dseq=(DcmSequenceOfItems *)stack.top(); @@ -89,8 +89,8 @@ } else result = EC_MemoryExhausted; } } - } - + } + return result; } @@ -101,7 +101,7 @@ OFCondition result = EC_Normal; DcmSequenceOfItems *dseq=NULL; DcmItem *ditem=NULL; - + dseq = new DcmSequenceOfItems(DCM_RETIRED_PresentationLUTContentSequence); if (dseq) { @@ -141,8 +141,8 @@ delete (*first); first = list_.erase(first); } - } - return; + } + return; } DVPSPresentationLUT *DVPSPresentationLUT_PList::findPresentationLUT(const char *instanceUID) @@ -164,14 +164,14 @@ const char *DVPSPresentationLUT_PList::addPresentationLUT(DVPSPresentationLUT *newLUT, OFBool inversePLUT) { if (newLUT == NULL) return NULL; - + DiLookupTable *diLUT = NULL; - const char *result = NULL; + const char *result = NULL; - // 'INVERSE' LUT shape is undefined for Print and has already + // 'INVERSE' LUT shape is undefined for Print and has already // been rendered into the bitmap at this stage. DVPSPresentationLUTType lutType = newLUT->getType(); - if (lutType == DVPSP_inverse) lutType = DVPSP_identity; + if (lutType == DVPSP_inverse) lutType = DVPSP_identity; DVPSPresentationLUT *myLUT = newLUT->clone(); if (myLUT) @@ -180,7 +180,7 @@ if (myLUT->getType() == DVPSP_inverse) myLUT->setType(DVPSP_identity); if (lutType == DVPSP_table) { - if (inversePLUT) myLUT->invert(); + if (inversePLUT) myLUT->invert(); diLUT = myLUT->createDiLookupTable(); } } else return NULL; @@ -194,10 +194,10 @@ { if (lutType == DVPSP_table) { - if ((*first)->compareDiLookupTable(diLUT)) - { - result = (*first)->getSOPInstanceUID(); - break; + if ((*first)->compareDiLookupTable(diLUT)) + { + result = (*first)->getSOPInstanceUID(); + break; } } else { result = (*first)->getSOPInstanceUID(); @@ -207,13 +207,13 @@ ++first; } delete diLUT; - + if (result) { delete myLUT; return result; } - + // no match, store new LUT char uid[100]; dcmGenerateUniqueIdentifier(uid); @@ -232,7 +232,7 @@ OFBool found = OFFalse; OFString theUID(rq.msg.NDeleteRQ.RequestedSOPInstanceUID); while ((first != last) && (!found)) - { + { if (theUID == (*first)->getSOPInstanceUID()) found = OFTrue; else ++first; } @@ -244,6 +244,6 @@ } else { // presentation LUT does not exist or wrong instance UID DCMPSTAT_WARN("cannot delete presentation LUT with instance UID '" << rq.msg.NDeleteRQ.RequestedSOPInstanceUID << "': object does not exist."); - rsp.msg.NDeleteRSP.DimseStatus = STATUS_N_NoSuchObjectInstance; + rsp.msg.NDeleteRSP.DimseStatus = STATUS_N_NoSuchSOPInstance; } } diff -Nru dcmtk-3.6.6/dcmpstat/libsrc/dvpsprt.cc dcmtk-3.6.7/dcmpstat/libsrc/dvpsprt.cc --- dcmtk-3.6.6/dcmpstat/libsrc/dvpsprt.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmpstat/libsrc/dvpsprt.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2000-2018, OFFIS e.V. + * Copyright (C) 2000-2022, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -767,7 +767,7 @@ } } else { DCMPSTAT_WARN("cannot retrieve printer information, instance UID is not well-known printer SOP instance UID."); - rsp.msg.NGetRSP.DimseStatus = STATUS_N_NoSuchObjectInstance; + rsp.msg.NGetRSP.DimseStatus = STATUS_N_NoSuchSOPInstance; } } @@ -796,7 +796,7 @@ } else { // film session does not exist or wrong instance UID DCMPSTAT_WARN("cannot update film session, object not found."); - rsp.msg.NSetRSP.DimseStatus = STATUS_N_NoSuchObjectInstance; + rsp.msg.NSetRSP.DimseStatus = STATUS_N_NoSuchSOPInstance; } } @@ -818,7 +818,7 @@ } else { // film session does not exist or wrong instance UID DCMPSTAT_WARN("cannot print film session, object not found."); - rsp.msg.NActionRSP.DimseStatus = STATUS_N_NoSuchObjectInstance; + rsp.msg.NActionRSP.DimseStatus = STATUS_N_NoSuchSOPInstance; } } @@ -909,7 +909,7 @@ } else { // no film session, refuse n-create DCMPSTAT_WARN("cannot create film box without film session."); - rsp.msg.NCreateRSP.DimseStatus = STATUS_N_InvalidObjectInstance; + rsp.msg.NCreateRSP.DimseStatus = STATUS_N_InvalidSOPInstance; rsp.msg.NCreateRSP.opts = 0; // don't include affected SOP instance UID } } @@ -956,7 +956,7 @@ } else { // film session does not exist or wrong instance UID DCMPSTAT_WARN("cannot delete film session with instance UID '" << rq.msg.NDeleteRQ.RequestedSOPInstanceUID << "': object does not exist."); - rsp.msg.NDeleteRSP.DimseStatus = STATUS_N_NoSuchObjectInstance; + rsp.msg.NDeleteRSP.DimseStatus = STATUS_N_NoSuchSOPInstance; } } diff -Nru dcmtk-3.6.6/dcmpstat/libsrc/dvpsri.cc dcmtk-3.6.7/dcmpstat/libsrc/dvpsri.cc --- dcmtk-3.6.6/dcmpstat/libsrc/dvpsri.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmpstat/libsrc/dvpsri.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1998-2018, OFFIS e.V. + * Copyright (C) 1998-2021, 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/dcmpstat/dvpsri.h" #include "dcmtk/dcmpstat/dvpsdef.h" /* for constants and macros */ -#define INCLUDE_CSTDIO -#include "dcmtk/ofstd/ofstdinc.h" - - /* --------------- class DVPSReferencedImage --------------- */ DVPSReferencedImage::DVPSReferencedImage() diff -Nru dcmtk-3.6.6/dcmpstat/libsrc/dvpssp.cc dcmtk-3.6.7/dcmpstat/libsrc/dvpssp.cc --- dcmtk-3.6.6/dcmpstat/libsrc/dvpssp.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmpstat/libsrc/dvpssp.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1998-2019, OFFIS e.V. + * Copyright (C) 1998-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -46,9 +46,7 @@ #include "dcmtk/dcmpstat/dvpsgr.h" /* for DVPSGraphicObject, needed by MSVC5 with STL */ #include "dcmtk/dcmpstat/dvpsri.h" /* for DVPSReferencedImage, needed by MSVC5 with STL */ -#define INCLUDE_CMATH -#define INCLUDE_CTIME -#include "dcmtk/ofstd/ofstdinc.h" +#include #define DIMSE_STATUS_OK(status) (((status) == 0) || DICOM_WARNING_STATUS(status)) #define DIMSE_STATUS_BAD(status) (((status) != 0) && !(DICOM_WARNING_STATUS(status))) @@ -1383,8 +1381,15 @@ DcmElement *delem=NULL; OFCondition result = EC_Normal; - ADD_TO_DATASET(DcmUnsignedShort, illumination) - ADD_TO_DATASET(DcmUnsignedShort, reflectedAmbientLight) + if (illumination.getLength() > 0) + { + ADD_TO_DATASET(DcmUnsignedShort, illumination) + } + + if (reflectedAmbientLight.getLength() > 0) + { + ADD_TO_DATASET(DcmUnsignedShort, reflectedAmbientLight) + } if (presentationLUTInstanceUID.size() > 0) { @@ -1431,6 +1436,12 @@ // add illumination and reflection, and presentation LUT reference if necessary. if ((printHandler.printerSupportsPresentationLUT()) && plutInSession) result = addPresentationLUTReference(dset); + if (result.good() && (specificCharacterSet.getLength() > 0)) + { + DcmElement *delem=NULL; + ADD_TO_DATASET(DcmCodeString, specificCharacterSet) + } + if (result==EC_Normal) { OFCondition cond = printHandler.createRQ(UID_BasicFilmSessionSOPClass, filmSessionInstanceUID, &dset, status, attributeListOut); diff -Nru dcmtk-3.6.6/dcmpstat/libsrc/dvpsspl.cc dcmtk-3.6.7/dcmpstat/libsrc/dvpsspl.cc --- dcmtk-3.6.6/dcmpstat/libsrc/dvpsspl.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmpstat/libsrc/dvpsspl.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1998-2010, OFFIS e.V. + * Copyright (C) 1998-2022, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -113,7 +113,7 @@ } else { // film box does not exist or wrong instance UID DCMPSTAT_WARN("cannot update film box, object not found."); - rsp.msg.NSetRSP.DimseStatus = STATUS_N_NoSuchObjectInstance; + rsp.msg.NSetRSP.DimseStatus = STATUS_N_NoSuchSOPInstance; } } @@ -142,7 +142,7 @@ DcmFileFormat imageFile; DcmDataset *imageDataset = imageFile.getDataset(); - if (newib->printSCPSet(cfg, cfgname, rqDataset, rsp, rspDataset, *imageDataset, + if (newib->printSCPSet(cfg, cfgname, rqDataset, rsp, rspDataset, *imageDataset, sp->getReferencedPresentationLUTAlignment(), presentationLUTnegotiated)) { if (EC_Normal == sp->writeHardcopyImageAttributes(*imageDataset)) @@ -174,7 +174,7 @@ } else { // image box does not exist or wrong instance UID DCMPSTAT_WARN("cannot update basic grayscale image box, object not found."); - rsp.msg.NSetRSP.DimseStatus = STATUS_N_NoSuchObjectInstance; + rsp.msg.NSetRSP.DimseStatus = STATUS_N_NoSuchSOPInstance; } } @@ -224,7 +224,7 @@ } else { // film box does not exist or wrong instance UID DCMPSTAT_WARN("cannot print film box, object not found."); - rsp.msg.NActionRSP.DimseStatus = STATUS_N_NoSuchObjectInstance; + rsp.msg.NActionRSP.DimseStatus = STATUS_N_NoSuchSOPInstance; } } @@ -293,7 +293,7 @@ } else { // film box does not exist or wrong instance UID DCMPSTAT_WARN("cannot delete film box with instance UID '" << rq.msg.NDeleteRQ.RequestedSOPInstanceUID << "': object does not exist."); - rsp.msg.NDeleteRSP.DimseStatus = STATUS_N_NoSuchObjectInstance; + rsp.msg.NDeleteRSP.DimseStatus = STATUS_N_NoSuchSOPInstance; } } @@ -329,12 +329,12 @@ { OFBool result = OFTrue; OFListConstIterator(DVPSStoredPrint *) first = list_.begin(); - OFListConstIterator(DVPSStoredPrint *) last = list_.end(); + OFListConstIterator(DVPSStoredPrint *) last = list_.end(); while (first != last) { result = result && (*first)->matchesPresentationLUT(align); ++first; - } + } return result; } @@ -345,7 +345,7 @@ DVPSPrintPresentationLUTAlignment newAlignment) { OFListIterator(DVPSStoredPrint *) first = list_.begin(); - OFListIterator(DVPSStoredPrint *) last = list_.end(); + OFListIterator(DVPSStoredPrint *) last = list_.end(); while (first != last) { (*first)->overridePresentationLUTSettings(newIllumination, newReflectedAmbientLight, newReferencedPLUT, newAlignment); diff -Nru dcmtk-3.6.6/dcmpstat/libsrc/dvpssvl.cc dcmtk-3.6.7/dcmpstat/libsrc/dvpssvl.cc --- dcmtk-3.6.6/dcmpstat/libsrc/dvpssvl.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmpstat/libsrc/dvpssvl.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1999-2018, OFFIS e.V. + * Copyright (C) 1999-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -285,7 +285,8 @@ if (haveWindow && ((voiActivation==DVPSV_preferVOIWindow)||(! haveLUT))) { // create VOI window - Float64 wc, ww; + Float64 wc = 0.0; + Float64 ww = 0.0; char *wexp = NULL; result = windowCenter.getFloat64(wc,0); if (EC_Normal==result) result = windowWidth.getFloat64(ww,0); diff -Nru dcmtk-3.6.6/dcmpstat/libsrc/dvpstat.cc dcmtk-3.6.7/dcmpstat/libsrc/dvpstat.cc --- dcmtk-3.6.6/dcmpstat/libsrc/dvpstat.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmpstat/libsrc/dvpstat.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1998-2017, OFFIS e.V. + * Copyright (C) 1998-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -44,14 +44,6 @@ #include "dcmtk/dcmpstat/dvpstx.h" /* for DVPSTextObject, needed by MSVC5 with STL */ #include "dcmtk/dcmpstat/dvpsgr.h" /* for DVPSGraphicObject, needed by MSVC5 with STL */ -#define INCLUDE_CSTDLIB -#define INCLUDE_CSTDIO -#define INCLUDE_CSTRING -#define INCLUDE_CMATH -#define INCLUDE_CTIME -#define INCLUDE_LIBC -#define INCLUDE_UNISTD -#include "dcmtk/ofstd/ofstdinc.h" /* --------------- class DVPresentationState --------------- */ @@ -1088,7 +1080,8 @@ signed long firstMapped = 0; if (haveActiveVOIWindow()) // use active VOI window to specify the LUT descriptor { - double ww, wc; + double ww = 0.0; + double wc = 0.0; if ((getCurrentWindowWidth(ww) == EC_Normal) && (getCurrentWindowCenter(wc) == EC_Normal)) { if (ww <= 65536) @@ -1554,8 +1547,8 @@ /* remove all external overlays that are not active as overlay or bitmap shutter */ for (unsigned int remgroup=0x6000; remgroup <= 0x601F; remgroup += 2) { - if ((remgroup != bitmapShutterGroup)&&((! overlayList.haveOverlayGroup(remgroup))|| - (NULL == activationLayerList.getActivationLayer(remgroup)))) + if ((remgroup != bitmapShutterGroup)&&((! overlayList.haveOverlayGroup(OFstatic_cast(Uint16, remgroup)))|| + (NULL == activationLayerList.getActivationLayer(OFstatic_cast(Uint16, remgroup))))) { currentImage->removeOverlay(remgroup); // ignore return value. } diff -Nru dcmtk-3.6.6/dcmpstat/libsrc/dvpstx.cc dcmtk-3.6.7/dcmpstat/libsrc/dvpstx.cc --- dcmtk-3.6.6/dcmpstat/libsrc/dvpstx.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmpstat/libsrc/dvpstx.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1998-2018, OFFIS e.V. + * Copyright (C) 1998-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -25,9 +25,6 @@ #include "dcmtk/ofstd/ofstring.h" #include "dcmtk/dcmpstat/dvpsdef.h" /* for constants and macros */ -#define INCLUDE_CSTRING -#include "dcmtk/ofstd/ofstdinc.h" - /* --------------- class DVPSTextObject --------------- */ diff -Nru dcmtk-3.6.6/dcmpstat/libsrc/dvpsvw.cc dcmtk-3.6.7/dcmpstat/libsrc/dvpsvw.cc --- dcmtk-3.6.6/dcmpstat/libsrc/dvpsvw.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmpstat/libsrc/dvpsvw.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1998-2017, OFFIS e.V. + * Copyright (C) 1998-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -25,9 +25,6 @@ #include "dcmtk/dcmdata/dctk.h" #include "dcmtk/ofstd/ofstd.h" -#define INCLUDE_CSTDIO -#include "dcmtk/ofstd/ofstdinc.h" - /* --------------- class DVPSVOIWindow --------------- */ DVPSVOIWindow::DVPSVOIWindow() diff -Nru dcmtk-3.6.6/dcmpstat/libsrc/dvsighdl.cc dcmtk-3.6.7/dcmpstat/libsrc/dvsighdl.cc --- dcmtk-3.6.6/dcmpstat/libsrc/dvsighdl.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmpstat/libsrc/dvsighdl.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2001-2020, OFFIS e.V. + * Copyright (C) 2001-2021, 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/dcmsign/sitypes.h" #include "dcmtk/dcmsign/sinullpr.h" #include "dcmtk/dcmsign/siprivat.h" -#include "dcmtk/dcmsign/siripemd.h" +#include "dcmtk/dcmsign/simdmac.h" #include "dcmtk/ofstd/ofstream.h" @@ -333,7 +333,7 @@ cert->getCertValidityNotAfter(aString); os << aString.c_str() << htmlEndl << htmlLine4 << "Public key" << htmlNext; - const char *ecname = NULL; + OFString ecname; switch (cert->getKeyType()) { case EKT_RSA: @@ -344,7 +344,7 @@ break; case EKT_EC: ecname = cert->getCertCurveName(); - if (ecname) + if (ecname.length() > 0) { os << "EC, curve " << ecname << ", " << cert->getCertKeyBits() << " bits"; } @@ -825,7 +825,7 @@ if (! key.matchesCertificate(cert)) return EC_IllegalCall; // private key does not match certificate DcmSignature signer; - SiRIPEMD160 mac; + SiMDMAC mac(EMT_RIPEMD160); SiNullProfile nullProfile; DVSignatureHandlerSignatureProfile mainProfile(attributesNotToSignInMainDataset); diff -Nru dcmtk-3.6.6/dcmpstat/libsrc/Makefile.dep dcmtk-3.6.7/dcmpstat/libsrc/Makefile.dep --- dcmtk-3.6.6/dcmpstat/libsrc/Makefile.dep 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmpstat/libsrc/Makefile.dep 2022-04-28 13:47:25.000000000 +0000 @@ -132,13 +132,13 @@ dviface.o: dviface.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmpstat/dviface.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../include/dcmtk/dcmpstat/dvpscf.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.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 \ ../../oflog/include/dcmtk/oflog/oflog.h \ ../../oflog/include/dcmtk/oflog/logger.h \ ../../oflog/include/dcmtk/oflog/config.h \ @@ -261,7 +261,6 @@ ../../ofstd/include/dcmtk/ofstd/ofconsol.h \ ../../dcmnet/include/dcmtk/dcmnet/dndefine.h \ ../../dcmnet/include/dcmtk/dcmnet/dcompat.h \ - ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \ ../../dcmdata/include/dcmtk/dcmdata/dcspchrs.h \ ../../ofstd/include/dcmtk/ofstd/ofchrenc.h \ ../../dcmqrdb/include/dcmtk/dcmqrdb/dcmqrdbi.h \ @@ -276,6 +275,7 @@ ../../dcmnet/include/dcmtk/dcmnet/assoc.h \ ../../ofstd/include/dcmtk/ofstd/offname.h \ ../include/dcmtk/dcmpstat/dvcache.h ../include/dcmtk/dcmpstat/dvpsdef.h \ + ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \ ../../dcmimgle/include/dcmtk/dcmimgle/digsdfn.h \ ../../dcmimgle/include/dcmtk/dcmimgle/didispfn.h \ ../../dcmimgle/include/dcmtk/dcmimgle/didefine.h \ @@ -360,20 +360,20 @@ ../../dcmqrdb/include/dcmtk/dcmqrdb/dcmqrdbs.h \ ../../dcmtls/include/dcmtk/dcmtls/tlstrans.h \ ../../dcmnet/include/dcmtk/dcmnet/dcmtrans.h \ - ../../dcmnet/include/dcmtk/dcmnet/dcmlayer.h \ ../../dcmtls/include/dcmtk/dcmtls/tlsdefin.h \ ../../dcmtls/include/dcmtk/dcmtls/tlslayer.h \ + ../../dcmnet/include/dcmtk/dcmnet/dcmlayer.h \ ../../dcmtls/include/dcmtk/dcmtls/tlsciphr.h dvpsab.o: dvpsab.cc ../../config/include/dcmtk/config/osconfig.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \ ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.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 \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ @@ -432,12 +432,12 @@ ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \ ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.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 \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../include/dcmtk/dcmpstat/dvpsabl.h ../include/dcmtk/dcmpstat/dvpstyp.h \ ../include/dcmtk/dcmpstat/dpdefine.h \ @@ -498,12 +498,12 @@ ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \ ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.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 \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../include/dcmtk/dcmpstat/dvpsal.h \ ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \ @@ -722,13 +722,13 @@ ../../ofstd/include/dcmtk/ofstd/oferror.h dvpscu.o: dvpscu.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmpstat/dvpscu.h ../include/dcmtk/dcmpstat/dvpstyp.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../include/dcmtk/dcmpstat/dpdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \ ../../oflog/include/dcmtk/oflog/oflog.h \ @@ -1018,11 +1018,11 @@ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../include/dcmtk/dcmpstat/dvpstyp.h \ ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ @@ -1133,7 +1133,6 @@ ../include/dcmtk/dcmpstat/dvpsril.h ../include/dcmtk/dcmpstat/dvpsri.h dvpsfs.o: dvpsfs.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmpstat/dvpsfs.h ../include/dcmtk/dcmpstat/dvpstyp.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../include/dcmtk/dcmpstat/dpdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ @@ -1143,6 +1142,7 @@ ../../oflog/include/dcmtk/oflog/oflog.h \ ../../oflog/include/dcmtk/oflog/logger.h \ ../../oflog/include/dcmtk/oflog/config.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../oflog/include/dcmtk/oflog/config/defines.h \ ../../oflog/include/dcmtk/oflog/helpers/threadcf.h \ ../../oflog/include/dcmtk/oflog/loglevel.h \ @@ -1253,7 +1253,6 @@ ../../ofstd/include/dcmtk/ofstd/ofconsol.h \ ../../dcmnet/include/dcmtk/dcmnet/dndefine.h \ ../../dcmnet/include/dcmtk/dcmnet/dcompat.h \ - ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \ ../../dcmnet/include/dcmtk/dcmnet/lst.h \ ../../dcmnet/include/dcmtk/dcmnet/dul.h \ ../../dcmnet/include/dcmtk/dcmnet/extneg.h \ @@ -1998,10 +1997,10 @@ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../dcmdata/include/dcmtk/dcmdata/dcsequen.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ @@ -2050,7 +2049,6 @@ ../../dcmdata/include/dcmtk/dcmdata/dclist.h \ ../include/dcmtk/dcmpstat/dvpsdef.h \ ../../dcmnet/include/dcmtk/dcmnet/dcompat.h \ - ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \ ../../dcmnet/include/dcmtk/dcmnet/dndefine.h \ ../../dcmdata/include/dcmtk/dcmdata/dctk.h \ ../../dcmdata/include/dcmtk/dcmdata/dcswap.h \ @@ -2234,7 +2232,6 @@ ../../ofstd/include/dcmtk/ofstd/ofconsol.h \ ../../dcmnet/include/dcmtk/dcmnet/dndefine.h \ ../../dcmnet/include/dcmtk/dcmnet/dcompat.h \ - ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \ ../../dcmnet/include/dcmtk/dcmnet/lst.h \ ../../dcmnet/include/dcmtk/dcmnet/dul.h \ ../../dcmnet/include/dcmtk/dcmnet/extneg.h \ @@ -2246,7 +2243,6 @@ ../include/dcmtk/dcmpstat/dvpspl.h dvpsibl.o: dvpsibl.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmpstat/dvpsibl.h ../include/dcmtk/dcmpstat/dvpstyp.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../include/dcmtk/dcmpstat/dpdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ @@ -2254,6 +2250,7 @@ ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ @@ -2367,7 +2364,6 @@ ../../ofstd/include/dcmtk/ofstd/ofconsol.h \ ../../dcmnet/include/dcmtk/dcmnet/dndefine.h \ ../../dcmnet/include/dcmtk/dcmnet/dcompat.h \ - ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \ ../../dcmnet/include/dcmtk/dcmnet/lst.h \ ../../dcmnet/include/dcmtk/dcmnet/dul.h \ ../../dcmnet/include/dcmtk/dcmnet/extneg.h \ @@ -2377,17 +2373,16 @@ ../include/dcmtk/dcmpstat/dvpshlp.h dvpsmsg.o: dvpsmsg.cc ../../config/include/dcmtk/config/osconfig.h \ ../../dcmnet/include/dcmtk/dcmnet/dcompat.h \ - ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \ - ../../ofstd/include/dcmtk/ofstd/ofcast.h \ + ../../dcmnet/include/dcmtk/dcmnet/dndefine.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 \ - ../../dcmnet/include/dcmtk/dcmnet/dndefine.h \ ../include/dcmtk/dcmpstat/dvpsmsg.h ../include/dcmtk/dcmpstat/dpdefine.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 \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../oflog/include/dcmtk/oflog/config/defines.h \ ../../oflog/include/dcmtk/oflog/helpers/threadcf.h \ ../../oflog/include/dcmtk/oflog/loglevel.h \ @@ -2414,6 +2409,7 @@ ../../oflog/include/dcmtk/oflog/helpers/snprintf.h \ ../../oflog/include/dcmtk/oflog/tracelog.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ + ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \ ../../dcmdata/include/dcmtk/dcmdata/dcswap.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ @@ -2422,7 +2418,6 @@ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../dcmnet/include/dcmtk/dcmnet/dcmtrans.h \ - ../../dcmnet/include/dcmtk/dcmnet/dcmlayer.h \ ../../dcmnet/include/dcmtk/dcmnet/dntypes.h \ ../../ofstd/include/dcmtk/ofstd/ofsockad.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ @@ -2666,12 +2661,12 @@ ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \ ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.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 \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../../dcmdata/include/dcmtk/dcmdata/dcsequen.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ @@ -2732,7 +2727,6 @@ ../../ofstd/include/dcmtk/ofstd/ofconsol.h \ ../../dcmnet/include/dcmtk/dcmnet/dndefine.h \ ../../dcmnet/include/dcmtk/dcmnet/dcompat.h \ - ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \ ../../dcmdata/include/dcmtk/dcmdata/dcuid.h \ ../../dcmnet/include/dcmtk/dcmnet/lst.h \ ../../dcmnet/include/dcmtk/dcmnet/dul.h \ @@ -2830,7 +2824,6 @@ ../../ofstd/include/dcmtk/ofstd/ofconsol.h \ ../../dcmnet/include/dcmtk/dcmnet/dndefine.h \ ../../dcmnet/include/dcmtk/dcmnet/dcompat.h \ - ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \ ../../dcmdata/include/dcmtk/dcmdata/dcuid.h \ ../../dcmnet/include/dcmtk/dcmnet/lst.h \ ../../dcmnet/include/dcmtk/dcmnet/dul.h \ @@ -2841,13 +2834,13 @@ ../../dcmdata/include/dcmtk/dcmdata/dcdatset.h dvpspll.o: dvpspll.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmpstat/dvpspll.h ../include/dcmtk/dcmpstat/dvpstyp.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../include/dcmtk/dcmpstat/dpdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ ../../ofstd/include/dcmtk/ofstd/oflist.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../../dcmnet/include/dcmtk/dcmnet/dimse.h \ ../../dcmnet/include/dcmtk/dcmnet/dicom.h \ @@ -2860,7 +2853,6 @@ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../../dcmnet/include/dcmtk/dcmnet/dndefine.h \ ../../dcmnet/include/dcmtk/dcmnet/dcompat.h \ - ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \ ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \ ../../oflog/include/dcmtk/oflog/oflog.h \ ../../oflog/include/dcmtk/oflog/logger.h \ @@ -3027,7 +3019,6 @@ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../../dcmnet/include/dcmtk/dcmnet/dndefine.h \ ../../dcmnet/include/dcmtk/dcmnet/dcompat.h \ - ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \ ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \ ../../dcmdata/include/dcmtk/dcmdata/dcuid.h \ ../../dcmnet/include/dcmtk/dcmnet/lst.h \ @@ -3050,13 +3041,13 @@ ../../dcmdata/include/dcmtk/dcmdata/dcpcache.h dvpsprt.o: dvpsprt.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../include/dcmtk/dcmpstat/dvpsprt.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.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 \ ../include/dcmtk/dcmpstat/dvpstyp.h ../include/dcmtk/dcmpstat/dvpspll.h \ ../include/dcmtk/dcmpstat/dpdefine.h \ ../../ofstd/include/dcmtk/ofstd/oflist.h \ @@ -3070,7 +3061,6 @@ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../../dcmnet/include/dcmtk/dcmnet/dndefine.h \ ../../dcmnet/include/dcmtk/dcmnet/dcompat.h \ - ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \ ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \ ../../oflog/include/dcmtk/oflog/oflog.h \ ../../oflog/include/dcmtk/oflog/logger.h \ @@ -3214,12 +3204,12 @@ ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \ ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.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 \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ @@ -3275,12 +3265,12 @@ ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \ ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.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 \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../../dcmdata/include/dcmtk/dcmdata/dcsequen.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ @@ -3343,12 +3333,12 @@ ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \ ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.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 \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../include/dcmtk/dcmpstat/dvpsrs.h ../include/dcmtk/dcmpstat/dvpsril.h \ ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \ @@ -3408,12 +3398,12 @@ ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \ ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.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 \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../../dcmdata/include/dcmtk/dcmdata/dcsequen.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ @@ -3475,12 +3465,12 @@ dvpssp.o: dvpssp.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmpstat/dvpssp.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.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 \ ../include/dcmtk/dcmpstat/dvpstyp.h ../include/dcmtk/dcmpstat/dvpspll.h \ ../include/dcmtk/dcmpstat/dpdefine.h \ ../../ofstd/include/dcmtk/ofstd/oflist.h \ @@ -3494,7 +3484,6 @@ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../../dcmnet/include/dcmtk/dcmnet/dndefine.h \ ../../dcmnet/include/dcmtk/dcmnet/dcompat.h \ - ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \ ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \ ../../oflog/include/dcmtk/oflog/oflog.h \ ../../oflog/include/dcmtk/oflog/logger.h \ @@ -3642,13 +3631,13 @@ ../include/dcmtk/dcmpstat/dvpsgr.h ../include/dcmtk/dcmpstat/dvpsri.h dvpsspl.o: dvpsspl.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmpstat/dvpsspl.h ../include/dcmtk/dcmpstat/dvpstyp.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../include/dcmtk/dcmpstat/dpdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ ../../ofstd/include/dcmtk/ofstd/oflist.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrus.h \ ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \ @@ -3698,7 +3687,6 @@ ../../ofstd/include/dcmtk/ofstd/ofconsol.h \ ../../dcmnet/include/dcmtk/dcmnet/dndefine.h \ ../../dcmnet/include/dcmtk/dcmnet/dcompat.h \ - ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \ ../../dcmdata/include/dcmtk/dcmdata/dcuid.h \ ../../dcmnet/include/dcmtk/dcmnet/lst.h \ ../../dcmnet/include/dcmtk/dcmnet/dul.h \ @@ -3803,12 +3791,12 @@ ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \ ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.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 \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../../dcmdata/include/dcmtk/dcmdata/dcsequen.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ @@ -3875,12 +3863,12 @@ ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \ ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.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 \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../../dcmdata/include/dcmtk/dcmdata/dcsequen.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ @@ -3942,6 +3930,7 @@ ../../dcmdata/include/dcmtk/dcmdata/dcvris.h dvpstat.o: dvpstat.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../include/dcmtk/dcmpstat/dvpstat.h ../include/dcmtk/dcmpstat/dcmpstat.h \ ../../dcmdata/include/dcmtk/dcmdata/dctk.h \ ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \ @@ -3951,7 +3940,6 @@ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../oflog/include/dcmtk/oflog/config/defines.h \ ../../oflog/include/dcmtk/oflog/helpers/threadcf.h \ ../../oflog/include/dcmtk/oflog/loglevel.h \ @@ -4324,13 +4312,13 @@ ../include/dcmtk/dcmpstat/dvpstyp.h dvpsvl.o: dvpsvl.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmpstat/dvpsvl.h ../include/dcmtk/dcmpstat/dvpstyp.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../include/dcmtk/dcmpstat/dpdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../../dcmdata/include/dcmtk/dcmdata/dctk.h \ ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \ @@ -4445,10 +4433,10 @@ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ @@ -4561,9 +4549,9 @@ ../../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/ofstring.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ @@ -4675,12 +4663,12 @@ ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \ ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.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 \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrlo.h \ ../../dcmdata/include/dcmtk/dcmdata/dcchrstr.h \ @@ -4735,12 +4723,12 @@ ../include/dcmtk/dcmpstat/dvpsvw.h ../include/dcmtk/dcmpstat/dvpsdef.h dvsighdl.o: dvsighdl.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmpstat/dvsighdl.h ../include/dcmtk/dcmpstat/dvpstyp.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../include/dcmtk/dcmpstat/dpdefine.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/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ ../../dcmsign/include/dcmtk/dcmsign/sicertvf.h \ @@ -4803,5 +4791,5 @@ ../../dcmsign/include/dcmtk/dcmsign/sinullpr.h \ ../../dcmsign/include/dcmtk/dcmsign/sisprof.h \ ../../dcmsign/include/dcmtk/dcmsign/siprivat.h \ - ../../dcmsign/include/dcmtk/dcmsign/siripemd.h \ + ../../dcmsign/include/dcmtk/dcmsign/simdmac.h \ ../../dcmsign/include/dcmtk/dcmsign/simac.h diff -Nru dcmtk-3.6.6/dcmpstat/tests/CMakeLists.txt dcmtk-3.6.7/dcmpstat/tests/CMakeLists.txt --- dcmtk-3.6.6/dcmpstat/tests/CMakeLists.txt 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmpstat/tests/CMakeLists.txt 2022-04-28 13:47:25.000000000 +0000 @@ -1,5 +1,5 @@ # declare executables -DCMTK_ADD_EXECUTABLE(msgserv msgserv) +DCMTK_ADD_EXECUTABLE(msgserv msgserv.cc) # 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 -Nru dcmtk-3.6.6/dcmpstat/tests/Makefile.dep dcmtk-3.6.7/dcmpstat/tests/Makefile.dep --- dcmtk-3.6.6/dcmpstat/tests/Makefile.dep 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmpstat/tests/Makefile.dep 2022-04-28 13:47:25.000000000 +0000 @@ -1,5 +1,4 @@ msgserv.o: msgserv.cc ../../config/include/dcmtk/config/osconfig.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../include/dcmtk/dcmpstat/dvpsmsg.h ../include/dcmtk/dcmpstat/dpdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ @@ -8,6 +7,7 @@ ../../oflog/include/dcmtk/oflog/oflog.h \ ../../oflog/include/dcmtk/oflog/logger.h \ ../../oflog/include/dcmtk/oflog/config.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../oflog/include/dcmtk/oflog/config/defines.h \ ../../oflog/include/dcmtk/oflog/helpers/threadcf.h \ ../../oflog/include/dcmtk/oflog/loglevel.h \ @@ -50,12 +50,10 @@ ../../ofstd/include/dcmtk/ofstd/ofexit.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 \ ../../dcmnet/include/dcmtk/dcmnet/dul.h \ ../../dcmnet/include/dcmtk/dcmnet/extneg.h \ ../../dcmnet/include/dcmtk/dcmnet/dicom.h \ diff -Nru dcmtk-3.6.6/dcmpstat/tests/msgserv.cc dcmtk-3.6.7/dcmpstat/tests/msgserv.cc --- dcmtk-3.6.6/dcmpstat/tests/msgserv.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmpstat/tests/msgserv.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2000-2018, OFFIS e.V. + * Copyright (C) 2000-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -49,10 +49,6 @@ #endif END_EXTERN_C -#define INCLUDE_CSTDLIB -#define INCLUDE_CERRNO -#define INCLUDE_CTIME -#include "dcmtk/ofstd/ofstdinc.h" #include "dcmtk/dcmpstat/dvpsmsg.h" /* for class DVPSIPCMessage */ #include "dcmtk/dcmdata/cmdlnarg.h" /* for prepareCmdLineArgs */ diff -Nru dcmtk-3.6.6/dcmqrdb/apps/CMakeLists.txt dcmtk-3.6.7/dcmqrdb/apps/CMakeLists.txt --- dcmtk-3.6.6/dcmqrdb/apps/CMakeLists.txt 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmqrdb/apps/CMakeLists.txt 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ # declare executables foreach(PROGRAM dcmqrscp dcmqridx dcmqrti) - DCMTK_ADD_EXECUTABLE(${PROGRAM} ${PROGRAM}) + DCMTK_ADD_EXECUTABLE(${PROGRAM} ${PROGRAM}.cc) endforeach() # make sure executables are linked to the corresponding libraries diff -Nru dcmtk-3.6.6/dcmqrdb/apps/dcmqridx.cc dcmtk-3.6.7/dcmqrdb/apps/dcmqridx.cc --- dcmtk-3.6.6/dcmqrdb/apps/dcmqridx.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmqrdb/apps/dcmqridx.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1993-2018, OFFIS e.V. + * Copyright (C) 1993-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -21,11 +21,6 @@ #include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ -#define INCLUDE_CSTDLIB -#define INCLUDE_CSTDIO -#define INCLUDE_CSTRING -#include "dcmtk/ofstd/ofstdinc.h" - #include "dcmtk/ofstd/ofconapp.h" #include "dcmtk/ofstd/ofcmdln.h" #include "dcmtk/dcmdata/dcdict.h" diff -Nru dcmtk-3.6.6/dcmqrdb/apps/dcmqrscp.cc dcmtk-3.6.7/dcmqrdb/apps/dcmqrscp.cc --- dcmtk-3.6.6/dcmqrdb/apps/dcmqrscp.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmqrdb/apps/dcmqrscp.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1993-2019, OFFIS e.V. + * Copyright (C) 1993-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -21,14 +21,6 @@ #include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ -#define INCLUDE_CSTDLIB -#define INCLUDE_CSTDIO -#define INCLUDE_CSTRING -#define INCLUDE_CSTDARG -#define INCLUDE_CTIME -#define INCLUDE_LIBC -#include "dcmtk/ofstd/ofstdinc.h" - BEGIN_EXTERN_C #ifdef HAVE_SYS_FILE_H #include @@ -105,7 +97,7 @@ { if (!isspace(key[ui])) { - key[ui] = toupper(key[ui]); + key[ui] = OFstatic_cast(char, toupper(key[ui])); ++ui; } else key.erase(ui, 1); diff -Nru dcmtk-3.6.6/dcmqrdb/apps/dcmqrti.cc dcmtk-3.6.7/dcmqrdb/apps/dcmqrti.cc --- dcmtk-3.6.6/dcmqrdb/apps/dcmqrti.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmqrdb/apps/dcmqrti.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1993-2017, OFFIS e.V. + * Copyright (C) 1993-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -21,14 +21,6 @@ #include "dcmtk/config/osconfig.h" -#define INCLUDE_CSTDLIB -#define INCLUDE_CSTDIO -#define INCLUDE_CSTRING -#define INCLUDE_CSTDARG -#define INCLUDE_CERRNO -#define INCLUDE_CTIME -#define INCLUDE_CSIGNAL -#include "dcmtk/ofstd/ofstdinc.h" BEGIN_EXTERN_C #ifdef HAVE_SYS_FILE_H #include diff -Nru dcmtk-3.6.6/dcmqrdb/apps/Makefile.dep dcmtk-3.6.7/dcmqrdb/apps/Makefile.dep --- dcmtk-3.6.6/dcmqrdb/apps/Makefile.dep 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmqrdb/apps/Makefile.dep 2022-04-28 13:47:25.000000000 +0000 @@ -1,10 +1,10 @@ dcmqridx.o: dcmqridx.cc ../../config/include/dcmtk/config/osconfig.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.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/ofexbl.h \ @@ -30,7 +30,6 @@ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ ../../dcmnet/include/dcmtk/dcmnet/dndefine.h \ ../../dcmnet/include/dcmtk/dcmnet/dcompat.h \ - ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \ ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \ ../../oflog/include/dcmtk/oflog/oflog.h \ ../../oflog/include/dcmtk/oflog/logger.h \ @@ -79,12 +78,12 @@ ../include/dcmtk/dcmqrdb/dcmqrdbi.h ../include/dcmtk/dcmqrdb/dcmqrdba.h \ ../../ofstd/include/dcmtk/ofstd/offname.h dcmqrscp.o: dcmqrscp.cc ../../config/include/dcmtk/config/osconfig.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.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/ofexbl.h \ @@ -106,7 +105,6 @@ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../../dcmnet/include/dcmtk/dcmnet/dndefine.h \ ../../dcmnet/include/dcmtk/dcmnet/dcompat.h \ - ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \ ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \ ../../oflog/include/dcmtk/oflog/oflog.h \ ../../oflog/include/dcmtk/oflog/logger.h \ @@ -174,12 +172,12 @@ ../../ofstd/include/dcmtk/ofstd/offname.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 \ ../../dcmnet/include/dcmtk/dcmnet/dicom.h \ ../../dcmnet/include/dcmtk/dcmnet/cond.h \ ../../ofstd/include/dcmtk/ofstd/ofconsol.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ @@ -191,7 +189,6 @@ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../../dcmnet/include/dcmtk/dcmnet/dndefine.h \ ../../dcmnet/include/dcmtk/dcmnet/dcompat.h \ - ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \ ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \ ../../oflog/include/dcmtk/oflog/oflog.h \ ../../oflog/include/dcmtk/oflog/logger.h \ diff -Nru dcmtk-3.6.6/dcmqrdb/docs/dcmqridx.man dcmtk-3.6.7/dcmqrdb/docs/dcmqridx.man --- dcmtk-3.6.6/dcmqrdb/docs/dcmqridx.man 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmqrdb/docs/dcmqridx.man 2022-04-28 13:47:25.000000000 +0000 @@ -131,6 +131,6 @@ \section dcmqridx_copyright COPYRIGHT -Copyright (C) 1993-2014 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany. +Copyright (C) 1993-2022 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany. */ diff -Nru dcmtk-3.6.6/dcmqrdb/docs/dcmqrscp.man dcmtk-3.6.7/dcmqrdb/docs/dcmqrscp.man --- dcmtk-3.6.6/dcmqrdb/docs/dcmqrscp.man 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmqrdb/docs/dcmqrscp.man 2022-04-28 13:47:25.000000000 +0000 @@ -857,7 +857,9 @@ PatientRadiationDoseSRStorage 1.2.840.10008.5.1.4.1.1.88.73 PlannedImagingAgentAdministrationSRStorage 1.2.840.10008.5.1.4.1.1.88.74 PerformedImagingAgentAdministrationSRStorage 1.2.840.10008.5.1.4.1.1.88.75 +EnhancedXRayRadiationDoseSRStorage 1.2.840.10008.5.1.4.1.1.88.76 ContentAssessmentResultsStorage 1.2.840.10008.5.1.4.1.1.90.1 +MicroscopyBulkSimpleAnnotationsStorage 1.2.840.10008.5.1.4.1.1.91.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 EncapsulatedSTLStorage 1.2.840.10008.5.1.4.1.1.104.3 @@ -869,6 +871,7 @@ EnhancedPETImageStorage 1.2.840.10008.5.1.4.1.1.130 BasicStructuredDisplayStorage 1.2.840.10008.5.1.4.1.1.131 CTPerformedProcedureProtocolStorage 1.2.840.10008.5.1.4.1.1.200.2 +XAPerformedProcedureProtocolStorage 1.2.840.10008.5.1.4.1.1.200.8 RTImageStorage 1.2.840.10008.5.1.4.1.1.481.1 RTDoseStorage 1.2.840.10008.5.1.4.1.1.481.2 RTStructureSetStorage 1.2.840.10008.5.1.4.1.1.481.3 @@ -889,6 +892,8 @@ TomotherapeuticRadiationRecordStorage 1.2.840.10008.5.1.4.1.1.481.18 CArmPhotonElectronRadiationRecordStorage 1.2.840.10008.5.1.4.1.1.481.19 RoboticRadiationRecordStorage 1.2.840.10008.5.1.4.1.1.481.20 +RTRadiationSetDeliveryInstructionStorage 1.2.840.10008.5.1.4.1.1.481.21 +RTTreatmentPreparationStorage 1.2.840.10008.5.1.4.1.1.481.22 DICOS_CTImageStorage 1.2.840.10008.5.1.4.1.1.501.1 DICOS_DigitalXRayImageStorageForPresentation 1.2.840.10008.5.1.4.1.1.501.2.1 DICOS_DigitalXRayImageStorageForProcessing 1.2.840.10008.5.1.4.1.1.501.2.2 @@ -1093,6 +1098,6 @@ \section dcmqrscp_copyright COPYRIGHT -Copyright (C) 1993-2020 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany. +Copyright (C) 1993-2022 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany. */ diff -Nru dcmtk-3.6.6/dcmqrdb/docs/dcmqrti.man dcmtk-3.6.7/dcmqrdb/docs/dcmqrti.man --- dcmtk-3.6.6/dcmqrdb/docs/dcmqrti.man 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmqrdb/docs/dcmqrti.man 2022-04-28 13:47:25.000000000 +0000 @@ -443,6 +443,6 @@ \section dcmqrti_copyright COPYRIGHT -Copyright (C) 1993-2014 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany. +Copyright (C) 1993-2022 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany. */ diff -Nru dcmtk-3.6.6/dcmqrdb/etc/dcmqrprf.cfg dcmtk-3.6.7/dcmqrdb/etc/dcmqrprf.cfg --- dcmtk-3.6.6/dcmqrdb/etc/dcmqrprf.cfg 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmqrdb/etc/dcmqrprf.cfg 2022-04-28 13:47:25.000000000 +0000 @@ -1,5 +1,5 @@ # -# Copyright (C) 2017-2020, OFFIS e.V. +# Copyright (C) 2017-2021, OFFIS e.V. # All rights reserved. See COPYRIGHT file for details. # # This software and supporting documentation were developed by @@ -247,12 +247,14 @@ # - EncapsulatedMTLStorage # - EncapsulatedOBJStorage # - EncapsulatedSTLStorage +# - EnhancedXRayRadiationDoseSRStorage # - ExtensibleSRStorage # - GrayscalePlanarMPRVolumetricPresentationStateStorage # - HangingProtocolStorage # - LegacyConvertedEnhancedCTImageStorage # - LegacyConvertedEnhancedMRImageStorage # - LegacyConvertedEnhancedPETImageStorage +# - MicroscopyBulkSimpleAnnotationsStorage # - MultichannelRespiratoryWaveformStorage # - MultipleVolumeRenderingVolumetricPresentationStateStorage # - OphthalmicOpticalCoherenceTomographyBscanVolumeAnalysisStorage @@ -269,8 +271,10 @@ # - RTPhysicianIntentStorage # - RTRadiationRecordSetStorage # - RTRadiationSalvageRecordStorage +# - RTRadiationSetDeliveryInstructionStorage # - RTRadiationSetStorage # - RTSegmentAnnotationStorage +# - RTTreatmentPreparationStorage # - SegmentedVolumeRenderingVolumetricPresentationStateStorage # - SimplifiedAdultEchoSRStorage # - SleepElectroencephalogramWaveformStorage @@ -280,6 +284,8 @@ # - VolumeRenderingVolumetricPresentationStateStorage # - WideFieldOphthalmicPhotographyStereographicProjectionImageStorage # - WideFieldOphthalmicPhotography3DCoordinatesImageStorage +# - XADefinedProcedureProtocolStorage +# - XAPerformedProcedureProtocolStorage # # - DICOS_2DAITStorage # - DICOS_3DAITStorage @@ -449,6 +455,8 @@ # - EncapsulatedMTLStorage # - EncapsulatedOBJStorage # - EncapsulatedSTLStorage +# - EnhancedXRayRadiationDoseSRStorage +# - MicroscopyBulkSimpleAnnotationsStorage # - MultichannelRespiratoryWaveformStorage # - MultipleVolumeRenderingVolumetricPresentationStateStorage # - OphthalmicOpticalCoherenceTomographyBscanVolumeAnalysisStorage @@ -463,13 +471,17 @@ # - RTPhysicianIntentStorage # - RTRadiationRecordSetStorage # - RTRadiationSalvageRecordStorage +# - RTRadiationSetDeliveryInstructionStorage # - RTRadiationSetStorage # - RTSegmentAnnotationStorage +# - RTTreatmentPreparationStorage # - SegmentedVolumeRenderingVolumetricPresentationStateStorage # - SleepElectroencephalogramWaveformStorage # - TomotherapeuticRadiationRecordStorage # - TomotherapeuticRadiationStorage # - VolumeRenderingVolumetricPresentationStateStorage +# - XADefinedProcedureProtocolStorage +# - XAPerformedProcedureProtocolStorage # # - RETIRED_HardcopyColorImageStorage # - RETIRED_HardcopyGrayscaleImageStorage @@ -678,6 +690,7 @@ # - EnhancedMRColorImageStorage # - EnhancedPETImageStorage # - EnhancedUSVolumeStorage +# - EnhancedXRayRadiationDoseSRStorage # - ExtensibleSRStorage # - GeneralAudioWaveformStorage # - GenericImplantTemplateStorage @@ -694,6 +707,7 @@ # - LegacyConvertedEnhancedPETImageStorage # - LensometryMeasurementsStorage # - MacularGridThicknessAndVolumeReportStorage +# - MicroscopyBulkSimpleAnnotationsStorage # - MultichannelRespiratoryWaveformStorage # - MultipleVolumeRenderingVolumetricPresentationStateStorage # - OphthalmicAxialMeasurementsStorage @@ -720,8 +734,10 @@ # - RTPhysicianIntentStorage # - RTRadiationRecordSetStorage # - RTRadiationSalvageRecordStorage +# - RTRadiationSetDeliveryInstructionStorage # - RTRadiationSetStorage # - RTSegmentAnnotationStorage +# - RTTreatmentPreparationStorage # - SegmentationStorage # - SegmentedVolumeRenderingVolumetricPresentationStateStorage # - SimplifiedAdultEchoSRStorage @@ -739,6 +755,8 @@ # - VolumeRenderingVolumetricPresentationStateStorage # - WideFieldOphthalmicPhotographyStereographicProjectionImageStorage # - WideFieldOphthalmicPhotography3DCoordinatesImageStorage +# - XADefinedProcedureProtocolStorage +# - XAPerformedProcedureProtocolStorage # - XAXRFGrayscaleSoftcopyPresentationStateStorage # - XRay3DAngiographicImageStorage # - XRay3DCraniofacialImageStorage @@ -927,12 +945,14 @@ # - EncapsulatedMTLStorage # - EncapsulatedOBJStorage # - EncapsulatedSTLStorage +# - EnhancedXRayRadiationDoseSRStorage # - ExtensibleSRStorage # - GrayscalePlanarMPRVolumetricPresentationStateStorage # - HangingProtocolStorage # - LegacyConvertedEnhancedCTImageStorage # - LegacyConvertedEnhancedMRImageStorage # - LegacyConvertedEnhancedPETImageStorage +# - MicroscopyBulkSimpleAnnotationsStorage # - MultichannelRespiratoryWaveformStorage # - MultipleVolumeRenderingVolumetricPresentationStateStorage # - OphthalmicOpticalCoherenceTomographyBscanVolumeAnalysisStorage @@ -950,8 +970,10 @@ # - RTPhysicianIntentStorage # - RTRadiationRecordSetStorage # - RTRadiationSalvageRecordStorage +# - RTRadiationSetDeliveryInstructionStorage # - RTRadiationSetStorage # - RTSegmentAnnotationStorage +# - RTTreatmentPreparationStorage # - SegmentedVolumeRenderingVolumetricPresentationStateStorage # - SimplifiedAdultEchoSRStorage # - SleepElectroencephalogramWaveformStorage @@ -961,6 +983,8 @@ # - VolumeRenderingVolumetricPresentationStateStorage # - WideFieldOphthalmicPhotographyStereographicProjectionImageStorage # - WideFieldOphthalmicPhotography3DCoordinatesImageStorage +# - XADefinedProcedureProtocolStorage +# - XAPerformedProcedureProtocolStorage # # - DICOS_2DAITStorage # - DICOS_3DAITStorage @@ -1118,6 +1142,8 @@ # - EncapsulatedMTLStorage # - EncapsulatedOBJStorage # - EncapsulatedSTLStorage +# - EnhancedXRayRadiationDoseSRStorage +# - MicroscopyBulkSimpleAnnotationsStorage # - MultichannelRespiratoryWaveformStorage # - MultipleVolumeRenderingVolumetricPresentationStateStorage # - OphthalmicOpticalCoherenceTomographyBscanVolumeAnalysisStorage @@ -1132,13 +1158,17 @@ # - RTPhysicianIntentStorage # - RTRadiationRecordSetStorage # - RTRadiationSalvageRecordStorage +# - RTRadiationSetDeliveryInstructionStorage # - RTRadiationSetStorage # - RTSegmentAnnotationStorage +# - RTTreatmentPreparationStorage # - SegmentedVolumeRenderingVolumetricPresentationStateStorage # - SleepElectroencephalogramWaveformStorage # - TomotherapeuticRadiationRecordStorage # - TomotherapeuticRadiationStorage # - VolumeRenderingVolumetricPresentationStateStorage +# - XADefinedProcedureProtocolStorage +# - XAPerformedProcedureProtocolStorage # # - RETIRED_HardcopyColorImageStorage # - RETIRED_HardcopyGrayscaleImageStorage diff -Nru dcmtk-3.6.6/dcmqrdb/include/dcmtk/dcmqrdb/dcmqrcbs.h dcmtk-3.6.7/dcmqrdb/include/dcmtk/dcmqrdb/dcmqrcbs.h --- dcmtk-3.6.6/dcmqrdb/include/dcmtk/dcmqrdb/dcmqrcbs.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmqrdb/include/dcmtk/dcmqrdb/dcmqrcbs.h 2022-04-28 13:47:25.000000000 +0000 @@ -59,7 +59,7 @@ } /** set DIMSE status - * param s new status + * @param s new status */ void setStatus(DIC_US s) { status = s; } diff -Nru dcmtk-3.6.6/dcmqrdb/include/dcmtk/dcmqrdb/dcmqrcnf.h dcmtk-3.6.7/dcmqrdb/include/dcmtk/dcmqrdb/dcmqrcnf.h --- dcmtk-3.6.6/dcmqrdb/include/dcmtk/dcmqrdb/dcmqrcnf.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmqrdb/include/dcmtk/dcmqrdb/dcmqrcnf.h 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1993-2017, OFFIS e.V. + * Copyright (C) 1993-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -24,8 +24,7 @@ #include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ -#define INCLUDE_CSTDIO -#include "dcmtk/ofstd/ofstdinc.h" + #include "dcmtk/ofstd/ofcmdln.h" #include "dcmtk/oflog/oflog.h" #include "dcmtk/dcmqrdb/qrdefine.h" diff -Nru dcmtk-3.6.6/dcmqrdb/include/dcmtk/dcmqrdb/dcmqrdba.h dcmtk-3.6.7/dcmqrdb/include/dcmtk/dcmqrdb/dcmqrdba.h --- dcmtk-3.6.6/dcmqrdb/include/dcmtk/dcmqrdb/dcmqrdba.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmqrdb/include/dcmtk/dcmqrdb/dcmqrdba.h 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1993-2017, OFFIS e.V. + * Copyright (C) 1993-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -24,10 +24,6 @@ #include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ -#define INCLUDE_CSTDLIB -#define INCLUDE_CSTDIO -#define INCLUDE_UNISTD -#include "dcmtk/ofstd/ofstdinc.h" #include "dcmtk/ofstd/ofcond.h" #include "dcmtk/dcmqrdb/qrdefine.h" diff -Nru dcmtk-3.6.6/dcmqrdb/include/dcmtk/dcmqrdb/dcmqrdbi.h dcmtk-3.6.7/dcmqrdb/include/dcmtk/dcmqrdb/dcmqrdbi.h --- dcmtk-3.6.6/dcmqrdb/include/dcmtk/dcmqrdb/dcmqrdbi.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmqrdb/include/dcmtk/dcmqrdb/dcmqrdbi.h 2022-04-28 13:47:25.000000000 +0000 @@ -258,6 +258,7 @@ /** enable/disable the DB quota system (default: enabled) which causes images * to be deleted if certain boundaries (number of studies, bytes per study) are exceeded. + * @param enable weather to disable/enable */ void enableQuotaSystem(OFBool enable); diff -Nru dcmtk-3.6.6/dcmqrdb/include/dcmtk/dcmqrdb/dcmqridx.h dcmtk-3.6.7/dcmqrdb/include/dcmtk/dcmqrdb/dcmqridx.h --- dcmtk-3.6.6/dcmqrdb/include/dcmtk/dcmqrdb/dcmqridx.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmqrdb/include/dcmtk/dcmqrdb/dcmqridx.h 2022-04-28 13:47:25.000000000 +0000 @@ -161,9 +161,13 @@ DB_SerializedTagKey XTag ; private: - /// private undefined copy constructor + /** private undefined copy constructor + * @param copy documented to avoid doxygen warning + */ DB_SmallDcmElmt(const DB_SmallDcmElmt& copy); - /// private undefined copy assignment operator + /** private undefined copy assignment operator + * @param copy documented to avoid doxygen warning + */ DB_SmallDcmElmt& operator=(const DB_SmallDcmElmt& copy); }; @@ -187,9 +191,13 @@ OFoptional utf8Value ; private: - /// private undefined copy constructor + /** private undefined copy constructor + * @param copy documented to avoid doxygen warning + */ DB_ElementList(const DB_ElementList& copy); - /// private undefined copy assignment operator + /** private undefined copy assignment operator + * @param copy documented to avoid doxygen warning + */ DB_ElementList& operator=(const DB_ElementList& copy); }; diff -Nru dcmtk-3.6.6/dcmqrdb/include/dcmtk/dcmqrdb/dcmqrptb.h dcmtk-3.6.7/dcmqrdb/include/dcmtk/dcmqrdb/dcmqrptb.h --- dcmtk-3.6.6/dcmqrdb/include/dcmtk/dcmqrdb/dcmqrptb.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmqrdb/include/dcmtk/dcmqrdb/dcmqrptb.h 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1993-2011, OFFIS e.V. + * Copyright (C) 1993-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -28,9 +28,6 @@ #include "dcmtk/dcmnet/assoc.h" #include "dcmtk/dcmqrdb/qrdefine.h" -#define INCLUDE_CTIME -#include "dcmtk/ofstd/ofstdinc.h" - BEGIN_EXTERN_C #ifdef HAVE_SYS_TIME_H #include @@ -78,6 +75,7 @@ * given aetitle. Used to enforce an ad-hoc rule that allows only * one parallel association to negotiate storage presentation contexts * for each storage area (aetitle) + * @param calledAETitle the given aetitle */ OFBool haveProcessWithWriteAccess(const char *calledAETitle) const; diff -Nru dcmtk-3.6.6/dcmqrdb/libsrc/CMakeLists.txt dcmtk-3.6.7/dcmqrdb/libsrc/CMakeLists.txt --- dcmtk-3.6.6/dcmqrdb/libsrc/CMakeLists.txt 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmqrdb/libsrc/CMakeLists.txt 2022-04-28 13:47:25.000000000 +0000 @@ -1,4 +1,16 @@ # create library from source files -DCMTK_ADD_LIBRARY(dcmqrdb dcmqrcbf dcmqrcbg dcmqrcbm dcmqrcbs dcmqrcnf dcmqrdbi dcmqrdbs dcmqropt dcmqrptb dcmqrsrv dcmqrtis) +DCMTK_ADD_LIBRARY(dcmqrdb + dcmqrcbf.cc + dcmqrcbg.cc + dcmqrcbm.cc + dcmqrcbs.cc + dcmqrcnf.cc + dcmqrdbi.cc + dcmqrdbs.cc + dcmqropt.cc + dcmqrptb.cc + dcmqrsrv.cc + dcmqrtis.cc +) DCMTK_TARGET_LINK_MODULES(dcmqrdb ofstd dcmdata dcmnet) diff -Nru dcmtk-3.6.6/dcmqrdb/libsrc/dcmqrcbf.cc dcmtk-3.6.7/dcmqrdb/libsrc/dcmqrcbf.cc --- dcmtk-3.6.6/dcmqrdb/libsrc/dcmqrcbf.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmqrdb/libsrc/dcmqrcbf.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1993-2017, OFFIS e.V. + * Copyright (C) 1993-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -40,6 +40,7 @@ DcmDataset **responseIdentifiers, DcmDataset **stDetail) { + (void) options_; OFCondition dbcond = EC_Normal; DcmQueryRetrieveDatabaseStatus dbStatus(priorStatus); diff -Nru dcmtk-3.6.6/dcmqrdb/libsrc/dcmqrcbg.cc dcmtk-3.6.7/dcmqrdb/libsrc/dcmqrcbg.cc --- dcmtk-3.6.6/dcmqrdb/libsrc/dcmqrcbg.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmqrdb/libsrc/dcmqrcbg.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1993-2019, OFFIS e.V. + * Copyright (C) 1993-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -287,9 +287,9 @@ char subImgFileName[MAXPATHLEN + 1]; /* sub-operation image file */ /* clear out strings */ - bzero(subImgFileName, sizeof(subImgFileName)); - bzero(subImgSOPClass, sizeof(subImgSOPClass)); - bzero(subImgSOPInstance, sizeof(subImgSOPInstance)); + memset(subImgFileName, 0, sizeof(subImgFileName)); + memset(subImgSOPClass, 0, sizeof(subImgSOPClass)); + memset(subImgSOPInstance, 0, sizeof(subImgSOPInstance)); /* get DB response */ dbcond = dbHandle.nextMoveResponse( diff -Nru dcmtk-3.6.6/dcmqrdb/libsrc/dcmqrcbm.cc dcmtk-3.6.7/dcmqrdb/libsrc/dcmqrcbm.cc --- dcmtk-3.6.6/dcmqrdb/libsrc/dcmqrcbm.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmqrdb/libsrc/dcmqrcbm.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1993-2019, OFFIS e.V. + * Copyright (C) 1993-2022, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -96,7 +96,7 @@ */ cond = buildSubAssociation(request); if (cond == QR_EC_InvalidPeer) { - dbStatus.setStatus(STATUS_MOVE_Failed_MoveDestinationUnknown); + dbStatus.setStatus(STATUS_MOVE_Refused_MoveDestinationUnknown); } else if (cond.bad()) { /* failed to build association, must fail move */ failAllSubOperations(&dbStatus); @@ -289,7 +289,7 @@ DIC_NODENAME dstHostName; DIC_NODENAME dstHostNamePlusPort; int dstPortNumber; - T_ASC_Parameters *params; + T_ASC_Parameters *params = NULL; OFString temp_str; OFStandard::strlcpy(dstAETitle, request->MoveDestination, DIC_AE_LEN + 1); @@ -393,9 +393,9 @@ char subImgFileName[MAXPATHLEN + 1]; /* sub-operation image file */ /* clear out strings */ - bzero(subImgFileName, sizeof(subImgFileName)); - bzero(subImgSOPClass, sizeof(subImgSOPClass)); - bzero(subImgSOPInstance, sizeof(subImgSOPInstance)); + memset(subImgFileName, 0, sizeof(subImgFileName)); + memset(subImgSOPClass, 0, sizeof(subImgSOPClass)); + memset(subImgSOPInstance,0, sizeof(subImgSOPInstance)); /* get DB response */ dbcond = dbHandle.nextMoveResponse( @@ -424,9 +424,9 @@ char subImgFileName[MAXPATHLEN + 1]; /* sub-operation image file */ /* clear out strings */ - bzero(subImgFileName, sizeof(subImgFileName)); - bzero(subImgSOPClass, sizeof(subImgSOPClass)); - bzero(subImgSOPInstance, sizeof(subImgSOPInstance)); + memset(subImgFileName, 0, sizeof(subImgFileName)); + memset(subImgSOPClass, 0, sizeof(subImgSOPClass)); + memset(subImgSOPInstance, 0, sizeof(subImgSOPInstance)); while (dbStatus->status() == STATUS_Pending) { /* get DB response */ @@ -698,7 +698,7 @@ for (i = 0; i < numberOfDcmLongSCUStorageSOPClassUIDs && cond.good(); i++) { cond = ASC_addPresentationContext( - params, pid, dcmLongSCUStorageSOPClassUIDs[i], + params, OFstatic_cast(T_ASC_PresentationContextID, pid), dcmLongSCUStorageSOPClassUIDs[i], transferSyntaxes, numTransferSyntaxes); pid += 2; /* only odd presentation context id's */ } diff -Nru dcmtk-3.6.6/dcmqrdb/libsrc/dcmqrcnf.cc dcmtk-3.6.7/dcmqrdb/libsrc/dcmqrcnf.cc --- dcmtk-3.6.6/dcmqrdb/libsrc/dcmqrcnf.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmqrdb/libsrc/dcmqrcnf.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1993-2020, OFFIS e.V. + * Copyright (C) 1993-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -23,17 +23,12 @@ #include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ #include "dcmtk/dcmqrdb/dcmqrcnf.h" -/* includes */ -#define INCLUDE_CSTDIO -#define INCLUDE_CCTYPE -#define INCLUDE_CSTDARG -#define INCLUDE_CSTRING -#define INCLUDE_CLIMITS -#include "dcmtk/ofstd/ofstdinc.h" #include "dcmtk/ofstd/ofcmdln.h" #include "dcmtk/ofstd/ofmap.h" #include "dcmtk/ofstd/ofchrenc.h" +#include + OFLogger DCM_dcmqrdbLogger = OFLog::getLogger("dcmtk.dcmqrdb"); static void freePeer(OFMap &pointersToFree, struct DcmQueryRetrieveConfigPeer *entry) diff -Nru dcmtk-3.6.6/dcmqrdb/libsrc/dcmqrdbi.cc dcmtk-3.6.7/dcmqrdb/libsrc/dcmqrdbi.cc --- dcmtk-3.6.6/dcmqrdb/libsrc/dcmqrdbi.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmqrdb/libsrc/dcmqrdbi.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1993-2019, OFFIS e.V. + * Copyright (C) 1993-2022, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -34,20 +34,19 @@ #endif END_EXTERN_C -#define INCLUDE_CCTYPE -#define INCLUDE_CSTDARG -#include "dcmtk/ofstd/ofstdinc.h" #include "dcmtk/ofstd/ofstd.h" #include "dcmtk/dcmqrdb/dcmqrdbs.h" #include "dcmtk/dcmqrdb/dcmqrdbi.h" #include "dcmtk/dcmqrdb/dcmqrcnf.h" #include "dcmtk/dcmqrdb/dcmqropt.h" - +#include "dcmtk/ofstd/ofstdinc.h" #include "dcmtk/dcmqrdb/dcmqridx.h" #include "dcmtk/dcmnet/diutil.h" #include "dcmtk/dcmdata/dcfilefo.h" #include "dcmtk/dcmdata/dcmatch.h" +#include + /* ========================= static data ========================= */ @@ -723,7 +722,7 @@ static void DB_DuplicateElement (DB_SmallDcmElmt *src, DB_SmallDcmElmt *dst) { - bzero( (char*)dst, sizeof (DB_SmallDcmElmt)); + memset( (char*)dst, 0, sizeof (DB_SmallDcmElmt)); dst -> XTag = src -> XTag; dst -> ValueLength = src -> ValueLength; @@ -731,7 +730,7 @@ dst -> PValueField = NULL; else { dst -> PValueField = (char *)malloc ((int) src -> ValueLength+1); - bzero(dst->PValueField, (size_t)(src->ValueLength+1)); + memset(dst->PValueField, 0, (size_t)(src->ValueLength+1)); if (dst->PValueField != NULL) { memcpy (dst -> PValueField, src -> PValueField, (size_t) src -> ValueLength); @@ -838,6 +837,7 @@ if (!query->elem.ValueLength) return OFTrue; + (void)findRequestConverter; OFString buffer; const char* pQuery = query->elem.PValueField; const char* pQueryEnd = pQuery + query->elem.ValueLength; @@ -1119,6 +1119,10 @@ DCMQRDB_DEBUG("Non Unique Key found (level " << level << ")"); return QR_EC_IndexDatabaseError ; } + else if (plist->elem.ValueLength == 0) { + DCMQRDB_DEBUG("Unique Key value is empty (level " << level << ")"); + return QR_EC_IndexDatabaseError ; + } else if (uniqueKeyFound) { DCMQRDB_DEBUG("More than one Unique Key found (level " << level << ")"); return QR_EC_IndexDatabaseError ; @@ -1126,6 +1130,10 @@ else uniqueKeyFound = OFTrue ; } + if (! uniqueKeyFound) { + DCMQRDB_DEBUG("No Unique Key found (level " << level << ")"); + return QR_EC_IndexDatabaseError ; + } } /**** If current level is the QueryLevel @@ -1443,7 +1451,7 @@ if (!qrLevelFound) { /* The Query/Retrieve Level is missing */ - status->setStatus(STATUS_FIND_Failed_IdentifierDoesNotMatchSOPClass); + status->setStatus(STATUS_FIND_Error_DataSetDoesNotMatchSOPClass); DCMQRDB_WARN("DB_startFindRequest(): missing Query/Retrieve Level"); handle_->idxCounter = -1 ; DB_FreeElementList (handle_->findRequestList) ; @@ -1477,9 +1485,9 @@ DB_FreeElementList (handle_->findRequestList) ; handle_->findRequestList = NULL ; #ifdef DEBUG - DCMQRDB_DEBUG("DB_startFindRequest () : STATUS_FIND_Failed_IdentifierDoesNotMatchSOPClass - Invalid RequestList"); + DCMQRDB_DEBUG("DB_startFindRequest () : STATUS_FIND_Error_DataSetDoesNotMatchSOPClass - Invalid RequestList"); #endif - status->setStatus(STATUS_FIND_Failed_IdentifierDoesNotMatchSOPClass); + status->setStatus(STATUS_FIND_Error_DataSetDoesNotMatchSOPClass); return (cond) ; } } @@ -1577,7 +1585,11 @@ OFCondition DcmQueryRetrieveIndexDatabaseHandle::nextFindResponse ( DcmDataset **findResponseIdentifiers, DcmQueryRetrieveDatabaseStatus *status, +#ifdef DCMTK_ENABLE_CHARSET_CONVERSION const DcmQueryRetrieveCharacterSetOptions& characterSetOptions) +#else + const DcmQueryRetrieveCharacterSetOptions& /* characterSetOptions */) +#endif { DB_ElementList *plist = NULL; @@ -1938,6 +1950,10 @@ DCMQRDB_DEBUG("Non Unique Key found (level " << level << ")"); return QR_EC_IndexDatabaseError ; } + else if (plist->elem.ValueLength == 0) { + DCMQRDB_DEBUG("Unique Key value is empty (level " << level << ")"); + return QR_EC_IndexDatabaseError ; + } else if (uniqueKeyFound) { DCMQRDB_DEBUG("More than one Unique Key found (level " << level << ")"); return QR_EC_IndexDatabaseError ; @@ -2023,7 +2039,7 @@ #endif else { - status->setStatus(STATUS_MOVE_Failed_SOPClassNotSupported); + status->setStatus(STATUS_MOVE_Refused_SOPClassNotSupported); return (QR_EC_IndexDatabaseError) ; } @@ -2118,7 +2134,7 @@ if (!qrLevelFound) { /* The Query/Retrieve Level is missing */ - status->setStatus(STATUS_MOVE_Failed_IdentifierDoesNotMatchSOPClass); + status->setStatus(STATUS_MOVE_Error_DataSetDoesNotMatchSOPClass); DCMQRDB_WARN("DB_startMoveRequest(): missing Query/Retrieve Level"); handle_->idxCounter = -1 ; DB_FreeElementList (handle_->findRequestList) ; @@ -2153,9 +2169,9 @@ DB_FreeElementList (handle_->findRequestList) ; handle_->findRequestList = NULL ; #ifdef DEBUG - DCMQRDB_DEBUG("DB_startMoveRequest () : STATUS_MOVE_Failed_IdentifierDoesNotMatchSOPClass - Invalid RequestList"); + DCMQRDB_DEBUG("DB_startMoveRequest () : STATUS_MOVE_Error_DataSetDoesNotMatchSOPClass - Invalid RequestList"); #endif - status->setStatus(STATUS_MOVE_Failed_IdentifierDoesNotMatchSOPClass); + status->setStatus(STATUS_MOVE_Error_DataSetDoesNotMatchSOPClass); return (cond) ; } } @@ -2285,7 +2301,7 @@ OFStandard::strlcpy(SOPInstanceUID, (char *) idxRec. SOPInstanceUID, SOPInstanceUIDSize) ; OFStandard::strlcpy(imageFileName, (char *) idxRec. filename, imageFileNameSize) ; - *numberOfRemainingSubOperations = --handle_->NumberRemainOperations ; + *numberOfRemainingSubOperations = OFstatic_cast(unsigned short, (--handle_->NumberRemainOperations)); nextlist = handle_->moveCounterList->next ; free (handle_->moveCounterList) ; @@ -2670,7 +2686,7 @@ /**** Initialize an IdxRecord ***/ - bzero((char*)&idxRec, sizeof(idxRec)); + memset((char*)&idxRec, 0, sizeof(idxRec)); DB_IdxInitRecord (&idxRec, 0) ; @@ -2716,7 +2732,7 @@ } /* InstanceStatus */ - idxRec.hstat = (isNew) ? DVIF_objectIsNew : DVIF_objectIsNotNew; + idxRec.hstat = OFstatic_cast(char, ((isNew) ? DVIF_objectIsNew : DVIF_objectIsNotNew)); /* InstanceDescription */ OFBool useDescrTag = OFTrue; @@ -2742,6 +2758,7 @@ (strcmp(SOPClassUID, UID_ChestCADSRStorage) == 0) || (strcmp(SOPClassUID, UID_ColonCADSRStorage) == 0) || (strcmp(SOPClassUID, UID_XRayRadiationDoseSRStorage) == 0) || + (strcmp(SOPClassUID, UID_EnhancedXRayRadiationDoseSRStorage) == 0) || (strcmp(SOPClassUID, UID_SpectaclePrescriptionReportStorage) == 0) || (strcmp(SOPClassUID, UID_MacularGridThicknessAndVolumeReportStorage) == 0) || (strcmp(SOPClassUID, UID_ImplantationPlanSRDocumentStorage) == 0) || @@ -2833,7 +2850,7 @@ return (QR_EC_IndexDatabaseError) ; } - bzero((char *)pStudyDesc, SIZEOF_STUDYDESC); + memset((char *)pStudyDesc, 0, SIZEOF_STUDYDESC); DB_GetStudyDesc(pStudyDesc) ; stat(imageFileName, &stat_buf) ; diff -Nru dcmtk-3.6.6/dcmqrdb/libsrc/dcmqrdbs.cc dcmtk-3.6.7/dcmqrdb/libsrc/dcmqrdbs.cc --- dcmtk-3.6.6/dcmqrdb/libsrc/dcmqrdbs.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmqrdb/libsrc/dcmqrdbs.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1993-2010, OFFIS e.V. + * Copyright (C) 1993-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -23,9 +23,7 @@ #include "dcmtk/dcmqrdb/dcmqrdbs.h" #include "dcmtk/dcmdata/dcdatset.h" /* for class DcmDataset */ -#define INCLUDE_CSTDDEF -#include "dcmtk/ofstd/ofstdinc.h" - +#include DcmQueryRetrieveDatabaseStatus::DcmQueryRetrieveDatabaseStatus(Uint16 s) : status_(s) diff -Nru dcmtk-3.6.6/dcmqrdb/libsrc/dcmqropt.cc dcmtk-3.6.7/dcmqrdb/libsrc/dcmqropt.cc --- dcmtk-3.6.6/dcmqrdb/libsrc/dcmqropt.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmqrdb/libsrc/dcmqropt.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1993-2017, OFFIS e.V. + * Copyright (C) 1993-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -22,9 +22,6 @@ #include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ #include "dcmtk/dcmqrdb/dcmqropt.h" -#define INCLUDE_CSTDARG -#include "dcmtk/ofstd/ofstdinc.h" - makeOFConditionConst(QR_EC_IndexDatabaseError, OFM_dcmqrdb, 1, OF_error, "Index database error"); makeOFConditionConst(QR_EC_InvalidPeer, OFM_dcmqrdb, 2, OF_error, "Invalid peer for move operation"); diff -Nru dcmtk-3.6.6/dcmqrdb/libsrc/dcmqrptb.cc dcmtk-3.6.7/dcmqrdb/libsrc/dcmqrptb.cc --- dcmtk-3.6.6/dcmqrdb/libsrc/dcmqrptb.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmqrdb/libsrc/dcmqrptb.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1993-2018, OFFIS e.V. + * Copyright (C) 1993-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -22,6 +22,9 @@ #include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ #include "dcmtk/dcmqrdb/dcmqrptb.h" #include "dcmtk/dcmqrdb/dcmqropt.h" +#include "dcmtk/ofstd/ofstdinc.h" +#include + /** helper class that describes entries in the process slot table. Internal use only. */ @@ -103,6 +106,7 @@ OFBool DcmQueryRetrieveProcessSlot::isProcessWithWriteAccess(const char *calledAETitle) const { + (void) startTime_; return (hasStorageAbility_ && calledAETitle && calledAETitle_ == calledAETitle); } diff -Nru dcmtk-3.6.6/dcmqrdb/libsrc/dcmqrsrv.cc dcmtk-3.6.7/dcmqrdb/libsrc/dcmqrsrv.cc --- dcmtk-3.6.6/dcmqrdb/libsrc/dcmqrsrv.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmqrdb/libsrc/dcmqrsrv.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1993-2018, OFFIS e.V. + * Copyright (C) 1993-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -447,11 +447,25 @@ { int i; T_ASC_PresentationContextID pid; + T_ASC_PresentationContext ctx; for (i = 0; i < numberOfDcmAllStorageSOPClassUIDs; i++) { do { - pid = ASC_findAcceptedPresentationContextID(assoc, dcmAllStorageSOPClassUIDs[i]); - if (pid != 0) ASC_refusePresentationContext(assoc->params, pid, ASC_P_USERREJECTION); + pid = ASC_findAcceptedPresentationContextID(assoc, dcmAllStorageSOPClassUIDs[i]); + if (pid != 0) { + if (ASC_findAcceptedPresentationContext(assoc->params, pid, &ctx).bad() || + ctx.acceptedRole != ASC_SC_ROLE_SCP) { + // pid refers to a storage presentation context in which the client is not + // exclusively acting as SCP (i.e. receiver of images). + // Reject this presentation context to enforce the "read-only" nature + // of the storage area. + ASC_refusePresentationContext(assoc->params, pid, ASC_P_USERREJECTION); + } + else { + // for the current SOP class, role negotiation is active. Skip to the next one. + pid = 0; + } + } } while (pid != 0); // repeat as long as we find presentation contexts for this SOP class - there might be multiple ones. } } diff -Nru dcmtk-3.6.6/dcmqrdb/libsrc/dcmqrtis.cc dcmtk-3.6.7/dcmqrdb/libsrc/dcmqrtis.cc --- dcmtk-3.6.6/dcmqrdb/libsrc/dcmqrtis.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmqrdb/libsrc/dcmqrtis.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1993-2018, OFFIS e.V. + * Copyright (C) 1993-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -29,6 +29,9 @@ #include "dcmtk/dcmqrdb/dcmqrdbs.h" #include "dcmtk/dcmdata/dcfilefo.h" #include "dcmtk/dcmqrdb/dcmqropt.h" +#include "dcmtk/ofstd/ofstdinc.h" +#include + BEGIN_EXTERN_C #ifdef HAVE_SYS_STAT_H @@ -288,7 +291,7 @@ series = (TI_SeriesEntry*) malloc(sizeof(TI_SeriesEntry)); if (series == NULL) return OFFalse; - bzero((char*)series, sizeof(TI_SeriesEntry)); /* make sure its clean */ + memset((char*)series, 0, sizeof(TI_SeriesEntry)); /* make sure its clean */ /* extract info from reply */ ok = DU_getStringDOElement(reply, DCM_SeriesInstanceUID, series->seriesInstanceUID, sizeof(series->seriesInstanceUID)); @@ -364,8 +367,8 @@ image = (TI_ImageEntry*) malloc(sizeof(TI_ImageEntry)); if (image == NULL) return OFFalse; - bzero((char*)image, sizeof(TI_ImageEntry)); /* make sure its clean */ - bzero((char*)studyID, sizeof(DIC_CS)); + memset((char*)image, 0, sizeof(TI_ImageEntry)); /* make sure its clean */ + memset((char*)studyID, 0, sizeof(DIC_CS)); /* extract info from reply */ ok = DU_getStringDOElement(reply, DCM_SOPInstanceUID, image->sopInstanceUID, sizeof(image->sopInstanceUID)); @@ -442,7 +445,7 @@ se = (TI_StudyEntry*) malloc(sizeof(TI_StudyEntry)); if (se == NULL) return OFFalse; - bzero((char*)se, sizeof(TI_StudyEntry)); /* make sure its clean */ + memset((char*)se, 0, sizeof(TI_StudyEntry)); /* make sure its clean */ /* extract info from reply */ ok = DU_getStringDOElement(reply, DCM_StudyInstanceUID, se->studyInstanceUID, sizeof(se->studyInstanceUID)); @@ -486,7 +489,7 @@ , blockMode_(DIMSE_BLOCKING) , dimse_timeout_(0) { - bzero((char*)peerNames, sizeof(peerNames)); + memset((char*)peerNames, 0, sizeof(peerNames)); } OFBool DcmQueryRetrieveTelnetInitiator::TI_detachAssociation(OFBool abortFlag) @@ -586,14 +589,14 @@ /* first add presentation contexts for find and verification */ for (i=0; i<(int)DIM_OF(abstractSyntaxes) && cond.good(); i++) { - cond = ASC_addPresentationContext( params, pid, abstractSyntaxes[i], transferSyntaxes, numTransferSyntaxes); + cond = ASC_addPresentationContext( params, OFstatic_cast(T_ASC_PresentationContextID, pid), abstractSyntaxes[i], transferSyntaxes, numTransferSyntaxes); pid += 2; /* only odd presentation context id's */ } /* and then for all storage SOP classes */ for (i=0; iparams, NULL, 0, peerTitle, sizeof(peerTitle), NULL, 0); } @@ -1112,7 +1115,6 @@ TI_detachAssociation(OFFalse); printf("Good Bye, Auf Wiedersehen, Au Revoir\n"); exit(0); - return OFTrue; } OFBool DcmQueryRetrieveTelnetInitiator::TI_actualizeStudies() @@ -1662,7 +1664,7 @@ return OFTrue; } - bzero(cmdarg, sizeof(cmdarg)); + memset(cmdarg, 0, sizeof(cmdarg)); narg = sscanf(cmdbuf, "send %s %d", cmdarg, &iarg); if (narg == 1) @@ -1682,6 +1684,7 @@ { char cmdBuf[1024]; /* can't have lines longer than this */ int arg; + memset(cmdBuf, 0, 1024); /* make the first database current */ currentdb = 0; @@ -2117,7 +2120,7 @@ else { dbEntry = (TI_DBEntry*) malloc( sizeof(TI_DBEntry) ); - bzero( (char*)dbEntry, sizeof(*dbEntry) ); + memset( (char*)dbEntry, 0, sizeof(*dbEntry) ); dbEntry->title = ctnTitles[i]; for( j=0 ; jtitle = remoteDBTitles[i]; dbEntry->isRemoteDB = OFTrue; diff -Nru dcmtk-3.6.6/dcmqrdb/libsrc/Makefile.dep dcmtk-3.6.7/dcmqrdb/libsrc/Makefile.dep --- dcmtk-3.6.6/dcmqrdb/libsrc/Makefile.dep 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmqrdb/libsrc/Makefile.dep 2022-04-28 13:47:25.000000000 +0000 @@ -2,10 +2,10 @@ ../include/dcmtk/dcmqrdb/dcmqrcbf.h \ ../../dcmnet/include/dcmtk/dcmnet/dimse.h \ ../../dcmnet/include/dcmtk/dcmnet/dicom.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../dcmnet/include/dcmtk/dcmnet/cond.h \ ../../ofstd/include/dcmtk/ofstd/ofconsol.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ @@ -17,7 +17,6 @@ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../../dcmnet/include/dcmtk/dcmnet/dndefine.h \ ../../dcmnet/include/dcmtk/dcmnet/dcompat.h \ - ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \ ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \ ../../oflog/include/dcmtk/oflog/oflog.h \ ../../oflog/include/dcmtk/oflog/logger.h \ @@ -86,10 +85,10 @@ ../include/dcmtk/dcmqrdb/dcmqrcbg.h \ ../../dcmnet/include/dcmtk/dcmnet/dimse.h \ ../../dcmnet/include/dcmtk/dcmnet/dicom.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../dcmnet/include/dcmtk/dcmnet/cond.h \ ../../ofstd/include/dcmtk/ofstd/ofconsol.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ @@ -101,7 +100,6 @@ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../../dcmnet/include/dcmtk/dcmnet/dndefine.h \ ../../dcmnet/include/dcmtk/dcmnet/dcompat.h \ - ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \ ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \ ../../oflog/include/dcmtk/oflog/oflog.h \ ../../oflog/include/dcmtk/oflog/logger.h \ @@ -170,10 +168,10 @@ ../include/dcmtk/dcmqrdb/dcmqrcbm.h \ ../../dcmnet/include/dcmtk/dcmnet/dimse.h \ ../../dcmnet/include/dcmtk/dcmnet/dicom.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../dcmnet/include/dcmtk/dcmnet/cond.h \ ../../ofstd/include/dcmtk/ofstd/ofconsol.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ @@ -185,7 +183,6 @@ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../../dcmnet/include/dcmtk/dcmnet/dndefine.h \ ../../dcmnet/include/dcmtk/dcmnet/dcompat.h \ - ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \ ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \ ../../oflog/include/dcmtk/oflog/oflog.h \ ../../oflog/include/dcmtk/oflog/logger.h \ @@ -262,10 +259,10 @@ ../include/dcmtk/dcmqrdb/dcmqrcbs.h \ ../../dcmnet/include/dcmtk/dcmnet/dimse.h \ ../../dcmnet/include/dcmtk/dcmnet/dicom.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../dcmnet/include/dcmtk/dcmnet/cond.h \ ../../ofstd/include/dcmtk/ofstd/ofconsol.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ @@ -277,7 +274,6 @@ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../../dcmnet/include/dcmtk/dcmnet/dndefine.h \ ../../dcmnet/include/dcmtk/dcmnet/dcompat.h \ - ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \ ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \ ../../oflog/include/dcmtk/oflog/oflog.h \ ../../oflog/include/dcmtk/oflog/logger.h \ @@ -344,12 +340,12 @@ ../../ofstd/include/dcmtk/ofstd/offname.h dcmqrcnf.o: dcmqrcnf.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmqrdb/dcmqrcnf.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofcmdln.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/ofexbl.h \ ../../ofstd/include/dcmtk/ofstd/oftraits.h \ @@ -391,13 +387,13 @@ ../../ofstd/include/dcmtk/ofstd/ofmap.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 \ ../../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 \ ../../ofstd/include/dcmtk/ofstd/ofstring.h \ ../../ofstd/include/dcmtk/ofstd/oftraits.h \ @@ -415,7 +411,6 @@ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../../dcmnet/include/dcmtk/dcmnet/dndefine.h \ ../../dcmnet/include/dcmtk/dcmnet/dcompat.h \ - ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \ ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \ ../../oflog/include/dcmtk/oflog/oflog.h \ ../../oflog/include/dcmtk/oflog/logger.h \ @@ -584,7 +579,6 @@ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../dcmnet/include/dcmtk/dcmnet/dndefine.h \ ../../dcmnet/include/dcmtk/dcmnet/dcompat.h \ - ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \ ../../dcmdata/include/dcmtk/dcmdata/dcuid.h \ ../../dcmnet/include/dcmtk/dcmnet/assoc.h \ ../../dcmnet/include/dcmtk/dcmnet/lst.h \ @@ -632,7 +626,6 @@ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../../dcmnet/include/dcmtk/dcmnet/dndefine.h \ ../../dcmnet/include/dcmtk/dcmnet/dcompat.h \ - ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \ ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \ ../../oflog/include/dcmtk/oflog/oflog.h \ ../../oflog/include/dcmtk/oflog/logger.h \ @@ -708,7 +701,6 @@ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../../dcmnet/include/dcmtk/dcmnet/dndefine.h \ ../../dcmnet/include/dcmtk/dcmnet/dcompat.h \ - ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \ ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \ ../../oflog/include/dcmtk/oflog/oflog.h \ ../../oflog/include/dcmtk/oflog/logger.h \ @@ -784,10 +776,10 @@ dcmqrtis.o: dcmqrtis.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmqrdb/dcmqrtis.h \ ../../dcmnet/include/dcmtk/dcmnet/dicom.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../dcmnet/include/dcmtk/dcmnet/cond.h \ ../../ofstd/include/dcmtk/ofstd/ofconsol.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ @@ -799,7 +791,6 @@ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../../dcmnet/include/dcmtk/dcmnet/dndefine.h \ ../../dcmnet/include/dcmtk/dcmnet/dcompat.h \ - ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \ ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \ ../../oflog/include/dcmtk/oflog/oflog.h \ ../../oflog/include/dcmtk/oflog/logger.h \ diff -Nru dcmtk-3.6.6/dcmrt/apps/CMakeLists.txt dcmtk-3.6.7/dcmrt/apps/CMakeLists.txt --- dcmtk-3.6.6/dcmrt/apps/CMakeLists.txt 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmrt/apps/CMakeLists.txt 2022-04-28 13:47:25.000000000 +0000 @@ -1,5 +1,5 @@ # declare executables -DCMTK_ADD_EXECUTABLE(drtdump drtdump) +DCMTK_ADD_EXECUTABLE(drtdump drtdump.cc) # make sure executables are linked to the corresponding libraries DCMTK_TARGET_LINK_MODULES(drtdump dcmrt dcmdata oflog ofstd) diff -Nru dcmtk-3.6.6/dcmrt/apps/drtdump.cc dcmtk-3.6.7/dcmrt/apps/drtdump.cc --- dcmtk-3.6.6/dcmrt/apps/drtdump.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmrt/apps/drtdump.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2010-2012, OFFIS e.V. and ICSMED AG, Oldenburg, Germany + * Copyright (c) 2010-2021, OFFIS e.V. and ICSMED AG, Oldenburg, Germany * All rights reserved. See COPYRIGHT file for details. * * Test read and write methods of DICOM RT classes @@ -199,13 +199,16 @@ appendToString(outString, tmpString, "" /*prefix*/, " mm" /*suffix*/); out << "Radiation Machine : " << outString << OFendl; } - Uint16 rows, columns; + Uint16 rows = 0; + Uint16 columns = 0; if (rtObject.getRows(rows).good() && rtObject.getColumns(columns).good()) { out << "Image Resolution : " << columns << " x " << rows << OFendl; } - Uint16 bitsAllocated, bitsStored, highBit; + Uint16 bitsAllocated = 0; + Uint16 bitsStored = 0; + Uint16 highBit = 0; if (rtObject.getBitsAllocated(bitsAllocated).good() && rtObject.getBitsStored(bitsStored).good() && rtObject.getHighBit(highBit).good()) diff -Nru dcmtk-3.6.6/dcmrt/docs/drtdump.man dcmtk-3.6.7/dcmrt/docs/drtdump.man --- dcmtk-3.6.6/dcmrt/docs/drtdump.man 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmrt/docs/drtdump.man 2022-04-28 13:47:25.000000000 +0000 @@ -181,7 +181,7 @@ \section drtdump_copyright COPYRIGHT -Copyright (C) 2010-2014 by OFFIS e.V. and ICSMED AG, Escherweg 2, 26121 +Copyright (C) 2010-2022 by OFFIS e.V. and ICSMED AG, Escherweg 2, 26121 Oldenburg, Germany. */ diff -Nru dcmtk-3.6.6/dcmrt/include/dcmtk/dcmrt/drmdose.h dcmtk-3.6.7/dcmrt/include/dcmtk/dcmrt/drmdose.h --- dcmtk-3.6.6/dcmrt/include/dcmtk/dcmrt/drmdose.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmrt/include/dcmtk/dcmrt/drmdose.h 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2012, OFFIS e.V. + * Copyright (C) 2012-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -31,8 +31,8 @@ * class provides several helper functions on top of DRTDoseIOD. * * @note These functions hopefully simplify working with DRTDoseIOD. This is a - * work in progress, please propose any improvements which would make working - * with this class easier for you and that your consider useful. + * work in progress, please propose any improvements which would make working + * with this class easier for you and that you consider useful. */ class DCMTK_DCMRT_EXPORT DRTDose : public DRTDoseIOD { diff -Nru dcmtk-3.6.6/dcmrt/include/dcmtk/dcmrt/drmimage.h dcmtk-3.6.7/dcmrt/include/dcmtk/dcmrt/drmimage.h --- dcmtk-3.6.6/dcmrt/include/dcmtk/dcmrt/drmimage.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmrt/include/dcmtk/dcmrt/drmimage.h 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2012-2016, OFFIS e.V. + * Copyright (C) 2012-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -34,8 +34,8 @@ * represented through DicomImage. * * @note These functions hopefully simplify working with DRTImageIOD. This is a - * work in progress, please propose any improvements which would make working - * with this class easier for you and that your consider useful. + * work in progress, please propose any improvements which would make working + * with this class easier for you and that you consider useful. */ class DCMTK_DCMRT_EXPORT DRTImage : public DRTImageIOD { diff -Nru dcmtk-3.6.6/dcmrt/include/dcmtk/dcmrt/drmplan.h dcmtk-3.6.7/dcmrt/include/dcmtk/dcmrt/drmplan.h --- dcmtk-3.6.6/dcmrt/include/dcmtk/dcmrt/drmplan.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmrt/include/dcmtk/dcmrt/drmplan.h 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2012, OFFIS e.V. + * Copyright (C) 2012-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -31,8 +31,8 @@ * provides several helper functions on top of DRTPlanIOD. * * @note These functions hopefully simplify working with DRTPlanIOD. This is a - * work in progress, please propose any improvements which would make working - * with this class easier for you and that your consider useful. + * work in progress, please propose any improvements which would make working + * with this class easier for you and that you consider useful. */ class DCMTK_DCMRT_EXPORT DRTPlan : public DRTPlanIOD { public: diff -Nru dcmtk-3.6.6/dcmrt/include/dcmtk/dcmrt/drmstrct.h dcmtk-3.6.7/dcmrt/include/dcmtk/dcmrt/drmstrct.h --- dcmtk-3.6.6/dcmrt/include/dcmtk/dcmrt/drmstrct.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmrt/include/dcmtk/dcmrt/drmstrct.h 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2012, OFFIS e.V. + * Copyright (C) 2012-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -31,8 +31,8 @@ * provides several helper functions on top of DRTStructureSet. * * @note These functions hopefully simplify working with DRTStructureSetIOD. - * This is a work in progress, please propose any improvements which would make - * working with this class easier for you and that your consider useful. + * This is a work in progress, please propose any improvements which would make + * working with this class easier for you and that you consider useful. */ class DCMTK_DCMRT_EXPORT DRTStructureSet : public DRTStructureSetIOD { @@ -57,7 +57,7 @@ */ DRTReferencedFrameOfReferenceSequence::Item& getFrameOfReference(const OFString& uid); - /** find a region of interest by its roi number. + /** find a region of interest by its ROI number. * @param roiNumber the ROI to find. * @return the item representing the region of interest or the * EmptyDefaultItem of the DRTStructureSetROISequence. diff -Nru dcmtk-3.6.6/dcmrt/include/dcmtk/dcmrt/drtimage.h dcmtk-3.6.7/dcmrt/include/dcmtk/dcmrt/drtimage.h --- dcmtk-3.6.6/dcmrt/include/dcmtk/dcmrt/drtimage.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmrt/include/dcmtk/dcmrt/drtimage.h 2022-04-28 13:47:25.000000000 +0000 @@ -1,7 +1,7 @@ /* * * Copyright (C) 2008-2012, OFFIS e.V. and ICSMED AG, Oldenburg, Germany - * Copyright (C) 2013-2017, J. Riesmeier, Oldenburg, Germany + * Copyright (C) 2013-2021, J. Riesmeier, Oldenburg, Germany * All rights reserved. See COPYRIGHT file for details. * * Header file for class DRTImageIOD @@ -82,6 +82,7 @@ #include "dcmtk/dcmrt/seq/drtudis.h" // for UDISequence #include "dcmtk/dcmrt/seq/drtvls.h" // for VOILUTSequence +#include /** Interface class for RTImageIOD * @note Because of its many member variables, an instance of this class requires quite diff -Nru dcmtk-3.6.6/dcmrt/libsrc/CMakeLists.txt dcmtk-3.6.7/dcmrt/libsrc/CMakeLists.txt --- dcmtk-3.6.6/dcmrt/libsrc/CMakeLists.txt 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmrt/libsrc/CMakeLists.txt 2022-04-28 13:47:25.000000000 +0000 @@ -1,4 +1,236 @@ # 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 drtcsrs drtcss drtdcs drtdddps drtddps drtdias drtdimcs drtdimrs drtdirs drtdrs drtds drtdspcs drtdss drtdvhs drtdvrrs drteas drtecs drtes drtfds drtfes drtfgs drtfgss drtfms drtfsss drtgas drtgmcs drtgms drtgpis drthsdrs drtiais drtians drtiblds drtibls drtibs drticpds drticps drtics drtiis drtipiqs drtircs drtiseis drtitts drtiwps drtiws drtlsds6 drtlsds7 drtlsds drtmacds drtmas drtmdrs drtmls drtmps drtmris drtmss drtmucs drtoas drtois drtopis drtos drtpbcs drtpcs drtpcxs drtpdecs drtpdeds drtpfms drtpics drtporcs drtporis drtppcs drtprsis drtpscs drtpsics drtpss drtpsss drtpvis drtqds drtras drtrbas2 drtrbas8 drtrbls drtrbos1 drtrbos6 drtrbos7 drtrbs2 drtrbs4 drtrbs8 drtrcdrs drtrcos drtrcps drtrcs drtrdros drtrdrs1 drtrdrs6 drtrdrs8 drtrds drtrecs drtrfgs drtrfors drtrics drtrims drtris drtrlsds drtrmdrs drtrms drtrmss6 drtrmss7 drtrpcs drtrpis drtrppcs drtrpphs drtrpps drtrppss drtrps drtrris1 drtrris6 drtrris9 drtrrms drtrros drtrrpcs drtrrros drtrrs drtrrshs drtrrtps3 drtrrtps4 drtrrtps5 drtrrtps drtrscs drtrsers drtrses drtrshs6 drtrshs7 drtrshs drtrsis drtrsns drtrsos drtrsrs drtrss drtrsss drtrsts drtrtrs2 drtrtrs4 drtrvis drtwrsrs drtrws drtrwvms drtscris drtscs drtsdcs drtsds drtshds drtsins drtsis drtsns drtspccs drtspcs drtspgis drtsptcs drtss drtssrcs drtssrs drtsss drttms0 drttms9 drttscds drttsibs drttsmds drttts drtudis drtvls drtwps drtwrs drtws drtxrs) +DCMTK_ADD_LIBRARY(dcmrt + drmdose.cc + drmimage.cc + drmplan.cc + drmstrct.cc + drtaadcs.cc + drtadcs.cc + drtads.cc + drtafs.cc + drtags.cc + drtajcs.cc + drtas1.cc + drtas5.cc + drtas6.cc + drtas7.cc + drtass.cc + drtbads.cc + drtbas.cc + drtbcps.cc + drtbl2.cc + drtbl5.cc + drtbldls.cc + drtbldps.cc + drtblds1.cc + drtblds5.cc + drtblds6.cc + drtbldts.cc + drtbrcss.cc + drtbrdrs.cc + drtbrs.cc + drtbs.cc + drtbss.cc + drtbvcps.cc + drtcbars.cc + drtccs.cc + drtcctus.cc + drtcdrs.cc + drtces.cc + drtcgis.cc + drtchs.cc + drtcims.cc + drtcis.cc + drtcncs.cc + drtcos.cc + drtcpas.cc + drtcpis.cc + drtcps.cc + drtcs.cc + drtcsas.cc + drtcshs.cc + drtcsis.cc + drtcsrs.cc + drtcss.cc + drtdcs.cc + drtdddps.cc + drtddps.cc + drtdias.cc + drtdimcs.cc + drtdimrs.cc + drtdirs.cc + drtdose.cc + drtdrs.cc + drtds.cc + drtdspcs.cc + drtdss.cc + drtdvhs.cc + drtdvrrs.cc + drteas.cc + drtecs.cc + drtes.cc + drtfds.cc + drtfes.cc + drtfgs.cc + drtfgss.cc + drtfms.cc + drtfsss.cc + drtgas.cc + drtgmcs.cc + drtgms.cc + drtgpis.cc + drthsdrs.cc + drtiais.cc + drtians.cc + drtiblds.cc + drtibls.cc + drtibs.cc + drticpds.cc + drticps.cc + drtics.cc + drtiis.cc + drtimage.cc + drtionpl.cc + drtiontr.cc + drtipiqs.cc + drtircs.cc + drtiseis.cc + drtitts.cc + drtiwps.cc + drtiws.cc + drtlsds.cc + drtlsds6.cc + drtlsds7.cc + drtmacds.cc + drtmas.cc + drtmdrs.cc + drtmls.cc + drtmps.cc + drtmris.cc + drtmss.cc + drtmucs.cc + drtoas.cc + drtois.cc + drtopis.cc + drtos.cc + drtpbcs.cc + drtpcs.cc + drtpcxs.cc + drtpdecs.cc + drtpdeds.cc + drtpfms.cc + drtpics.cc + drtplan.cc + drtporcs.cc + drtporis.cc + drtppcs.cc + drtprsis.cc + drtpscs.cc + drtpsics.cc + drtpss.cc + drtpsss.cc + drtpvis.cc + drtqds.cc + drtras.cc + drtrbas2.cc + drtrbas8.cc + drtrbls.cc + drtrbos1.cc + drtrbos6.cc + drtrbos7.cc + drtrbs2.cc + drtrbs4.cc + drtrbs8.cc + drtrcdrs.cc + drtrcos.cc + drtrcps.cc + drtrcs.cc + drtrdros.cc + drtrdrs1.cc + drtrdrs6.cc + drtrdrs8.cc + drtrds.cc + drtrecs.cc + drtrfgs.cc + drtrfors.cc + drtrics.cc + drtrims.cc + drtris.cc + drtrlsds.cc + drtrmdrs.cc + drtrms.cc + drtrmss6.cc + drtrmss7.cc + drtrpcs.cc + drtrpis.cc + drtrppcs.cc + drtrpphs.cc + drtrpps.cc + drtrppss.cc + drtrps.cc + drtrris1.cc + drtrris6.cc + drtrris9.cc + drtrrms.cc + drtrros.cc + drtrrpcs.cc + drtrrros.cc + drtrrs.cc + drtrrshs.cc + drtrrtps.cc + drtrrtps3.cc + drtrrtps4.cc + drtrrtps5.cc + drtrscs.cc + drtrsers.cc + drtrses.cc + drtrshs.cc + drtrshs6.cc + drtrshs7.cc + drtrsis.cc + drtrsns.cc + drtrsos.cc + drtrsrs.cc + drtrss.cc + drtrsss.cc + drtrsts.cc + drtrtrs2.cc + drtrtrs4.cc + drtrvis.cc + drtrws.cc + drtrwvms.cc + drtscris.cc + drtscs.cc + drtsdcs.cc + drtsds.cc + drtshds.cc + drtsins.cc + drtsis.cc + drtsns.cc + drtspccs.cc + drtspcs.cc + drtspgis.cc + drtsptcs.cc + drtss.cc + drtssrcs.cc + drtssrs.cc + drtsss.cc + drtstrct.cc + drttms0.cc + drttms9.cc + drttreat.cc + drttscds.cc + drttsibs.cc + drttsmds.cc + drttts.cc + drttypes.cc + drtudis.cc + drtvls.cc + drtwps.cc + drtwrs.cc + drtwrsrs.cc + drtws.cc + drtxrs.cc +) DCMTK_TARGET_LINK_MODULES(dcmrt ofstd oflog dcmdata dcmimgle) diff -Nru dcmtk-3.6.6/dcmrt/libsrc/drmdose.cc dcmtk-3.6.7/dcmrt/libsrc/drmdose.cc --- dcmtk-3.6.6/dcmrt/libsrc/drmdose.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmrt/libsrc/drmdose.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2012-2015, OFFIS e.V. + * Copyright (C) 2012-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -68,7 +68,7 @@ { unsignedT result; if (pixelData_.getPartialValue(&result, OFstatic_cast(Uint32, pixelNumber * sizeof(unsignedT)), OFstatic_cast(Uint32, sizeof(unsignedT))).bad()) - return -1; + return OFstatic_cast(unsignedT, (-1)); return result; } @@ -148,7 +148,7 @@ OFCondition DRTDose::getDose(double &result, unsigned int x, unsigned int y, unsigned int frame) const { double gridScaling; - double dose; + double dose = 0.0; OFCondition cond = getDoseGridScaling(gridScaling); if (cond.good()) cond = getUnscaledDose(dose, x, y, frame); @@ -170,9 +170,10 @@ static OFCondition getImageParameters(const DRTDose& dose, Uint32& frames, Uint16& rows, Uint16& columns, Uint16& bitsAllocated, Uint16& pixelRep) { OFCondition cond = EC_Normal; - Sint32 tmp; - Uint16 bitsStored, highBit; - + Sint32 tmp = 0; + Uint16 bitsStored = 0; + Uint16 highBit = 0; + // tbd: Would be nice to know which getter failed if (cond.good()) cond = dose.getNumberOfFrames(tmp); @@ -249,7 +250,7 @@ Uint32 frames; Uint32 offset, length; Uint16 rows, columns, bitsAllocated, pixelRep; - double doseGridScaling; + double doseGridScaling = 0.0; OFCondition cond = EC_Normal; result.clear(); diff -Nru dcmtk-3.6.6/dcmrt/libsrc/drtajcs.cc dcmtk-3.6.7/dcmrt/libsrc/drtajcs.cc --- dcmtk-3.6.6/dcmrt/libsrc/drtajcs.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmrt/libsrc/drtajcs.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,7 +1,7 @@ /* * * Copyright (C) 2008-2012, OFFIS e.V. and ICSMED AG, Oldenburg, Germany - * Copyright (C) 2013-2017, J. Riesmeier, Oldenburg, Germany + * Copyright (C) 2013-2021, J. Riesmeier, Oldenburg, Germany * All rights reserved. See COPYRIGHT file for details. * * Source file for class DRTAssigningJurisdictionCodeSequence @@ -16,6 +16,8 @@ #include "dcmtk/dcmrt/seq/drtajcs.h" +#include + // --- item class --- diff -Nru dcmtk-3.6.6/dcmrt/libsrc/drtcs.cc dcmtk-3.6.7/dcmrt/libsrc/drtcs.cc --- dcmtk-3.6.6/dcmrt/libsrc/drtcs.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmrt/libsrc/drtcs.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,13 +1,14 @@ /* * * Copyright (C) 2008-2012, OFFIS e.V. and ICSMED AG, Oldenburg, Germany - * Copyright (C) 2013-2017, J. Riesmeier, Oldenburg, Germany + * Copyright (C) 2013-2021, J. Riesmeier, Oldenburg, Germany * All rights reserved. See COPYRIGHT file for details. * * Source file for class DRTContourSequence * * Generated automatically from DICOM PS 3.3-2017e * File created on 2017-12-05 09:30:54 + * Last modified on 2021-02-01 by Riesmeier * */ @@ -21,13 +22,13 @@ DRTContourSequence::Item::Item(const OFBool emptyDefaultItem) : EmptyDefaultItem(emptyDefaultItem), - AttachedContours(DCM_AttachedContours), + AttachedContours(DCM_RETIRED_AttachedContours), ContourData(DCM_ContourData), ContourGeometricType(DCM_ContourGeometricType), ContourImageSequence(emptyDefaultItem /*emptyDefaultSequence*/), ContourNumber(DCM_ContourNumber), - ContourOffsetVector(DCM_ContourOffsetVector), - ContourSlabThickness(DCM_ContourSlabThickness), + ContourOffsetVector(DCM_RETIRED_ContourOffsetVector), + ContourSlabThickness(DCM_RETIRED_ContourSlabThickness), NumberOfContourPoints(DCM_NumberOfContourPoints) { } diff -Nru dcmtk-3.6.6/dcmrt/libsrc/drtionpl.cc dcmtk-3.6.7/dcmrt/libsrc/drtionpl.cc --- dcmtk-3.6.6/dcmrt/libsrc/drtionpl.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmrt/libsrc/drtionpl.cc 2022-04-28 13:47:25.000000000 +0000 @@ -8,6 +8,7 @@ * * Generated automatically from DICOM PS 3.3-2017e * File created on 2017-12-05 09:30:54 + * Last modified on 2022-01-26 by Riesmeier * */ @@ -156,7 +157,7 @@ RTPlanTime(DCM_RTPlanTime), TreatmentProtocols(DCM_TreatmentProtocols), PlanIntent(DCM_PlanIntent), - TreatmentSites(DCM_TreatmentSites), + TreatmentSites(DCM_RETIRED_TreatmentSites), RTPlanGeometry(DCM_RTPlanGeometry), ReferencedStructureSetSequence(), ReferencedDoseSequence(), diff -Nru dcmtk-3.6.6/dcmrt/libsrc/drtplan.cc dcmtk-3.6.7/dcmrt/libsrc/drtplan.cc --- dcmtk-3.6.6/dcmrt/libsrc/drtplan.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmrt/libsrc/drtplan.cc 2022-04-28 13:47:25.000000000 +0000 @@ -8,6 +8,7 @@ * * Generated automatically from DICOM PS 3.3-2017e * File created on 2017-12-05 09:30:54 + * Last modified on 2022-01-26 by Riesmeier * */ @@ -156,7 +157,7 @@ RTPlanTime(DCM_RTPlanTime), TreatmentProtocols(DCM_TreatmentProtocols), PlanIntent(DCM_PlanIntent), - TreatmentSites(DCM_TreatmentSites), + TreatmentSites(DCM_RETIRED_TreatmentSites), RTPlanGeometry(DCM_RTPlanGeometry), ReferencedStructureSetSequence(), ReferencedDoseSequence(), diff -Nru dcmtk-3.6.6/dcmrt/libsrc/drttypes.cc dcmtk-3.6.7/dcmrt/libsrc/drttypes.cc --- dcmtk-3.6.6/dcmrt/libsrc/drttypes.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmrt/libsrc/drttypes.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,7 +1,7 @@ /* * - * Copyright (c) 2008-2012, OFFIS e.V. and ICSMED AG, Oldenburg, Germany - * Copyright (C) 2013-2016, J. Riesmeier, Oldenburg, Germany + * Copyright (c) 2008-2021, OFFIS e.V. and ICSMED AG, Oldenburg, Germany + * Copyright (C) 2013-2021, J. Riesmeier, Oldenburg, Germany * All rights reserved. See COPYRIGHT file for details. * * Source file for class DRTTypes @@ -19,11 +19,6 @@ #include "dcmtk/ofstd/ofstd.h" -#define INCLUDE_CSTDIO -#define INCLUDE_CCTYPE -#include "dcmtk/ofstd/ofstdinc.h" - - /*------------------------* * constant definitions * *------------------------*/ diff -Nru dcmtk-3.6.6/dcmrt/tests/CMakeLists.txt dcmtk-3.6.7/dcmrt/tests/CMakeLists.txt --- dcmtk-3.6.6/dcmrt/tests/CMakeLists.txt 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmrt/tests/CMakeLists.txt 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,10 @@ # declare executables -DCMTK_ADD_EXECUTABLE(drttest drttest) -DCMTK_ADD_EXECUTABLE(dcmrt_tests tests tsearch) +DCMTK_ADD_EXECUTABLE(drttest drttest.cc) +DCMTK_ADD_EXECUTABLE(dcmrt_tests + tests.cc + tsearch.cc + tcontour.cc +) # make sure executables are linked to the corresponding libraries DCMTK_TARGET_LINK_MODULES(drttest dcmrt dcmdata oflog ofstd) diff -Nru dcmtk-3.6.6/dcmrt/tests/Makefile.dep dcmtk-3.6.7/dcmrt/tests/Makefile.dep --- dcmtk-3.6.6/dcmrt/tests/Makefile.dep 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmrt/tests/Makefile.dep 2022-04-28 13:47:25.000000000 +0000 @@ -248,6 +248,207 @@ ../include/dcmtk/dcmrt/seq/drtrtrs4.h \ ../include/dcmtk/dcmrt/seq/drttscds.h \ ../include/dcmtk/dcmrt/seq/drttsmds.h +tcontour.o: tcontour.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/ofexbl.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.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/ofcond.h \ + ../../ofstd/include/dcmtk/ofstd/oflimits.h \ + ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ + ../../ofstd/include/dcmtk/ofstd/ofexit.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/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/dcmrt/drtstrct.h ../include/dcmtk/dcmrt/drttypes.h \ + ../../dcmdata/include/dcmtk/dcmdata/dctk.h \ + ../../dcmdata/include/dcmtk/dcmdata/dctypes.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/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/dcvrsv.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcvruv.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/dcvrov.h \ + ../../dcmdata/include/dcmtk/dcmdata/cmdlnarg.h \ + ../include/dcmtk/dcmrt/seq/drtadcs.h ../include/dcmtk/dcmrt/seq/drtecs.h \ + ../include/dcmtk/dcmrt/seq/drtbrs.h \ + ../include/dcmtk/dcmrt/seq/drtbrcss.h \ + ../include/dcmtk/dcmrt/seq/drtcsis.h \ + ../include/dcmtk/dcmrt/seq/drtcsrs.h \ + ../include/dcmtk/dcmrt/seq/drtcctus.h \ + ../include/dcmtk/dcmrt/seq/drtcpis.h ../include/dcmtk/dcmrt/seq/drtics.h \ + ../include/dcmtk/dcmrt/seq/drtpics.h \ + ../include/dcmtk/dcmrt/seq/drtcgis.h ../include/dcmtk/dcmrt/seq/drtces.h \ + ../include/dcmtk/dcmrt/seq/drtois.h \ + ../include/dcmtk/dcmrt/seq/drtporcs.h \ + ../include/dcmtk/dcmrt/seq/drtcsas.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/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 \ + ../include/dcmtk/dcmrt/seq/drthsdrs.h \ + ../include/dcmtk/dcmrt/seq/drtians.h \ + ../include/dcmtk/dcmrt/seq/drtiais.h \ + ../include/dcmtk/dcmrt/seq/drtiseis.h \ + ../include/dcmtk/dcmrt/seq/drtmps.h ../include/dcmtk/dcmrt/seq/drtmris.h \ + ../include/dcmtk/dcmrt/seq/drtoas.h ../include/dcmtk/dcmrt/seq/drtmas.h \ + ../include/dcmtk/dcmrt/seq/drtopis.h \ + ../include/dcmtk/dcmrt/seq/drtpbcs.h \ + ../include/dcmtk/dcmrt/seq/drtpsics.h \ + ../include/dcmtk/dcmrt/seq/drtpscs.h \ + ../include/dcmtk/dcmrt/seq/drtppcs.h \ + ../include/dcmtk/dcmrt/seq/drtpcxs.h ../include/dcmtk/dcmrt/seq/drtccs.h \ + ../include/dcmtk/dcmrt/seq/drtcncs.h \ + ../include/dcmtk/dcmrt/seq/drtcims.h \ + ../include/dcmtk/dcmrt/seq/drtmucs.h \ + ../include/dcmtk/dcmrt/seq/drtrsos.h \ + ../include/dcmtk/dcmrt/seq/drtporis.h \ + ../include/dcmtk/dcmrt/seq/drtprsis.h \ + ../include/dcmtk/dcmrt/seq/drtpsss.h \ + ../include/dcmtk/dcmrt/seq/drtpdecs.h \ + ../include/dcmtk/dcmrt/seq/drtdias.h \ + ../include/dcmtk/dcmrt/seq/drtpdeds.h \ + ../include/dcmtk/dcmrt/seq/drtpcs.h ../include/dcmtk/dcmrt/seq/drtrcs.h \ + ../include/dcmtk/dcmrt/seq/drtcs.h ../include/dcmtk/dcmrt/seq/drtcis.h \ + ../include/dcmtk/dcmrt/seq/drtrros.h \ + ../include/dcmtk/dcmrt/seq/drtrpps.h \ + ../include/dcmtk/dcmrt/seq/drtrecs.h \ + ../include/dcmtk/dcmrt/seq/drtrics.h \ + ../include/dcmtk/dcmrt/seq/drtsptcs.h \ + ../include/dcmtk/dcmrt/seq/drtrrs.h \ + ../include/dcmtk/dcmrt/seq/drtrrros.h \ + ../include/dcmtk/dcmrt/seq/drtspccs.h \ + ../include/dcmtk/dcmrt/seq/drtrppcs.h \ + ../include/dcmtk/dcmrt/seq/drtrfors.h \ + ../include/dcmtk/dcmrt/seq/drtrsts.h \ + ../include/dcmtk/dcmrt/seq/drtrses.h \ + ../include/dcmtk/dcmrt/seq/drtrims.h ../include/dcmtk/dcmrt/seq/drtris.h \ + ../include/dcmtk/dcmrt/seq/drtrpphs.h \ + ../include/dcmtk/dcmrt/seq/drtdimrs.h \ + ../include/dcmtk/dcmrt/seq/drtdirs.h \ + ../include/dcmtk/dcmrt/seq/drtwrsrs.h \ + ../include/dcmtk/dcmrt/seq/drtwrs.h ../include/dcmtk/dcmrt/seq/drtxrs.h \ + ../include/dcmtk/dcmrt/seq/drtrps.h \ + ../include/dcmtk/dcmrt/seq/drtrppss.h \ + ../include/dcmtk/dcmrt/seq/drtrsers.h \ + ../include/dcmtk/dcmrt/seq/drtrss.h ../include/dcmtk/dcmrt/seq/drtrpis.h \ + ../include/dcmtk/dcmrt/seq/drtras.h \ + ../include/dcmtk/dcmrt/seq/drtrrpcs.h \ + ../include/dcmtk/dcmrt/seq/drtrpcs.h \ + ../include/dcmtk/dcmrt/seq/drtspcs.h \ + ../include/dcmtk/dcmrt/seq/drtrscs.h \ + ../include/dcmtk/dcmrt/seq/drtsdcs.h ../include/dcmtk/dcmrt/seq/drtsis.h \ + ../include/dcmtk/dcmrt/seq/drtsins.h \ + ../include/dcmtk/dcmrt/seq/drtspgis.h \ + ../include/dcmtk/dcmrt/seq/drtscs.h ../include/dcmtk/dcmrt/seq/drtsss.h \ + ../include/dcmtk/dcmrt/seq/drtssrcs.h \ + ../include/dcmtk/dcmrt/seq/drtssrs.h \ + ../include/dcmtk/dcmrt/seq/drtscris.h \ + ../include/dcmtk/dcmrt/seq/drtudis.h tests.o: tests.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/oftest.h \ ../../ofstd/include/dcmtk/ofstd/ofconapp.h \ diff -Nru dcmtk-3.6.6/dcmrt/tests/Makefile.in dcmtk-3.6.7/dcmrt/tests/Makefile.in --- dcmtk-3.6.6/dcmrt/tests/Makefile.in 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmrt/tests/Makefile.in 2022-04-28 13:47:25.000000000 +0000 @@ -23,7 +23,7 @@ LOCALLIBS = -ldcmrt -ldcmimgle -ldcmdata -loflog -lofstd \ $(TIFFLIBS) $(PNGLIBS) $(ZLIBLIBS) $(CHARCONVLIBS) $(MATHLIBS) -test_objs = tests.o tsearch.o +test_objs = tests.o tsearch.o tcontour.o objs = drttest.o $(test_objs) progs = drttest tests @@ -40,10 +40,10 @@ check: tests - ./tests + DCMDICTPATH=../data/dicom.dic ./tests check-exhaustive: tests - ./tests -x + DCMDICTPATH=../data/dicom.dic ./tests -x clean: diff -Nru dcmtk-3.6.6/dcmrt/tests/tcontour.cc dcmtk-3.6.7/dcmrt/tests/tcontour.cc --- dcmtk-3.6.6/dcmrt/tests/tcontour.cc 1970-01-01 00:00:00.000000000 +0000 +++ dcmtk-3.6.7/dcmrt/tests/tcontour.cc 2022-04-28 13:47:25.000000000 +0000 @@ -0,0 +1,62 @@ +/* + * + * Copyright (C) 2021, J. Riesmeier, Oldenburg, Germany + * 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: dcmrt + * + * Author: Joerg Riesmeier + * + * Purpose: test program for adding contour data to an RT Structure Set + * + */ + +#include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ + +#include "dcmtk/ofstd/oftest.h" +#include "dcmtk/dcmrt/drtstrct.h" + + +OFTEST(dcmrt_contour) +{ + DRTStructureSetIOD structureSet; + DRTROIContourSequence &roiContourSequence = structureSet.getROIContourSequence(); + DRTROIContourSequence::Item *roiContourSequenceItem = NULL; + + // add new item + OFCHECK(roiContourSequence.addItem(roiContourSequenceItem).good()); + if (roiContourSequenceItem != NULL) + { + DRTContourSequence &contourSequence = roiContourSequenceItem->getContourSequence(); + DRTContourSequence::Item *contourSequenceItem = NULL; + // also add a new item to the nested sub-sequence + OFCHECK(contourSequence.addItem(contourSequenceItem).good()); + if (roiContourSequenceItem != NULL) + { + // set contour data (dummy values) + OFCHECK(contourSequenceItem->setContourData("100\\200\\146\\101\\201\\147").good()); + } + } + + // check if contour data was set correctly + OFVector contourData; + OFCHECK(structureSet.getROIContourSequence().getItem(0).getContourSequence().getItem(0).getContourData(contourData).good()); + OFCHECK_EQUAL(contourData.size(), 6); + if (contourData.size() >= 6) + { + OFCHECK_EQUAL(contourData.at(0), 100); + OFCHECK_EQUAL(contourData.at(1), 200); + OFCHECK_EQUAL(contourData.at(2), 146); + OFCHECK_EQUAL(contourData.at(3), 101); + OFCHECK_EQUAL(contourData.at(4), 201); + OFCHECK_EQUAL(contourData.at(5), 147); + } +} diff -Nru dcmtk-3.6.6/dcmrt/tests/tests.cc dcmtk-3.6.7/dcmrt/tests/tests.cc --- dcmtk-3.6.6/dcmrt/tests/tests.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmrt/tests/tests.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2012-2016, OFFIS e.V. + * Copyright (C) 2012-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -24,4 +24,5 @@ #include "dcmtk/ofstd/oftest.h" OFTEST_REGISTER(dcmrt_search); +OFTEST_REGISTER(dcmrt_contour); OFTEST_MAIN("dcmrt") diff -Nru dcmtk-3.6.6/dcmseg/include/dcmtk/dcmseg/segdoc.h dcmtk-3.6.7/dcmseg/include/dcmtk/dcmseg/segdoc.h --- dcmtk-3.6.6/dcmseg/include/dcmtk/dcmseg/segdoc.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmseg/include/dcmtk/dcmseg/segdoc.h 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2015-2019, Open Connections GmbH + * Copyright (C) 2015-2022, Open Connections GmbH * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation are maintained by @@ -130,6 +130,23 @@ */ virtual OFBool getCheckFGOnWrite(); + /** If enabled, dimensions are checked before actual writing. + * This can be very time-consuming if many frames are present. + * Disabling should only be done if the user knows that the functional groups + * are valid, wants to to adapt the functional groups manually after calling + * write() or knows what he's doing otherwise.
    + * Per default, checking is enabled. + * @param doCheck If OFTrue, checking will be performed. If OFFalse, + * no checks are performed. + */ + virtual void setCheckDimensionsOnWrite(const OFBool doCheck); + + /** Returns whether dimensions are checked before actual + * writing is performed in the write() method. + * @return OFTrue if checking is performed, OFFalse otherwise + */ + virtual OFBool getCheckDimensionsOnWrite(); + // -------------------- creation --------------------- /** Factory method to create a binary segmentation object from the minimal @@ -195,7 +212,10 @@ /** Get number of frames, based on the number of items in the shared * functional functional groups sequence (i.e.\ the attribute Number of - * Frames) is not trusted). + * Frames) is not trusted). Note that this returns the numbers of frames + * present in memory. In practice (i.e. for writing later on), the number + * of frames must not exceed 2^31-1 (maximum value of Number of Frames + * attribute, enforced by writing routines). * @return The number of frames handled by this object */ size_t getNumberOfFrames(); @@ -218,7 +238,9 @@ return this->m_SegmentationFractionalType; } - /** Get the Number of Segments + /** Get the Number of Segments. Note that this returns the numbers of Segments + * present in memory. In practice, the number of segments must not exceed + * 2^16-1 (enforced by writing routines). * @return The number of segments handled by this object */ size_t getNumberOfSegments(); @@ -266,14 +288,14 @@ * @param segmentNumber The logical segment number * @return The segment if segment number is valid, NULL otherwise */ - virtual DcmSegment* getSegment(const unsigned int segmentNumber); + virtual DcmSegment* getSegment(const size_t segmentNumber); /** Get logical segment number by providing a pointer to a given segment * @param segment The segment to find the logical segment number for * @param segmentNumber The segment number. 0 if segment could not be found. * @return OFTrue if segment could be found, OFFalse otherwise. */ - virtual OFBool getSegmentNumber(const DcmSegment* segment, unsigned int& segmentNumber); + virtual OFBool getSegmentNumber(const DcmSegment* segment, size_t& segmentNumber); /** Reference to the Performed Procedure Step that led to the creation of this * segmentation object. This is required if this object is created in an MPPS @@ -466,11 +488,9 @@ /** Write fractional frames to given pixel data buffer * @param pixData The filled pixel data buffer returned by the method - * @param numFrames The number of frames to write - * @param pixDataLength The length of buffer in pixData (in bytes) returned by this method. * @return EC_Normal if writing was successful, error otherwise */ - virtual OFCondition writeFractionalFrames(Uint8* pixData, Uint32 numFrames, const size_t pixDataLength); + OFCondition writeFractionalFrames(Uint8* pixData); /** Write binary frames to given given pixel data buffer * @param pixData The filled pixel data buffer returned by the method @@ -524,16 +544,16 @@ * @param colorModel The color model used * @return EC_Normal if reading/checking was successful, error otherwise */ - virtual OFCondition getAndCheckImagePixelAttributes(DcmItem& dataset, - Uint16& allocated, - Uint16& stored, - Uint16& high, - Uint16& spp, - Uint16& pixelRep, - Uint16& rows, - Uint16& cols, - Uint16& numberOfFrames, - OFString& colorModel); + OFCondition getAndCheckImagePixelAttributes(DcmItem& dataset, + Uint16& allocated, + Uint16& stored, + Uint16& high, + Uint16& spp, + Uint16& pixelRep, + Uint16& rows, + Uint16& cols, + Uint32& numberOfFrames, + OFString& colorModel); /** This is the counterpart to the extractFrames() function. It takes a number * of frames that are in binary segmentation format (i.e. "bit-packed") and @@ -628,7 +648,7 @@ * @result OFTrue if length is valid, OFFalse otherwise */ OFBool - checkPixDataLength(DcmElement* pixelData, const Uint16 rows, const Uint16 cols, const Uint16& numberOfFrames); + checkPixDataLength(DcmElement* pixelData, const Uint16 rows, const Uint16 cols, const Uint32& numberOfFrames); /** Loads file * @param dcmff The file format to load into @@ -667,7 +687,7 @@ */ OFCondition readSegmentationType(DcmItem& item); - /** Decompress the given dataset + /** Decompress the given dataset, if compressed in Deflated or RLE transfer syntax. * @param dset The dataset to be decompressed * @return EC_Normal if decompression worked (or dataset has already been * decompressed), IOD_EC_CannotDecompress otherwise diff -Nru dcmtk-3.6.6/dcmseg/include/dcmtk/dcmseg/segment.h dcmtk-3.6.7/dcmseg/include/dcmtk/dcmseg/segment.h --- dcmtk-3.6.6/dcmseg/include/dcmtk/dcmseg/segment.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmseg/include/dcmtk/dcmseg/segment.h 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2015-2019, Open Connections GmbH + * Copyright (C) 2015-2022, Open Connections GmbH * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation are maintained by @@ -58,10 +58,10 @@ * successful; memory is allocated by the function * @param segmentLabel Free text label for the segment * @param segmentedPropertyCategory The segmented property category. - * Baseline CID 7150 “Segmentation Property Categories†should be + * Baseline CID 7150 "Segmentation Property Categories" should be * used. * @param segmentedPropertyType The segmented property type. Baseline CID - * 7151 “Segmentation Property Types†+ * 7151 "Segmentation Property Types" * @param algoType The algorithm type used for segmenting this segment * @param algoName Algorithm name (required if algoType is not MANUAL) * @return EC_Normal if creation was successful, error otherwise @@ -97,7 +97,7 @@ /** Get Segment Number * @return The Segment number */ - virtual unsigned int getSegmentNumber(); + virtual Uint16 getSegmentNumber(); /** Get Segment Label * @param value Reference to variable in which the value should be stored diff -Nru dcmtk-3.6.6/dcmseg/include/dcmtk/dcmseg/segtypes.h dcmtk-3.6.7/dcmseg/include/dcmtk/dcmseg/segtypes.h --- dcmtk-3.6.6/dcmseg/include/dcmtk/dcmseg/segtypes.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmseg/include/dcmtk/dcmseg/segtypes.h 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2015-2020, Open Connections GmbH + * Copyright (C) 2015-2022, Open Connections GmbH * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation are maintained by @@ -55,7 +55,12 @@ * using an unsigned 16 Bit Integer within "Segment Number" starting with 1. * Thus maximally 65535 segments can be stored. */ -const Uint32 DCM_SEG_MAX_SEGMENTS = 65535; +const Uint16 DCM_SEG_MAX_SEGMENTS = 65535; // 2^16-1 + +/** Number of frames for Segmentation objects is limited (besides others) by + * the Number of Frames attribute which permits values up to a maximum of 2^31-1. + */ +const Uint32 DCM_SEG_MAX_FRAMES = 2147483647; // 2^31-1 /** @name Specific error conditions for module dcmseg * These error codes can be used in addition to the general purpose @@ -73,6 +78,8 @@ extern DCMTK_DCMSEG_EXPORT const OFConditionConst SG_EC_InvalidValue; /// error: not enough data extern DCMTK_DCMSEG_EXPORT const OFConditionConst SG_EC_NotEnoughData; +/// error: too many frames +extern DCMTK_DCMSEG_EXPORT const OFConditionConst SG_EC_MaxFramesReached; /** General purpose class hiding global functions, constants and types in the * segmentation context from the global namespace. diff -Nru dcmtk-3.6.6/dcmseg/libsrc/CMakeLists.txt dcmtk-3.6.7/dcmseg/libsrc/CMakeLists.txt --- dcmtk-3.6.6/dcmseg/libsrc/CMakeLists.txt 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmseg/libsrc/CMakeLists.txt 2022-04-28 13:47:25.000000000 +0000 @@ -1,4 +1,9 @@ # create library from source files -DCMTK_ADD_LIBRARY(dcmseg segdoc segment segtypes segutils) +DCMTK_ADD_LIBRARY(dcmseg + segdoc.cc + segment.cc + segtypes.cc + segutils.cc +) DCMTK_TARGET_LINK_MODULES(dcmseg dcmfg dcmiod dcmdata ofstd oflog) diff -Nru dcmtk-3.6.6/dcmseg/libsrc/Makefile.dep dcmtk-3.6.7/dcmseg/libsrc/Makefile.dep --- dcmtk-3.6.6/dcmseg/libsrc/Makefile.dep 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmseg/libsrc/Makefile.dep 2022-04-28 13:47:25.000000000 +0000 @@ -131,13 +131,6 @@ ../../dcmdata/include/dcmtk/dcmdata/dcdatutl.h \ ../include/dcmtk/dcmseg/segdoc.h \ ../../dcmfg/include/dcmtk/dcmfg/concatenationloader.h \ - ../../ofstd/include/dcmtk/ofstd/oftuple.h \ - ../../ofstd/include/dcmtk/ofstd/ofdiag.h \ - ../../ofstd/include/dcmtk/ofstd/diag/push.def \ - ../../ofstd/include/dcmtk/ofstd/diag/mmtag.def \ - ../../ofstd/include/dcmtk/ofstd/variadic/tuplefrd.h \ - ../../ofstd/include/dcmtk/ofstd/variadic/tuple.h \ - ../../ofstd/include/dcmtk/ofstd/diag/pop.def \ ../../dcmfg/include/dcmtk/dcmfg/fginterface.h \ ../../dcmfg/include/dcmtk/dcmfg/fg.h \ ../../dcmiod/include/dcmtk/dcmiod/iodimage.h \ @@ -157,10 +150,13 @@ ../../dcmiod/include/dcmtk/dcmiod/modimagepixelvariant.h \ ../../dcmiod/include/dcmtk/dcmiod/modimagepixelbase.h \ ../../ofstd/include/dcmtk/ofstd/ofvriant.h \ + ../../ofstd/include/dcmtk/ofstd/ofdiag.h \ ../../ofstd/include/dcmtk/ofstd/variadic/variant.h \ ../../ofstd/include/dcmtk/ofstd/variadic/helpers.h \ + ../../ofstd/include/dcmtk/ofstd/diag/push.def \ ../../ofstd/include/dcmtk/ofstd/diag/cnvrsn.def \ ../../ofstd/include/dcmtk/ofstd/diag/vsprfw.def \ + ../../ofstd/include/dcmtk/ofstd/diag/pop.def \ ../../dcmiod/include/dcmtk/dcmiod/modenhequipment.h \ ../../dcmiod/include/dcmtk/dcmiod/modimagepixel.h \ ../../dcmiod/include/dcmtk/dcmiod/modmultiframedimension.h \ @@ -291,13 +287,6 @@ ../../dcmdata/include/dcmtk/dcmdata/cmdlnarg.h \ ../../dcmfg/include/dcmtk/dcmfg/fgdefine.h \ ../../dcmfg/include/dcmtk/dcmfg/concatenationloader.h \ - ../../ofstd/include/dcmtk/ofstd/oftuple.h \ - ../../ofstd/include/dcmtk/ofstd/ofdiag.h \ - ../../ofstd/include/dcmtk/ofstd/diag/push.def \ - ../../ofstd/include/dcmtk/ofstd/diag/mmtag.def \ - ../../ofstd/include/dcmtk/ofstd/variadic/tuplefrd.h \ - ../../ofstd/include/dcmtk/ofstd/variadic/tuple.h \ - ../../ofstd/include/dcmtk/ofstd/diag/pop.def \ ../../dcmfg/include/dcmtk/dcmfg/fgfracon.h \ ../../dcmfg/include/dcmtk/dcmfg/fgbase.h \ ../../dcmfg/include/dcmtk/dcmfg/fgtypes.h \ @@ -322,10 +311,13 @@ ../../dcmiod/include/dcmtk/dcmiod/modimagepixelvariant.h \ ../../dcmiod/include/dcmtk/dcmiod/modimagepixelbase.h \ ../../ofstd/include/dcmtk/ofstd/ofvriant.h \ + ../../ofstd/include/dcmtk/ofstd/ofdiag.h \ ../../ofstd/include/dcmtk/ofstd/variadic/variant.h \ ../../ofstd/include/dcmtk/ofstd/variadic/helpers.h \ + ../../ofstd/include/dcmtk/ofstd/diag/push.def \ ../../ofstd/include/dcmtk/ofstd/diag/cnvrsn.def \ ../../ofstd/include/dcmtk/ofstd/diag/vsprfw.def \ + ../../ofstd/include/dcmtk/ofstd/diag/pop.def \ ../../dcmiod/include/dcmtk/dcmiod/modenhequipment.h \ ../../dcmiod/include/dcmtk/dcmiod/modimagepixel.h \ ../../dcmiod/include/dcmtk/dcmiod/modmultiframedimension.h \ diff -Nru dcmtk-3.6.6/dcmseg/libsrc/segdoc.cc dcmtk-3.6.7/dcmseg/libsrc/segdoc.cc --- dcmtk-3.6.6/dcmseg/libsrc/segdoc.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmseg/libsrc/segdoc.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* + * Copyright (C) 2015-2022, Open Connections GmbH * - * Copyright (C) 2015-2019, Open Connections GmbH * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation are maintained by @@ -316,6 +316,16 @@ return m_FGInterface.getCheckOnWrite(); } +void DcmSegmentation::setCheckDimensionsOnWrite(const OFBool doCheck) +{ + m_DimensionModule.setCheckOnWrite(doCheck); +} + +OFBool DcmSegmentation::getCheckDimensionsOnWrite() +{ + return m_DimensionModule.getCheckOnWrite(); +} + OFCondition DcmSegmentation::writeWithSeparatePixelData(DcmItem& dataset, Uint8*& pixData, size_t& pixDataLength) { // FGInterface::write() will know whether it has to check FG structure @@ -392,14 +402,12 @@ if (m_SegmentationType == DcmSegTypes::ST_BINARY) result = writeBinaryFrames(pixData, rows, cols, pixDataLength); else if (m_SegmentationType == DcmSegTypes::ST_FRACTIONAL) - result = writeFractionalFrames(pixData, numFrames, pixDataLength); + result = writeFractionalFrames(pixData); else result = SG_EC_UnknownSegmentationType; if (result.bad()) { delete[] pixData; - pixData = NULL; - pixDataLength = 0; } } @@ -455,9 +463,12 @@ OFCondition DcmSegmentation::addFrame(Uint8* pixData) { - OFCondition result; + if (m_Frames.size() >= DCM_SEG_MAX_FRAMES) + return SG_EC_MaxFramesReached; - Uint16 rows, cols; + OFCondition result; + Uint16 rows = 0; + Uint16 cols = 0; if (getImagePixel().getRows(rows).good() && getImagePixel().getColumns(cols).good()) { DcmIODTypes::Frame* frame = NULL; @@ -532,7 +543,7 @@ Uint16 refSeg; if (fg->getReferencedSegmentNumber(refSeg).good()) { - if (refSeg == segmentNumber) + if (OFstatic_cast(size_t, refSeg) == segmentNumber) { frameNumbers.push_back(count); } @@ -548,6 +559,9 @@ OFCondition DcmSegmentation::addFrame(Uint8* pixData, const Uint16 segmentNumber, const OFVector& perFrameInformation) { + if (m_Frames.size() >= DCM_SEG_MAX_FRAMES) + return SG_EC_MaxFramesReached; + Uint32 frameNo = OFstatic_cast(Uint32, m_Frames.size()); // will be the index of the frame (counted from 0) OFCondition result; @@ -726,7 +740,7 @@ /* -- Getter for DICOM attributes -- */ -DcmSegment* DcmSegmentation::getSegment(const unsigned int segmentNumber) +DcmSegment* DcmSegmentation::getSegment(const size_t segmentNumber) { // check for invalid index if ((segmentNumber == 0) || (segmentNumber > m_Segments.size())) @@ -738,7 +752,7 @@ return m_Segments[segmentNumber - 1]; } -OFBool DcmSegmentation::getSegmentNumber(const DcmSegment* segment, unsigned int& segmentNumber) +OFBool DcmSegmentation::getSegmentNumber(const DcmSegment* segment, size_t& segmentNumber) { segmentNumber = 0; size_t max = m_Segments.size(); @@ -746,8 +760,7 @@ { if (m_Segments.at(count) == segment) { - // logical segment numbering starts with 1 but vector index with 0 - segmentNumber = OFstatic_cast(unsigned int, count + 1); + segmentNumber = OFstatic_cast(Uint16, count + 1); return OFTrue; } } @@ -805,9 +818,10 @@ OFCondition DcmSegmentation::readFrames(DcmItem& dataset) { OFCondition result; - Uint16 allocated, stored, high, spp, pixelRep, rows, cols, numberOfFrames; - allocated = stored = high = spp = rows = cols = numberOfFrames = 0; - pixelRep = 2; // invalid value for this attribute + Uint16 allocated, stored, high, spp, pixelRep, rows, cols; + Uint32 numberOfFrames = 0; + allocated = stored = high = spp = rows = cols = 0; + pixelRep = 2; // invalid value for this attribute OFString colorModel; /* check the typical image pixel attributes and get correct(ed) values */ @@ -872,7 +886,7 @@ Uint16& pixelRep, Uint16& rows, Uint16& cols, - Uint16& numberOfFrames, + Uint32& numberOfFrames, OFString& colorModel) { OFBool fail = OFFalse; @@ -910,7 +924,7 @@ } else { - numberOfFrames = OFstatic_cast(Uint16, numFrames); + numberOfFrames = OFstatic_cast(Uint32, numFrames); } } @@ -983,9 +997,12 @@ OFCondition result = writeWithSeparatePixelData(dataset, pixData, pixDataLength); if (result.good()) { + // Check whether pixel data length exceeds maximum number of bytes for uncompressed pixel data, + // enforced by length field of Pixel Data attribute VR OB/OW if written in explicit VR transfer syntax. if (pixDataLength <= 4294967294UL) { - result = dataset.putAndInsertUint8Array(DCM_PixelData, pixData, OFstatic_cast(unsigned long, pixDataLength)); + result + = dataset.putAndInsertUint8Array(DCM_PixelData, pixData, OFstatic_cast(unsigned long, pixDataLength)); } else { @@ -1024,15 +1041,10 @@ OFCondition DcmSegmentation::writeMultiFrameDimensionModule(DcmItem& dataset) { - OFCondition result = m_DimensionModule.checkDimensions(&dataset); - if (result.good()) - { - result = m_DimensionModule.write(dataset); - } - return result; + return m_DimensionModule.write(dataset); } -OFCondition DcmSegmentation::writeFractionalFrames(Uint8* pixData, const Uint32 numFrames, const size_t pixDataLength) +OFCondition DcmSegmentation::writeFractionalFrames(Uint8* pixData) { OFVector::iterator it = m_Frames.begin(); // Just copy bytes for each frame as is @@ -1158,7 +1170,7 @@ OFBool DcmSegmentation::checkPixDataLength(DcmElement* pixelData, const Uint16 rows, const Uint16 cols, - const Uint16& numberOfFrames) + const Uint32& numberOfFrames) { // Get actual length of pixel data in bytes size_t length = pixelData->getLengthField(); @@ -1210,7 +1222,7 @@ if (m_SegmentationType == DcmSegTypes::ST_BINARY) { // check whether the 1-bit pixels exactly fit into bytes - remainder = (OFstatic_cast(size_t, rows) * cols) % 8; + remainder = bytesRequired % 8; // number of bytes that work on an exact fit bytesRequired = bytesRequired / 8; // add one byte if we have a remainder @@ -1311,9 +1323,14 @@ DCMSEG_ERROR("No segments defined"); return OFFalse; } + if (m_Segments.size() > DCM_SEG_MAX_SEGMENTS) + { + DCMSEG_ERROR("Too many segments defined"); + return OFFalse; + } if (m_Segments.size() > m_Frames.size()) { - DCMSEG_ERROR("There are more segments than frames defined"); + DCMSEG_ERROR("More segments than frames defined"); return OFFalse; } @@ -1431,7 +1448,7 @@ // previous frame; mask out those bits not belonging to previous frame. // This will potentially create some empty bits on the left of the byte, // that the current frame can use to store the its own first bits. - firstByte = (writePos[0] << freeBits) >> freeBits; + firstByte = OFstatic_cast(unsigned char, (writePos[0] << freeBits)) >> freeBits; memcpy(writePos, (*frame)->pixData, (*frame)->length); // If the previous frame left over some unused bits, shift the current frame // that number of bits to the left, and restore the original bits of the @@ -1461,6 +1478,6 @@ // last byte. Fill them with zeros (though not required by the standard). if (freeBits > 0) { - *writePos = (*writePos >> freeBits) << freeBits; + *writePos = (OFstatic_cast(unsigned char, *writePos) >> freeBits) << freeBits; } } diff -Nru dcmtk-3.6.6/dcmseg/libsrc/segment.cc dcmtk-3.6.7/dcmseg/libsrc/segment.cc --- dcmtk-3.6.6/dcmseg/libsrc/segment.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmseg/libsrc/segment.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2015-2019, Open Connections GmbH + * Copyright (C) 2015-2022, Open Connections GmbH * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation are maintained by @@ -163,12 +163,21 @@ // -------------- getters -------------------- -unsigned int DcmSegment::getSegmentNumber() +Uint16 DcmSegment::getSegmentNumber() { - unsigned int value = 0; + Uint16 value = 0; if (m_SegmentationDoc != NULL) { - m_SegmentationDoc->getSegmentNumber(this, value); + size_t big = 0; + m_SegmentationDoc->getSegmentNumber(this, big); + if (big <= DCM_SEG_MAX_SEGMENTS) + { + value = OFstatic_cast(Uint16, big); + } + else + { + DCMSEG_ERROR("More segments (" << big << ") defined than permitted (" << DCM_SEG_MAX_SEGMENTS << ")"); + } } return value; } diff -Nru dcmtk-3.6.6/dcmseg/libsrc/segtypes.cc dcmtk-3.6.7/dcmseg/libsrc/segtypes.cc --- dcmtk-3.6.6/dcmseg/libsrc/segtypes.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmseg/libsrc/segtypes.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2015-2019, Open Connections GmbH + * Copyright (C) 2015-2022, Open Connections GmbH * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation are maintained by @@ -38,6 +38,7 @@ makeOFConditionConst(SG_EC_UnknownSegmentationType, OFM_dcmseg, 3, OF_error, "Unknown Segmentation Type"); makeOFConditionConst(SG_EC_InvalidValue, OFM_dcmseg, 4, OF_error, "Invalid value for Segmentation SOP Class"); makeOFConditionConst(SG_EC_NotEnoughData, OFM_dcmseg, 5, OF_error, "Not enough data"); +makeOFConditionConst(SG_EC_MaxFramesReached, OFM_dcmseg, 6, OF_error, "Maximum Number of Frames reached"); DcmSegTypes::E_SegmentationType DcmSegTypes::OFString2Segtype(const OFString& value) { @@ -329,12 +330,12 @@ if (result.good()) { DcmIODUtil::writeSubSequence >(result, - DCM_SegmentedPropertyTypeModifierCodeSequence, - m_SegmentedPropertyTypeModifierCode, - item, - "1-n", - "3", - "SegmentDescriptionMacro"); + DCM_SegmentedPropertyTypeModifierCodeSequence, + m_SegmentedPropertyTypeModifierCode, + item, + "1-n", + "3", + "SegmentDescriptionMacro"); } } return result; diff -Nru dcmtk-3.6.6/dcmseg/libsrc/segutils.cc dcmtk-3.6.7/dcmseg/libsrc/segutils.cc --- dcmtk-3.6.6/dcmseg/libsrc/segutils.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmseg/libsrc/segutils.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2015-2019, Open Connections GmbH + * Copyright (C) 2015-2022, Open Connections GmbH * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation are maintained by @@ -130,7 +130,7 @@ { if (numBits > 7) { - DCMSEG_ERROR("Invalid input data: shiftFrameBitsLeft() can only shift 0-7 bits"); + DCMSEG_ERROR("Invalid input data: alignFrameOnBitPosition() can only shift 0-7 bits"); return; } Uint8 carryOver = 0; @@ -146,7 +146,7 @@ buf[x] |= carryOver; // Compute carry over bits for next byte to be handled, i.e. those bits at the left that will be // overwritten in the next byte - carryOver = current >> (8 - numBits); + carryOver = OFstatic_cast(unsigned char, current) >> (8 - numBits); } } @@ -167,12 +167,12 @@ OFString DcmSegUtils::debugByte2Bin(Uint8 b) { - OFString result("", 8); + OFString result("00000000"); for (int i = 7; i >= 0; i--) { result[i] = (b & 1) + '0'; - b >>= 1; + b = OFstatic_cast(unsigned char, b) >> 1; } return result; } diff -Nru dcmtk-3.6.6/dcmseg/tests/CMakeLists.txt dcmtk-3.6.7/dcmseg/tests/CMakeLists.txt --- dcmtk-3.6.6/dcmseg/tests/CMakeLists.txt 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmseg/tests/CMakeLists.txt 2022-04-28 13:47:25.000000000 +0000 @@ -1,5 +1,11 @@ # declare executables -DCMTK_ADD_EXECUTABLE(dcmseg_tests tests tutils troundtrip.cc tconcat_binary) +DCMTK_ADD_EXECUTABLE(dcmseg_tests + tbigdim.cc + tests.cc + tutils.cc + troundtrip.cc + tconcat_binary.cc +) # make sure executables are linked to the corresponding libraries DCMTK_TARGET_LINK_MODULES(dcmseg_tests dcmseg dcmfg dcmiod dcmdata oflog ofstd) diff -Nru dcmtk-3.6.6/dcmseg/tests/Makefile.dep dcmtk-3.6.7/dcmseg/tests/Makefile.dep --- dcmtk-3.6.6/dcmseg/tests/Makefile.dep 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmseg/tests/Makefile.dep 2022-04-28 13:47:25.000000000 +0000 @@ -1,3 +1,176 @@ +tbigdim.o: tbigdim.cc ../../config/include/dcmtk/config/osconfig.h \ + ../include/dcmtk/dcmseg/segdoc.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcvrui.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcbytstr.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 \ + ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ + ../../ofstd/include/dcmtk/ofstd/ofcast.h \ + ../../ofstd/include/dcmtk/ofstd/ofexport.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.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 \ + ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofstream.h \ + ../../oflog/include/dcmtk/oflog/tstring.h \ + ../../ofstd/include/dcmtk/ofstd/ofstring.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 \ + ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \ + ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ + ../../ofstd/include/dcmtk/ofstd/ofthread.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ + ../../ofstd/include/dcmtk/ofstd/ofcond.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 \ + ../../dcmfg/include/dcmtk/dcmfg/concatenationcreator.h \ + ../../dcmdata/include/dcmtk/dcmdata/dctk.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcswap.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcistrma.h \ + ../../ofstd/include/dcmtk/ofstd/offile.h \ + ../../ofstd/include/dcmtk/ofstd/ofstd.h \ + ../../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/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/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/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/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/dcvrsv.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcvruv.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/dcvrov.h \ + ../../dcmdata/include/dcmtk/dcmdata/cmdlnarg.h \ + ../../dcmfg/include/dcmtk/dcmfg/fgdefine.h \ + ../../dcmfg/include/dcmtk/dcmfg/concatenationloader.h \ + ../../dcmiod/include/dcmtk/dcmiod/iodtypes.h \ + ../../dcmiod/include/dcmtk/dcmiod/ioddef.h \ + ../../dcmiod/include/dcmtk/dcmiod/iodutil.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcdatutl.h \ + ../../dcmiod/include/dcmtk/dcmiod/iodrules.h \ + ../../dcmfg/include/dcmtk/dcmfg/fgfracon.h \ + ../../dcmfg/include/dcmtk/dcmfg/fgbase.h \ + ../../dcmfg/include/dcmtk/dcmfg/fgtypes.h \ + ../../dcmfg/include/dcmtk/dcmfg/fginterface.h \ + ../../dcmfg/include/dcmtk/dcmfg/fg.h \ + ../../dcmiod/include/dcmtk/dcmiod/iodimage.h \ + ../../dcmiod/include/dcmtk/dcmiod/iodcommn.h \ + ../../dcmiod/include/dcmtk/dcmiod/modcommoninstanceref.h \ + ../../dcmiod/include/dcmtk/dcmiod/iodmacro.h \ + ../../dcmiod/include/dcmtk/dcmiod/modbase.h \ + ../../dcmiod/include/dcmtk/dcmiod/iodreferences.h \ + ../../dcmiod/include/dcmtk/dcmiod/modequipment.h \ + ../../dcmiod/include/dcmtk/dcmiod/modfor.h \ + ../../dcmiod/include/dcmtk/dcmiod/modgeneralseries.h \ + ../../dcmiod/include/dcmtk/dcmiod/modgeneralstudy.h \ + ../../dcmiod/include/dcmtk/dcmiod/modpatient.h \ + ../../dcmiod/include/dcmtk/dcmiod/modpatientstudy.h \ + ../../ofstd/include/dcmtk/ofstd/ofoption.h \ + ../../ofstd/include/dcmtk/ofstd/ofalign.h \ + ../../dcmiod/include/dcmtk/dcmiod/modsopcommon.h \ + ../../dcmiod/include/dcmtk/dcmiod/modgeneralimage.h \ + ../../dcmiod/include/dcmtk/dcmiod/modimagepixelvariant.h \ + ../../dcmiod/include/dcmtk/dcmiod/modimagepixelbase.h \ + ../../ofstd/include/dcmtk/ofstd/ofvriant.h \ + ../../ofstd/include/dcmtk/ofstd/ofdiag.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/variant.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/helpers.h \ + ../../ofstd/include/dcmtk/ofstd/diag/push.def \ + ../../ofstd/include/dcmtk/ofstd/diag/cnvrsn.def \ + ../../ofstd/include/dcmtk/ofstd/diag/vsprfw.def \ + ../../ofstd/include/dcmtk/ofstd/diag/pop.def \ + ../../dcmiod/include/dcmtk/dcmiod/modenhequipment.h \ + ../../dcmiod/include/dcmtk/dcmiod/modimagepixel.h \ + ../../dcmiod/include/dcmtk/dcmiod/modmultiframedimension.h \ + ../../dcmiod/include/dcmtk/dcmiod/modmultiframefg.h \ + ../../dcmiod/include/dcmtk/dcmiod/modsegmentationseries.h \ + ../include/dcmtk/dcmseg/segdef.h ../include/dcmtk/dcmseg/segtypes.h \ + ../include/dcmtk/dcmseg/segment.h \ + ../../ofstd/include/dcmtk/ofstd/oftest.h \ + ../../ofstd/include/dcmtk/ofstd/ofconapp.h \ + ../../ofstd/include/dcmtk/ofstd/ofcmdln.h \ + ../../ofstd/include/dcmtk/ofstd/ofexbl.h \ + ../../ofstd/include/dcmtk/ofstd/ofconsol.h \ + ../../ofstd/include/dcmtk/ofstd/ofexit.h \ + ../../dcmfg/include/dcmtk/dcmfg/fgpixmsr.h \ + ../../dcmfg/include/dcmtk/dcmfg/fgplanor.h \ + ../../dcmfg/include/dcmtk/dcmfg/fgplanpo.h \ + ../../dcmfg/include/dcmtk/dcmfg/fgseg.h \ + ../../ofstd/include/dcmtk/ofstd/ofstrutl.h \ + ../../ofstd/include/dcmtk/ofstd/oftempf.h tconcat_binary.o: tconcat_binary.cc \ ../../config/include/dcmtk/config/osconfig.h \ ../../dcmfg/include/dcmtk/dcmfg/concatenationcreator.h \ @@ -121,13 +294,6 @@ ../../dcmiod/include/dcmtk/dcmiod/iodutil.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdatutl.h \ ../../dcmiod/include/dcmtk/dcmiod/iodrules.h \ - ../../ofstd/include/dcmtk/ofstd/oftuple.h \ - ../../ofstd/include/dcmtk/ofstd/ofdiag.h \ - ../../ofstd/include/dcmtk/ofstd/diag/push.def \ - ../../ofstd/include/dcmtk/ofstd/diag/mmtag.def \ - ../../ofstd/include/dcmtk/ofstd/variadic/tuplefrd.h \ - ../../ofstd/include/dcmtk/ofstd/variadic/tuple.h \ - ../../ofstd/include/dcmtk/ofstd/diag/pop.def \ ../include/dcmtk/dcmseg/segdoc.h \ ../../dcmfg/include/dcmtk/dcmfg/fgfracon.h \ ../../dcmfg/include/dcmtk/dcmfg/fgbase.h \ @@ -153,10 +319,13 @@ ../../dcmiod/include/dcmtk/dcmiod/modimagepixelvariant.h \ ../../dcmiod/include/dcmtk/dcmiod/modimagepixelbase.h \ ../../ofstd/include/dcmtk/ofstd/ofvriant.h \ + ../../ofstd/include/dcmtk/ofstd/ofdiag.h \ ../../ofstd/include/dcmtk/ofstd/variadic/variant.h \ ../../ofstd/include/dcmtk/ofstd/variadic/helpers.h \ + ../../ofstd/include/dcmtk/ofstd/diag/push.def \ ../../ofstd/include/dcmtk/ofstd/diag/cnvrsn.def \ ../../ofstd/include/dcmtk/ofstd/diag/vsprfw.def \ + ../../ofstd/include/dcmtk/ofstd/diag/pop.def \ ../../dcmiod/include/dcmtk/dcmiod/modenhequipment.h \ ../../dcmiod/include/dcmtk/dcmiod/modimagepixel.h \ ../../dcmiod/include/dcmtk/dcmiod/modmultiframedimension.h \ @@ -342,13 +511,6 @@ ../../dcmiod/include/dcmtk/dcmiod/iodutil.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdatutl.h \ ../../dcmiod/include/dcmtk/dcmiod/iodrules.h \ - ../../ofstd/include/dcmtk/ofstd/oftuple.h \ - ../../ofstd/include/dcmtk/ofstd/ofdiag.h \ - ../../ofstd/include/dcmtk/ofstd/diag/push.def \ - ../../ofstd/include/dcmtk/ofstd/diag/mmtag.def \ - ../../ofstd/include/dcmtk/ofstd/variadic/tuplefrd.h \ - ../../ofstd/include/dcmtk/ofstd/variadic/tuple.h \ - ../../ofstd/include/dcmtk/ofstd/diag/pop.def \ ../../dcmfg/include/dcmtk/dcmfg/fgfracon.h \ ../../dcmfg/include/dcmtk/dcmfg/fgbase.h \ ../../dcmfg/include/dcmtk/dcmfg/fgtypes.h \ @@ -373,10 +535,13 @@ ../../dcmiod/include/dcmtk/dcmiod/modimagepixelvariant.h \ ../../dcmiod/include/dcmtk/dcmiod/modimagepixelbase.h \ ../../ofstd/include/dcmtk/ofstd/ofvriant.h \ + ../../ofstd/include/dcmtk/ofstd/ofdiag.h \ ../../ofstd/include/dcmtk/ofstd/variadic/variant.h \ ../../ofstd/include/dcmtk/ofstd/variadic/helpers.h \ + ../../ofstd/include/dcmtk/ofstd/diag/push.def \ ../../ofstd/include/dcmtk/ofstd/diag/cnvrsn.def \ ../../ofstd/include/dcmtk/ofstd/diag/vsprfw.def \ + ../../ofstd/include/dcmtk/ofstd/diag/pop.def \ ../../dcmiod/include/dcmtk/dcmiod/modenhequipment.h \ ../../dcmiod/include/dcmtk/dcmiod/modimagepixel.h \ ../../dcmiod/include/dcmtk/dcmiod/modmultiframedimension.h \ diff -Nru dcmtk-3.6.6/dcmseg/tests/Makefile.in dcmtk-3.6.7/dcmseg/tests/Makefile.in --- dcmtk-3.6.6/dcmseg/tests/Makefile.in 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmseg/tests/Makefile.in 2022-04-28 13:47:25.000000000 +0000 @@ -25,7 +25,7 @@ LOCALINCLUDES = -I$(top_srcdir)/include -I$(ofstddir)/include -I$(oflogdir)/include \ -I$(dcmdatadir)/include -I$(dcmioddir)/include -I$(dcmfgdir)/include \ -test_objs = tconcat_binary.o tests.o troundtrip.o tutils.o +test_objs = tbigdim.o tconcat_binary.o tests.o troundtrip.o tutils.o objs = $(test_objs) progs = tests diff -Nru dcmtk-3.6.6/dcmseg/tests/tbigdim.cc dcmtk-3.6.7/dcmseg/tests/tbigdim.cc --- dcmtk-3.6.6/dcmseg/tests/tbigdim.cc 1970-01-01 00:00:00.000000000 +0000 +++ dcmtk-3.6.7/dcmseg/tests/tbigdim.cc 2022-04-28 13:47:25.000000000 +0000 @@ -0,0 +1,306 @@ +/* + * + * Copyright (C) 2022, 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: dcmseg + * + * Author: Michael Onken + * + * Purpose: Test for creating and reading Segmentation with many frames/segments + * + */ + +#include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ +#include "dcmtk/ofstd/oftest.h" +#include "dcmtk/dcmseg/segtypes.h" /* for DCMSEG_DEBUG */ + +#ifdef HAVE_STL_MAP +#include "dcmtk/dcmseg/segdoc.h" +#include "dcmtk/dcmseg/segment.h" + +#include "dcmtk/dcmfg/fgfracon.h" +#include "dcmtk/dcmfg/fgpixmsr.h" +#include "dcmtk/dcmfg/fgplanor.h" +#include "dcmtk/dcmfg/fgplanpo.h" +#include "dcmtk/dcmfg/fgseg.h" +#include "dcmtk/dcmiod/iodmacro.h" +#include "dcmtk/dcmdata/dcxfer.h" +#include "dcmtk/ofstd/ofmem.h" +#include "dcmtk/ofstd/ofstrutl.h" +#include "dcmtk/ofstd/oftempf.h" + +static const Uint8 NUM_ROWS = 5; +static const Uint8 NUM_COLS = 5; + +// Restrict to 1.000.000 Frames since the theoretical 2^31-1 number of frames +// results in too much memory usage and waiting time +static const Uint32 NUM_FRAMES = 1000000; +static const Uint16 NUM_SEGS = DCM_SEG_MAX_SEGMENTS; + +static const Uint8 NUM_PIXELS_PER_FRAME = NUM_COLS * NUM_ROWS; + +static DcmSegmentation* create(); +static void setGenericValues(DcmSegmentation* seg); +static void addSharedFGs(DcmSegmentation* seg); +static void addSegments(DcmSegmentation* seg); +static void addFrames(DcmSegmentation* seg); +static void addDimensions(DcmSegmentation* seg); +static void checkCreatedObject(DcmDataset& seg); + +OFTEST_FLAGS(dcmseg_bigdim, EF_Slow) +{ + // Make sure data dictionary is loaded + if (!dcmDataDict.isDictionaryLoaded()) + { + OFCHECK_FAIL("no data dictionary loaded, check environment variable: " DCM_DICT_ENVIRONMENT_VARIABLE); + return; + } + + // Creation + DcmSegmentation* seg = create(); + setGenericValues(seg); + addSharedFGs(seg); + addSegments(seg); + addFrames(seg); + addDimensions(seg); + + // Write to dataset and compare its dump with expected result + DcmFileFormat dcmff; + DcmDataset* ds = dcmff.getDataset(); + seg->setCheckDimensionsOnWrite(OFFalse); + seg->setCheckFGOnWrite(OFFalse); + OFCondition result = seg->writeDataset(*ds); + OFCHECK(result.good()); + + // Save to disk, and re-load to test import + OFTempFile tf; + OFString temp_fn = tf.getFilename(); + OFCHECK(!temp_fn.empty()); + OFCHECK(dcmff.saveFile(temp_fn.c_str(), EXS_LittleEndianExplicit).good()); + + // Read object from dataset into DcmSegmentation object, write again to dataset and + // check whether object after writing is identical to object after writing. + // the same expected result + delete seg; + seg = NULL; + DcmSegmentation::loadFile(temp_fn, seg).good(); + OFCHECK(seg != OFnullptr); + if (seg) + { + DcmDataset dset; + seg->setCheckDimensionsOnWrite(OFFalse); + seg->setCheckFGOnWrite(OFFalse); + OFCHECK(seg->writeDataset(dset).good()); + checkCreatedObject(dset); + delete seg; + } +} + +static DcmSegmentation* create() +{ + IODGeneralEquipmentModule::EquipmentInfo eq("Open Connections", "OC CT", "4711", "0.1"); + ContentIdentificationMacro ci("1", "LABEL", "DESCRIPTION", "Doe^John"); + DcmSegmentation* seg = NULL; + OFCondition result; + DcmSegmentation::createFractionalSegmentation(seg, NUM_ROWS, NUM_COLS, DcmSegTypes::SFT_OCCUPANCY, 255, eq, ci); + OFCHECK(result.good()); + OFCHECK(seg != OFnullptr); + seg->setCheckFGOnWrite(OFFalse); + seg->setCheckDimensionsOnWrite(OFFalse); + return seg; +} + +static void setGenericValues(DcmSegmentation* seg) +{ + if (!seg) + return; + OFCHECK(seg->getPatient().setPatientName("Bond^James").good()); + OFCHECK(seg->getPatient().setPatientID("007").good()); + OFCHECK(seg->getPatient().setPatientBirthDate("19771007").good()); + OFCHECK(seg->getStudy().setStudyDate("20190801").good()); + OFCHECK(seg->getStudy().setStudyTime("120000").good()); + OFCHECK(seg->getStudy().setStudyID("1").good()); + OFCHECK(seg->getPatientStudy().setPatientAge("040Y").good()); + OFCHECK(seg->getSeries().setSeriesDescription("Test Description").good()); + OFCHECK(seg->getSeries().setSeriesNumber("1").good()); + OFCHECK(seg->getSeries().setPatientPosition("HFS").good()); + + // Those values are usually computed automatically. UIDS are generated and date/times are set to current values. + // But in order to compare the "old" dump with the freshly created image attributes, we set some values manually, + // so that they are not overwritten with new, automatically created values later. + OFCHECK(seg->getStudy().setStudyInstanceUID("1.2.276.0.7230010.3.1.2.8323329.14863.1565940357.864811").good()); + OFCHECK(seg->getFrameOfReference().setFrameOfReferenceUID("2.25.30853397773651184949181049330553108086").good()); + OFCHECK(seg->getSeries().setSeriesInstanceUID("1.2.276.0.7230010.3.1.3.8323329.14863.1565940357.864812").good()); + OFCHECK(seg->getSOPCommon().setSOPInstanceUID("1.2.276.0.7230010.3.1.4.8323329.14863.1565940357.864813").good()); + OFCHECK(seg->getGeneralImage().setContentDate("20190927").good()); + OFCHECK(seg->getGeneralImage().setContentTime("153857").good()); +} + +static void addSharedFGs(DcmSegmentation* seg) +{ + if (!seg) + return; + + FGPixelMeasures meas; + OFCHECK(meas.setPixelSpacing("0.1\\0.1").good()); + OFCHECK(meas.setSliceThickness("1.0").good()); + OFCHECK(meas.setSpacingBetweenSlices("0.05").good()); + + FGPlanePosPatient planpo; + OFCHECK(planpo.setImagePositionPatient("0.0", "0.0", "0.0").good()); + + FGPlaneOrientationPatient planor; + OFCHECK(planor.setImageOrientationPatient("1.0", "0.0", "0.0", "0.0", "1.0", "0.0").good()); + + OFCHECK(seg->addForAllFrames(meas).good()); + OFCHECK(seg->addForAllFrames(planpo).good()); + OFCHECK(seg->addForAllFrames(planor).good()); +} + + + +static void addSegments(DcmSegmentation* seg) +{ + for (Uint16 s = 0; s < NUM_SEGS; s++) + { + DcmSegment* segment = NULL; + CodeSequenceMacro category("85756007", "SCT", "Tissue"); + CodeSequenceMacro propType("51114001", "SCT", "Artery"); + char buf[100]; + sprintf(buf, "SEGLABEL_%hu", s); + OFCHECK(DcmSegment::create(segment, buf, category, propType, DcmSegTypes::SAT_AUTOMATIC, "OC_DUMMY") + .good()); + OFCHECK(segment != OFnullptr); + Uint16 dontCare = 0; + OFCHECK(seg->addSegment(segment, dontCare).good()); + } +} + + +static void addFrames(DcmSegmentation* seg) +{ + if (!seg) + return; + + FGSegmentation* fg_seg = new FGSegmentation(); + FGFrameContent* fg = new FGFrameContent(); + OFCHECK(fg && fg_seg); + fg->setStackID("1"); + if (fg) + { + for (Uint32 frameNo = 1; frameNo <= NUM_FRAMES; frameNo++) + { + // Frame Acqusition Number is set to the current frame number. Since attribute is 16 bits + // only (but optional), this is only done as long as frame number is within 16 bit range. + if (frameNo <= DCM_SEG_MAX_SEGMENTS) + OFCHECK(fg->setFrameAcquisitionNumber(OFstatic_cast(Uint16, frameNo)).good()); + OFCHECK(fg->setFrameReferenceDateTime("20190816092557").good()); + OFCHECK(fg->setFrameAcquisitionDateTime("20190816092557").good()); + OFCHECK(fg->setFrameAcquisitionDuration(0.001).good()); + OFCHECK(fg->setInStackPositionNumber(frameNo).good()); + OFCHECK(fg->setDimensionIndexValues(1, 0).good()); + OFCHECK(fg->setDimensionIndexValues(frameNo, 1).good()); + OFVector groups; + groups.push_back(fg); + + Uint8* data = new Uint8[NUM_PIXELS_PER_FRAME]; + for (Uint8 i = 0; i < NUM_PIXELS_PER_FRAME; ++i) + { + data[i] = i; + } + OFCHECK(fg_seg->setReferencedSegmentNumber(frameNo % (DCM_SEG_MAX_SEGMENTS + 1)).good()); // limit/loop to 16 bit + OFVector perFrameFGs; + perFrameFGs.push_back(fg); + perFrameFGs.push_back(fg_seg); + OFCHECK(seg->addFrame(data, frameNo % (DCM_SEG_MAX_SEGMENTS + 1), perFrameFGs).good()); + delete[] data; + } + } + delete fg; + delete fg_seg; +} + +static void addDimensions(DcmSegmentation* seg) +{ + if (!seg) + return; + IODMultiframeDimensionModule& dims = seg->getDimensions(); + OFCHECK(dims.addDimensionIndex( + DCM_StackID, "2.25.30855560781715986879861690673941231222", DCM_FrameContentSequence, "STACK_DIM") + .good()); + OFCHECK(dims.addDimensionIndex(DCM_InStackPositionNumber, + "2.25.30855560781715986879861690673941231222", + DCM_FrameContentSequence, + "STACK_DIM") + .good()); + OFunique_ptr org( + new IODMultiframeDimensionModule::DimensionOrganizationItem); + if (org) + { + org->setDimensionOrganizationUID("2.25.30855560781715986879861690673941231222"); + dims.getDimensionOrganizationSequence().push_back(org.release()); + } +} + + +static void checkCreatedObject(DcmDataset& dset) +{ + OFString str; + Sint32 sint32; + + dset.findAndGetSint32(DCM_NumberOfFrames, sint32); + OFCHECK(NUM_FRAMES == sint32); + + DcmElement *elem = NULL; + OFCHECK(dset.findAndGetElement(DCM_PixelData, elem).good()); + if (elem != OFnullptr) + { + unsigned long count = 0; + const Uint8* pixData = NULL; + OFCHECK(dset.findAndGetUint8Array(DCM_PixelData, pixData, &count).good()); + OFCHECK(count == NUM_FRAMES * NUM_PIXELS_PER_FRAME); + for (size_t p = 0; p < count; p++) + { + OFCHECK(pixData[p] == p % (NUM_PIXELS_PER_FRAME)); + } + } + DcmSequenceOfItems *seq = NULL; + OFCHECK(dset.findAndGetSequence(DCM_PerFrameFunctionalGroupsSequence, seq).good()); + if (seq != NULL) + { + size_t card = seq->card(); + OFCHECK(card == NUM_FRAMES); + DcmItem* item = seq->getItem(0); + for (size_t n = 0; (n < card) && (item != NULL); n++) + { + DcmItem* fgItem = NULL; + OFCHECK(item->findAndGetSequenceItem(DCM_SegmentIdentificationSequence, fgItem, 0).good()); + if (item != NULL) + { + Uint16 segNum = 0; + OFCHECK(fgItem->findAndGetUint16(DCM_ReferencedSegmentNumber, segNum).good()); + OFCHECK(segNum == ((n + 1) % (DCM_SEG_MAX_SEGMENTS + 1))); + + } + item = OFstatic_cast(DcmItem*, seq->nextInContainer(item)); + } + } +} +#else + +// Dummy version of the test case. Needed to prevent ctest test failure. +OFTEST(dcmseg_bigdim) +{ + DCMSEG_DEBUG("Will not run dcmseg_bigdim test: std::map support (HAVE_STL_MAP) must be defined to complete the test in acceptable time"); +} + +#endif // HAVE_STL_MAP diff -Nru dcmtk-3.6.6/dcmseg/tests/tests.cc dcmtk-3.6.7/dcmseg/tests/tests.cc --- dcmtk-3.6.6/dcmseg/tests/tests.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmseg/tests/tests.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2015-2019, OFFIS e.V. + * Copyright (C) 2015-2022, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -23,6 +23,7 @@ #include "dcmtk/ofstd/oftest.h" +OFTEST_REGISTER(dcmseg_bigdim); OFTEST_REGISTER(dcmseg_utils); OFTEST_REGISTER(dcmseg_roundtrip); OFTEST_REGISTER(dcmseg_concat_binary); diff -Nru dcmtk-3.6.6/dcmseg/tests/troundtrip.cc dcmtk-3.6.7/dcmseg/tests/troundtrip.cc --- dcmtk-3.6.6/dcmseg/tests/troundtrip.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmseg/tests/troundtrip.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2019-2020, OFFIS e.V. + * Copyright (C) 2019-2021, 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/dcmfg/fgplanpo.h" #include "dcmtk/dcmfg/fgseg.h" #include "dcmtk/dcmiod/iodmacro.h" +#include "dcmtk/dcmdata/dcxfer.h" #include "dcmtk/ofstd/ofmem.h" #include "dcmtk/ofstd/ofstrutl.h" #include "dcmtk/ofstd/oftempf.h" @@ -285,6 +286,7 @@ { DcmSegmentation* concat = NULL; OFCHECK(DcmSegmentation::loadDataset(*concatInstance, concat).good()); + if (concat == NULL) return; // loadDataset() failed, we cannot continue size_t numFrames; numFrames = concat->getNumberOfFrames(); OFCHECK(numFrames == 1); @@ -327,7 +329,7 @@ && (cShared == concat->getFunctionalGroups().getShared()->end())); DcmSequenceOfItems* cPerFrame = NULL; OFCHECK(concatInstance->findAndGetSequence(DCM_PerFrameFunctionalGroupsSequence, cPerFrame).good()); - OFCHECK(cPerFrame->card() == 1); + OFCHECK(cPerFrame && (cPerFrame->card() == 1)); OFBool perFrame = OFFalse; FGBase* fg = concat->getFunctionalGroups().get(0, DcmFGTypes::EFG_FRAMECONTENT, perFrame); @@ -406,7 +408,11 @@ { EXPECTED_DUMP = "\n"; EXPECTED_DUMP += "# Dicom-Data-Set\n"; - EXPECTED_DUMP += "# Used TransferSyntax: Little Endian Explicit\n"; + // DcmDataset.print() produces dumps in local endianess, so make sure the dump reflects the current machine + if (gLocalByteOrder == EBO_LittleEndian) + EXPECTED_DUMP += "# Used TransferSyntax: Little Endian Explicit\n"; + else + EXPECTED_DUMP += "# Used TransferSyntax: Big Endian Explicit\n"; EXPECTED_DUMP += "(0008,0008) CS [DERIVED\\PRIMARY] # 16, 2 ImageType\n"; EXPECTED_DUMP += "(0008,0016) UI =SegmentationStorage # 28, 1 SOPClassUID\n"; EXPECTED_DUMP diff -Nru dcmtk-3.6.6/dcmsign/apps/CMakeLists.txt dcmtk-3.6.7/dcmsign/apps/CMakeLists.txt --- dcmtk-3.6.6/dcmsign/apps/CMakeLists.txt 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmsign/apps/CMakeLists.txt 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ # declare directories containing used libraries # declare executables -DCMTK_ADD_EXECUTABLE(dcmsign dcmsign) +DCMTK_ADD_EXECUTABLE(dcmsign dcmsign.cc) # make sure executables are linked to the corresponding libraries DCMTK_TARGET_LINK_MODULES(dcmsign dcmdsig dcmdata oflog ofstd) diff -Nru dcmtk-3.6.6/dcmsign/apps/dcmsign.cc dcmtk-3.6.7/dcmsign/apps/dcmsign.cc --- dcmtk-3.6.6/dcmsign/apps/dcmsign.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmsign/apps/dcmsign.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2000-2020, OFFIS e.V. + * Copyright (C) 2000-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -21,11 +21,6 @@ #include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ -#define INCLUDE_CSTDLIB -#define INCLUDE_CSTDIO -#define INCLUDE_CSTRING -#define INCLUDE_CCTYPE -#include "dcmtk/ofstd/ofstdinc.h" #include "dcmtk/dcmdata/cmdlnarg.h" #include "dcmtk/oflog/oflog.h" @@ -54,12 +49,7 @@ #include "dcmtk/dcmsign/sisrpr.h" #include "dcmtk/dcmsign/sisrvpr.h" #include "dcmtk/dcmsign/simac.h" -#include "dcmtk/dcmsign/simd5.h" -#include "dcmtk/dcmsign/sisha1.h" -#include "dcmtk/dcmsign/sisha256.h" -#include "dcmtk/dcmsign/sisha384.h" -#include "dcmtk/dcmsign/sisha512.h" -#include "dcmtk/dcmsign/siripemd.h" +#include "dcmtk/dcmsign/simdmac.h" #include "dcmtk/dcmsign/siprivat.h" #include "dcmtk/dcmsign/sicert.h" #include "dcmtk/dcmsign/sitsfs.h" @@ -553,35 +543,35 @@ if (cmd.findOption("--mac-ripemd160")) { app.checkDependence("--mac-ripemd160", "--sign or --sign-item", (opt_operation == DSO_sign) || (opt_operation == DSO_signItem)); - opt_mac = new SiRIPEMD160(); + opt_mac = new SiMDMAC(EMT_RIPEMD160); } if (cmd.findOption("--mac-sha1")) { app.checkDependence("--mac-sha1", "--sign or --sign-item", (opt_operation == DSO_sign) || (opt_operation == DSO_signItem)); - opt_mac = new SiSHA1(); + opt_mac = new SiMDMAC(EMT_SHA1); } if (cmd.findOption("--mac-md5")) { app.checkDependence("--mac-md5", "--sign or --sign-item", (opt_operation == DSO_sign) || (opt_operation == DSO_signItem)); - opt_mac = new SiMD5(); + opt_mac = new SiMDMAC(EMT_MD5); } if (cmd.findOption("--mac-sha256")) { app.checkDependence("--mac-sha256", "--sign or --sign-item", (opt_operation == DSO_sign) || (opt_operation == DSO_signItem)); - opt_mac = new SiSHA256(); + opt_mac = new SiMDMAC(EMT_SHA256); } if (cmd.findOption("--mac-sha384")) { app.checkDependence("--mac-sha384", "--sign or --sign-item", (opt_operation == DSO_sign) || (opt_operation == DSO_signItem)); - opt_mac = new SiSHA384(); + opt_mac = new SiMDMAC(EMT_SHA384); } if (cmd.findOption("--mac-sha512")) { app.checkDependence("--mac-sha512", "--sign or --sign-item", (opt_operation == DSO_sign) || (opt_operation == DSO_signItem)); - opt_mac = new SiSHA512(); + opt_mac = new SiMDMAC(EMT_SHA512); } cmd.endOptionBlock(); - if (opt_mac == NULL) opt_mac = new SiRIPEMD160(); + if (opt_mac == NULL) opt_mac = new SiMDMAC(EMT_RIPEMD160); cmd.beginOptionBlock(); if (cmd.findOption("--no-sig-purpose")) @@ -867,11 +857,11 @@ } cleanup: - delete opt_timeStamp; delete opt_mac; delete opt_profile; delete opt_tagList; + DcmSignature::cleanupLibrary(); return result; } diff -Nru dcmtk-3.6.6/dcmsign/apps/Makefile.dep dcmtk-3.6.7/dcmsign/apps/Makefile.dep --- dcmtk-3.6.6/dcmsign/apps/Makefile.dep 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmsign/apps/Makefile.dep 2022-04-28 13:47:25.000000000 +0000 @@ -1,5 +1,4 @@ dcmsign.o: dcmsign.cc ../../config/include/dcmtk/config/osconfig.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../dcmdata/include/dcmtk/dcmdata/cmdlnarg.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ @@ -8,6 +7,7 @@ ../../oflog/include/dcmtk/oflog/oflog.h \ ../../oflog/include/dcmtk/oflog/logger.h \ ../../oflog/include/dcmtk/oflog/config.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../oflog/include/dcmtk/oflog/config/defines.h \ ../../oflog/include/dcmtk/oflog/helpers/threadcf.h \ ../../oflog/include/dcmtk/oflog/loglevel.h \ @@ -58,12 +58,10 @@ ../include/dcmtk/dcmsign/sibrsapr.h ../include/dcmtk/dcmsign/siautopr.h \ ../include/dcmtk/dcmsign/sicreapr.h ../include/dcmtk/dcmsign/sisrpr.h \ ../include/dcmtk/dcmsign/sisrvpr.h ../include/dcmtk/dcmsign/simac.h \ - ../include/dcmtk/dcmsign/simd5.h ../include/dcmtk/dcmsign/sisha1.h \ - ../include/dcmtk/dcmsign/sisha256.h ../include/dcmtk/dcmsign/sisha384.h \ - ../include/dcmtk/dcmsign/sisha512.h ../include/dcmtk/dcmsign/siripemd.h \ - ../include/dcmtk/dcmsign/siprivat.h ../include/dcmtk/dcmsign/sicert.h \ - ../include/dcmtk/dcmsign/sitsfs.h ../include/dcmtk/dcmsign/sitstamp.h \ - ../include/dcmtk/dcmsign/sicertvf.h \ + ../include/dcmtk/dcmsign/simdmac.h ../include/dcmtk/dcmsign/siprivat.h \ + ../include/dcmtk/dcmsign/sicert.h ../include/dcmtk/dcmsign/sitsfs.h \ + ../include/dcmtk/dcmsign/sitstamp.h ../include/dcmtk/dcmsign/sicertvf.h \ + ../include/dcmtk/dcmsign/siexit.h \ ../../dcmdata/include/dcmtk/dcmdata/dctk.h \ ../../dcmdata/include/dcmtk/dcmdata/dcswap.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ diff -Nru dcmtk-3.6.6/dcmsign/docs/dcmsign.man dcmtk-3.6.7/dcmsign/docs/dcmsign.man --- dcmtk-3.6.6/dcmsign/docs/dcmsign.man 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmsign/docs/dcmsign.man 2022-04-28 13:47:25.000000000 +0000 @@ -582,6 +582,6 @@ \section dcmsign_copyright COPYRIGHT -Copyright (C) 2000-2020 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany. +Copyright (C) 2000-2022 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany. */ diff -Nru dcmtk-3.6.6/dcmsign/include/dcmtk/dcmsign/dcsignat.h dcmtk-3.6.7/dcmsign/include/dcmtk/dcmsign/dcsignat.h --- dcmtk-3.6.6/dcmsign/include/dcmtk/dcmsign/dcsignat.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmsign/include/dcmtk/dcmsign/dcsignat.h 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1998-2019, OFFIS e.V. + * Copyright (C) 1998-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -31,9 +31,6 @@ #include "dcmtk/dcmdata/dcxfer.h" /* for E_TransferSyntax */ #include "dcmtk/dcmsign/sipurpos.h" /* for E_SignaturePurposeType */ -#define INCLUDE_CSTDIO -#include "dcmtk/ofstd/ofstdinc.h" - class DcmAttributeTag; class DcmDateTime; class DcmItem; @@ -64,6 +61,11 @@ */ static void initializeLibrary(); + /** cleans up the dcmsign library including the underlying OpenSSL library. + * this method should be called by main() before program end to avoid memory leaks. + */ + static void cleanupLibrary(); + /// default constructor DcmSignature(); @@ -333,6 +335,7 @@ /// pointer to certified timestamp for currently selected signature item SiTimeStamp *selectedTimestamp; + }; #endif diff -Nru dcmtk-3.6.6/dcmsign/include/dcmtk/dcmsign/sicert.h dcmtk-3.6.7/dcmsign/include/dcmtk/dcmsign/sicert.h --- dcmtk-3.6.6/dcmsign/include/dcmtk/dcmsign/sicert.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmsign/include/dcmtk/dcmsign/sicert.h 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1998-2019, OFFIS e.V. + * Copyright (C) 1998-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -134,11 +134,11 @@ long getCertKeyBits(); /** returns the name of the elliptic curve used in the certificate. - * @return NULL if the certificate is not of elliptic curve type, + * @return empty string if the certificate is not of elliptic curve type, * "unnamed curve" if the curve name has not been stored in the certificate, * or the short name of the elliptic curve if available. */ - const char *getCertCurveName(); + OFString getCertCurveName(); /** checks if the length of the public key in the certificate is too short * and must be considered weak. Currently, an RSA or DSA key with less than diff -Nru dcmtk-3.6.6/dcmsign/include/dcmtk/dcmsign/sicertvf.h dcmtk-3.6.7/dcmsign/include/dcmtk/dcmsign/sicertvf.h --- dcmtk-3.6.6/dcmsign/include/dcmtk/dcmsign/sicertvf.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmsign/include/dcmtk/dcmsign/sicertvf.h 2022-04-28 13:47:25.000000000 +0000 @@ -52,7 +52,7 @@ /** loads a certificate from a file and adds it to the pool of trusted certificates. * @param fileName path to the certificate file - * @param filetype file format: X509_FILETYPE_PEM or X509_FILETYPE_ASN1 + * @param fileType file format: X509_FILETYPE_PEM or X509_FILETYPE_ASN1 * @return SI_EC_Normal if successful, an error code otherwise */ virtual OFCondition addTrustedCertificateFile(const char *fileName, int fileType); @@ -69,8 +69,8 @@ /** loads all files as certificates from the specified directory and adds them * to the pool of trusted certificates. - * @param fileName path to the directory containing certificate files - * @param filetype file format: X509_FILETYPE_PEM or X509_FILETYPE_ASN1 + * @param pathName path to the directory containing certificate files + * @param fileType file format: X509_FILETYPE_PEM or X509_FILETYPE_ASN1 * @return SI_EC_Normal if successful, an error code otherwise */ virtual OFCondition addTrustedCertificateDir(const char *pathName, int fileType); @@ -78,7 +78,7 @@ /** loads a certificate revocation list (CRL) in X.509 format from a file and * adds it to the pool of trusted certificates and CRLs. * @param fileName path to the CRL file - * @param filetype file format: X509_FILETYPE_PEM or X509_FILETYPE_ASN1 + * @param fileType file format: X509_FILETYPE_PEM or X509_FILETYPE_ASN1 * @return SI_EC_Normal if successful, an error code otherwise */ virtual OFCondition addCertificateRevocationList(const char *fileName, int fileType); diff -Nru dcmtk-3.6.6/dcmsign/include/dcmtk/dcmsign/sidsa.h dcmtk-3.6.7/dcmsign/include/dcmtk/dcmsign/sidsa.h --- dcmtk-3.6.6/dcmsign/include/dcmtk/dcmsign/sidsa.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmsign/include/dcmtk/dcmsign/sidsa.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,115 +0,0 @@ -/* - * - * Copyright (C) 1998-2019, 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: dcmsign - * - * Author: Marco Eichelberg - * - * Purpose: - * classes: SiDSA - * - */ - -#ifndef SIDSA_H -#define SIDSA_H - -#include "dcmtk/config/osconfig.h" - -#ifdef WITH_OPENSSL - -#include "dcmtk/dcmsign/sialgo.h" -#include "dcmtk/ofstd/oftypes.h" - -class SiPrivateKey; -struct dsa_st; -typedef struct dsa_st DSA; - -/** - * This class implements the DSA public key crypto algorithms. - * @remark This class is only available if DCMTK is compiled with - * OpenSSL support enabled. - */ - -class DCMTK_DCMSIGN_EXPORT SiDSA : public SiAlgorithm -{ -public: - - /** constructor - * @param pointer to public DSA key - */ - SiDSA(DSA *key); - - /// destructor - virtual ~SiDSA(); - - /** creates a signature. - * @param inputHash array of hash key bytes that are to be signed - * @param inputHashSize length of hash key array in bytes - * @param inputHashAlgorithm MAC algorithm used for creation of hash key. Ignored for DSA signatures. - * @param outputSignature pointer to array of at least getSize() which must be allocated by caller. - * @param outputSignatureSize returns the number of bytes written to outputSignature. - * @return SI_EC_Normal if successful, errorcode otherwise. - */ - virtual OFCondition sign( - const unsigned char *inputHash, - unsigned long inputHashSize, - E_MACType inputHashAlgorithm, - unsigned char *outputSignature, - unsigned long &outputSignatureSize); - - /** verifies a signature. - * @param inputHash array of bytes containing hash key to be verified against signature - * @param inputHashSize length of hash key array in bytes - * @param inputHashAlgorithm MAC algorithm used for creation of hash key. Ignored for DSA signatures. - * @param inputSignature array of bytes containing signature to be verified - * @param inputSignatureSize length of signature array in bytes - * @param verified returns whether the signature was successfully verified - * @return SI_EC_Normal if successful, errorcode otherwise. - */ - virtual OFCondition verify( - const unsigned char *inputHash, - unsigned long inputHashSize, - E_MACType inputHashAlgorithm, - const unsigned char *inputSignature, - unsigned long inputSignatureSize, - OFBool &verified); - - /** returns the size of a block of encrypted/decrypted ciphertext in bytes. - * The result depends on the public key algorithm, key size and padding scheme. - * In general the input to decrypt() or encrypt() must be less than or equal - * to this block size. The output of decrypt() or encrypt() is always equal - * to this block size. - * @return block size for this public key cryptosystem and key - */ - virtual unsigned long getSize() const; - - /** returns the type of public key algorithm computed by this object - * @return type of public key algorithm - */ - virtual E_KeyType keyType() const; - -private: - - /// private undefined copy constructor - SiDSA(SiDSA& arg); - - /// private undefined copy assignment operator - SiDSA& operator=(SiDSA& arg); - - /// DSA key used for signature/verification - DSA *dsa; - -}; - -#endif -#endif diff -Nru dcmtk-3.6.6/dcmsign/include/dcmtk/dcmsign/siecdsa.h dcmtk-3.6.7/dcmsign/include/dcmtk/dcmsign/siecdsa.h --- dcmtk-3.6.6/dcmsign/include/dcmtk/dcmsign/siecdsa.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmsign/include/dcmtk/dcmsign/siecdsa.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,115 +0,0 @@ -/* - * - * Copyright (C) 1998-2019, 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: dcmsign - * - * Author: Marco Eichelberg - * - * Purpose: - * classes: SiDSA - * - */ - -#ifndef SIECDSA_H -#define SIECDSA_H - -#include "dcmtk/config/osconfig.h" - -#ifdef WITH_OPENSSL - -#include "dcmtk/dcmsign/sialgo.h" -#include "dcmtk/ofstd/oftypes.h" - -class SiPrivateKey; -struct ec_key_st; -typedef struct ec_key_st EC_KEY; - -/** - * This class implements the ECDSA public key crypto algorithms. - * @remark This class is only available if DCMTK is compiled with - * OpenSSL support enabled. - */ - -class DCMTK_DCMSIGN_EXPORT SiECDSA : public SiAlgorithm -{ -public: - - /** constructor - * @param pointer to public ECDSA key - */ - SiECDSA(EC_KEY *key); - - /// destructor - virtual ~SiECDSA(); - - /** creates a signature. - * @param inputHash array of hash key bytes that are to be signed - * @param inputHashSize length of hash key array in bytes - * @param inputHashAlgorithm MAC algorithm used for creation of hash key. Ignored for ECDSA signatures. - * @param outputSignature pointer to array of at least getSize() which must be allocated by caller. - * @param outputSignatureSize returns the number of bytes written to outputSignature. - * @return SI_EC_Normal if successful, errorcode otherwise. - */ - virtual OFCondition sign( - const unsigned char *inputHash, - unsigned long inputHashSize, - E_MACType inputHashAlgorithm, - unsigned char *outputSignature, - unsigned long &outputSignatureSize); - - /** verifies a signature. - * @param inputHash array of bytes containing hash key to be verified against signature - * @param inputHashSize length of hash key array in bytes - * @param inputHashAlgorithm MAC algorithm used for creation of hash key. Ignored for ECDSA signatures. - * @param inputSignature array of bytes containing signature to be verified - * @param inputSignatureSize length of signature array in bytes - * @param verified returns whether the signature was successfully verified - * @return SI_EC_Normal if successful, errorcode otherwise. - */ - virtual OFCondition verify( - const unsigned char *inputHash, - unsigned long inputHashSize, - E_MACType inputHashAlgorithm, - const unsigned char *inputSignature, - unsigned long inputSignatureSize, - OFBool &verified); - - /** returns the size of a block of encrypted/decrypted ciphertext in bytes. - * The result depends on the public key algorithm, key size and padding scheme. - * In general the input to decrypt() or encrypt() must be less than or equal - * to this block size. The output of decrypt() or encrypt() is always equal - * to this block size. - * @return block size for this public key cryptosystem and key - */ - virtual unsigned long getSize() const; - - /** returns the type of public key algorithm computed by this object - * @return type of public key algorithm - */ - virtual E_KeyType keyType() const; - -private: - - /// private undefined copy constructor - SiECDSA(SiECDSA& arg); - - /// private undefined copy assignment operator - SiECDSA& operator=(SiECDSA& arg); - - /// ECDSA key used for signature/verification - EC_KEY *ecdsa; - -}; - -#endif -#endif diff -Nru dcmtk-3.6.6/dcmsign/include/dcmtk/dcmsign/simaccon.h dcmtk-3.6.7/dcmsign/include/dcmtk/dcmsign/simaccon.h --- dcmtk-3.6.6/dcmsign/include/dcmtk/dcmsign/simaccon.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmsign/include/dcmtk/dcmsign/simaccon.h 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1998-2019, OFFIS e.V. + * Copyright (C) 1998-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -32,9 +32,6 @@ #include "dcmtk/dcmdata/dcxfer.h" /* for E_TransferSyntax */ #include "dcmtk/dcmdata/dcdeftag.h" -#define INCLUDE_CSTDIO -#include "dcmtk/ofstd/ofstdinc.h" - class SiMAC; class DcmItem; class DcmElement; diff -Nru dcmtk-3.6.6/dcmsign/include/dcmtk/dcmsign/simd5.h dcmtk-3.6.7/dcmsign/include/dcmtk/dcmsign/simd5.h --- dcmtk-3.6.6/dcmsign/include/dcmtk/dcmsign/simd5.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmsign/include/dcmtk/dcmsign/simd5.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,99 +0,0 @@ -/* - * - * Copyright (C) 1998-2019, 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: dcmsign - * - * Author: Marco Eichelberg - * - * Purpose: - * classes: SiMD5 - * - */ - -#ifndef SIMD5_H -#define SIMD5_H - -#include "dcmtk/config/osconfig.h" - -#ifdef WITH_OPENSSL - -#include "dcmtk/dcmsign/simac.h" -#include "dcmtk/dcmsign/sitypes.h" - -struct MD5state_st; -typedef struct MD5state_st MD5_CTX; - -/** - * a class implementing the hash function MD5 - * @remark this class is only available if DCMTK is compiled with - * OpenSSL support enabled. - */ -class DCMTK_DCMSIGN_EXPORT SiMD5 : public SiMAC -{ -public: - /// default constructor - SiMD5(); - - /// destructor - virtual ~SiMD5(); - - /** initializes the MAC algorithm. - * @return status code - */ - virtual OFCondition initialize(); - - /** feeds data into the MAC algorithm - * @param data pointer to raw data to be fed into the MAC, must not be NULL - * @param length number of bytes in raw data array - * @return status code - */ - virtual OFCondition digest(const unsigned char *data, unsigned long length); - - /** finalizes the MAC and writes it to the given output array, - * which must be at least getSize() bytes large. - * After a call to finalize, the MAC algorithm must be initialized - * again, see initialize(). - * @param result pointer to array of getSize() bytes into which the MAC is written - * @return status code - */ - virtual OFCondition finalize(unsigned char *result); - - /** returns the size of a MAC in bytes. - * @return block size for this MAC algorithm - */ - virtual unsigned long getSize() const; - - /** returns the type of MAC algorithm computed by this object - * @return type of MAC algorithm - */ - virtual E_MACType macType() const; - - /** returns the DICOM identifier for this MAC algorithm - * @return DICOM defined term for algorithm - */ - virtual const char *getDefinedTerm() const; - -private: - - /// private undefined copy constructor - SiMD5(SiMD5& arg); - - /// private undefined copy assignment operator - SiMD5& operator=(SiMD5& arg); - - /// OpenSSL MD5 context - MD5_CTX *ctx; -}; - -#endif -#endif diff -Nru dcmtk-3.6.6/dcmsign/include/dcmtk/dcmsign/simdmac.h dcmtk-3.6.7/dcmsign/include/dcmtk/dcmsign/simdmac.h --- dcmtk-3.6.6/dcmsign/include/dcmtk/dcmsign/simdmac.h 1970-01-01 00:00:00.000000000 +0000 +++ dcmtk-3.6.7/dcmsign/include/dcmtk/dcmsign/simdmac.h 2022-04-28 13:47:25.000000000 +0000 @@ -0,0 +1,112 @@ +/* + * + * Copyright (C) 1998-2021, 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: dcmsign + * + * Author: Norbert Loxen, Marco Eichelberg + * + * Purpose: + * classes: SiMDMAC + * + */ + +#ifndef SIMDMAC_H +#define SIMDMAC_H + +#include "dcmtk/config/osconfig.h" + +#ifdef WITH_OPENSSL + +#include "dcmtk/dcmsign/simac.h" +#include "dcmtk/dcmsign/sitypes.h" + +BEGIN_EXTERN_C +#include +END_EXTERN_C + +#ifndef HAVE_OPENSSL_DECLARATION_NEW_EVP_MD_CTX +struct env_md_ctx_st; +typedef struct env_md_ctx_st EVP_MD_CTX; +#else +struct evp_md_ctx_st; +typedef struct evp_md_ctx_st EVP_MD_CTX; +#endif + +/** + * a class implementing all supported hash functions using the OpenSSL EVP_MD high level API. + * @remark this class is only available if DCMTK is compiled with + * OpenSSL support enabled. + */ +class DCMTK_DCMSIGN_EXPORT SiMDMAC : public SiMAC +{ +public: + /// default constructor + SiMDMAC(E_MACType mactype); + + /// destructor + virtual ~SiMDMAC(); + + /** initializes the MAC algorithm. + * @return status code + */ + virtual OFCondition initialize(); + + /** feeds data into the MAC algorithm + * @param data pointer to raw data to be fed into the MAC, must not be NULL + * @param length number of bytes in raw data array + * @return status code + */ + virtual OFCondition digest(const unsigned char *data, unsigned long length); + + /** finalizes the MAC and writes it to the given output array, + * which must be at least getSize() bytes large. + * After a call to finalize, the MAC algorithm must be initialized + * again, see initialize(). + * @param result pointer to array of getSize() bytes into which the MAC is written + * @return status code + */ + virtual OFCondition finalize(unsigned char *result); + + /** returns the size of a MAC in bytes. + * @return block size for this MAC algorithm + */ + virtual unsigned long getSize() const; + + /** returns the type of MAC algorithm computed by this object + * @return type of MAC algorithm + */ + virtual E_MACType macType() const; + + /** returns the DICOM identifier for this MAC algorithm + * @return DICOM defined term for algorithm + */ + virtual const char *getDefinedTerm() const; + +private: + + /// private undefined copy constructor + SiMDMAC(SiMDMAC& arg); + + /// private undefined copy assignment operator + SiMDMAC& operator=(SiMDMAC& arg); + + /// OpenSSL MAC context + EVP_MD_CTX *ctx; + + /// MAC type + E_MACType macType_; + +}; + +#endif +#endif diff -Nru dcmtk-3.6.6/dcmsign/include/dcmtk/dcmsign/sipkey.h dcmtk-3.6.7/dcmsign/include/dcmtk/dcmsign/sipkey.h --- dcmtk-3.6.6/dcmsign/include/dcmtk/dcmsign/sipkey.h 1970-01-01 00:00:00.000000000 +0000 +++ dcmtk-3.6.7/dcmsign/include/dcmtk/dcmsign/sipkey.h 2022-04-28 13:47:25.000000000 +0000 @@ -0,0 +1,121 @@ +/* + * + * Copyright (C) 1998-2020, 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: dcmsign + * + * Author: Norbert Loxen, Marco Eichelberg + * + * Purpose: + * classes: SiPKEY + * + */ + +#ifndef SIPKEY_H +#define SIPKEY_H + +#include "dcmtk/config/osconfig.h" + +#ifdef WITH_OPENSSL + +#include "dcmtk/dcmsign/sialgo.h" +#include "dcmtk/ofstd/oftypes.h" + +class SiPrivateKey; +struct evp_pkey_st; +typedef struct evp_pkey_st EVP_PKEY; + +/** + * This class implements all supported public key crypto algorithms + * using the OpenSSL EVP_PKEY high level API. + * @remark this class is only available if DCMTK is compiled with + * OpenSSL support enabled. + */ + +class DCMTK_DCMSIGN_EXPORT SiPKEY : public SiAlgorithm +{ +public: + + /** constructor + * @param key pointer to public or private key + * @param owned if true, ownership of the key is transferred to the SiPKEY instance + */ + SiPKEY(EVP_PKEY *key, OFBool owned); + + /// destructor + virtual ~SiPKEY(); + + /** creates a signature. + * @param inputHash array of hash key bytes that are to be signed + * @param inputHashSize length of hash key array in bytes + * @param inputHashAlgorithm MAC algorithm used for creation of hash key. + * Required for creation of PKCS#1 RSA signature padding. + * @param outputSignature pointer to array of at least getSize() which must be allocated by caller. + * @param outputSignatureSize returns the number of bytes written to outputSignature. + * @return SI_EC_Normal if successful, errorcode otherwise. + */ + virtual OFCondition sign( + const unsigned char *inputHash, + unsigned long inputHashSize, + E_MACType inputHashAlgorithm, + unsigned char *outputSignature, + unsigned long &outputSignatureSize); + + /** verifies a signature. + * @param inputHash array of bytes containing hash key to be verified against signature + * @param inputHashSize length of hash key array in bytes + * @param inputHashAlgorithm MAC algorithm used for creation of hash key. + * Required for creation of PKCS#1 RSA signature padding. + * @param inputSignature array of bytes containing signature to be verified + * @param inputSignatureSize length of signature array in bytes + * @param verified returns whether the signature was successfully verified + * @return SI_EC_Normal if successful, errorcode otherwise. + */ + virtual OFCondition verify( + const unsigned char *inputHash, + unsigned long inputHashSize, + E_MACType inputHashAlgorithm, + const unsigned char *inputSignature, + unsigned long inputSignatureSize, + OFBool &verified); + + /** returns the size of a block of encrypted/decrypted ciphertext in bytes. + * The result depends on the public key algorithm, key size and padding scheme. + * In general the input to decrypt() or encrypt() must be less than or equal + * to this block size. The output of decrypt() or encrypt() is always equal + * to this block size. + * @return block size for this public key cryptosystem and key + */ + virtual unsigned long getSize() const; + + /** returns the type of public key algorithm computed by this object + * @return type of public key algorithm + */ + virtual E_KeyType keyType() const; + +private: + + /// private undefined copy constructor + SiPKEY(SiPKEY& arg); + + /// private undefined copy assignment operator + SiPKEY& operator=(SiPKEY& arg); + + /// key used for signature/verification + EVP_PKEY *signing_key; + + /// indicates if the signing key object is owned by this instance. + OFBool owned_; +}; + +#endif +#endif diff -Nru dcmtk-3.6.6/dcmsign/include/dcmtk/dcmsign/siripemd.h dcmtk-3.6.7/dcmsign/include/dcmtk/dcmsign/siripemd.h --- dcmtk-3.6.6/dcmsign/include/dcmtk/dcmsign/siripemd.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmsign/include/dcmtk/dcmsign/siripemd.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,99 +0,0 @@ -/* - * - * Copyright (C) 1998-2019, 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: dcmsign - * - * Author: Norbert Loxen, Marco Eichelberg - * - * Purpose: - * classes: SiRIPEMD160 - * - */ - -#ifndef SIRIPEMD_H -#define SIRIPEMD_H - -#include "dcmtk/config/osconfig.h" - -#ifdef WITH_OPENSSL - -#include "dcmtk/dcmsign/simac.h" -#include "dcmtk/dcmsign/sitypes.h" - -struct RIPEMD160state_st; -typedef struct RIPEMD160state_st RIPEMD160_CTX; - -/** - * a class implementing the hash function RIPEMD160 - * @remark this class is only available if DCMTK is compiled with - * OpenSSL support enabled. - */ -class DCMTK_DCMSIGN_EXPORT SiRIPEMD160 : public SiMAC -{ -public: - /// default constructor - SiRIPEMD160(); - - /// destructor - virtual ~SiRIPEMD160(); - - /** initializes the MAC algorithm. - * @return status code - */ - virtual OFCondition initialize(); - - /** feeds data into the MAC algorithm - * @param data pointer to raw data to be fed into the MAC, must not be NULL - * @param length number of bytes in raw data array - * @return status code - */ - virtual OFCondition digest(const unsigned char *data, unsigned long length); - - /** finalizes the MAC and writes it to the given output array, - * which must be at least getSize() bytes large. - * After a call to finalize, the MAC algorithm must be initialized - * again, see initialize(). - * @param result pointer to array of getSize() bytes into which the MAC is written - * @return status code - */ - virtual OFCondition finalize(unsigned char *result); - - /** returns the size of a MAC in bytes. - * @return block size for this MAC algorithm - */ - virtual unsigned long getSize() const; - - /** returns the type of MAC algorithm computed by this object - * @return type of MAC algorithm - */ - virtual E_MACType macType() const; - - /** returns the DICOM identifier for this MAC algorithm - * @return DICOM defined term for algorithm - */ - virtual const char *getDefinedTerm() const; - -private: - - /// private undefined copy constructor - SiRIPEMD160(SiRIPEMD160& arg); - - /// private undefined copy assignment operator - SiRIPEMD160& operator=(SiRIPEMD160& arg); - - /// OpenSSL RIPEMD 160 context - RIPEMD160_CTX *ctx; -}; - -#endif -#endif diff -Nru dcmtk-3.6.6/dcmsign/include/dcmtk/dcmsign/sirsa.h dcmtk-3.6.7/dcmsign/include/dcmtk/dcmsign/sirsa.h --- dcmtk-3.6.6/dcmsign/include/dcmtk/dcmsign/sirsa.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmsign/include/dcmtk/dcmsign/sirsa.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,117 +0,0 @@ -/* - * - * Copyright (C) 1998-2019, 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: dcmsign - * - * Author: Norbert Loxen, Marco Eichelberg - * - * Purpose: - * classes: SiRSA - * - */ - -#ifndef SIRSA_H -#define SIRSA_H - -#include "dcmtk/config/osconfig.h" - -#ifdef WITH_OPENSSL - -#include "dcmtk/dcmsign/sialgo.h" -#include "dcmtk/ofstd/oftypes.h" - -class SiPrivateKey; -struct rsa_st; -typedef struct rsa_st RSA; - -/** - * This class implements the RSA public key crypto algorithms. - * @remark this class is only available if DCMTK is compiled with - * OpenSSL support enabled. - */ - -class DCMTK_DCMSIGN_EXPORT SiRSA : public SiAlgorithm -{ -public: - - /** constructor - * @param pointer to public RSA key - */ - SiRSA(RSA *key); - - /// destructor - virtual ~SiRSA(); - - /** creates a signature. - * @param inputHash array of hash key bytes that are to be signed - * @param inputHashSize length of hash key array in bytes - * @param inputHashAlgorithm MAC algorithm used for creation of hash key. - * Required for creation of PKCS#1 RSA signature padding. - * @param outputSignature pointer to array of at least getSize() which must be allocated by caller. - * @param outputSignatureSize returns the number of bytes written to outputSignature. - * @return SI_EC_Normal if successful, errorcode otherwise. - */ - virtual OFCondition sign( - const unsigned char *inputHash, - unsigned long inputHashSize, - E_MACType inputHashAlgorithm, - unsigned char *outputSignature, - unsigned long &outputSignatureSize); - - /** verifies a signature. - * @param inputHash array of bytes containing hash key to be verified against signature - * @param inputHashSize length of hash key array in bytes - * @param inputHashAlgorithm MAC algorithm used for creation of hash key. - * Required for creation of PKCS#1 RSA signature padding. - * @param inputSignature array of bytes containing signature to be verified - * @param inputSignatureSize length of signature array in bytes - * @param verified returns whether the signature was successfully verified - * @return SI_EC_Normal if successful, errorcode otherwise. - */ - virtual OFCondition verify( - const unsigned char *inputHash, - unsigned long inputHashSize, - E_MACType inputHashAlgorithm, - const unsigned char *inputSignature, - unsigned long inputSignatureSize, - OFBool &verified); - - /** returns the size of a block of encrypted/decrypted ciphertext in bytes. - * The result depends on the public key algorithm, key size and padding scheme. - * In general the input to decrypt() or encrypt() must be less than or equal - * to this block size. The output of decrypt() or encrypt() is always equal - * to this block size. - * @return block size for this public key cryptosystem and key - */ - virtual unsigned long getSize() const; - - /** returns the type of public key algorithm computed by this object - * @return type of public key algorithm - */ - virtual E_KeyType keyType() const; - -private: - - /// private undefined copy constructor - SiRSA(SiRSA& arg); - - /// private undefined copy assignment operator - SiRSA& operator=(SiRSA& arg); - - /// RSA key used for signature/verification - RSA *rsa; - -}; - -#endif -#endif diff -Nru dcmtk-3.6.6/dcmsign/include/dcmtk/dcmsign/sisha1.h dcmtk-3.6.7/dcmsign/include/dcmtk/dcmsign/sisha1.h --- dcmtk-3.6.6/dcmsign/include/dcmtk/dcmsign/sisha1.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmsign/include/dcmtk/dcmsign/sisha1.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,99 +0,0 @@ -/* - * - * Copyright (C) 1998-2019, 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: dcmsign - * - * Author: Norbert Loxen, Marco Eichelberg - * - * Purpose: - * classes: SiSHA1 - * - */ - -#ifndef SISHA1_H -#define SISHA1_H - -#include "dcmtk/config/osconfig.h" - -#ifdef WITH_OPENSSL - -#include "dcmtk/dcmsign/simac.h" -#include "dcmtk/dcmsign/sitypes.h" - -struct SHAstate_st; -typedef struct SHAstate_st SHA_CTX; - -/** - * a class implementing the hash function SHA1 - * @remark this class is only available if DCMTK is compiled with - * OpenSSL support enabled. - */ -class DCMTK_DCMSIGN_EXPORT SiSHA1 : public SiMAC -{ -public: - /// default constructor - SiSHA1(); - - /// destructor - virtual ~SiSHA1(); - - /** initializes the MAC algorithm. - * @return status code - */ - virtual OFCondition initialize(); - - /** feeds data into the MAC algorithm - * @param data pointer to raw data to be fed into the MAC, must not be NULL - * @param length number of bytes in raw data array - * @return status code - */ - virtual OFCondition digest(const unsigned char *data, unsigned long length); - - /** finalizes the MAC and writes it to the given output array, - * which must be at least getSize() bytes large. - * After a call to finalize, the MAC algorithm must be initialized - * again, see initialize(). - * @param result pointer to array of getSize() bytes into which the MAC is written - * @return status code - */ - virtual OFCondition finalize(unsigned char *result); - - /** returns the size of a MAC in bytes. - * @return block size for this MAC algorithm - */ - virtual unsigned long getSize() const; - - /** returns the type of MAC algorithm computed by this object - * @return type of MAC algorithm - */ - virtual E_MACType macType() const; - - /** returns the DICOM identifier for this MAC algorithm - * @return DICOM defined term for algorithm - */ - virtual const char *getDefinedTerm() const; - -private: - - /// private undefined copy constructor - SiSHA1(SiSHA1& arg); - - /// private undefined copy assignment operator - SiSHA1& operator=(SiSHA1& arg); - - /// OpenSSL SHA1 context - SHA_CTX *ctx; -}; - -#endif -#endif diff -Nru dcmtk-3.6.6/dcmsign/include/dcmtk/dcmsign/sisha256.h dcmtk-3.6.7/dcmsign/include/dcmtk/dcmsign/sisha256.h --- dcmtk-3.6.6/dcmsign/include/dcmtk/dcmsign/sisha256.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmsign/include/dcmtk/dcmsign/sisha256.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,98 +0,0 @@ -/* - * - * Copyright (C) 2016-2018, 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: dcmsign - * - * Author: Marco Eichelberg - * - * Purpose: - * classes: SiSHA256 - * - */ - -#ifndef SISHA256_H -#define SISHA256_H - -#include "dcmtk/config/osconfig.h" -#include "dcmtk/dcmsign/simac.h" -#include "dcmtk/dcmsign/sitypes.h" - -#ifdef WITH_OPENSSL - -struct SHA256state_st; -typedef struct SHA256state_st SHA256_CTX; - -/** - * a class implementing the hash function SHA256 - * @remark this class is only available if DCMTK is compiled with - * OpenSSL support enabled. - */ -class DCMTK_DCMSIGN_EXPORT SiSHA256 : public SiMAC -{ -public: - /// default constructor - SiSHA256(); - - /// destructor - virtual ~SiSHA256(); - - /** initializes the MAC algorithm. - * @return status code - */ - virtual OFCondition initialize(); - - /** feeds data into the MAC algorithm - * @param data pointer to raw data to be fed into the MAC, must not be NULL - * @param length number of bytes in raw data array - * @return status code - */ - virtual OFCondition digest(const unsigned char *data, unsigned long length); - - /** finalizes the MAC and writes it to the given output array, - * which must be at least getSize() bytes large. - * After a call to finalize, the MAC algorithm must be initialized - * again, see initialize(). - * @param result pointer to array of getSize() bytes into which the MAC is written - * @return status code - */ - virtual OFCondition finalize(unsigned char *result); - - /** returns the size of a MAC in bytes. - * @return block size for this MAC algorithm - */ - virtual unsigned long getSize() const; - - /** returns the type of MAC algorithm computed by this object - * @return type of MAC algorithm - */ - virtual E_MACType macType() const; - - /** returns the DICOM identifier for this MAC algorithm - * @return DICOM defined term for algorithm - */ - virtual const char *getDefinedTerm() const; - -private: - - /// private undefined copy constructor - SiSHA256(SiSHA256& arg); - - /// private undefined copy assignment operator - SiSHA256& operator=(SiSHA256& arg); - - /// OpenSSL SHA256 context - SHA256_CTX *ctx; -}; - -#endif -#endif diff -Nru dcmtk-3.6.6/dcmsign/include/dcmtk/dcmsign/sisha384.h dcmtk-3.6.7/dcmsign/include/dcmtk/dcmsign/sisha384.h --- dcmtk-3.6.6/dcmsign/include/dcmtk/dcmsign/sisha384.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmsign/include/dcmtk/dcmsign/sisha384.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,98 +0,0 @@ -/* - * - * Copyright (C) 2016-2018, 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: dcmsign - * - * Author: Marco Eichelberg - * - * Purpose: - * classes: SiSHA384 - * - */ - -#ifndef SISHA384_H -#define SISHA384_H - -#include "dcmtk/config/osconfig.h" -#include "dcmtk/dcmsign/simac.h" -#include "dcmtk/dcmsign/sitypes.h" - -#ifdef WITH_OPENSSL - -struct SHA512state_st; -typedef struct SHA512state_st SHA512_CTX; - -/** - * a class implementing the hash function SHA384 - * @remark this class is only available if DCMTK is compiled with - * OpenSSL support enabled. - */ -class DCMTK_DCMSIGN_EXPORT SiSHA384 : public SiMAC -{ -public: - /// default constructor - SiSHA384(); - - /// destructor - virtual ~SiSHA384(); - - /** initializes the MAC algorithm. - * @return status code - */ - virtual OFCondition initialize(); - - /** feeds data into the MAC algorithm - * @param data pointer to raw data to be fed into the MAC, must not be NULL - * @param length number of bytes in raw data array - * @return status code - */ - virtual OFCondition digest(const unsigned char *data, unsigned long length); - - /** finalizes the MAC and writes it to the given output array, - * which must be at least getSize() bytes large. - * After a call to finalize, the MAC algorithm must be initialized - * again, see initialize(). - * @param result pointer to array of getSize() bytes into which the MAC is written - * @return status code - */ - virtual OFCondition finalize(unsigned char *result); - - /** returns the size of a MAC in bytes. - * @return block size for this MAC algorithm - */ - virtual unsigned long getSize() const; - - /** returns the type of MAC algorithm computed by this object - * @return type of MAC algorithm - */ - virtual E_MACType macType() const; - - /** returns the DICOM identifier for this MAC algorithm - * @return DICOM defined term for algorithm - */ - virtual const char *getDefinedTerm() const; - -private: - - /// private undefined copy constructor - SiSHA384(SiSHA384& arg); - - /// private undefined copy assignment operator - SiSHA384& operator=(SiSHA384& arg); - - /// OpenSSL SHA384 context - SHA512_CTX *ctx; -}; - -#endif -#endif diff -Nru dcmtk-3.6.6/dcmsign/include/dcmtk/dcmsign/sisha512.h dcmtk-3.6.7/dcmsign/include/dcmtk/dcmsign/sisha512.h --- dcmtk-3.6.6/dcmsign/include/dcmtk/dcmsign/sisha512.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmsign/include/dcmtk/dcmsign/sisha512.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,98 +0,0 @@ -/* - * - * Copyright (C) 2016-2018, 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: dcmsign - * - * Author: Marco Eichelberg - * - * Purpose: - * classes: SiSHA512 - * - */ - -#ifndef SISHA512_H -#define SISHA512_H - -#include "dcmtk/config/osconfig.h" -#include "dcmtk/dcmsign/simac.h" -#include "dcmtk/dcmsign/sitypes.h" - -#ifdef WITH_OPENSSL - -struct SHA512state_st; -typedef struct SHA512state_st SHA512_CTX; - -/** - * a class implementing the hash function SHA512 - * @remark this class is only available if DCMTK is compiled with - * OpenSSL support enabled. - */ -class DCMTK_DCMSIGN_EXPORT SiSHA512 : public SiMAC -{ -public: - /// default constructor - SiSHA512(); - - /// destructor - virtual ~SiSHA512(); - - /** initializes the MAC algorithm. - * @return status code - */ - virtual OFCondition initialize(); - - /** feeds data into the MAC algorithm - * @param data pointer to raw data to be fed into the MAC, must not be NULL - * @param length number of bytes in raw data array - * @return status code - */ - virtual OFCondition digest(const unsigned char *data, unsigned long length); - - /** finalizes the MAC and writes it to the given output array, - * which must be at least getSize() bytes large. - * After a call to finalize, the MAC algorithm must be initialized - * again, see initialize(). - * @param result pointer to array of getSize() bytes into which the MAC is written - * @return status code - */ - virtual OFCondition finalize(unsigned char *result); - - /** returns the size of a MAC in bytes. - * @return block size for this MAC algorithm - */ - virtual unsigned long getSize() const; - - /** returns the type of MAC algorithm computed by this object - * @return type of MAC algorithm - */ - virtual E_MACType macType() const; - - /** returns the DICOM identifier for this MAC algorithm - * @return DICOM defined term for algorithm - */ - virtual const char *getDefinedTerm() const; - -private: - - /// private undefined copy constructor - SiSHA512(SiSHA512& arg); - - /// private undefined copy assignment operator - SiSHA512& operator=(SiSHA512& arg); - - /// OpenSSL SHA512 context - SHA512_CTX *ctx; -}; - -#endif -#endif diff -Nru dcmtk-3.6.6/dcmsign/include/dcmtk/dcmsign/sisprof.h dcmtk-3.6.7/dcmsign/include/dcmtk/dcmsign/sisprof.h --- dcmtk-3.6.6/dcmsign/include/dcmtk/dcmsign/sisprof.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmsign/include/dcmtk/dcmsign/sisprof.h 2022-04-28 13:47:25.000000000 +0000 @@ -58,7 +58,7 @@ virtual OFBool isAllowableMACType(E_MACType macType) const = 0; /** checks whether the given MAC object can be used with this security profile. - * @param macType object to be checked + * @param mac macType object to be checked * @return true if object is allowable for this profile, false otherwise. */ virtual OFBool isAllowableMAC(const SiMAC& mac) const; diff -Nru dcmtk-3.6.6/dcmsign/libsrc/CMakeLists.txt dcmtk-3.6.7/dcmsign/libsrc/CMakeLists.txt --- dcmtk-3.6.6/dcmsign/libsrc/CMakeLists.txt 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmsign/libsrc/CMakeLists.txt 2022-04-28 13:47:25.000000000 +0000 @@ -1,9 +1,26 @@ # create library from source files -DCMTK_ADD_LIBRARY( - dcmdsig dcsighlp dcsignat siautopr sibrsapr sicert sicertvf sicreapr - sidsa siecdsa simaccon simd5 sinullpr siprivat sipurpos siripemd sirsa - sisha1 sisprof sisrpr sisrvpr sitstamp sitypes sisha256 sisha384 - sisha512 sitsfs) +DCMTK_ADD_LIBRARY(dcmdsig + dcsighlp.cc + dcsignat.cc + siautopr.cc + sibrsapr.cc + sicert.cc + sicertvf.cc + sicreapr.cc + simaccon.cc + simdmac.cc + sinullpr.cc + sipkey.cc + siprivat.cc + sipurpos.cc + sisprof.cc + sisrpr.cc + sisrvpr.cc + sitsfs.cc + sitstamp.cc + sitypes.cc +) DCMTK_TARGET_LINK_MODULES(dcmdsig ofstd dcmdata) DCMTK_TARGET_LINK_LIBRARIES(dcmdsig ${OPENSSL_LIBS}) +set_property(TARGET dcmdsig PROPERTY OUTPUT_NAME "dcmdsig${DCMTK_TLS_LIBRARY_POSTFIX}") diff -Nru dcmtk-3.6.6/dcmsign/libsrc/dcsighlp.cc dcmtk-3.6.7/dcmsign/libsrc/dcsighlp.cc --- dcmtk-3.6.6/dcmsign/libsrc/dcsighlp.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmsign/libsrc/dcsighlp.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2000-2020, OFFIS e.V. + * Copyright (C) 2000-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -84,7 +84,7 @@ unsigned int group=0; unsigned int elem=0; if (2 != sscanf(c+spos,"%x,%x", &group, &elem)) return 0; // parse error - key = DcmTagKey(group,elem); + key = DcmTagKey(OFstatic_cast(Uint16, group),OFstatic_cast(Uint16, elem)); pos = ++lpos; return 1; // tag key } @@ -182,7 +182,7 @@ } dcmDataDict.rdunlock(); } else { - if (EC_Normal == tagList.putTagVal(DcmTagKey(group,elem), tagList.getVM())) result = OFTrue; + if (EC_Normal == tagList.putTagVal(DcmTagKey(OFstatic_cast(Uint16, group),OFstatic_cast(Uint16, elem)), tagList.getVM())) result = OFTrue; } return result; } @@ -851,7 +851,7 @@ DCMSIGN_INFO(" Validity : not before " << aString); cert->getCertValidityNotAfter(aString); DCMSIGN_INFO(" Validity : not after " << aString); - const char *ecname = NULL; + OFString ecname; switch (cert->getKeyType()) { case EKT_RSA: @@ -862,7 +862,7 @@ break; case EKT_EC: ecname = cert->getCertCurveName(); - if (ecname) + if (ecname.length() > 0) { DCMSIGN_INFO(" Public key : EC, curve " << ecname << ", " << cert->getCertKeyBits() << " bits"); } diff -Nru dcmtk-3.6.6/dcmsign/libsrc/dcsignat.cc dcmtk-3.6.7/dcmsign/libsrc/dcsignat.cc --- dcmtk-3.6.6/dcmsign/libsrc/dcsignat.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmsign/libsrc/dcsignat.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2000-2019, OFFIS e.V. + * Copyright (C) 2000-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -42,13 +42,8 @@ #include "dcmtk/dcmsign/sicert.h" #include "dcmtk/dcmsign/simac.h" #include "dcmtk/dcmsign/simaccon.h" -#include "dcmtk/dcmsign/simd5.h" #include "dcmtk/dcmsign/siprivat.h" -#include "dcmtk/dcmsign/siripemd.h" -#include "dcmtk/dcmsign/sisha1.h" -#include "dcmtk/dcmsign/sisha256.h" -#include "dcmtk/dcmsign/sisha384.h" -#include "dcmtk/dcmsign/sisha512.h" +#include "dcmtk/dcmsign/simdmac.h" #include "dcmtk/dcmsign/sisprof.h" #include "dcmtk/dcmsign/sitstamp.h" #include "dcmtk/dcmsign/sitsfs.h" @@ -56,15 +51,50 @@ BEGIN_EXTERN_C #include #include +#include +#ifdef HAVE_OPENSSL_PROVIDER_H +#include +#endif END_EXTERN_C /* static helper methods */ +#ifdef HAVE_OPENSSL_PROTOTYPE_OSSL_PROVIDER_LOAD +static OSSL_PROVIDER *legacyProvider = NULL; +static OSSL_PROVIDER *defaultProvider = NULL; +#endif + void DcmSignature::initializeLibrary() { + SSL_library_init(); + SSL_load_error_strings(); OpenSSL_add_all_algorithms(); - ERR_load_crypto_strings(); +#ifdef HAVE_OPENSSL_PROTOTYPE_OSSL_PROVIDER_LOAD + // load the legacy provider, which is needed for RIPEMD160 + if (legacyProvider == NULL) legacyProvider = OSSL_PROVIDER_load(NULL, "legacy"); + if (legacyProvider == NULL) DCMSIGN_ERROR("Unable to load the OpenSSL Legacy Provider, RIPEMD160 and MD5 not available"); + + // explicitly also load the default provider + if (defaultProvider == NULL) defaultProvider = OSSL_PROVIDER_load(NULL, "default"); + if (defaultProvider == NULL) DCMSIGN_ERROR("Unable to load the OpenSSL Default Provider"); +#endif +} + +void DcmSignature::cleanupLibrary() +{ +#ifdef HAVE_OPENSSL_PROTOTYPE_OSSL_PROVIDER_LOAD + if (legacyProvider) + { + OSSL_PROVIDER_unload(legacyProvider); + legacyProvider = NULL; + } + if (defaultProvider) + { + OSSL_PROVIDER_unload(defaultProvider); + defaultProvider = NULL; + } +#endif } OFCondition DcmSignature::getMACIDnumber(DcmItem &item, Uint16& macid) @@ -476,6 +506,19 @@ else { result = mac.finalize(digest); + + if (dcmsignLogger.isEnabledFor(OFLogger::DEBUG_LOG_LEVEL)) + { + OFString logString; + char c[5]; + for (size_t i=0; igetDefinedTerm() << " MAC = " << logString); + } result = algorithm->verify(digest, digestLength, mac->macType(), sigData, sigLength, verified); if ((result.good()) && (! verified)) result = SI_EC_VerificationFailed_Corrupted; } diff -Nru dcmtk-3.6.6/dcmsign/libsrc/Makefile.dep dcmtk-3.6.7/dcmsign/libsrc/Makefile.dep --- dcmtk-3.6.6/dcmsign/libsrc/Makefile.dep 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmsign/libsrc/Makefile.dep 2022-04-28 13:47:25.000000000 +0000 @@ -68,7 +68,8 @@ ../include/dcmtk/dcmsign/sicreapr.h ../include/dcmtk/dcmsign/sibrsapr.h \ ../include/dcmtk/dcmsign/siautopr.h ../include/dcmtk/dcmsign/sisrvpr.h \ ../include/dcmtk/dcmsign/sisrpr.h \ - ../../ofstd/include/dcmtk/ofstd/ofexit.h + ../../ofstd/include/dcmtk/ofstd/ofexit.h \ + ../include/dcmtk/dcmsign/siexit.h dcsignat.o: dcsignat.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmsign/dcsignat.h ../include/dcmtk/dcmsign/sitypes.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ @@ -144,11 +145,9 @@ ../include/dcmtk/dcmsign/simac.h ../include/dcmtk/dcmsign/simaccon.h \ ../../dcmdata/include/dcmtk/dcmdata/dcostrmb.h \ ../../dcmdata/include/dcmtk/dcmdata/dcostrma.h \ - ../include/dcmtk/dcmsign/simd5.h ../include/dcmtk/dcmsign/siprivat.h \ - ../include/dcmtk/dcmsign/siripemd.h ../include/dcmtk/dcmsign/sisha1.h \ - ../include/dcmtk/dcmsign/sisha256.h ../include/dcmtk/dcmsign/sisha384.h \ - ../include/dcmtk/dcmsign/sisha512.h ../include/dcmtk/dcmsign/sisprof.h \ - ../include/dcmtk/dcmsign/sitstamp.h ../include/dcmtk/dcmsign/sitsfs.h + ../include/dcmtk/dcmsign/siprivat.h ../include/dcmtk/dcmsign/simdmac.h \ + ../include/dcmtk/dcmsign/sisprof.h ../include/dcmtk/dcmsign/sitstamp.h \ + ../include/dcmtk/dcmsign/sitsfs.h siautopr.o: siautopr.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmsign/siautopr.h ../include/dcmtk/dcmsign/sibrsapr.h \ ../include/dcmtk/dcmsign/sisprof.h ../include/dcmtk/dcmsign/sitypes.h \ @@ -287,9 +286,8 @@ ../../oflog/include/dcmtk/oflog/logmacro.h \ ../../oflog/include/dcmtk/oflog/helpers/snprintf.h \ ../../oflog/include/dcmtk/oflog/tracelog.h \ - ../include/dcmtk/dcmsign/sidefine.h ../include/dcmtk/dcmsign/sirsa.h \ - ../include/dcmtk/dcmsign/sialgo.h ../include/dcmtk/dcmsign/sidsa.h \ - ../include/dcmtk/dcmsign/siecdsa.h \ + ../include/dcmtk/dcmsign/sidefine.h ../include/dcmtk/dcmsign/sipkey.h \ + ../include/dcmtk/dcmsign/sialgo.h \ ../../dcmdata/include/dcmtk/dcmdata/dcstack.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \ @@ -412,82 +410,6 @@ ../../dcmdata/include/dcmtk/dcmdata/dcstack.h \ ../../dcmdata/include/dcmtk/dcmdata/dclist.h \ ../../dcmdata/include/dcmtk/dcmdata/dcpcache.h -sidsa.o: sidsa.cc ../../config/include/dcmtk/config/osconfig.h \ - ../include/dcmtk/dcmsign/sidsa.h ../include/dcmtk/dcmsign/sialgo.h \ - ../include/dcmtk/dcmsign/sitypes.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/ofcond.h \ - ../../ofstd/include/dcmtk/ofstd/ofstring.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/oftraits.h \ - ../../ofstd/include/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/dcmsign/sidefine.h ../include/dcmtk/dcmsign/sicert.h \ - ../include/dcmtk/dcmsign/siprivat.h -siecdsa.o: siecdsa.cc ../../config/include/dcmtk/config/osconfig.h \ - ../include/dcmtk/dcmsign/siecdsa.h ../include/dcmtk/dcmsign/sialgo.h \ - ../include/dcmtk/dcmsign/sitypes.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/ofcond.h \ - ../../ofstd/include/dcmtk/ofstd/ofstring.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/oftraits.h \ - ../../ofstd/include/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/dcmsign/sidefine.h ../include/dcmtk/dcmsign/sicert.h \ - ../include/dcmtk/dcmsign/siprivat.h simaccon.o: simaccon.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmsign/simaccon.h ../include/dcmtk/dcmsign/sitypes.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ @@ -553,8 +475,8 @@ ../../dcmdata/include/dcmtk/dcmdata/dcwcache.h \ ../../dcmdata/include/dcmtk/dcmdata/dcfcache.h \ ../../dcmdata/include/dcmtk/dcmdata/dcistrma.h -simd5.o: simd5.cc ../../config/include/dcmtk/config/osconfig.h \ - ../include/dcmtk/dcmsign/simd5.h ../include/dcmtk/dcmsign/simac.h \ +simdmac.o: simdmac.cc ../../config/include/dcmtk/config/osconfig.h \ + ../include/dcmtk/dcmsign/simdmac.h ../include/dcmtk/dcmsign/simac.h \ ../include/dcmtk/dcmsign/sitypes.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ @@ -635,142 +557,8 @@ ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h -siprivat.o: siprivat.cc ../../config/include/dcmtk/config/osconfig.h \ - ../include/dcmtk/dcmsign/siprivat.h ../include/dcmtk/dcmsign/sitypes.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/ofcond.h \ - ../../ofstd/include/dcmtk/ofstd/ofstring.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/oftraits.h \ - ../../ofstd/include/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/dcmsign/sidefine.h ../include/dcmtk/dcmsign/sirsa.h \ - ../include/dcmtk/dcmsign/sialgo.h ../include/dcmtk/dcmsign/sidsa.h \ - ../include/dcmtk/dcmsign/siecdsa.h ../include/dcmtk/dcmsign/sicert.h -sipurpos.o: sipurpos.cc ../../config/include/dcmtk/config/osconfig.h \ - ../include/dcmtk/dcmsign/sipurpos.h ../include/dcmtk/dcmsign/sidefine.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/dcmsign/sitypes.h \ - ../../ofstd/include/dcmtk/ofstd/oftypes.h \ - ../../ofstd/include/dcmtk/ofstd/ofcond.h \ - ../../ofstd/include/dcmtk/ofstd/ofstring.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/oftraits.h \ - ../../ofstd/include/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 \ - ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \ - ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \ - ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ - ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \ - ../../ofstd/include/dcmtk/ofstd/offile.h \ - ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../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 \ - ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \ - ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ - ../../ofstd/include/dcmtk/ofstd/ofthread.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/dcstack.h \ - ../../dcmdata/include/dcmtk/dcmdata/dclist.h \ - ../../dcmdata/include/dcmtk/dcmdata/dcpcache.h -siripemd.o: siripemd.cc ../../config/include/dcmtk/config/osconfig.h \ - ../include/dcmtk/dcmsign/siripemd.h ../include/dcmtk/dcmsign/simac.h \ - ../include/dcmtk/dcmsign/sitypes.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/ofcond.h \ - ../../ofstd/include/dcmtk/ofstd/ofstring.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/oftraits.h \ - ../../ofstd/include/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/dcmsign/sidefine.h \ - ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ - ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h -sirsa.o: sirsa.cc ../../config/include/dcmtk/config/osconfig.h \ - ../include/dcmtk/dcmsign/sirsa.h ../include/dcmtk/dcmsign/sialgo.h \ +sipkey.o: sipkey.cc ../../config/include/dcmtk/config/osconfig.h \ + ../include/dcmtk/dcmsign/sipkey.h ../include/dcmtk/dcmsign/sialgo.h \ ../include/dcmtk/dcmsign/sitypes.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ @@ -807,9 +595,8 @@ ../../oflog/include/dcmtk/oflog/tracelog.h \ ../include/dcmtk/dcmsign/sidefine.h ../include/dcmtk/dcmsign/sicert.h \ ../include/dcmtk/dcmsign/siprivat.h -sisha1.o: sisha1.cc ../../config/include/dcmtk/config/osconfig.h \ - ../include/dcmtk/dcmsign/sisha1.h ../include/dcmtk/dcmsign/simac.h \ - ../include/dcmtk/dcmsign/sitypes.h \ +siprivat.o: siprivat.cc ../../config/include/dcmtk/config/osconfig.h \ + ../include/dcmtk/dcmsign/siprivat.h ../include/dcmtk/dcmsign/sitypes.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ @@ -843,96 +630,17 @@ ../../oflog/include/dcmtk/oflog/logmacro.h \ ../../oflog/include/dcmtk/oflog/helpers/snprintf.h \ ../../oflog/include/dcmtk/oflog/tracelog.h \ - ../include/dcmtk/dcmsign/sidefine.h \ - ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ - ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h -sisha256.o: sisha256.cc ../../config/include/dcmtk/config/osconfig.h \ - ../include/dcmtk/dcmsign/sisha256.h ../include/dcmtk/dcmsign/simac.h \ - ../include/dcmtk/dcmsign/sitypes.h \ - ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../include/dcmtk/dcmsign/sidefine.h ../include/dcmtk/dcmsign/sipkey.h \ + ../include/dcmtk/dcmsign/sialgo.h ../include/dcmtk/dcmsign/sicert.h +sipurpos.o: sipurpos.cc ../../config/include/dcmtk/config/osconfig.h \ + ../include/dcmtk/dcmsign/sipurpos.h ../include/dcmtk/dcmsign/sidefine.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/ofcond.h \ - ../../ofstd/include/dcmtk/ofstd/ofstring.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/oftraits.h \ - ../../ofstd/include/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/dcmsign/sidefine.h \ - ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ - ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h -sisha384.o: sisha384.cc ../../config/include/dcmtk/config/osconfig.h \ - ../include/dcmtk/dcmsign/sisha384.h ../include/dcmtk/dcmsign/simac.h \ - ../include/dcmtk/dcmsign/sitypes.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/ofcond.h \ - ../../ofstd/include/dcmtk/ofstd/ofstring.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/oftraits.h \ - ../../ofstd/include/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/dcmsign/sidefine.h \ - ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ - ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h -sisha512.o: sisha512.cc ../../config/include/dcmtk/config/osconfig.h \ - ../include/dcmtk/dcmsign/sisha512.h ../include/dcmtk/dcmsign/simac.h \ ../include/dcmtk/dcmsign/sitypes.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/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.h \ ../../oflog/include/dcmtk/oflog/oflog.h \ @@ -960,9 +668,27 @@ ../../oflog/include/dcmtk/oflog/logmacro.h \ ../../oflog/include/dcmtk/oflog/helpers/snprintf.h \ ../../oflog/include/dcmtk/oflog/tracelog.h \ - ../include/dcmtk/dcmsign/sidefine.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \ + ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \ + ../../ofstd/include/dcmtk/ofstd/offile.h \ + ../../ofstd/include/dcmtk/ofstd/ofstd.h \ + ../../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 \ + ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \ + ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ + ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ - ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h + ../../dcmdata/include/dcmtk/dcmdata/dcxfer.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \ + ../../dcmdata/include/dcmtk/dcmdata/dctag.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcstack.h \ + ../../dcmdata/include/dcmtk/dcmdata/dclist.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcpcache.h sisprof.o: sisprof.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmsign/sisprof.h ../include/dcmtk/dcmsign/sitypes.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ @@ -1259,12 +985,9 @@ ../../dcmdata/include/dcmtk/dcmdata/dclist.h \ ../../dcmdata/include/dcmtk/dcmdata/dcpcache.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \ - ../include/dcmtk/dcmsign/simd5.h ../include/dcmtk/dcmsign/simac.h \ - ../include/dcmtk/dcmsign/siripemd.h ../include/dcmtk/dcmsign/sisha1.h \ - ../include/dcmtk/dcmsign/sisha256.h ../include/dcmtk/dcmsign/sisha384.h \ - ../include/dcmtk/dcmsign/sisha512.h ../include/dcmtk/dcmsign/sicert.h \ - ../include/dcmtk/dcmsign/sicertvf.h ../include/dcmtk/dcmsign/dcsignat.h \ - ../include/dcmtk/dcmsign/sipurpos.h \ + ../include/dcmtk/dcmsign/simdmac.h ../include/dcmtk/dcmsign/simac.h \ + ../include/dcmtk/dcmsign/sicert.h ../include/dcmtk/dcmsign/sicertvf.h \ + ../include/dcmtk/dcmsign/dcsignat.h ../include/dcmtk/dcmsign/sipurpos.h \ ../../ofstd/include/dcmtk/ofstd/ofdatime.h \ ../../ofstd/include/dcmtk/ofstd/ofdate.h \ ../../ofstd/include/dcmtk/ofstd/oftime.h diff -Nru dcmtk-3.6.6/dcmsign/libsrc/Makefile.in dcmtk-3.6.7/dcmsign/libsrc/Makefile.in --- dcmtk-3.6.6/dcmsign/libsrc/Makefile.in 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmsign/libsrc/Makefile.in 2022-04-28 13:47:25.000000000 +0000 @@ -19,10 +19,10 @@ LOCALINCLUDES = -I$(ofstddir)/include -I$(oflogdir)/include -I$(dcmdatadir)/include LOCALDEFS = -objs = dcsignat.o sicert.o sidsa.o simd5.o siprivat.o sirsa.o sisprof.o \ - siautopr.o sicreapr.o simaccon.o sinullpr.o siripemd.o sisha1.o \ - sitypes.o sicertvf.o sibrsapr.o sisha256.o sisha384.o sisha512.o siecdsa.o \ - sisrpr.o sisrvpr.o sipurpos.o dcsighlp.o sitstamp.o sitsfs.o +objs = dcsignat.o sicert.o siprivat.o sipkey.o sisprof.o \ + siautopr.o sicreapr.o simaccon.o sinullpr.o simdmac.o \ + sitypes.o sicertvf.o sibrsapr.o sisrpr.o sisrvpr.o \ + sipurpos.o dcsighlp.o sitstamp.o sitsfs.o library = libdcmdsig.$(LIBEXT) diff -Nru dcmtk-3.6.6/dcmsign/libsrc/sicert.cc dcmtk-3.6.7/dcmsign/libsrc/sicert.cc --- dcmtk-3.6.6/dcmsign/libsrc/sicert.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmsign/libsrc/sicert.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1998-2019, OFFIS e.V. + * Copyright (C) 1998-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -25,9 +25,7 @@ #ifdef WITH_OPENSSL #include "dcmtk/dcmsign/sicert.h" -#include "dcmtk/dcmsign/sirsa.h" /* for class SiRSA */ -#include "dcmtk/dcmsign/sidsa.h" /* for class SiDSA */ -#include "dcmtk/dcmsign/siecdsa.h" /* for class SiECDSA */ +#include "dcmtk/dcmsign/sipkey.h" #include "dcmtk/dcmdata/dcstack.h" #include "dcmtk/dcmdata/dcitem.h" #include "dcmtk/dcmdata/dcvrcs.h" @@ -42,9 +40,15 @@ #include END_EXTERN_C -#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER) +#ifndef HAVE_OPENSSL_PROTOTYPE_X509_GET0_NOTBEFORE #define X509_get0_notBefore(x) X509_get_notBefore(x) +#endif + +#ifndef HAVE_OPENSSL_PROTOTYPE_X509_GET0_NOTAFTER #define X509_get0_notAfter(x) X509_get_notAfter(x) +#endif + +#ifndef HAVE_OPENSSL_PROTOTYPE_EVP_PKEY_ID #define EVP_PKEY_id(key) key->type #endif @@ -102,30 +106,7 @@ if (x509) { EVP_PKEY *pkey = X509_extract_key(x509); - if (pkey) - { - switch(EVP_PKEY_type(EVP_PKEY_id(pkey))) - { - case EVP_PKEY_RSA: - result = new SiRSA(EVP_PKEY_get1_RSA(pkey)); - break; - case EVP_PKEY_DSA: - result = new SiDSA(EVP_PKEY_get1_DSA(pkey)); - break; - case EVP_PKEY_EC: -#ifdef OPENSSL_NO_EC - result = new SiECDSA(NULL); -#else - result = new SiECDSA(EVP_PKEY_get1_EC_KEY(pkey)); -#endif - break; - case EVP_PKEY_DH: - default: - /* nothing */ - break; - } - EVP_PKEY_free(pkey); - } + if (pkey) result = new SiPKEY(pkey, OFTrue); } return result; } @@ -184,13 +165,8 @@ { if (data) { -#if OPENSSL_VERSION_NUMBER >= 0x00908000L - // incompatible API change in OpenSSL 0.9.8 const Uint8 *cdata = data; x509 = d2i_X509(NULL, &cdata, cert->getLength()); -#else - x509 = d2i_X509(NULL, &data, cert->getLength()); -#endif if (x509 == NULL) { DCMSIGN_WARN("Unable to parse X.509 certificate."); @@ -432,17 +408,25 @@ return certPubKeyBits; } -const char *SiCertificate::getCertCurveName() +OFString SiCertificate::getCertCurveName() { - const char *result = NULL; + OFString result; #ifndef OPENSSL_NO_EC if (x509) { EVP_PKEY *pkey = X509_extract_key(x509); if (pkey && EVP_PKEY_type(EVP_PKEY_id(pkey)) == EVP_PKEY_EC) { - // we have an elliptic curve. Access EC key. -#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER) + // we have an elliptic curve. +#ifdef HAVE_OPENSSL_PROTOTYPE_EVP_PKEY_GET_GROUP_NAME + /* code for OpenSSL 3.0 and newer */ + char groupname[100]; + groupname[0] = '\0'; + EVP_PKEY_get_group_name(pkey, groupname, 100, NULL); + result = groupname; +#else + /* code for older OpenSSL versions */ +#ifndef HAVE_OPENSSL_PROTOTYPE_EVP_PKEY_GET0_EC_KEY EC_KEY *eckey = EVP_PKEY_get1_EC_KEY(pkey); #else const EC_KEY *eckey = EVP_PKEY_get0_EC_KEY(pkey); @@ -461,10 +445,12 @@ } else result = "unnamed curve"; } -#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER) +#ifndef HAVE_OPENSSL_PROTOTYPE_EVP_PKEY_GET0_EC_KEY EC_KEY_free(eckey); #endif } +#endif /* HAVE_OPENSSL_PROTOTYPE_EVP_PKEY_GET_GROUP_NAME */ + EVP_PKEY_free(pkey); } } @@ -634,13 +620,9 @@ { if (d) { -#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER) // Before OpenSSL 1.1.0, the first parameter of ASN1_TIME_to_generalizedtime() - // was not declared const, as it should be + // was not declared const. We cast the const away, which should work with old and new versions. ASN1_GENERALIZEDTIME *gm = ASN1_TIME_to_generalizedtime(OFconst_cast(ASN1_TIME *, d), NULL); -#else - ASN1_GENERALIZEDTIME *gm = ASN1_TIME_to_generalizedtime(d, NULL); -#endif if (gm) { OFCondition result = convertGeneralizedTime(gm, dt); diff -Nru dcmtk-3.6.6/dcmsign/libsrc/sidsa.cc dcmtk-3.6.7/dcmsign/libsrc/sidsa.cc --- dcmtk-3.6.6/dcmsign/libsrc/sidsa.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmsign/libsrc/sidsa.cc 1970-01-01 00:00:00.000000000 +0000 @@ -1,143 +0,0 @@ -/* - * - * Copyright (C) 1998-2016, 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: dcmsign - * - * Author: Norbert Loxen, Marco Eichelberg - * - * Purpose: - * classes: SiDSA - * - */ - -#include "dcmtk/config/osconfig.h" - -#ifdef WITH_OPENSSL - -#include "dcmtk/dcmsign/sidsa.h" -#include "dcmtk/dcmsign/sicert.h" -#include "dcmtk/dcmsign/siprivat.h" - -BEGIN_EXTERN_C -#include -#include -#include -END_EXTERN_C - -SiDSA::SiDSA(DSA *key) -: dsa(key) -{ -} - - -SiDSA::~SiDSA() -{ - if (dsa) DSA_free(dsa); -} - - -OFCondition SiDSA::sign( - const unsigned char *inputHash, - unsigned long inputHashSize, - E_MACType inputHashAlgorithm, - unsigned char *outputSignature, - unsigned long &outputSignatureSize) -{ - if (dsa==NULL) return SI_EC_InitializationFailed; - int openSSLmac = 0; - switch (inputHashAlgorithm) - { - case EMT_SHA1: - openSSLmac = NID_sha1; - break; - case EMT_RIPEMD160: - openSSLmac = NID_ripemd160; - break; - case EMT_MD5: - openSSLmac = NID_md5; - break; - case EMT_SHA256: - openSSLmac = NID_sha256; - break; - case EMT_SHA384: - openSSLmac = NID_sha384; - break; - case EMT_SHA512: - openSSLmac = NID_sha512; - break; - } - unsigned int sigLen = 0; - int error = DSA_sign(openSSLmac, inputHash, (unsigned int)inputHashSize, outputSignature, &sigLen, dsa); - outputSignatureSize = sigLen; - if (error < 0) return SI_EC_OpenSSLFailure; - return EC_Normal; -} - - -OFCondition SiDSA::verify( - const unsigned char *inputHash, - unsigned long inputHashSize, - E_MACType inputHashAlgorithm, - const unsigned char *inputSignature, - unsigned long inputSignatureSize, - OFBool &verified) -{ - verified = OFFalse; - if (dsa==NULL) return SI_EC_InitializationFailed; - int openSSLmac = 0; - switch (inputHashAlgorithm) - { - case EMT_SHA1: - openSSLmac = NID_sha1; - break; - case EMT_RIPEMD160: - openSSLmac = NID_ripemd160; - break; - case EMT_MD5: - openSSLmac = NID_md5; - break; - case EMT_SHA256: - openSSLmac = NID_sha256; - break; - case EMT_SHA384: - openSSLmac = NID_sha384; - break; - case EMT_SHA512: - openSSLmac = NID_sha512; - break; - } - - // we have to cast away const on inputSignature yet because of OpenSSL limitations - int error = DSA_verify(openSSLmac, inputHash, (unsigned int)inputHashSize, (unsigned char *)inputSignature, (unsigned int)inputSignatureSize, dsa); - if (error < 0) return SI_EC_OpenSSLFailure; else if (error > 0) verified = OFTrue; - return EC_Normal; -} - - -unsigned long SiDSA::getSize() const -{ - if (dsa == NULL) return 0; - return DSA_size(dsa); -} - - -E_KeyType SiDSA::keyType() const -{ - return EKT_DSA; -} - -#else /* WITH_OPENSSL */ - -int sidsa_cc_dummy_to_keep_linker_from_moaning = 0; - -#endif diff -Nru dcmtk-3.6.6/dcmsign/libsrc/siecdsa.cc dcmtk-3.6.7/dcmsign/libsrc/siecdsa.cc --- dcmtk-3.6.6/dcmsign/libsrc/siecdsa.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmsign/libsrc/siecdsa.cc 1970-01-01 00:00:00.000000000 +0000 @@ -1,188 +0,0 @@ -/* - * - * Copyright (C) 1998-2019, 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: dcmsign - * - * Author: Norbert Loxen, Marco Eichelberg - * - * Purpose: - * classes: SiECDSA - * - */ - -#include "dcmtk/config/osconfig.h" - -#ifdef WITH_OPENSSL - -#include "dcmtk/dcmsign/siecdsa.h" -#include "dcmtk/dcmsign/sicert.h" -#include "dcmtk/dcmsign/siprivat.h" - -BEGIN_EXTERN_C -#include -#include -#ifndef OPENSSL_NO_EC -#include -#include -#endif -END_EXTERN_C - -SiECDSA::SiECDSA(EC_KEY *key) -: ecdsa(key) -{ -} - -#ifndef OPENSSL_NO_EC - -SiECDSA::~SiECDSA() -{ - if (ecdsa) EC_KEY_free(ecdsa); -} - - -OFCondition SiECDSA::sign( - const unsigned char *inputHash, - unsigned long inputHashSize, - E_MACType inputHashAlgorithm, - unsigned char *outputSignature, - unsigned long &outputSignatureSize) -{ - if (ecdsa==NULL) return SI_EC_InitializationFailed; - int openSSLmac = 0; - switch (inputHashAlgorithm) - { - case EMT_SHA1: - openSSLmac = NID_sha1; - break; - case EMT_RIPEMD160: - openSSLmac = NID_ripemd160; - break; - case EMT_MD5: - openSSLmac = NID_md5; - break; - case EMT_SHA256: - openSSLmac = NID_sha256; - break; - case EMT_SHA384: - openSSLmac = NID_sha384; - break; - case EMT_SHA512: - openSSLmac = NID_sha512; - break; - } - unsigned int sigLen = 0; - int error = ECDSA_sign(openSSLmac, inputHash, (unsigned int)inputHashSize, outputSignature, &sigLen, ecdsa); - outputSignatureSize = sigLen; - if (error < 0) return SI_EC_OpenSSLFailure; - return EC_Normal; -} - - -OFCondition SiECDSA::verify( - const unsigned char *inputHash, - unsigned long inputHashSize, - E_MACType inputHashAlgorithm, - const unsigned char *inputSignature, - unsigned long inputSignatureSize, - OFBool &verified) -{ - verified = OFFalse; - if (ecdsa==NULL) return SI_EC_InitializationFailed; - int openSSLmac = 0; - switch (inputHashAlgorithm) - { - case EMT_SHA1: - openSSLmac = NID_sha1; - break; - case EMT_RIPEMD160: - openSSLmac = NID_ripemd160; - break; - case EMT_MD5: - openSSLmac = NID_md5; - break; - case EMT_SHA256: - openSSLmac = NID_sha256; - break; - case EMT_SHA384: - openSSLmac = NID_sha384; - break; - case EMT_SHA512: - openSSLmac = NID_sha512; - break; - } - - // we have to cast away const on inputSignature yet because of OpenSSL limitations - int error = ECDSA_verify(openSSLmac, inputHash, (unsigned int)inputHashSize, (unsigned char *)inputSignature, (unsigned int)inputSignatureSize, ecdsa); - - if (error < 0) - { - const char *err = ERR_reason_error_string(ERR_peek_error()); - if (err) DCMSIGN_ERROR("OpenSSL error: " << err); - return SI_EC_OpenSSLFailure; - } - else if (error > 0) verified = OFTrue; - - return EC_Normal; -} - - -unsigned long SiECDSA::getSize() const -{ - if (ecdsa == NULL) return 0; - return ECDSA_size(ecdsa); -} - -#else /* OPENSSL_NO_EC */ - -SiECDSA::~SiECDSA() -{ -} - -OFCondition SiECDSA::sign( - const unsigned char * /* inputHash */, - unsigned long /* inputHashSize */, - E_MACType /* inputHashAlgorithm */, - unsigned char * /* outputSignature */, - unsigned long& /* outputSignatureSize */) -{ - return SI_EC_EllipticCurveNotSupported; -} - -OFCondition SiECDSA::verify( - const unsigned char * /* inputHash */, - unsigned long /* inputHashSize */, - E_MACType /* inputHashAlgorithm */, - const unsigned char * /* inputSignature */, - unsigned long /* inputSignatureSize */, - OFBool& /* verified */) -{ - return SI_EC_EllipticCurveNotSupported; -} - -unsigned long SiECDSA::getSize() const -{ - return 0; -} - -#endif /* OPENSSL_NO_EC */ - -E_KeyType SiECDSA::keyType() const -{ - return EKT_EC; -} - -#else /* WITH_OPENSSL */ - -int SiECDSA_cc_dummy_to_keep_linker_from_moaning = 0; - -#endif diff -Nru dcmtk-3.6.6/dcmsign/libsrc/simd5.cc dcmtk-3.6.7/dcmsign/libsrc/simd5.cc --- dcmtk-3.6.6/dcmsign/libsrc/simd5.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmsign/libsrc/simd5.cc 1970-01-01 00:00:00.000000000 +0000 @@ -1,90 +0,0 @@ -/* - * - * Copyright (C) 1998-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: dcmsign - * - * Author: Marco Eichelberg - * - * Purpose: - * classes: SiMD5 - * - */ - -#include "dcmtk/config/osconfig.h" - -#ifdef WITH_OPENSSL - -#include "dcmtk/dcmsign/simd5.h" -#include "dcmtk/dcmdata/dcerror.h" - -#define INCLUDE_CSTDLIB -#include "dcmtk/ofstd/ofstdinc.h" - -BEGIN_EXTERN_C -#include -END_EXTERN_C - - -SiMD5::SiMD5() -: ctx(new MD5_CTX()) -{ - initialize(); -} - -SiMD5::~SiMD5() -{ - delete ctx; -} - -unsigned long SiMD5::getSize() const -{ - return MD5_DIGEST_LENGTH; -} - -OFCondition SiMD5::initialize() -{ - MD5_Init(ctx); - return EC_Normal; -} - -OFCondition SiMD5::digest(const unsigned char *data, unsigned long length) -{ - if (length == 0) return EC_Normal; - if ((data == NULL)||(ctx == NULL)) return EC_IllegalCall; - MD5_Update(ctx, data, length); - return EC_Normal; -} - -OFCondition SiMD5::finalize(unsigned char *result) -{ - if ((result == NULL)||(ctx == NULL)) return EC_IllegalCall; - MD5_Final(result, ctx); - return EC_Normal; -} - -E_MACType SiMD5::macType() const -{ - return EMT_MD5; -} - -const char *SiMD5::getDefinedTerm() const -{ - return SI_DEFTERMS_MD5; -} - - -#else /* WITH_OPENSSL */ - -int simd5_cc_dummy_to_keep_linker_from_moaning = 0; - -#endif diff -Nru dcmtk-3.6.6/dcmsign/libsrc/simdmac.cc dcmtk-3.6.7/dcmsign/libsrc/simdmac.cc --- dcmtk-3.6.6/dcmsign/libsrc/simdmac.cc 1970-01-01 00:00:00.000000000 +0000 +++ dcmtk-3.6.7/dcmsign/libsrc/simdmac.cc 2022-04-28 13:47:25.000000000 +0000 @@ -0,0 +1,156 @@ +/* + * + * Copyright (C) 1998-2021, 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: dcmsign + * + * Author: Norbert Loxen, Marco Eichelberg + * + * Purpose: + * classes: SiMDMAC + * + */ + +#include "dcmtk/config/osconfig.h" + +#ifdef WITH_OPENSSL + +#include "dcmtk/dcmsign/simdmac.h" +#include "dcmtk/dcmdata/dcerror.h" + +BEGIN_EXTERN_C +#include +END_EXTERN_C + + +SiMDMAC::SiMDMAC(E_MACType mactype) +: ctx(NULL) +, macType_(mactype) +{ + initialize(); +} + +SiMDMAC::~SiMDMAC() +{ + EVP_MD_CTX_destroy(ctx); // This is the same as EVP_MD_CTX_free() in OpenSSL 3.0 +} + +unsigned long SiMDMAC::getSize() const +{ + if (ctx) return EVP_MD_CTX_size(ctx); + return 0; +} + +OFCondition SiMDMAC::initialize() +{ + EVP_MD_CTX_destroy(ctx); // This is the same as EVP_MD_CTX_free() in OpenSSL 3.0 + + ctx = EVP_MD_CTX_create(); // This is the same as EVP_MD_CTX_new() in OpenSSL 3.0 + if (ctx==NULL) return SI_EC_InitializationFailed; + + const EVP_MD *md_type = NULL; + switch (macType_) + { + case EMT_SHA1: + md_type = EVP_sha1(); + break; + case EMT_RIPEMD160: + md_type = EVP_ripemd160(); + break; + case EMT_MD5: + md_type = EVP_md5(); + break; + case EMT_SHA256: + md_type = EVP_sha256(); + break; + case EMT_SHA384: + md_type = EVP_sha384(); + break; + case EMT_SHA512: + md_type = EVP_sha512(); + break; + } + if (md_type==NULL) return SI_EC_InitializationFailed; + + if (EVP_DigestInit_ex(ctx, md_type, NULL) <= 0) + { + DCMSIGN_DEBUG("SiMDMAC::initialize(): call to EVP_DigestInit_ex() failed"); + EVP_MD_CTX_destroy(ctx); // This is the same as EVP_MD_CTX_free() in OpenSSL 3.0 + ctx = NULL; + return SI_EC_OpenSSLFailure; + } + + return EC_Normal; +} + +OFCondition SiMDMAC::digest(const unsigned char *data, unsigned long length) +{ + if (length == 0) return EC_Normal; + if (ctx==NULL) return SI_EC_InitializationFailed; + if (data == NULL) return EC_IllegalCall; + + if (EVP_DigestUpdate(ctx, data, length) <= 0) + { + DCMSIGN_DEBUG("SiMDMAC::digest(): call to EVP_DigestUpdate() failed"); + return SI_EC_OpenSSLFailure; + } + return EC_Normal; +} + +OFCondition SiMDMAC::finalize(unsigned char *result) +{ + if (ctx==NULL) return SI_EC_InitializationFailed; + if (result==NULL) return EC_IllegalCall; + if (EVP_DigestFinal_ex(ctx, result, NULL) <= 0) + { + DCMSIGN_DEBUG("SiMDMAC::finalize(): call to EVP_DigestFinal_ex() failed"); + return SI_EC_OpenSSLFailure; + } + return EC_Normal; +} + +E_MACType SiMDMAC::macType() const +{ + return macType_; +} + +const char *SiMDMAC::getDefinedTerm() const +{ + switch (macType_) + { + case EMT_SHA1: + return SI_DEFTERMS_SHA1; + break; + case EMT_RIPEMD160: + return SI_DEFTERMS_RIPEMD160; + break; + case EMT_MD5: + return SI_DEFTERMS_MD5; + break; + case EMT_SHA256: + return SI_DEFTERMS_SHA256; + break; + case EMT_SHA384: + return SI_DEFTERMS_SHA384; + break; + case EMT_SHA512: + return SI_DEFTERMS_SHA512; + break; + } + return "UNKNOWN_MAC"; +} + +#else /* WITH_OPENSSL */ + +int simdmac_cc_dummy_to_keep_linker_from_moaning = 0; + +#endif diff -Nru dcmtk-3.6.6/dcmsign/libsrc/sipkey.cc dcmtk-3.6.7/dcmsign/libsrc/sipkey.cc --- dcmtk-3.6.6/dcmsign/libsrc/sipkey.cc 1970-01-01 00:00:00.000000000 +0000 +++ dcmtk-3.6.7/dcmsign/libsrc/sipkey.cc 2022-04-28 13:47:25.000000000 +0000 @@ -0,0 +1,263 @@ +/* + * + * Copyright (C) 1998-2021, 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: dcmsign + * + * Author: Norbert Loxen, Marco Eichelberg + * + * Purpose: + * classes: SiPKEY + * + */ + +#include "dcmtk/config/osconfig.h" + +#ifdef WITH_OPENSSL + +#include "dcmtk/dcmsign/sipkey.h" +#include "dcmtk/dcmsign/sicert.h" +#include "dcmtk/dcmsign/siprivat.h" + +BEGIN_EXTERN_C +#include +#include +#include +END_EXTERN_C + +SiPKEY::SiPKEY(EVP_PKEY *key, OFBool owned) +: signing_key(key) +, owned_(owned) +{ +} + +SiPKEY::~SiPKEY() +{ + if (owned_ && signing_key) EVP_PKEY_free(signing_key); +} + + +OFCondition SiPKEY::sign( + const unsigned char *inputHash, + unsigned long inputHashSize, + E_MACType inputHashAlgorithm, + unsigned char *outputSignature, + unsigned long &outputSignatureSize) +{ + if (signing_key==NULL) return SI_EC_InitializationFailed; + const EVP_MD *openSSLmac = NULL; + switch (inputHashAlgorithm) + { + case EMT_SHA1: + openSSLmac = EVP_sha1(); + break; + case EMT_RIPEMD160: + openSSLmac = EVP_ripemd160(); + break; + case EMT_MD5: + openSSLmac = EVP_md5(); + break; + case EMT_SHA256: + openSSLmac = EVP_sha256(); + break; + case EMT_SHA384: + openSSLmac = EVP_sha384(); + break; + case EMT_SHA512: + openSSLmac = EVP_sha512(); + break; + } + + E_KeyType keytype = keyType(); + size_t sigLen = outputSignatureSize; + OFCondition result = EC_Normal; + + // create context structure + EVP_PKEY_CTX *ctx = EVP_PKEY_CTX_new(signing_key, NULL /* no engine */); + if (ctx == NULL) + { + DCMSIGN_DEBUG("SiPKEY::sign(): call to EVP_PKEY_CTX_new() failed"); + result = SI_EC_OpenSSLFailure; + } + + if (result.good()) + { + // initialize signature operation + if (EVP_PKEY_sign_init(ctx) <= 0) + { + DCMSIGN_DEBUG("SiPKEY::sign(): call to EVP_PKEY_sign_init() failed"); + result = SI_EC_OpenSSLFailure; + } + } + + if (result.good() && (keytype == EKT_RSA)) + { + // set padding mode (only for RSA keys) + if (EVP_PKEY_CTX_set_rsa_padding(ctx, RSA_PKCS1_PADDING) <= 0) + { + DCMSIGN_DEBUG("SiPKEY::sign(): call to EVP_PKEY_CTX_set_rsa_padding() failed"); + result = SI_EC_OpenSSLFailure; + } + } + + if (result.good() && (keytype == EKT_RSA)) + { + // set MAC used for hash key generation (only for RSA keys) + if (EVP_PKEY_CTX_set_signature_md(ctx, openSSLmac) <= 0) + { + DCMSIGN_DEBUG("SiPKEY::sign(): call to EVP_PKEY_CTX_set_signature_md() failed"); + result = SI_EC_OpenSSLFailure; + } + } + + if (result.good()) + { + // finally, create the signature + if (EVP_PKEY_sign(ctx, outputSignature, &sigLen, inputHash, inputHashSize) <= 0) + { + DCMSIGN_DEBUG("SiPKEY::sign(): call to EVP_PKEY_sign() failed"); + result = SI_EC_OpenSSLFailure; + } + } + + // clean up context. Call is safe if ctx==NULL. + EVP_PKEY_CTX_free(ctx); + + outputSignatureSize = OFstatic_cast(unsigned long, sigLen); + return result; +} + + +OFCondition SiPKEY::verify( + const unsigned char *inputHash, + unsigned long inputHashSize, + E_MACType inputHashAlgorithm, + const unsigned char *inputSignature, + unsigned long inputSignatureSize, + OFBool &verified) +{ + verified = OFFalse; + if (signing_key==NULL) return SI_EC_InitializationFailed; + + const EVP_MD *openSSLmac = NULL; + switch (inputHashAlgorithm) + { + case EMT_SHA1: + openSSLmac = EVP_sha1(); + break; + case EMT_RIPEMD160: + openSSLmac = EVP_ripemd160(); + break; + case EMT_MD5: + openSSLmac = EVP_md5(); + break; + case EMT_SHA256: + openSSLmac = EVP_sha256(); + break; + case EMT_SHA384: + openSSLmac = EVP_sha384(); + break; + case EMT_SHA512: + openSSLmac = EVP_sha512(); + break; + } + + E_KeyType keytype = keyType(); + OFCondition result = EC_Normal; + + // create context structure + EVP_PKEY_CTX *ctx = EVP_PKEY_CTX_new(signing_key, NULL /* no engine */); + if (ctx == NULL) + { + DCMSIGN_DEBUG("SiPKEY::verify(): call to EVP_PKEY_CTX_new() failed"); + result = SI_EC_OpenSSLFailure; + } + + if (result.good()) + { + // initialize signature operation + if (EVP_PKEY_verify_init(ctx) <= 0) + { + DCMSIGN_DEBUG("SiPKEY::verify(): call to EVP_PKEY_verify_init() failed"); + result = SI_EC_OpenSSLFailure; + } + } + + if (result.good() && (keytype == EKT_RSA)) + { + // set padding mode (only for RSA keys) + if (EVP_PKEY_CTX_set_rsa_padding(ctx, RSA_PKCS1_PADDING) <= 0) + { + DCMSIGN_DEBUG("SiPKEY::verify(): call to EVP_PKEY_CTX_set_rsa_padding() failed"); + result = SI_EC_OpenSSLFailure; + } + } + + if (result.good() && (keytype == EKT_RSA)) + { + // set MAC used for hash key generation (only for RSA keys) + if (EVP_PKEY_CTX_set_signature_md(ctx, openSSLmac) <= 0) + { + DCMSIGN_DEBUG("SiPKEY::verify(): call to EVP_PKEY_CTX_set_signature_md() failed"); + result = SI_EC_OpenSSLFailure; + } + } + + if (result.good()) + { + // finally, create the signature + if (EVP_PKEY_verify(ctx, inputSignature, inputSignatureSize, inputHash, inputHashSize) > 0) verified = OFTrue; + } + + // clean up structures. Both calls are safe if parameter is NULL. + EVP_PKEY_CTX_free(ctx); + + return result; +} + +unsigned long SiPKEY::getSize() const +{ + if (signing_key == NULL) return 0; + return EVP_PKEY_size(signing_key); +} + + +E_KeyType SiPKEY::keyType() const +{ + E_KeyType result = EKT_none; + if (signing_key) switch(EVP_PKEY_type(EVP_PKEY_id(signing_key))) + { + case EVP_PKEY_RSA: + result = EKT_RSA; + break; + case EVP_PKEY_DSA: + result = EKT_DSA; + break; + case EVP_PKEY_DH: + result = EKT_DH; + break; + case EVP_PKEY_EC: + result = EKT_EC; + break; + default: + /* nothing */ + break; + } + + return result; +} + +#else /* WITH_OPENSSL */ + +int sirsa_cc_dummy_to_keep_linker_from_moaning = 0; + +#endif diff -Nru dcmtk-3.6.6/dcmsign/libsrc/siprivat.cc dcmtk-3.6.7/dcmsign/libsrc/siprivat.cc --- dcmtk-3.6.6/dcmsign/libsrc/siprivat.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmsign/libsrc/siprivat.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1998-2019, OFFIS e.V. + * Copyright (C) 1998-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -25,21 +25,16 @@ #ifdef WITH_OPENSSL #include "dcmtk/dcmsign/siprivat.h" -#include "dcmtk/dcmsign/sirsa.h" -#include "dcmtk/dcmsign/sidsa.h" -#include "dcmtk/dcmsign/siecdsa.h" +#include "dcmtk/dcmsign/sipkey.h" #include "dcmtk/dcmsign/sicert.h" -#define INCLUDE_CSTRING -#include "dcmtk/ofstd/ofstdinc.h" - BEGIN_EXTERN_C #include #include #include END_EXTERN_C -#if OPENSSL_VERSION_NUMBER < 0x10100000L +#ifndef HAVE_OPENSSL_PROTOTYPE_EVP_PKEY_ID #define EVP_PKEY_id(key) key->type #endif @@ -154,29 +149,7 @@ SiAlgorithm *SiPrivateKey::createAlgorithmForPrivateKey() { - if (pkey) - { - switch(EVP_PKEY_type(EVP_PKEY_id(pkey))) - { - case EVP_PKEY_RSA: - return new SiRSA(EVP_PKEY_get1_RSA(pkey)); - /* break; */ - case EVP_PKEY_DSA: - return new SiDSA(EVP_PKEY_get1_DSA(pkey)); - /* break; */ - case EVP_PKEY_EC: -#ifdef OPENSSL_NO_EC - return new SiECDSA(NULL); -#else - return new SiECDSA(EVP_PKEY_get1_EC_KEY(pkey)); -#endif - /* break; */ - case EVP_PKEY_DH: - default: - /* nothing */ - break; - } - } + if (pkey) return new SiPKEY(pkey, OFFalse); return NULL; } diff -Nru dcmtk-3.6.6/dcmsign/libsrc/siripemd.cc dcmtk-3.6.7/dcmsign/libsrc/siripemd.cc --- dcmtk-3.6.6/dcmsign/libsrc/siripemd.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmsign/libsrc/siripemd.cc 1970-01-01 00:00:00.000000000 +0000 @@ -1,88 +0,0 @@ -/* - * - * Copyright (C) 1998-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: dcmsign - * - * Author: Norbert Loxen, Marco Eichelberg - * - * Purpose: - * classes: SiRIPEMD160 - * - */ - -#include "dcmtk/config/osconfig.h" - -#ifdef WITH_OPENSSL - -#include "dcmtk/dcmsign/siripemd.h" -#include "dcmtk/dcmdata/dcerror.h" - -#define INCLUDE_CSTDLIB -#include "dcmtk/ofstd/ofstdinc.h" - -BEGIN_EXTERN_C -#include -END_EXTERN_C - -SiRIPEMD160::SiRIPEMD160() -: ctx(new RIPEMD160_CTX()) -{ - initialize(); -} - -SiRIPEMD160::~SiRIPEMD160() -{ - delete ctx; -} - -unsigned long SiRIPEMD160::getSize() const -{ - return RIPEMD160_DIGEST_LENGTH; -} - -OFCondition SiRIPEMD160::initialize() -{ - RIPEMD160_Init(ctx); - return EC_Normal; -} - -OFCondition SiRIPEMD160::digest(const unsigned char *data, unsigned long length) -{ - if (length == 0) return EC_Normal; - if ((data == NULL)||(ctx == NULL)) return EC_IllegalCall; - RIPEMD160_Update(ctx, data, length); - return EC_Normal; -} - -OFCondition SiRIPEMD160::finalize(unsigned char *result) -{ - if ((result == NULL)||(ctx == NULL)) return EC_IllegalCall; - RIPEMD160_Final(result, ctx); - return EC_Normal; -} - -E_MACType SiRIPEMD160::macType() const -{ - return EMT_RIPEMD160; -} - -const char *SiRIPEMD160::getDefinedTerm() const -{ - return SI_DEFTERMS_RIPEMD160; -} - -#else /* WITH_OPENSSL */ - -int siripemd_cc_dummy_to_keep_linker_from_moaning = 0; - -#endif diff -Nru dcmtk-3.6.6/dcmsign/libsrc/sirsa.cc dcmtk-3.6.7/dcmsign/libsrc/sirsa.cc --- dcmtk-3.6.6/dcmsign/libsrc/sirsa.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmsign/libsrc/sirsa.cc 1970-01-01 00:00:00.000000000 +0000 @@ -1,143 +0,0 @@ -/* - * - * Copyright (C) 1998-2016, 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: dcmsign - * - * Author: Norbert Loxen, Marco Eichelberg - * - * Purpose: - * classes: SiRSA - * - */ - -#include "dcmtk/config/osconfig.h" - -#ifdef WITH_OPENSSL - -#include "dcmtk/dcmsign/sirsa.h" -#include "dcmtk/dcmsign/sicert.h" -#include "dcmtk/dcmsign/siprivat.h" - -BEGIN_EXTERN_C -#include -#include -#include /* for RSA */ -END_EXTERN_C - -SiRSA::SiRSA(RSA *key) -: rsa(key) -{ -} - -SiRSA::~SiRSA() -{ - if (rsa) RSA_free(rsa); -} - - -OFCondition SiRSA::sign( - const unsigned char *inputHash, - unsigned long inputHashSize, - E_MACType inputHashAlgorithm, - unsigned char *outputSignature, - unsigned long &outputSignatureSize) -{ - if (rsa==NULL) return SI_EC_InitializationFailed; - int openSSLmac = 0; - switch (inputHashAlgorithm) - { - case EMT_SHA1: - openSSLmac = NID_sha1; - break; - case EMT_RIPEMD160: - openSSLmac = NID_ripemd160; - break; - case EMT_MD5: - openSSLmac = NID_md5; - break; - case EMT_SHA256: - openSSLmac = NID_sha256; - break; - case EMT_SHA384: - openSSLmac = NID_sha384; - break; - case EMT_SHA512: - openSSLmac = NID_sha512; - break; - } - unsigned int sigLen = 0; - // we have to cast away const on inputHash yet because of OpenSSL limitations - int error = RSA_sign(openSSLmac, (unsigned char *)inputHash, (unsigned int)inputHashSize, outputSignature, &sigLen, rsa); - outputSignatureSize = sigLen; - if (error < 0) return SI_EC_OpenSSLFailure; - return EC_Normal; -} - - -OFCondition SiRSA::verify( - const unsigned char *inputHash, - unsigned long inputHashSize, - E_MACType inputHashAlgorithm, - const unsigned char *inputSignature, - unsigned long inputSignatureSize, - OFBool &verified) -{ - verified = OFFalse; - if (rsa==NULL) return SI_EC_InitializationFailed; - - int openSSLmac = 0; - switch (inputHashAlgorithm) - { - case EMT_SHA1: - openSSLmac = NID_sha1; - break; - case EMT_RIPEMD160: - openSSLmac = NID_ripemd160; - break; - case EMT_MD5: - openSSLmac = NID_md5; - break; - case EMT_SHA256: - openSSLmac = NID_sha256; - break; - case EMT_SHA384: - openSSLmac = NID_sha384; - break; - case EMT_SHA512: - openSSLmac = NID_sha512; - break; - } - // we have to cast away const on inputHash yet because of OpenSSL limitations - // we have to cast away const on inputSignature yet because of OpenSSL limitations - int error = RSA_verify(openSSLmac, (unsigned char *)inputHash, (unsigned int)inputHashSize, (unsigned char *)inputSignature, (unsigned int)inputSignatureSize, rsa); - if (error < 0) return SI_EC_OpenSSLFailure; else if (error > 0) verified = OFTrue; - return EC_Normal; -} - -unsigned long SiRSA::getSize() const -{ - if (rsa == NULL) return 0; - return RSA_size(rsa); -} - - -E_KeyType SiRSA::keyType() const -{ - return EKT_RSA; -} - -#else /* WITH_OPENSSL */ - -int sirsa_cc_dummy_to_keep_linker_from_moaning = 0; - -#endif diff -Nru dcmtk-3.6.6/dcmsign/libsrc/sisha1.cc dcmtk-3.6.7/dcmsign/libsrc/sisha1.cc --- dcmtk-3.6.6/dcmsign/libsrc/sisha1.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmsign/libsrc/sisha1.cc 1970-01-01 00:00:00.000000000 +0000 @@ -1,89 +0,0 @@ -/* - * - * Copyright (C) 1998-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: dcmsign - * - * Author: Norbert Loxen, Marco Eichelberg - * - * Purpose: - * classes: SiSHA1 - * - */ - -#include "dcmtk/config/osconfig.h" - -#ifdef WITH_OPENSSL - -#include "dcmtk/dcmsign/sisha1.h" -#include "dcmtk/dcmdata/dcerror.h" - -#define INCLUDE_CSTDLIB -#include "dcmtk/ofstd/ofstdinc.h" - -BEGIN_EXTERN_C -#include -END_EXTERN_C - - -SiSHA1::SiSHA1() -: ctx(new SHA_CTX()) -{ - initialize(); -} - -SiSHA1::~SiSHA1() -{ - delete ctx; -} - -unsigned long SiSHA1::getSize() const -{ - return SHA_DIGEST_LENGTH; -} - -OFCondition SiSHA1::initialize() -{ - SHA1_Init(ctx); - return EC_Normal; -} - -OFCondition SiSHA1::digest(const unsigned char *data, unsigned long length) -{ - if (length == 0) return EC_Normal; - if ((data == NULL)||(ctx == NULL)) return EC_IllegalCall; - SHA1_Update(ctx, data, length); - return EC_Normal; -} - -OFCondition SiSHA1::finalize(unsigned char *result) -{ - if ((result == NULL)||(ctx == NULL)) return EC_IllegalCall; - SHA1_Final(result, ctx); - return EC_Normal; -} - -E_MACType SiSHA1::macType() const -{ - return EMT_SHA1; -} - -const char *SiSHA1::getDefinedTerm() const -{ - return SI_DEFTERMS_SHA1; -} - -#else /* WITH_OPENSSL */ - -int sisha1_cc_dummy_to_keep_linker_from_moaning = 0; - -#endif diff -Nru dcmtk-3.6.6/dcmsign/libsrc/sisha256.cc dcmtk-3.6.7/dcmsign/libsrc/sisha256.cc --- dcmtk-3.6.6/dcmsign/libsrc/sisha256.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmsign/libsrc/sisha256.cc 1970-01-01 00:00:00.000000000 +0000 @@ -1,89 +0,0 @@ -/* - * - * Copyright (C) 2016, 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: dcmsign - * - * Author: Marco Eichelberg - * - * Purpose: - * classes: SiSHA256 - * - */ - -#include "dcmtk/config/osconfig.h" - -#ifdef WITH_OPENSSL - -#include "dcmtk/dcmsign/sisha256.h" -#include "dcmtk/dcmdata/dcerror.h" - -#define INCLUDE_CSTDLIB -#include "dcmtk/ofstd/ofstdinc.h" - -BEGIN_EXTERN_C -#include -END_EXTERN_C - - -SiSHA256::SiSHA256() -: ctx(new SHA256_CTX()) -{ - initialize(); -} - -SiSHA256::~SiSHA256() -{ - delete ctx; -} - -unsigned long SiSHA256::getSize() const -{ - return SHA256_DIGEST_LENGTH; -} - -OFCondition SiSHA256::initialize() -{ - SHA256_Init(ctx); - return EC_Normal; -} - -OFCondition SiSHA256::digest(const unsigned char *data, unsigned long length) -{ - if (length == 0) return EC_Normal; - if ((data == NULL)||(ctx == NULL)) return EC_IllegalCall; - SHA256_Update(ctx, data, length); - return EC_Normal; -} - -OFCondition SiSHA256::finalize(unsigned char *result) -{ - if ((result == NULL)||(ctx == NULL)) return EC_IllegalCall; - SHA256_Final(result, ctx); - return EC_Normal; -} - -E_MACType SiSHA256::macType() const -{ - return EMT_SHA256; -} - -const char *SiSHA256::getDefinedTerm() const -{ - return SI_DEFTERMS_SHA256; -} - -#else /* WITH_OPENSSL */ - -int sisha256_cc_dummy_to_keep_linker_from_moaning = 0; - -#endif diff -Nru dcmtk-3.6.6/dcmsign/libsrc/sisha384.cc dcmtk-3.6.7/dcmsign/libsrc/sisha384.cc --- dcmtk-3.6.6/dcmsign/libsrc/sisha384.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmsign/libsrc/sisha384.cc 1970-01-01 00:00:00.000000000 +0000 @@ -1,89 +0,0 @@ -/* - * - * Copyright (C) 2016-2018, 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: dcmsign - * - * Author: Marco Eichelberg - * - * Purpose: - * classes: SiSHA384 - * - */ - -#include "dcmtk/config/osconfig.h" - -#ifdef WITH_OPENSSL - -#include "dcmtk/dcmsign/sisha384.h" -#include "dcmtk/dcmdata/dcerror.h" - -#define INCLUDE_CSTDLIB -#include "dcmtk/ofstd/ofstdinc.h" - -BEGIN_EXTERN_C -#include -END_EXTERN_C - - -SiSHA384::SiSHA384() -: ctx(new SHA512_CTX()) -{ - initialize(); -} - -SiSHA384::~SiSHA384() -{ - delete ctx; -} - -unsigned long SiSHA384::getSize() const -{ - return SHA384_DIGEST_LENGTH; -} - -OFCondition SiSHA384::initialize() -{ - SHA384_Init(ctx); - return EC_Normal; -} - -OFCondition SiSHA384::digest(const unsigned char *data, unsigned long length) -{ - if (length == 0) return EC_Normal; - if ((data == NULL)||(ctx == NULL)) return EC_IllegalCall; - SHA384_Update(ctx, data, length); - return EC_Normal; -} - -OFCondition SiSHA384::finalize(unsigned char *result) -{ - if ((result == NULL)||(ctx == NULL)) return EC_IllegalCall; - SHA384_Final(result, ctx); - return EC_Normal; -} - -E_MACType SiSHA384::macType() const -{ - return EMT_SHA384; -} - -const char *SiSHA384::getDefinedTerm() const -{ - return SI_DEFTERMS_SHA384; -} - -#else /* WITH_OPENSSL */ - -int sisha384_cc_dummy_to_keep_linker_from_moaning = 0; - -#endif diff -Nru dcmtk-3.6.6/dcmsign/libsrc/sisha512.cc dcmtk-3.6.7/dcmsign/libsrc/sisha512.cc --- dcmtk-3.6.6/dcmsign/libsrc/sisha512.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmsign/libsrc/sisha512.cc 1970-01-01 00:00:00.000000000 +0000 @@ -1,89 +0,0 @@ -/* - * - * Copyright (C) 2016, 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: dcmsign - * - * Author: Marco Eichelberg - * - * Purpose: - * classes: SiSHA512 - * - */ - -#include "dcmtk/config/osconfig.h" - -#ifdef WITH_OPENSSL - -#include "dcmtk/dcmsign/sisha512.h" -#include "dcmtk/dcmdata/dcerror.h" - -#define INCLUDE_CSTDLIB -#include "dcmtk/ofstd/ofstdinc.h" - -BEGIN_EXTERN_C -#include -END_EXTERN_C - - -SiSHA512::SiSHA512() -: ctx(new SHA512_CTX()) -{ - initialize(); -} - -SiSHA512::~SiSHA512() -{ - delete ctx; -} - -unsigned long SiSHA512::getSize() const -{ - return SHA512_DIGEST_LENGTH; -} - -OFCondition SiSHA512::initialize() -{ - SHA512_Init(ctx); - return EC_Normal; -} - -OFCondition SiSHA512::digest(const unsigned char *data, unsigned long length) -{ - if (length == 0) return EC_Normal; - if ((data == NULL)||(ctx == NULL)) return EC_IllegalCall; - SHA512_Update(ctx, data, length); - return EC_Normal; -} - -OFCondition SiSHA512::finalize(unsigned char *result) -{ - if ((result == NULL)||(ctx == NULL)) return EC_IllegalCall; - SHA512_Final(result, ctx); - return EC_Normal; -} - -E_MACType SiSHA512::macType() const -{ - return EMT_SHA512; -} - -const char *SiSHA512::getDefinedTerm() const -{ - return SI_DEFTERMS_SHA512; -} - -#else /* WITH_OPENSSL */ - -int sisha512_cc_dummy_to_keep_linker_from_moaning = 0; - -#endif diff -Nru dcmtk-3.6.6/dcmsign/libsrc/sitstamp.cc dcmtk-3.6.7/dcmsign/libsrc/sitstamp.cc --- dcmtk-3.6.6/dcmsign/libsrc/sitstamp.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmsign/libsrc/sitstamp.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2019, OFFIS e.V. + * Copyright (C) 2019-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -29,12 +29,7 @@ #include "dcmtk/dcmdata/dcerror.h" #include "dcmtk/dcmdata/dcitem.h" #include "dcmtk/dcmdata/dcdeftag.h" -#include "dcmtk/dcmsign/simd5.h" -#include "dcmtk/dcmsign/siripemd.h" -#include "dcmtk/dcmsign/sisha1.h" -#include "dcmtk/dcmsign/sisha256.h" -#include "dcmtk/dcmsign/sisha384.h" -#include "dcmtk/dcmsign/sisha512.h" +#include "dcmtk/dcmsign/simdmac.h" #include "dcmtk/dcmsign/sicert.h" #include "dcmtk/dcmsign/sicertvf.h" #include "dcmtk/dcmsign/dcsignat.h" @@ -48,16 +43,43 @@ #include END_EXTERN_C -#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER) +#ifndef HAVE_OPENSSL_PROTOTYPE_X509_GET0_NOTBEFORE #define X509_get0_notBefore(x) X509_get_notBefore(x) +#endif + +#ifndef HAVE_OPENSSL_PROTOTYPE_X509_GET0_NOTAFTER #define X509_get0_notAfter(x) X509_get_notAfter(x) +#endif + +#ifndef HAVE_OPENSSL_PROTOTYPE_TS_STATUS_INFO_GET0_STATUS #define TS_STATUS_INFO_get0_status(x) (x)->status +#endif + +#ifndef HAVE_OPENSSL_PROTOTYPE_TS_STATUS_INFO_GET0_TEXT #define TS_STATUS_INFO_get0_text(x) (x)->text +#endif + +#ifndef HAVE_OPENSSL_PROTOTYPE_TS_STATUS_INFO_GET0_FAILURE_INFO #define TS_STATUS_INFO_get0_failure_info(x) (x)->failure_info +#endif + +#ifndef HAVE_OPENSSL_PROTOTYPE_TS_VERIFY_CTS_SET_CERTS #define TS_VERIFY_CTS_set_certs(x,y) ((x)->certs = (y)) +#endif + +#ifndef HAVE_OPENSSL_PROTOTYPE_TS_VERIFY_CTX_SET_DATA #define TS_VERIFY_CTX_set_data(x,y) ((x)->data = (y)) +#endif + +#ifndef HAVE_OPENSSL_PROTOTYPE_TS_VERIFY_CTX_SET_FLAGS #define TS_VERIFY_CTX_set_flags(x,y) ((x)->flags = (y)) +#endif + +#ifndef HAVE_OPENSSL_PROTOTYPE_TS_VERIFY_CTX_SET_STORE #define TS_VERIFY_CTX_set_store(x,y) ((x)->store = (y)) +#endif + +#ifndef HAVE_OPENSSL_PROTOTYPE_ASN1_STRING_GET0_DATA #define ASN1_STRING_get0_data(x) ASN1_STRING_data((asn1_string_st*)x) #endif @@ -158,27 +180,27 @@ switch (tsq_mac_) { case EMT_SHA1: - mac = new SiSHA1(); + mac = new SiMDMAC(EMT_SHA1); evpmd = EVP_sha1(); break; case EMT_RIPEMD160: - mac = new SiRIPEMD160(); + mac = new SiMDMAC(EMT_RIPEMD160); evpmd = EVP_ripemd160(); break; case EMT_MD5: - mac = new SiMD5(); + mac = new SiMDMAC(EMT_MD5); evpmd = EVP_md5(); break; case EMT_SHA256: - mac = new SiSHA256(); + mac = new SiMDMAC(EMT_SHA256); evpmd = EVP_sha256(); break; case EMT_SHA384: - mac = new SiSHA384(); + mac = new SiMDMAC(EMT_SHA384); evpmd = EVP_sha384(); break; case EMT_SHA512: - mac = new SiSHA512(); + mac = new SiMDMAC(EMT_SHA512); evpmd = EVP_sha512(); break; default: @@ -619,7 +641,7 @@ SiMAC *mac = NULL; if (result.good()) { -#if OPENSSL_VERSION_NUMBER < 0x10100000L +#ifndef HAVE_OPENSSL_X509_ALGOR_GET0_CONST_PARAM ASN1_OBJECT *mac_oid = NULL; void *ppval = NULL; #else @@ -640,22 +662,22 @@ switch (mac_nid) { case NID_sha1: - mac = new SiSHA1(); + mac = new SiMDMAC(EMT_SHA1); break; case NID_ripemd160: - mac = new SiRIPEMD160(); + mac = new SiMDMAC(EMT_RIPEMD160); break; case NID_md5: - mac = new SiMD5(); + mac = new SiMDMAC(EMT_MD5); break; case NID_sha256: - mac = new SiSHA256(); + mac = new SiMDMAC(EMT_SHA256); break; case NID_sha384: - mac = new SiSHA384(); + mac = new SiMDMAC(EMT_SHA384); break; case NID_sha512: - mac = new SiSHA512(); + mac = new SiMDMAC(EMT_SHA512); break; default: DCMSIGN_ERROR("timestamp response validation failed: unsupported MAC algorithm " << ( mac_name ? mac_name : "(unknown)") << " in timestamp response"); @@ -1205,7 +1227,7 @@ DCMSIGN_INFO(" Validity : not before " << aString); cert.getCertValidityNotAfter(aString); DCMSIGN_INFO(" Validity : not after " << aString); - const char *ecname = NULL; + OFString ecname; switch (cert.getKeyType()) { case EKT_RSA: @@ -1216,7 +1238,7 @@ break; case EKT_EC: ecname = cert.getCertCurveName(); - if (ecname) + if (ecname.length() > 0) { DCMSIGN_INFO(" Public key : EC, curve " << ecname << ", " << cert.getCertKeyBits() << " bits"); } @@ -1282,12 +1304,9 @@ if (result.good()) { - -#if OPENSSL_VERSION_NUMBER < 0x10002000L || defined(LIBRESSL_VERSION_NUMBER) + // In OpenSSL 1.0.1 and earlier, the first parameter was not const + // We cast the const away, which should work with old and new versions BIO *bio = BIO_new_mem_buf(OFconst_cast(Uint8 *, signature), sigLength); -#else - BIO *bio = BIO_new_mem_buf(signature, sigLength); -#endif if (bio) { // set the digital signature as the raw data against which diff -Nru dcmtk-3.6.6/dcmsr/apps/CMakeLists.txt dcmtk-3.6.7/dcmsr/apps/CMakeLists.txt --- dcmtk-3.6.6/dcmsr/apps/CMakeLists.txt 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmsr/apps/CMakeLists.txt 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ # declare executables foreach(PROGRAM dsr2html dsr2xml dsrdump xml2dsr) - DCMTK_ADD_EXECUTABLE(${PROGRAM} ${PROGRAM}) + DCMTK_ADD_EXECUTABLE(${PROGRAM} ${PROGRAM}.cc) endforeach() # make sure executables are linked to the corresponding libraries diff -Nru dcmtk-3.6.6/dcmsr/apps/Makefile.dep dcmtk-3.6.7/dcmsr/apps/Makefile.dep --- dcmtk-3.6.6/dcmsr/apps/Makefile.dep 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmsr/apps/Makefile.dep 2022-04-28 13:47:25.000000000 +0000 @@ -5,12 +5,12 @@ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \ ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ @@ -84,6 +84,7 @@ ../../dcmdata/include/dcmtk/dcmdata/dcvrcs.h \ ../../dcmdata/include/dcmtk/dcmdata/dcbytstr.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrda.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcvrds.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvris.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrlo.h \ ../../dcmdata/include/dcmtk/dcmdata/dcchrstr.h \ @@ -111,7 +112,6 @@ ../../dcmdata/include/dcmtk/dcmdata/dcofsetl.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrae.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvras.h \ - ../../dcmdata/include/dcmtk/dcmdata/dcvrds.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrdt.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrur.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrlt.h \ @@ -145,12 +145,12 @@ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \ ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ @@ -224,6 +224,7 @@ ../../dcmdata/include/dcmtk/dcmdata/dcvrcs.h \ ../../dcmdata/include/dcmtk/dcmdata/dcbytstr.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrda.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcvrds.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvris.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrlo.h \ ../../dcmdata/include/dcmtk/dcmdata/dcchrstr.h \ @@ -251,7 +252,6 @@ ../../dcmdata/include/dcmtk/dcmdata/dcofsetl.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrae.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvras.h \ - ../../dcmdata/include/dcmtk/dcmdata/dcvrds.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrdt.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrur.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrlt.h \ @@ -285,12 +285,12 @@ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \ ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ @@ -364,6 +364,7 @@ ../../dcmdata/include/dcmtk/dcmdata/dcvrcs.h \ ../../dcmdata/include/dcmtk/dcmdata/dcbytstr.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrda.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcvrds.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvris.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrlo.h \ ../../dcmdata/include/dcmtk/dcmdata/dcchrstr.h \ @@ -391,7 +392,6 @@ ../../dcmdata/include/dcmtk/dcmdata/dcofsetl.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrae.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvras.h \ - ../../dcmdata/include/dcmtk/dcmdata/dcvrds.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrdt.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrur.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrlt.h \ @@ -425,12 +425,12 @@ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \ ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ @@ -504,6 +504,7 @@ ../../dcmdata/include/dcmtk/dcmdata/dcvrcs.h \ ../../dcmdata/include/dcmtk/dcmdata/dcbytstr.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrda.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcvrds.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvris.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrlo.h \ ../../dcmdata/include/dcmtk/dcmdata/dcchrstr.h \ @@ -531,7 +532,6 @@ ../../dcmdata/include/dcmtk/dcmdata/dcofsetl.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrae.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvras.h \ - ../../dcmdata/include/dcmtk/dcmdata/dcvrds.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrdt.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrur.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrlt.h \ diff -Nru dcmtk-3.6.6/dcmsr/data/dsr2xml.xsd dcmtk-3.6.7/dcmsr/data/dsr2xml.xsd --- dcmtk-3.6.6/dcmsr/data/dsr2xml.xsd 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmsr/data/dsr2xml.xsd 2022-04-28 13:47:25.000000000 +0000 @@ -10,7 +10,7 @@ XML Schema for DCMTK tools dsr2xml and xml2dsr. - Copyright (C) 2003-2019, OFFIS e.V. and J. Riesmeier + Copyright (C) 2003-2021, OFFIS e.V. and J. Riesmeier All rights reserved. See COPYRIGHT file for details. @@ -91,6 +91,9 @@ + + + @@ -726,6 +729,7 @@ + diff -Nru dcmtk-3.6.6/dcmsr/docs/dsr2html.man dcmtk-3.6.7/dcmsr/docs/dsr2html.man --- dcmtk-3.6.6/dcmsr/docs/dsr2html.man 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmsr/docs/dsr2html.man 2022-04-28 13:47:25.000000000 +0000 @@ -356,6 +356,6 @@ \section dsr2html_copyright COPYRIGHT -Copyright (C) 2000-2019 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany. +Copyright (C) 2000-2022 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany. */ diff -Nru dcmtk-3.6.6/dcmsr/docs/dsr2xml.man dcmtk-3.6.7/dcmsr/docs/dsr2xml.man --- dcmtk-3.6.6/dcmsr/docs/dsr2xml.man 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmsr/docs/dsr2xml.man 2022-04-28 13:47:25.000000000 +0000 @@ -344,6 +344,6 @@ \section dsr2xml_copyright COPYRIGHT -Copyright (C) 2000-2019 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany. +Copyright (C) 2000-2022 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany. */ diff -Nru dcmtk-3.6.6/dcmsr/docs/dsrdump.man dcmtk-3.6.7/dcmsr/docs/dsrdump.man --- dcmtk-3.6.6/dcmsr/docs/dsrdump.man 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmsr/docs/dsrdump.man 2022-04-28 13:47:25.000000000 +0000 @@ -294,6 +294,6 @@ \section dsrdump_copyright COPYRIGHT -Copyright (C) 2000-2019 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany. +Copyright (C) 2000-2022 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany. */ diff -Nru dcmtk-3.6.6/dcmsr/docs/xml2dsr.man dcmtk-3.6.7/dcmsr/docs/xml2dsr.man --- dcmtk-3.6.6/dcmsr/docs/xml2dsr.man 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmsr/docs/xml2dsr.man 2022-04-28 13:47:25.000000000 +0000 @@ -310,6 +310,6 @@ \section xml2dsr_copyright COPYRIGHT -Copyright (C) 2003-2019 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany. +Copyright (C) 2003-2022 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany. */ diff -Nru dcmtk-3.6.6/dcmsr/include/dcmtk/dcmsr/cmr/cid10013.h dcmtk-3.6.7/dcmsr/include/dcmtk/dcmsr/cmr/cid10013.h --- dcmtk-3.6.6/dcmsr/include/dcmtk/dcmsr/cmr/cid10013.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmsr/include/dcmtk/dcmsr/cmr/cid10013.h 2022-04-28 13:47:25.000000000 +0000 @@ -1,12 +1,12 @@ /* * - * Copyright (C) 2015-2020, J. Riesmeier, Oldenburg, Germany + * Copyright (C) 2015-2022, J. Riesmeier, Oldenburg, Germany * All rights reserved. See COPYRIGHT file for details. * * Header file for class CID10013_CTAcquisitionType * - * Generated automatically from DICOM PS 3.16-2020e - * File created on 2020-11-25 11:13:16 by J. Riesmeier + * Generated automatically from DICOM PS 3.16-2022b + * File created on 2022-04-12 13:01:20 by J. Riesmeier * */ diff -Nru dcmtk-3.6.6/dcmsr/include/dcmtk/dcmsr/cmr/cid10033.h dcmtk-3.6.7/dcmsr/include/dcmtk/dcmsr/cmr/cid10033.h --- dcmtk-3.6.6/dcmsr/include/dcmtk/dcmsr/cmr/cid10033.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmsr/include/dcmtk/dcmsr/cmr/cid10033.h 2022-04-28 13:47:25.000000000 +0000 @@ -1,12 +1,12 @@ /* * - * Copyright (C) 2015-2020, J. Riesmeier, Oldenburg, Germany + * Copyright (C) 2015-2022, J. Riesmeier, Oldenburg, Germany * All rights reserved. See COPYRIGHT file for details. * * Header file for class CID10033_CTReconstructionAlgorithm * - * Generated automatically from DICOM PS 3.16-2020e - * File created on 2020-11-25 11:13:18 by J. Riesmeier + * Generated automatically from DICOM PS 3.16-2022b + * File created on 2022-04-12 13:01:21 by J. Riesmeier * */ diff -Nru dcmtk-3.6.6/dcmsr/include/dcmtk/dcmsr/cmr/cid100.h dcmtk-3.6.7/dcmsr/include/dcmtk/dcmsr/cmr/cid100.h --- dcmtk-3.6.6/dcmsr/include/dcmtk/dcmsr/cmr/cid100.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmsr/include/dcmtk/dcmsr/cmr/cid100.h 2022-04-28 13:47:25.000000000 +0000 @@ -1,12 +1,12 @@ /* * - * Copyright (C) 2015-2020, J. Riesmeier, Oldenburg, Germany + * Copyright (C) 2015-2022, J. Riesmeier, Oldenburg, Germany * All rights reserved. See COPYRIGHT file for details. * * Header file for class CID100_QuantitativeDiagnosticImagingProcedures * - * Generated automatically from DICOM PS 3.16-2020e - * File created on 2020-11-25 11:12:49 by J. Riesmeier + * Generated automatically from DICOM PS 3.16-2022b + * File created on 2022-04-12 13:01:10 by J. Riesmeier * */ @@ -28,7 +28,7 @@ /** Implementation of DCMR Context Group: * CID 100 - Quantitative Diagnostic Imaging Procedures. - * (type: extensible, version: 20190817) + * (type: extensible, version: 20210905) */ class DCMTK_CMR_EXPORT CID100_QuantitativeDiagnosticImagingProcedures : public DSRContextGroup @@ -46,7 +46,7 @@ MagneticResonanceImagingGuidance, /// (126020,DCM,"Multiparametric MRI") MultiparametricMRI, - /// (126021,DCM,"Multiparametric MRI of prostate") + /// (719178004,SCT,"Multiparametric MRI of prostate") MultiparametricMRIOfProstate, /// (126022,DCM,"Multiparametric MRI of whole body") MultiparametricMRIOfWholeBody, diff -Nru dcmtk-3.6.6/dcmsr/include/dcmtk/dcmsr/cmr/cid11.h dcmtk-3.6.7/dcmsr/include/dcmtk/dcmsr/cmr/cid11.h --- dcmtk-3.6.6/dcmsr/include/dcmtk/dcmsr/cmr/cid11.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmsr/include/dcmtk/dcmsr/cmr/cid11.h 2022-04-28 13:47:25.000000000 +0000 @@ -1,12 +1,12 @@ /* * - * Copyright (C) 2015-2020, J. Riesmeier, Oldenburg, Germany + * Copyright (C) 2015-2022, J. Riesmeier, Oldenburg, Germany * All rights reserved. See COPYRIGHT file for details. * * Header file for class CID11_RouteOfAdministration * - * Generated automatically from DICOM PS 3.16-2020e - * File created on 2020-11-25 11:12:44 by J. Riesmeier + * Generated automatically from DICOM PS 3.16-2022b + * File created on 2022-04-12 13:01:08 by J. Riesmeier * */ diff -Nru dcmtk-3.6.6/dcmsr/include/dcmtk/dcmsr/cmr/cid244.h dcmtk-3.6.7/dcmsr/include/dcmtk/dcmsr/cmr/cid244.h --- dcmtk-3.6.6/dcmsr/include/dcmtk/dcmsr/cmr/cid244.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmsr/include/dcmtk/dcmsr/cmr/cid244.h 2022-04-28 13:47:25.000000000 +0000 @@ -1,12 +1,12 @@ /* * - * Copyright (C) 2015-2020, J. Riesmeier, Oldenburg, Germany + * Copyright (C) 2015-2022, J. Riesmeier, Oldenburg, Germany * All rights reserved. See COPYRIGHT file for details. * * Header file for class CID244_Laterality * - * Generated automatically from DICOM PS 3.16-2020e - * File created on 2020-11-25 11:12:51 by J. Riesmeier + * Generated automatically from DICOM PS 3.16-2022b + * File created on 2022-04-12 13:01:11 by J. Riesmeier * */ diff -Nru dcmtk-3.6.6/dcmsr/include/dcmtk/dcmsr/cmr/cid247.h dcmtk-3.6.7/dcmsr/include/dcmtk/dcmsr/cmr/cid247.h --- dcmtk-3.6.6/dcmsr/include/dcmtk/dcmsr/cmr/cid247.h 1970-01-01 00:00:00.000000000 +0000 +++ dcmtk-3.6.7/dcmsr/include/dcmtk/dcmsr/cmr/cid247.h 2022-04-28 13:47:25.000000000 +0000 @@ -0,0 +1,160 @@ +/* + * + * Copyright (C) 2015-2022, J. Riesmeier, Oldenburg, Germany + * All rights reserved. See COPYRIGHT file for details. + * + * Header file for class CID247_LateralityLeftRightOnly + * + * Generated automatically from DICOM PS 3.16-2022b + * File created on 2022-04-12 13:01:11 by J. Riesmeier + * + */ + + +#ifndef CMR_CID247_H +#define CMR_CID247_H + +#include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ + +#include "dcmtk/dcmsr/dsrctxgr.h" +#include "dcmtk/dcmsr/cmr/define.h" + +#include "dcmtk/ofstd/ofmap.h" + + +/*---------------------* + * class declaration * + *---------------------*/ + +/** Implementation of DCMR Context Group: + * CID 247 - Laterality Left-Right Only. + * (type: extensible, version: 20190524) + */ +class DCMTK_CMR_EXPORT CID247_LateralityLeftRightOnly + : public DSRContextGroup +{ + + public: + + /** types of laterality left-right only + */ + enum EnumType + { + /// (24028007,SCT,"Right") + Right, + /// (7771000,SCT,"Left") + Left + }; + + /** (default) constructor + ** @param selectedValue coded entry to be selected as the current value (optional). + * Should be a valid code according to the DICOM definitions + * for this context group, i.e. no checks are performed. + * Call DSRContextGroup::checkSelectedValue() if needed. + */ + CID247_LateralityLeftRightOnly(const DSRCodedEntryValue &selectedValue = DSRCodedEntryValue()); + + /** constructor + ** @param selectedValue type mapped to a coded entry that is selected as the + * current value + ** @param enhancedEncodingMode set enhanced encoding mode for coded entry (if enabled) + */ + CID247_LateralityLeftRightOnly(const EnumType selectedValue, + const OFBool enhancedEncodingMode = OFFalse); + + /** select a coded entry given by its type as the current value + ** @param selectedValue type mapped to a coded entry that is selected as the + * current value + * @param enhancedEncodingMode set enhanced encoding mode for coded entry (if enabled) + ** @return status, EC_Normal if successful, an error code otherwise + */ + virtual OFCondition selectValue(const EnumType selectedValue, + const OFBool enhancedEncodingMode = OFFalse); + + // --- static helper functions --- + + /** initialize this context group explicitly. Internally, the list of standard coded + * entries is created and initialized by calling getCodes(). + ** @note This function can be called multiple times but in case of multi-threaded + * applications should be called at least once before any instance of this class + * is actually used. For single-threaded applications, there is no need to call + * it since the initialization is done implicitly. + */ + static void initialize(); + + /** cleanup this context group, i.e.\ delete the internal list of standard coded entries. + * Usually, there is no need to call this method, but it might be useful in order to + * explicitly free the associated memory, e.g. when checking for memory leaks. The list + * will be recreated automatically when needed (or when initialize() is called). + */ + static void cleanup(); + + /** map a given type to the associated coded entry + ** @param value type that should be mapped to a coded entry + * @param enhancedEncodingMode set enhanced encoding mode for coded entry (if enabled) + ** @return coded entry that is associated with the given type + */ + static DSRCodedEntryValue getCodedEntry(const EnumType value, + const OFBool enhancedEncodingMode = OFFalse); + + // --- reintroduce methods from base class + + using DSRContextGroup::selectValue; + using DSRContextGroup::findCodedEntry; + + + protected: + + /// type used for storing and managing the coded entries + typedef OFMap CodeList; + + /** print details on coded entries that are contained in this context group. + * See DSRCodedEntryValue::print() for details of the coded entry output. + ** @param stream stream to which the output should be printed + */ + virtual void printCodes(STD_NAMESPACE ostream &stream) const; + + /** search for a given coded entry in this context group + ** @param searchForCodedEntry coded entry to be searched for + * @param foundCodedEntry pointer to variable that will store the coded entry + * (if found and pointer is not NULL) + * @param enhancedEncodingMode set enhanced encoding mode for coded entry (if enabled) + ** @return result of the search process, also defines the type of the entry + */ + virtual OFCondition findCodedEntry(const DSRCodedEntryValue &searchForCodedEntry, + DSRCodedEntryValue *foundCodedEntry, + const OFBool enhancedEncodingMode = OFFalse) const; + + // --- static helper function --- + + /** get list of standard coded entries that are managed by this context group. + * Internally, the singleton pattern is used, so the list is initialized only once. + * Please note that this function is not thread-safe. Therefore, the initialize() + * function can be called before any instance of this class is actually used. + ** @return reference to list of coded entries managed by this context group + */ + static CodeList &getCodes(); + + /** set the "Enhanced Encoding Mode" for a given coded entry + ** @param codedEntryValue coded entry for which the enhanced encoding mode is set + ** @return status, EC_Normal if successful, an error code otherwise + */ + static OFCondition setEnhancedEncodingMode(DSRCodedEntryValue &codedEntryValue); + + + private: + + /// pointer to internal code list (use a static variable for singleton pattern) + static CodeList *Codes; +}; + + +/*-------------------* + * type definition * + *-------------------*/ + +// define short name for the context group class +typedef CID247_LateralityLeftRightOnly CMR_CID247; + + +#endif diff -Nru dcmtk-3.6.6/dcmsr/include/dcmtk/dcmsr/cmr/cid29.h dcmtk-3.6.7/dcmsr/include/dcmtk/dcmsr/cmr/cid29.h --- dcmtk-3.6.6/dcmsr/include/dcmtk/dcmsr/cmr/cid29.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmsr/include/dcmtk/dcmsr/cmr/cid29.h 2022-04-28 13:47:25.000000000 +0000 @@ -1,12 +1,12 @@ /* * - * Copyright (C) 2015-2020, J. Riesmeier, Oldenburg, Germany + * Copyright (C) 2015-2022, J. Riesmeier, Oldenburg, Germany * All rights reserved. See COPYRIGHT file for details. * * Header file for class CID29_AcquisitionModality * - * Generated automatically from DICOM PS 3.16-2020e - * File created on 2020-11-25 11:12:45 by J. Riesmeier + * Generated automatically from DICOM PS 3.16-2022b + * File created on 2022-04-12 13:01:09 by J. Riesmeier * */ diff -Nru dcmtk-3.6.6/dcmsr/include/dcmtk/dcmsr/cmr/cid4020.h dcmtk-3.6.7/dcmsr/include/dcmtk/dcmsr/cmr/cid4020.h --- dcmtk-3.6.6/dcmsr/include/dcmtk/dcmsr/cmr/cid4020.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmsr/include/dcmtk/dcmsr/cmr/cid4020.h 2022-04-28 13:47:25.000000000 +0000 @@ -1,12 +1,12 @@ /* * - * Copyright (C) 2015-2020, J. Riesmeier, Oldenburg, Germany + * Copyright (C) 2015-2022, J. Riesmeier, Oldenburg, Germany * All rights reserved. See COPYRIGHT file for details. * * Header file for class CID4020_PETRadionuclide * - * Generated automatically from DICOM PS 3.16-2020e - * File created on 2020-11-25 11:12:55 by J. Riesmeier + * Generated automatically from DICOM PS 3.16-2022b + * File created on 2022-04-12 13:01:12 by J. Riesmeier * */ diff -Nru dcmtk-3.6.6/dcmsr/include/dcmtk/dcmsr/cmr/cid4021.h dcmtk-3.6.7/dcmsr/include/dcmtk/dcmsr/cmr/cid4021.h --- dcmtk-3.6.6/dcmsr/include/dcmtk/dcmsr/cmr/cid4021.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmsr/include/dcmtk/dcmsr/cmr/cid4021.h 2022-04-28 13:47:25.000000000 +0000 @@ -1,12 +1,12 @@ /* * - * Copyright (C) 2015-2020, J. Riesmeier, Oldenburg, Germany + * Copyright (C) 2015-2022, J. Riesmeier, Oldenburg, Germany * All rights reserved. See COPYRIGHT file for details. * * Header file for class CID4021_PETRadiopharmaceutical * - * Generated automatically from DICOM PS 3.16-2020e - * File created on 2020-11-25 11:12:57 by J. Riesmeier + * Generated automatically from DICOM PS 3.16-2022b + * File created on 2022-04-12 13:01:13 by J. Riesmeier * */ @@ -40,8 +40,6 @@ */ enum EnumType { - /// (C000591008,MSH,"^18^Fluorine flortaucipir") - _18_FluorineFlortaucipir, /// (126752,DCM,"28H1 ^89^Zr") _28H1_89Zr, /// (126713,DCM,"2FA F^18^") diff -Nru dcmtk-3.6.6/dcmsr/include/dcmtk/dcmsr/cmr/cid4031.h dcmtk-3.6.7/dcmsr/include/dcmtk/dcmsr/cmr/cid4031.h --- dcmtk-3.6.6/dcmsr/include/dcmtk/dcmsr/cmr/cid4031.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmsr/include/dcmtk/dcmsr/cmr/cid4031.h 2022-04-28 13:47:25.000000000 +0000 @@ -1,12 +1,12 @@ /* * - * Copyright (C) 2015-2020, J. Riesmeier, Oldenburg, Germany + * Copyright (C) 2015-2022, J. Riesmeier, Oldenburg, Germany * All rights reserved. See COPYRIGHT file for details. * * Header file for class CID4031_CommonAnatomicRegions * - * Generated automatically from DICOM PS 3.16-2020e - * File created on 2020-11-25 11:12:59 by J. Riesmeier + * Generated automatically from DICOM PS 3.16-2022b + * File created on 2022-04-12 13:01:14 by J. Riesmeier * */ @@ -28,7 +28,7 @@ /** Implementation of DCMR Context Group: * CID 4031 - Common Anatomic Regions. - * (type: extensible, version: 20200704) + * (type: extensible, version: 20210120) */ class DCMTK_CMR_EXPORT CID4031_CommonAnatomicRegions : public DSRContextGroup @@ -54,6 +54,8 @@ ApexOfLung, /// (28273000,SCT,"Bile duct") BileDuct, + /// (34707002,SCT,"Biliary tract") + BiliaryTract, /// (89837001,SCT,"Bladder") Bladder, /// (72001000,SCT,"Bone of lower limb") diff -Nru dcmtk-3.6.6/dcmsr/include/dcmtk/dcmsr/cmr/cid42.h dcmtk-3.6.7/dcmsr/include/dcmtk/dcmsr/cmr/cid42.h --- dcmtk-3.6.6/dcmsr/include/dcmtk/dcmsr/cmr/cid42.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmsr/include/dcmtk/dcmsr/cmr/cid42.h 2022-04-28 13:47:25.000000000 +0000 @@ -1,12 +1,12 @@ /* * - * Copyright (C) 2015-2020, J. Riesmeier, Oldenburg, Germany + * Copyright (C) 2015-2022, J. Riesmeier, Oldenburg, Germany * All rights reserved. See COPYRIGHT file for details. * * Header file for class CID42_NumericValueQualifier * - * Generated automatically from DICOM PS 3.16-2020e - * File created on 2020-11-25 11:12:47 by J. Riesmeier + * Generated automatically from DICOM PS 3.16-2022b + * File created on 2022-04-12 13:01:09 by J. Riesmeier * */ @@ -40,29 +40,29 @@ */ enum EnumType { - /// (114000,DCM,"Not a number") + /// (114000,DCM,"Not a number"), included from CID 43 NotANumber, - /// (114001,DCM,"Negative Infinity") + /// (114001,DCM,"Negative Infinity"), included from CID 43 NegativeInfinity, - /// (114002,DCM,"Positive Infinity") + /// (114002,DCM,"Positive Infinity"), included from CID 43 PositiveInfinity, - /// (114003,DCM,"Divide by zero") + /// (114003,DCM,"Divide by zero"), included from CID 43 DivideByZero, - /// (114004,DCM,"Underflow") + /// (114004,DCM,"Underflow"), included from CID 43 Underflow, - /// (114005,DCM,"Overflow") + /// (114005,DCM,"Overflow"), included from CID 43 Overflow, - /// (114006,DCM,"Measurement failure") + /// (114006,DCM,"Measurement failure"), included from CID 43 MeasurementFailure, - /// (114007,DCM,"Measurement not attempted") - MeasurementNotAttempted, - /// (114008,DCM,"Calculation failure") + /// (114008,DCM,"Calculation failure"), included from CID 43 CalculationFailure, - /// (114009,DCM,"Value out of range") + /// (114009,DCM,"Value out of range"), included from CID 43 ValueOutOfRange, - /// (114010,DCM,"Value unknown") + /// (114007,DCM,"Measurement not attempted"), included from CID 44 + MeasurementNotAttempted, + /// (114010,DCM,"Value unknown"), included from CID 44 ValueUnknown, - /// (114011,DCM,"Value indeterminate") + /// (114011,DCM,"Value indeterminate"), included from CID 44 ValueIndeterminate }; diff -Nru dcmtk-3.6.6/dcmsr/include/dcmtk/dcmsr/cmr/cid6147.h dcmtk-3.6.7/dcmsr/include/dcmtk/dcmsr/cmr/cid6147.h --- dcmtk-3.6.6/dcmsr/include/dcmtk/dcmsr/cmr/cid6147.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmsr/include/dcmtk/dcmsr/cmr/cid6147.h 2022-04-28 13:47:25.000000000 +0000 @@ -1,12 +1,12 @@ /* * - * Copyright (C) 2015-2020, J. Riesmeier, Oldenburg, Germany + * Copyright (C) 2015-2022, J. Riesmeier, Oldenburg, Germany * All rights reserved. See COPYRIGHT file for details. * * Header file for class CID6147_ResponseCriteria * - * Generated automatically from DICOM PS 3.16-2020e - * File created on 2020-11-25 11:13:01 by J. Riesmeier + * Generated automatically from DICOM PS 3.16-2022b + * File created on 2022-04-12 13:01:14 by J. Riesmeier * */ diff -Nru dcmtk-3.6.6/dcmsr/include/dcmtk/dcmsr/cmr/cid7021.h dcmtk-3.6.7/dcmsr/include/dcmtk/dcmsr/cmr/cid7021.h --- dcmtk-3.6.6/dcmsr/include/dcmtk/dcmsr/cmr/cid7021.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmsr/include/dcmtk/dcmsr/cmr/cid7021.h 2022-04-28 13:47:25.000000000 +0000 @@ -1,12 +1,12 @@ /* * - * Copyright (C) 2015-2020, J. Riesmeier, Oldenburg, Germany + * Copyright (C) 2015-2022, J. Riesmeier, Oldenburg, Germany * All rights reserved. See COPYRIGHT file for details. * * Header file for class CID7021_MeasurementReportDocumentTitles * - * Generated automatically from DICOM PS 3.16-2020e - * File created on 2020-11-25 11:13:03 by J. Riesmeier + * Generated automatically from DICOM PS 3.16-2022b + * File created on 2022-04-12 13:01:15 by J. Riesmeier * */ diff -Nru dcmtk-3.6.6/dcmsr/include/dcmtk/dcmsr/cmr/cid7181.h dcmtk-3.6.7/dcmsr/include/dcmtk/dcmsr/cmr/cid7181.h --- dcmtk-3.6.6/dcmsr/include/dcmtk/dcmsr/cmr/cid7181.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmsr/include/dcmtk/dcmsr/cmr/cid7181.h 2022-04-28 13:47:25.000000000 +0000 @@ -1,12 +1,12 @@ /* * - * Copyright (C) 2015-2020, J. Riesmeier, Oldenburg, Germany + * Copyright (C) 2015-2022, J. Riesmeier, Oldenburg, Germany * All rights reserved. See COPYRIGHT file for details. * * Header file for class CID7181_AbstractMultiDimensionalImageModelComponentUnits * - * Generated automatically from DICOM PS 3.16-2020e - * File created on 2020-11-25 11:13:05 by J. Riesmeier + * Generated automatically from DICOM PS 3.16-2022b + * File created on 2022-04-12 13:01:16 by J. Riesmeier * */ diff -Nru dcmtk-3.6.6/dcmsr/include/dcmtk/dcmsr/cmr/cid7445.h dcmtk-3.6.7/dcmsr/include/dcmtk/dcmsr/cmr/cid7445.h --- dcmtk-3.6.6/dcmsr/include/dcmtk/dcmsr/cmr/cid7445.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmsr/include/dcmtk/dcmsr/cmr/cid7445.h 2022-04-28 13:47:25.000000000 +0000 @@ -1,12 +1,12 @@ /* * - * Copyright (C) 2015-2020, J. Riesmeier, Oldenburg, Germany + * Copyright (C) 2015-2022, J. Riesmeier, Oldenburg, Germany * All rights reserved. See COPYRIGHT file for details. * * Header file for class CID7445_DeviceParticipatingRoles * - * Generated automatically from DICOM PS 3.16-2020e - * File created on 2020-11-25 11:13:06 by J. Riesmeier + * Generated automatically from DICOM PS 3.16-2022b + * File created on 2022-04-12 13:01:16 by J. Riesmeier * */ diff -Nru dcmtk-3.6.6/dcmsr/include/dcmtk/dcmsr/cmr/cid7452.h dcmtk-3.6.7/dcmsr/include/dcmtk/dcmsr/cmr/cid7452.h --- dcmtk-3.6.6/dcmsr/include/dcmtk/dcmsr/cmr/cid7452.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmsr/include/dcmtk/dcmsr/cmr/cid7452.h 2022-04-28 13:47:25.000000000 +0000 @@ -1,12 +1,12 @@ /* * - * Copyright (C) 2015-2020, J. Riesmeier, Oldenburg, Germany + * Copyright (C) 2015-2022, J. Riesmeier, Oldenburg, Germany * All rights reserved. See COPYRIGHT file for details. * * Header file for class CID7452_OrganizationalRoles * - * Generated automatically from DICOM PS 3.16-2020e - * File created on 2020-11-25 11:13:08 by J. Riesmeier + * Generated automatically from DICOM PS 3.16-2022b + * File created on 2022-04-12 13:01:17 by J. Riesmeier * */ diff -Nru dcmtk-3.6.6/dcmsr/include/dcmtk/dcmsr/cmr/cid7453.h dcmtk-3.6.7/dcmsr/include/dcmtk/dcmsr/cmr/cid7453.h --- dcmtk-3.6.6/dcmsr/include/dcmtk/dcmsr/cmr/cid7453.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmsr/include/dcmtk/dcmsr/cmr/cid7453.h 2022-04-28 13:47:25.000000000 +0000 @@ -1,12 +1,12 @@ /* * - * Copyright (C) 2015-2020, J. Riesmeier, Oldenburg, Germany + * Copyright (C) 2015-2022, J. Riesmeier, Oldenburg, Germany * All rights reserved. See COPYRIGHT file for details. * * Header file for class CID7453_PerformingRoles * - * Generated automatically from DICOM PS 3.16-2020e - * File created on 2020-11-25 11:13:10 by J. Riesmeier + * Generated automatically from DICOM PS 3.16-2022b + * File created on 2022-04-12 13:01:18 by J. Riesmeier * */ diff -Nru dcmtk-3.6.6/dcmsr/include/dcmtk/dcmsr/cmr/cid7464.h dcmtk-3.6.7/dcmsr/include/dcmtk/dcmsr/cmr/cid7464.h --- dcmtk-3.6.6/dcmsr/include/dcmtk/dcmsr/cmr/cid7464.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmsr/include/dcmtk/dcmsr/cmr/cid7464.h 2022-04-28 13:47:25.000000000 +0000 @@ -1,12 +1,12 @@ /* * - * Copyright (C) 2015-2020, J. Riesmeier, Oldenburg, Germany + * Copyright (C) 2015-2022, J. Riesmeier, Oldenburg, Germany * All rights reserved. See COPYRIGHT file for details. * * Header file for class CID7464_GeneralRegionOfInterestMeasurementModifiers * - * Generated automatically from DICOM PS 3.16-2020e - * File created on 2020-11-25 11:13:12 by J. Riesmeier + * Generated automatically from DICOM PS 3.16-2022b + * File created on 2022-04-12 13:01:19 by J. Riesmeier * */ diff -Nru dcmtk-3.6.6/dcmsr/include/dcmtk/dcmsr/cmr/cid7469.h dcmtk-3.6.7/dcmsr/include/dcmtk/dcmsr/cmr/cid7469.h --- dcmtk-3.6.6/dcmsr/include/dcmtk/dcmsr/cmr/cid7469.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmsr/include/dcmtk/dcmsr/cmr/cid7469.h 2022-04-28 13:47:25.000000000 +0000 @@ -1,12 +1,12 @@ /* * - * Copyright (C) 2015-2020, J. Riesmeier, Oldenburg, Germany + * Copyright (C) 2015-2022, J. Riesmeier, Oldenburg, Germany * All rights reserved. See COPYRIGHT file for details. * * Header file for class CID7469_GenericIntensityAndSizeMeasurements * - * Generated automatically from DICOM PS 3.16-2020e - * File created on 2020-11-25 11:13:14 by J. Riesmeier + * Generated automatically from DICOM PS 3.16-2022b + * File created on 2022-04-12 13:01:20 by J. Riesmeier * */ diff -Nru dcmtk-3.6.6/dcmsr/include/dcmtk/dcmsr/cmr/srnumvl.h dcmtk-3.6.7/dcmsr/include/dcmtk/dcmsr/cmr/srnumvl.h --- dcmtk-3.6.6/dcmsr/include/dcmtk/dcmsr/cmr/srnumvl.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmsr/include/dcmtk/dcmsr/cmr/srnumvl.h 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2015-2016, J. Riesmeier, Oldenburg, Germany + * Copyright (C) 2015-2021, J. Riesmeier, Oldenburg, Germany * All rights reserved. See COPYRIGHT file for details. * * Header file for class CMR_SRNumericMeasurementValue @@ -50,10 +50,10 @@ const OFBool check = OFTrue); /** constructor - ** @param valueQualifier code representing the numeric value qualifier. Used to - * specify the reason for the absence of the measured value - * sequence, i.e. why the numeric value and measurement unit - * are empty. + ** @param valueQualifier code representing the numeric value qualifier (mandatory). + * Used to specify the reason for the absence of the measured + * value sequence, i.e. why the numeric value and measurement + * unit are empty. * @param check if enabled, check value for validity before setting it. * See corresponding setValue() method for details. */ @@ -63,10 +63,7 @@ /** constructor ** @param numericValue numeric value (VR=DS, mandatory) * @param measurementUnit code representing the units of measurement (mandatory) - * @param valueQualifier code representing the numeric value qualifier (optional). - * Can also be used to specify the reason for the absence of - * the measured value sequence (where 'numericValue' and - * 'measurementUnit' are stored). + * @param valueQualifier code representing the numeric value qualifier (optional) * @param check if enabled, check values for validity before setting them. * See corresponding setValue() method for details. */ @@ -117,10 +114,8 @@ * needed. ** @param numericValue numeric value to be set (VR=DS, mandatory) * @param measurementUnit measurement unit to be set (mandatory) - * @param valueQualifier numeric value qualifier to be set (optional). Can also be - * used to specify the reason for the absence of the measured - * value sequence (where 'numericValue' and 'measurementUnit' - * are stored). Use an empty code to remove the current value. + * @param valueQualifier numeric value qualifier to be set (optional). + * Use an empty code to remove the current value. * @param check if enabled, check values for validity before setting them. * See checkXXX() methods for details. ** @return status, EC_Normal if successful, an error code otherwise @@ -135,8 +130,8 @@ * Value Sequence, or the reason for the absence of the Measured Value Sequence Item. * Before setting the code, it is usually checked. If the code is invalid the current * code is not replaced and remains unchanged. - ** @param valueQualifier numeric value qualifier to be set (optional). Use an empty - * code to remove the current value. + ** @param valueQualifier numeric value qualifier to be set (conditional). + * Use an empty code to remove the current value. * @param check if enabled, check value for validity before setting it. * See checkNumericValueQualifier() method for details. ** @return status, EC_Normal if successful, an error code otherwise diff -Nru dcmtk-3.6.6/dcmsr/include/dcmtk/dcmsr/cmr/srnumvlu.h dcmtk-3.6.7/dcmsr/include/dcmtk/dcmsr/cmr/srnumvlu.h --- dcmtk-3.6.6/dcmsr/include/dcmtk/dcmsr/cmr/srnumvlu.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmsr/include/dcmtk/dcmsr/cmr/srnumvlu.h 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2016, J. Riesmeier, Oldenburg, Germany + * Copyright (C) 2016-2021, J. Riesmeier, Oldenburg, Germany * All rights reserved. See COPYRIGHT file for details. * * Header file for class CMR_SRNumericMeasurementValueWithUnits @@ -56,10 +56,10 @@ const OFBool check = OFTrue); /** constructor - ** @param valueQualifier code representing the numeric value qualifier. Used to - * specify the reason for the absence of the measured value - * sequence, i.e. why the numeric value and measurement unit - * are empty. + ** @param valueQualifier code representing the numeric value qualifier (mandatory). + * Used to specify the reason for the absence of the measured + * value sequence, i.e. why the numeric value and measurement + * unit are empty. * @param check if enabled, check value for validity before setting it. * See corresponding setValue() method for details. */ @@ -69,10 +69,7 @@ /** constructor ** @param numericValue numeric value (VR=DS, mandatory) * @param measurementUnit code representing the units of measurement (mandatory) - * @param valueQualifier code representing the numeric value qualifier (optional). - * Can also be used to specify the reason for the absence of - * the measured value sequence (where 'numericValue' and - * 'measurementUnit' are stored). + * @param valueQualifier code representing the numeric value qualifier (optional) * @param check if enabled, check values for validity before setting them. * See corresponding setValue() method for details. */ @@ -126,10 +123,8 @@ * needed. ** @param numericValue numeric value to be set (VR=DS, mandatory) * @param measurementUnit measurement unit to be set (mandatory) - * @param valueQualifier numeric value qualifier to be set (optional). Can also be - * used to specify the reason for the absence of the measured - * value sequence (where 'numericValue' and 'measurementUnit' - * are stored). Use an empty code to remove the current value. + * @param valueQualifier numeric value qualifier to be set (optional). + * Use an empty code to remove the current value. * @param check if enabled, check values for validity before setting them. * See checkXXX() methods for details. ** @return status, EC_Normal if successful, an error code otherwise diff -Nru dcmtk-3.6.6/dcmsr/include/dcmtk/dcmsr/cmr/tid1411.h dcmtk-3.6.7/dcmsr/include/dcmtk/dcmsr/cmr/tid1411.h --- dcmtk-3.6.6/dcmsr/include/dcmtk/dcmsr/cmr/tid1411.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmsr/include/dcmtk/dcmsr/cmr/tid1411.h 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2016-2017, J. Riesmeier, Oldenburg, Germany + * Copyright (C) 2016-2021, J. Riesmeier, Oldenburg, Germany * All rights reserved. See COPYRIGHT file for details. * * Header file for class TID1411_VolumetricROIMeasurements @@ -82,8 +82,7 @@ /** check whether the current internal state is valid. * That means, whether the base class is valid and whether all mandatory content * items and included templates are valid (present), i.e. hasMeasurementGroup(), - * hasTrackingIdentifier(), hasTrackingUniqueIdentifier(), hasReferencedSegment(), - * hasSourceSeriesForSegmentation() and hasROIMeasurements() return true. + * hasReferencedSegment() and hasSourceSeriesForSegmentation() return true. ** @return OFTrue if valid, OFFalse otherwise */ OFBool isValid() const; @@ -102,13 +101,13 @@ OFBool hasMeasurementGroup(const OFBool checkChildren = OFFalse) const; /** check whether the 'Tracking Identifier' content item (TID 1411 - Row 2) is - * present. This content item is mandatory, i.e. should be present with a value. + * present. This content item is optional, i.e. might be absent. ** @return OFTrue if the tracking identifier is present, OFFalse otherwise */ OFBool hasTrackingIdentifier() const; /** check whether the 'Tracking Unique Identifier' content item (TID 1411 - Row 3) is - * present. This content item is mandatory, i.e. should be present with a value. + * present. This content item is optional, i.e. might be absent. ** @return OFTrue if the tracking unique identifier is present, OFFalse otherwise */ OFBool hasTrackingUniqueIdentifier() const; @@ -127,10 +126,10 @@ OFBool hasSourceSeriesForSegmentation() const; /** check whether there is an included 'ROI Measurements' template (TID 1411 - - * Row 15) in this measurement template. Initially, this mandatory sub-template - * is created and included by the constructor of this class. After clear() has - * been called, the content item has to be recreated, which is done automatically - * when needed. + * Row 15) in this measurement template. Initially, the optional sub-template + * TID 1419 is created and included by the constructor of this class. After clear() + * has been called, the content item has to be recreated, which is done + * automatically when needed. ** @param checkChildren flag, which is enabled by default, indicating whether to * check for any children, i.e.\ whether the respective * sub-template has any content (child nodes). If OFFalse, @@ -141,7 +140,8 @@ /** get current measurement value of this measurement group as defined by TID 1419 * (ROI Measurements), i.e.\ the current instance of TID 1411 - Row 15. - * This included template is mandatory, i.e. should be present and not be empty. + * This included template is optional, i.e. might be empty and, therefore, does not + * contribute any content items to the tree. * Further instances can be added by calling addMeasurement(). ** @return reference to internally managed SR template (current instance) */ diff -Nru dcmtk-3.6.6/dcmsr/include/dcmtk/dcmsr/cmr/tid1419m.h dcmtk-3.6.7/dcmsr/include/dcmtk/dcmsr/cmr/tid1419m.h --- dcmtk-3.6.6/dcmsr/include/dcmtk/dcmsr/cmr/tid1419m.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmsr/include/dcmtk/dcmsr/cmr/tid1419m.h 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2017-2018, J. Riesmeier, Oldenburg, Germany + * Copyright (C) 2017-2021, J. Riesmeier, Oldenburg, Germany * All rights reserved. See COPYRIGHT file for details. * * Header file for class TID1419_ROIMeasurements_Measurement @@ -102,7 +102,7 @@ } /** create a new measurement. - * Clear the entire measurement and create the mandatory (and other supported) content + * Clear the entire measurement and create the mandatory and other supported content * items of this template, i.e.\ TID 1419 - Row 5 and 20. ** @param conceptName coded entry specifying the concept name of the measurement * (e.g.\ from the given context group 'T_Measurement') diff -Nru dcmtk-3.6.6/dcmsr/include/dcmtk/dcmsr/cmr/tid1500.h dcmtk-3.6.7/dcmsr/include/dcmtk/dcmsr/cmr/tid1500.h --- dcmtk-3.6.6/dcmsr/include/dcmtk/dcmsr/cmr/tid1500.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmsr/include/dcmtk/dcmsr/cmr/tid1500.h 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2015-2017, J. Riesmeier, Oldenburg, Germany + * Copyright (C) 2015-2021, J. Riesmeier, Oldenburg, Germany * All rights reserved. See COPYRIGHT file for details. * * Header file for class TID1500_MeasurementReport @@ -105,39 +105,50 @@ /** check whether the current internal state is valid. * That means, check whether the base class is valid, the mandatory included - * templates TID 1204, 1001 and 1600 are valid, and whether hasProcedureReported() - * as well as hasImagingMeasurements() or hasQualitativeEvaluations() return true. - * In addition, each of the included templates TID 1411 and 1501 should either be - * empty or valid. + * template TID 1001 is valid, and whether hasImagingMeasurements() or + * hasQualitativeEvaluations() return true. In addition, each of the included + * templates TID 1204, 1411, 1501 and 1600 should either be empty or valid. ** @return OFTrue if valid, OFFalse otherwise */ virtual OFBool isValid() const; /** check whether there are any 'Procedure reported' content items (TID 1500 - Row 4) - * in this measurement report. This content item is mandatory, i.e. one or more - * instances of the associated content item should be present. + * in this measurement report. This content item is optional, i.e. might be absent. ** @return OFTrue if at least one procedure reported is present, OFFalse otherwise */ OFBool hasProcedureReported() const; + /** check whether there is an included 'Image Library' template (TID 1500 - Row 8) + * in this measurement report. Initially, the optional sub-template TID 1600 is + * created (without content items) and included by the constructor of this class. + * After clear() has been called or no document title is passed to the constructor, + * it can be created again by calling createNewMeasurementReport(). + ** @param checkChildren optional flag indicating whether to also check for any + * children, i.e.\ whether the respective sub-template has + * any content (child nodes). By default, the presence of + * the "included template" content item is checked only. + ** @return OFTrue if image library is present, OFFalse otherwise + */ + OFBool hasImageLibrary(const OFBool checkChildren = OFFalse) const; + /** check whether there is an 'Imaging Measurements' content item (TID 1500 - Row 6) * in this measurement report. Initially, this conditional content item is created * by the constructor of this class. After clear() has been called or no document * title is passed to the constructor, it can be created again by calling * createNewMeasurementReport(). ** @param checkChildren optional flag indicating whether to also check for any - * children, i.e.\ whether the respective content item has - * child nodes. By default, the presence of the higher-level - * CONTAINER is checked only. + * children, i.e.\ whether the respective sub-template has + * any content (child nodes). By default, the presence of + * the "included template" content item is checked only. ** @return OFTrue if imaging measurements are present, OFFalse otherwise */ OFBool hasImagingMeasurements(const OFBool checkChildren = OFFalse) const; /** check whether there is an included 'Volumetric ROI Measurements' template - * (TID 1500 - Row 8) in this measurement report. Initially, this optional - * sub-template is created and included by the constructor of this class. After - * clear() has been called or no document title is passed to the constructor, it - * can be created again by calling createNewMeasurementReport(). + * (TID 1500 - Row 8) in this measurement report. Initially, the optional + * sub-template TID 1511 is created and included by the constructor of this class + * After clear() has been called or no document title is passed to the constructor, + * it can be created again by calling createNewMeasurementReport(). ** @param checkChildren optional flag indicating whether to also check for any * children, i.e.\ whether the respective sub-template has * any content (child nodes). By default, the presence of @@ -147,10 +158,10 @@ OFBool hasVolumetricROIMeasurements(const OFBool checkChildren = OFFalse) const; /** check whether there is an included 'Measurement Group' template (TID 1500 - - * Row 9) in this measurement report. Initially, this optional sub-template is - * created and included by the constructor of this class. After clear() has been - * called or no document title is passed to the constructor, it can be created again - * by calling createNewMeasurementReport(). + * Row 9) in this measurement report. Initially, the optional sub-template TID + * 1501 is created and included by the constructor of this class. After clear() has + * been called or no document title is passed to the constructor, it can be created + * again by calling createNewMeasurementReport(). ** @param checkChildren optional flag indicating whether to also check for any * children, i.e.\ whether the respective sub-template has * any content (child nodes). By default, the presence of @@ -170,7 +181,8 @@ OFBool hasQualitativeEvaluations(const OFBool checkChildren = OFFalse) const; /** get language of this report as defined by TID 1204 (Language of Content Item and - * Descendants). This included template is mandatory, i.e. should not be empty. + * Descendants). This included template is optional, i.e. might be empty and, + * therefore, does not contribute any content items to the tree. ** @return reference to internally managed SR template */ inline TID1204_LanguageOfContentItemAndDescendants &getLanguage() const @@ -188,7 +200,8 @@ } /** get image library of this report as defined by TID 1600 (Image Library). - * This included template is mandatory, i.e. should not be empty. + * This included template is optional, i.e. might be empty and, therefore, does not + * contribute any content items to the tree. ** @return reference to internally managed SR template */ inline TID1600_ImageLibrary &getImageLibrary() const @@ -198,7 +211,8 @@ /** get volumetric ROI measurements of this report as defined by TID 1411 (Volumetric * ROI Measurements), i.e.\ the current instance of TID 1500 - Row 8. - * This included template is optional, i.e. might be empty (but not absent). + * This included template is optional, i.e. might be empty and, therefore, does not + * add any content items to the tree. * Further instances can be added by calling addVolumetricROIMeasurements(). ** @return reference to internally managed SR template (current instance) */ @@ -209,7 +223,8 @@ /** get individual measurements of this report as defined by TID 1501 (Measurement * Group), i.e.\ the current instance of TID 1500 - Row 9. - * This included template is optional, i.e. might be empty (but not absent). + * This included template is optional, i.e. might be empty and, therefore, does not + * contribute any content items to the tree. * Further instances can be added by calling addIndividualMeasurements(). ** @return reference to internally managed SR template (current instance) */ @@ -225,7 +240,7 @@ OFCondition getDocumentTitle(DSRCodedEntryValue &titleCode); /** create a new measurement report. - * Clear the report and create the mandatory (and other supported) content items of + * Clear the report and create the mandatory and other supported content items of * this template, i.e.\ TID 1500 - Row 1 to 6 and 8 to 9. ** @param title document title to be set (from CID 7021 - Measurement Report * Document Titles), i.e.\ the concept name of the root node @@ -311,7 +326,7 @@ protected: - /** create the mandatory (and other supported) content items of this template, + /** create the mandatory and other supported content items of this template, * i.e.\ TID 1500 - Row 1 to 6 and 8. It is expected that the tree is currently * empty. ** @param title coded entry that specifies the document title to be set diff -Nru dcmtk-3.6.6/dcmsr/include/dcmtk/dcmsr/cmr/tid1501.h dcmtk-3.6.7/dcmsr/include/dcmtk/dcmsr/cmr/tid1501.h --- dcmtk-3.6.6/dcmsr/include/dcmtk/dcmsr/cmr/tid1501.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmsr/include/dcmtk/dcmsr/cmr/tid1501.h 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2017, J. Riesmeier, Oldenburg, Germany + * Copyright (C) 2017-2021, J. Riesmeier, Oldenburg, Germany * All rights reserved. See COPYRIGHT file for details. * * Header file for class TID1501_MeasurementGroup @@ -78,9 +78,8 @@ /** check whether the current internal state is valid. * That means, whether the base class is valid and whether all mandatory content - * items and included templates are valid (present), i.e. hasMeasurementGroup(), - * hasTrackingIdentifier(), hasTrackingUniqueIdentifier() and hasMeasurements() - * return true. + * items and included templates are valid (present), i.e. hasMeasurementGroup() + * and hasMeasurements() return true. ** @return OFTrue if valid, OFFalse otherwise */ OFBool isValid() const; @@ -99,21 +98,22 @@ OFBool hasMeasurementGroup(const OFBool checkChildren = OFFalse) const; /** check whether the 'Tracking Identifier' content item (TID 1501 - Row 2) is - * present. This content item is mandatory, i.e. should be present with a value. + * present. This content item is optional, i.e. might be absent. ** @return OFTrue if the tracking identifier is present, OFFalse otherwise */ OFBool hasTrackingIdentifier() const; /** check whether the 'Tracking Unique Identifier' content item (TID 1501 - Row 3) is - * present. This content item is mandatory, i.e. should be present with a value. + * present. This content item is optional, i.e. might be absent. ** @return OFTrue if the tracking unique identifier is present, OFFalse otherwise */ OFBool hasTrackingUniqueIdentifier() const; /** check whether there is an included 'Measurement' template (TID 1501 - Row 10) in - * this measurement template. Initially, this mandatory sub-template is created and - * included by the constructor of this class. After clear() has been called, the - * content item has to be recreated, which is done automatically when needed. + * this measurement template. Initially, the mandatory sub-template TID 300 is + * created and included by the constructor of this class. After clear() has been + * called, the content item has to be recreated, which is done automatically when + * needed. ** @param checkChildren flag, which is enabled by default, indicating whether to * check for any children, i.e.\ whether the respective * sub-template has any content (child nodes). If OFFalse, diff -Nru dcmtk-3.6.6/dcmsr/include/dcmtk/dcmsr/cmr/tid1600.h dcmtk-3.6.7/dcmsr/include/dcmtk/dcmsr/cmr/tid1600.h --- dcmtk-3.6.6/dcmsr/include/dcmtk/dcmsr/cmr/tid1600.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmsr/include/dcmtk/dcmsr/cmr/tid1600.h 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2015-2016, J. Riesmeier, Oldenburg, Germany + * Copyright (C) 2015-2021, J. Riesmeier, Oldenburg, Germany * All rights reserved. See COPYRIGHT file for details. * * Header file for class TID1600_ImageLibrary diff -Nru dcmtk-3.6.6/dcmsr/include/dcmtk/dcmsr/codes/dcm.h dcmtk-3.6.7/dcmsr/include/dcmtk/dcmsr/codes/dcm.h --- dcmtk-3.6.6/dcmsr/include/dcmtk/dcmsr/codes/dcm.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmsr/include/dcmtk/dcmsr/codes/dcm.h 2022-04-28 13:47:25.000000000 +0000 @@ -1,12 +1,12 @@ /* * - * Copyright (C) 2015-2020, J. Riesmeier, Oldenburg, Germany + * Copyright (C) 2015-2022, J. Riesmeier, Oldenburg, Germany * All rights reserved. See COPYRIGHT file for details. * * Header file with DICOM Controlled Terminology Code Definitions (Coding Scheme "DCM", Version "01") * - * Generated automatically from DICOM PS 3.16-2020e - * File created on 2020-11-25 10:55:18 by J. Riesmeier + * Generated automatically from DICOM PS 3.16-2022b + * File created on 2022-04-11 09:59:28 by J. Riesmeier * */ @@ -34,8 +34,8 @@ * code definitions * *--------------------*/ -// total number of codes: 4387 -// - retired: 199 +// total number of codes: 4632 +// - retired: 201 // - no name: 27 // - not unique: 17 @@ -48,6 +48,7 @@ // The "cleaned camel-case version of the code meaning" is an attempt to map the free text // description of the code meaning to a compiler-friendly but still human-readable representation. +#define CODE_DCM_Annotation DSRBasicCodedEntry("ANN", "DCM", "Annotation") #define CODE_DCM_Autorefraction DSRBasicCodedEntry("AR", "DCM", "Autorefraction") #define CODE_DCM_Archive DSRBasicCodedEntry("ARCHIVE", "DCM", "Archive") #define CODE_DCM_RETIRED_Angioscopy DSRBasicCodedEntry("AS", "DCM", "Angioscopy") @@ -809,8 +810,8 @@ #define CODE_DCM_PartiallySucceeded DSRBasicCodedEntry("111223", "DCM", "Partially Succeeded") #define CODE_DCM_Failed DSRBasicCodedEntry("111224", "DCM", "Failed") #define CODE_DCM_NotAttempted DSRBasicCodedEntry("111225", "DCM", "Not Attempted") -#define CODE_DCM_IndividualImpressionRecommendationAnalysis DSRBasicCodedEntry("111233", "DCM", "Individual Impression / Recommendation Analysis") -#define CODE_DCM_OverallImpressionRecommendationAnalysis DSRBasicCodedEntry("111234", "DCM", "Overall Impression / Recommendation Analysis") +#define CODE_DCM_IndividualImpressionRecommendationAnalysis DSRBasicCodedEntry("111233", "DCM", "Individual Impression/Recommendation Analysis") +#define CODE_DCM_OverallImpressionRecommendationAnalysis DSRBasicCodedEntry("111234", "DCM", "Overall Impression/Recommendation Analysis") #define CODE_DCM_Unusable_QualityRendersImageUnusable DSRBasicCodedEntry("111235", "DCM", "Unusable - Quality renders image unusable") #define CODE_DCM_Usable_DoesNotMeetTheQualityControlStandard DSRBasicCodedEntry("111236", "DCM", "Usable - Does not meet the quality control standard") #define CODE_DCM_Usable_MeetsTheQualityControlStandard DSRBasicCodedEntry("111237", "DCM", "Usable - Meets the quality control standard") @@ -1169,6 +1170,7 @@ #define CODE_DCM_EntranceExposureAtRP DSRBasicCodedEntry("111636", "DCM", "Entrance Exposure at RP") #define CODE_DCM_AccumulatedAverageGlandularDose DSRBasicCodedEntry("111637", "DCM", "Accumulated Average Glandular Dose") #define CODE_DCM_PatientEquivalentThickness DSRBasicCodedEntry("111638", "DCM", "Patient Equivalent Thickness") +#define CODE_DCM_VirtualGrid DSRBasicCodedEntry("111640", "DCM", "Virtual grid") #define CODE_DCM_FixedGrid DSRBasicCodedEntry("111641", "DCM", "Fixed grid") #define CODE_DCM_FocusedGrid DSRBasicCodedEntry("111642", "DCM", "Focused grid") #define CODE_DCM_ReciprocatingGrid DSRBasicCodedEntry("111643", "DCM", "Reciprocating grid") @@ -1544,7 +1546,7 @@ #define CODE_DCM_Coalescent DSRBasicCodedEntry("112157", "DCM", "Coalescent") #define CODE_DCM_Lobar DSRBasicCodedEntry("112158", "DCM", "Lobar") #define CODE_DCM_HyperAcute DSRBasicCodedEntry("112159", "DCM", "Hyper-acute") -#define CODE_DCM_Homogeneous_uniformOpacity DSRBasicCodedEntry("112160", "DCM", "Homogeneous (uniform opacity)") +#define CODE_DCM_Homogeneous DSRBasicCodedEntry("112160", "DCM", "Homogeneous") #define CODE_DCM_Inhomogeneous DSRBasicCodedEntry("112161", "DCM", "Inhomogeneous") #define CODE_DCM_Target DSRBasicCodedEntry("112162", "DCM", "Target") #define CODE_DCM_Fibrocalcific DSRBasicCodedEntry("112163", "DCM", "Fibrocalcific") @@ -1630,7 +1632,7 @@ #define CODE_DCM_Generic3DPlanning DSRBasicCodedEntry("112341", "DCM", "Generic 3D Planning") #define CODE_DCM_GenericPlanningForHipReplacement DSRBasicCodedEntry("112342", "DCM", "Generic Planning for Hip Replacement") #define CODE_DCM_GenericPlanningForKneeReplacement DSRBasicCodedEntry("112343", "DCM", "Generic Planning for Knee Replacement") -#define CODE_DCM_MuellerMethodPlanningForHipReplacement DSRBasicCodedEntry("112344", "DCM", "Müller Method Planning for Hip Replacement") +#define CODE_DCM_MuellerMethodPlanningForHipReplacement DSRBasicCodedEntry("112344", "DCM", "Mueller Method Planning for Hip Replacement") #define CODE_DCM_ImplantationPlan DSRBasicCodedEntry("112345", "DCM", "Implantation Plan") #define CODE_DCM_SelectedImplantComponent DSRBasicCodedEntry("112346", "DCM", "Selected Implant Component") #define CODE_DCM_ComponentID DSRBasicCodedEntry("112347", "DCM", "Component ID") @@ -3257,7 +3259,7 @@ #define CODE_DCM_ImagingMeasurements DSRBasicCodedEntry("126010", "DCM", "Imaging Measurements") #define CODE_DCM_DerivedImagingMeasurements DSRBasicCodedEntry("126011", "DCM", "Derived Imaging Measurements") #define CODE_DCM_MultiparametricMRI DSRBasicCodedEntry("126020", "DCM", "Multiparametric MRI") -#define CODE_DCM_MultiparametricMRIOfProstate DSRBasicCodedEntry("126021", "DCM", "Multiparametric MRI of prostate") +#define CODE_DCM_RETIRED_MultiparametricMRIOfProstate DSRBasicCodedEntry("126021", "DCM", "Multiparametric MRI of prostate") #define CODE_DCM_MultiparametricMRIOfWholeBody DSRBasicCodedEntry("126022", "DCM", "Multiparametric MRI of whole body") #define CODE_DCM_LWHMethodForVolumeOfEllipsoid DSRBasicCodedEntry("126029", "DCM", "LWH method for volume of ellipsoid") #define CODE_DCM_SumOfSegmentedVoxelMethodForVolume DSRBasicCodedEntry("126030", "DCM", "Sum of segmented voxel method for volume") @@ -4193,10 +4195,10 @@ #define CODE_DCM_SyringeAttached DSRBasicCodedEntry("130163", "DCM", "Syringe attached") #define CODE_DCM_SyringeDetached DSRBasicCodedEntry("130164", "DCM", "Syringe detached") #define CODE_DCM_TotalKeepVeinOpenVolumeAdministered DSRBasicCodedEntry("130165", "DCM", "Total Keep Vein Open Volume Administered") -#define CODE_DCM_AutomaticAdministrationPhase DSRBasicCodedEntry("130168", "DCM", "Automatic Administration Phase") -#define CODE_DCM_AutomaticProgrammedHoldPhase DSRBasicCodedEntry("130169", "DCM", "Automatic Programmed Hold Phase") -#define CODE_DCM_AutomaticWithManualHoldPhase DSRBasicCodedEntry("130170", "DCM", "Automatic with Manual Hold Phase") -#define CODE_DCM_AutomaticWithManualInjectPhase DSRBasicCodedEntry("130171", "DCM", "Automatic with Manual Inject Phase") +#define CODE_DCM_AutomaticProgrammedAdministrationPhase DSRBasicCodedEntry("130168", "DCM", "Automatic Programmed Administration Phase") +#define CODE_DCM_AutomaticProgrammedDelayPhase DSRBasicCodedEntry("130169", "DCM", "Automatic Programmed Delay Phase") +#define CODE_DCM_RETIRED_AutomaticWithManualHoldPhase DSRBasicCodedEntry("130170", "DCM", "Automatic with Manual Hold Phase") +#define CODE_DCM_AutomatedManualInjectPhase DSRBasicCodedEntry("130171", "DCM", "Automated Manual Inject Phase") #define CODE_DCM_ManuallyTriggeredInjectionInformation DSRBasicCodedEntry("130172", "DCM", "Manually Triggered Injection Information") #define CODE_DCM_AutomatedAdministration DSRBasicCodedEntry("130173", "DCM", "Automated Administration") #define CODE_DCM_ManualAdministration DSRBasicCodedEntry("130174", "DCM", "Manual Administration") @@ -4280,6 +4282,13 @@ #define CODE_DCM_ContrastReactionProphylacticAgent DSRBasicCodedEntry("130259", "DCM", "Contrast Reaction Prophylactic Agent") #define CODE_DCM_ImagingAgentAdministrationPerformedPhaseUID DSRBasicCodedEntry("130261", "DCM", "Imaging Agent Administration Performed Phase UID") #define CODE_DCM_ReferencedImagingAgentAdministrationPhaseUID DSRBasicCodedEntry("130262", "DCM", "Referenced Imaging Agent Administration Phase UID") +#define CODE_DCM_AutomaticProgrammedWaitPhase DSRBasicCodedEntry("130263", "DCM", "Automatic Programmed Wait Phase") +#define CODE_DCM_ImagingAgentAdministrationInjectorPhaseIdentifier DSRBasicCodedEntry("130264", "DCM", "Imaging Agent Administration Injector Phase Identifier") +#define CODE_DCM_ImagingAgentAdministrationPhaseWithManualHold DSRBasicCodedEntry("130265", "DCM", "Imaging Agent Administration Phase with Manual Hold") +#define CODE_DCM_ProgrammedHoldStarted DSRBasicCodedEntry("130266", "DCM", "Programmed hold started") +#define CODE_DCM_ManualHoldStarted DSRBasicCodedEntry("130267", "DCM", "Manual hold started") +#define CODE_DCM_ManualResumeFromHold DSRBasicCodedEntry("130268", "DCM", "Manual resume from hold") +#define CODE_DCM_TerminatedHoldDueToTimeout DSRBasicCodedEntry("130269", "DCM", "Terminated hold due to timeout") #define CODE_DCM_Median DSRBasicCodedEntry("130290", "DCM", "Median") #define CODE_DCM_SkinOfParaspinalAreaOfTheNeck DSRBasicCodedEntry("130300", "DCM", "Skin of paraspinal area of the neck") #define CODE_DCM_SkinOfParaspinalAreaOfTheSuperiorBack DSRBasicCodedEntry("130301", "DCM", "Skin of paraspinal area of the superior back") @@ -4435,5 +4444,241 @@ #define CODE_DCM_NumberOfFirstDegreeRelativesAffectedByMalignantMelanoma DSRBasicCodedEntry("130487", "DCM", "Number of first-degree relatives affected by malignant melanoma") #define CODE_DCM_RegionInSpace DSRBasicCodedEntry("130488", "DCM", "Region in Space") #define CODE_DCM_ReferencedRegionOfInterestIdentifier DSRBasicCodedEntry("130489", "DCM", "Referenced Region of Interest Identifier") +#define CODE_DCM_Centerline DSRBasicCodedEntry("130490", "DCM", "Centerline") +#define CODE_DCM_StimulationMode DSRBasicCodedEntry("130491", "DCM", "Stimulation Mode") +#define CODE_DCM_StimulusSamplePosition DSRBasicCodedEntry("130492", "DCM", "Stimulus Sample Position") +#define CODE_DCM_StimulusTimeOffset DSRBasicCodedEntry("130493", "DCM", "Stimulus Time Offset") +#define CODE_DCM_NumberOfStimulusEvents DSRBasicCodedEntry("130494", "DCM", "Number of Stimulus Events") +#define CODE_DCM_FrequencyOfStimulusEvents DSRBasicCodedEntry("130495", "DCM", "Frequency of Stimulus Events") +#define CODE_DCM_AccumulatedDoseData DSRBasicCodedEntry("130500", "DCM", "Accumulated Dose Data") +#define CODE_DCM_IrradiationEventSummaryData DSRBasicCodedEntry("130501", "DCM", "Irradiation Event Summary Data") +#define CODE_DCM_ReferencePointDosimetry DSRBasicCodedEntry("130502", "DCM", "Reference Point Dosimetry") +#define CODE_DCM_IsRejectedAcquisition DSRBasicCodedEntry("130503", "DCM", "Is Rejected Acquisition") +#define CODE_DCM_ReasonForRejectingAcquisition DSRBasicCodedEntry("130504", "DCM", "Reason for Rejecting Acquisition") +#define CODE_DCM_IrradiationDetails DSRBasicCodedEntry("130505", "DCM", "Irradiation Details") +#define CODE_DCM_RDSRFrameOfReferenceOrigin DSRBasicCodedEntry("130506", "DCM", "RDSR Frame of Reference Origin") +#define CODE_DCM_RDSRFrameOfReferenceDescription DSRBasicCodedEntry("130507", "DCM", "RDSR Frame of Reference Description") +#define CODE_DCM_RadiationSourceCharacteristics DSRBasicCodedEntry("130508", "DCM", "Radiation Source Characteristics") +#define CODE_DCM_XRayFilterThickness DSRBasicCodedEntry("130509", "DCM", "X-Ray Filter Thickness") +#define CODE_DCM_ReportedValueType DSRBasicCodedEntry("130510", "DCM", "Reported Value Type") +#define CODE_DCM_RadiationTechnique DSRBasicCodedEntry("130511", "DCM", "Radiation Technique") +#define CODE_DCM_Filtration DSRBasicCodedEntry("130512", "DCM", "Filtration") +#define CODE_DCM_Attenuators DSRBasicCodedEntry("130513", "DCM", "Attenuators") +#define CODE_DCM_RadiationOutput DSRBasicCodedEntry("130514", "DCM", "Radiation Output") +#define CODE_DCM_AirKermaAtOutputMeasurementPoint DSRBasicCodedEntry("130515", "DCM", "Air Kerma at Output Measurement Point") +#define CODE_DCM_RadiationFieldArea DSRBasicCodedEntry("130516", "DCM", "Radiation Field Area") +#define CODE_DCM_RadiationFieldOutline DSRBasicCodedEntry("130517", "DCM", "Radiation Field Outline") +#define CODE_DCM_ValueTiming DSRBasicCodedEntry("130518", "DCM", "Value Timing") +#define CODE_DCM_XRaySourceReferenceCoordinateSystem DSRBasicCodedEntry("130519", "DCM", "X-Ray Source Reference Coordinate System") +#define CODE_DCM_TransformationMatrix DSRBasicCodedEntry("130520", "DCM", "Transformation Matrix") +#define CODE_DCM_CenterOfRotation DSRBasicCodedEntry("130521", "DCM", "Center of Rotation") +#define CODE_DCM_RotationPlaneNormalPoint DSRBasicCodedEntry("130522", "DCM", "Rotation Plane Normal Point") +#define CODE_DCM_RotationAngle DSRBasicCodedEntry("130523", "DCM", "Rotation Angle") +#define CODE_DCM_BeamPosition DSRBasicCodedEntry("130524", "DCM", "Beam Position") +#define CODE_DCM_OutputMeasurementPointPosition DSRBasicCodedEntry("130525", "DCM", "Output Measurement Point Position") +#define CODE_DCM_ReferencePointPosition DSRBasicCodedEntry("130526", "DCM", "Reference Point Position") +#define CODE_DCM_IdentificationOfTheAttenuator DSRBasicCodedEntry("130527", "DCM", "Identification of the Attenuator") +#define CODE_DCM_AttenuatorPosition DSRBasicCodedEntry("130528", "DCM", "Attenuator Position") +#define CODE_DCM_PatientAttenuationCharacteristics DSRBasicCodedEntry("130529", "DCM", "Patient Attenuation Characteristics") +#define CODE_DCM_ProcedureCharacteristics DSRBasicCodedEntry("130530", "DCM", "Procedure Characteristics") +#define CODE_DCM_AttenuatorCharacteristics DSRBasicCodedEntry("130531", "DCM", "Attenuator Characteristics") +#define CODE_DCM_DurationOfTimePeriod DSRBasicCodedEntry("130532", "DCM", "Duration of Time Period") +#define CODE_DCM_BeginningOfTimePeriod DSRBasicCodedEntry("130533", "DCM", "Beginning of Time Period") +#define CODE_DCM_EndOfTimePeriod DSRBasicCodedEntry("130534", "DCM", "End of Time Period") +#define CODE_DCM_MiddleOfTimePeriod DSRBasicCodedEntry("130535", "DCM", "Middle of Time Period") +#define CODE_DCM_RoomOrigin DSRBasicCodedEntry("130536", "DCM", "Room Origin") +#define CODE_DCM_EquipmentOrigin DSRBasicCodedEntry("130537", "DCM", "Equipment Origin") +#define CODE_DCM_PatientSupportOrigin DSRBasicCodedEntry("130538", "DCM", "Patient Support Origin") +#define CODE_DCM_IsocenterOrigin DSRBasicCodedEntry("130539", "DCM", "Isocenter Origin") +#define CODE_DCM_PatientCoordinateSystemOrigin DSRBasicCodedEntry("130540", "DCM", "Patient Coordinate System Origin") +#define CODE_DCM_10cmDosimetryPhantom DSRBasicCodedEntry("130541", "DCM", "10 cm Dosimetry Phantom") +#define CODE_DCM_MagneticFieldStrength DSRBasicCodedEntry("130542", "DCM", "Magnetic field strength") +#define CODE_DCM_EndorectalCoilUsed DSRBasicCodedEntry("130543", "DCM", "Endorectal coil used") +#define CODE_DCM_EndorectalCoilType DSRBasicCodedEntry("130544", "DCM", "Endorectal coil type") +#define CODE_DCM_InflatableEndorectalCoilFillSubstance DSRBasicCodedEntry("130545", "DCM", "Inflatable endorectal coil fill substance") +#define CODE_DCM_CrossSectionalScanPlaneOrientation DSRBasicCodedEntry("130546", "DCM", "Cross-sectional scan plane orientation") +#define CODE_DCM_DynamicContrastEnhancedTemporalResolution DSRBasicCodedEntry("130547", "DCM", "Dynamic contrast-enhanced temporal resolution") +#define CODE_DCM_GenitourinaryHistory DSRBasicCodedEntry("130548", "DCM", "Genitourinary History") +#define CODE_DCM_ImagingStudyQuality DSRBasicCodedEntry("130549", "DCM", "Imaging Study Quality") +#define CODE_DCM_ImagingSeriesQuality DSRBasicCodedEntry("130550", "DCM", "Imaging Series Quality") +#define CODE_DCM_ReportingSystem DSRBasicCodedEntry("130551", "DCM", "Reporting system") +#define CODE_DCM_ProstateMRIRelevantProcedureInformation DSRBasicCodedEntry("130552", "DCM", "Prostate MRI relevant procedure information") +#define CODE_DCM_ProstateImagingFindings DSRBasicCodedEntry("130553", "DCM", "Prostate Imaging Findings") +#define CODE_DCM_OverallProstateFinding DSRBasicCodedEntry("130554", "DCM", "Overall Prostate Finding") +#define CODE_DCM_LocalizedProstateFinding DSRBasicCodedEntry("130555", "DCM", "Localized Prostate Finding") +#define CODE_DCM_ProstateRelationalMeasurements DSRBasicCodedEntry("130556", "DCM", "Prostate relational measurements") +#define CODE_DCM_DistanceFromNeurovascularBundle DSRBasicCodedEntry("130557", "DCM", "Distance from neurovascular bundle") +#define CODE_DCM_LesionCapsularContactLength DSRBasicCodedEntry("130558", "DCM", "Lesion capsular contact length") +#define CODE_DCM_ExtraProstaticFinding DSRBasicCodedEntry("130559", "DCM", "Extra-prostatic Finding") +#define CODE_DCM_PIRADSLocalizedAbnormalityAssessment DSRBasicCodedEntry("130560", "DCM", "PI-RADS Localized Abnormality Assessment") +#define CODE_DCM_PIRADST2WILesionAssessment DSRBasicCodedEntry("130561", "DCM", "PI-RADS T2WI Lesion Assessment") +#define CODE_DCM_PIRADSDWILesionAssessment DSRBasicCodedEntry("130562", "DCM", "PI-RADS DWI Lesion Assessment") +#define CODE_DCM_PIRADSDCELesionAssessment DSRBasicCodedEntry("130563", "DCM", "PI-RADS DCE Lesion Assessment") +#define CODE_DCM_PIRADSV2dot0 DSRBasicCodedEntry("130564", "DCM", "PI-RADS v2.0") +#define CODE_DCM_PIRADSV2dot1 DSRBasicCodedEntry("130565", "DCM", "PI-RADS v2.1") +#define CODE_DCM_DiffusionWeightedAcquisitionHighestBValueImage DSRBasicCodedEntry("130566", "DCM", "Diffusion-weighted Acquisition Highest b-value image") +#define CODE_DCM_DynamicContrastEnhancedAcquisition DSRBasicCodedEntry("130567", "DCM", "Dynamic Contrast-Enhanced Acquisition") +#define CODE_DCM_DynamicContrastEnhancedAcquisitionSubtractionImage DSRBasicCodedEntry("130568", "DCM", "Dynamic Contrast-Enhanced Acquisition Subtraction image") +#define CODE_DCM_UtricleCyst DSRBasicCodedEntry("130569", "DCM", "Utricle cyst") +#define CODE_DCM_ProtocolNotFollowed DSRBasicCodedEntry("130570", "DCM", "Protocol not followed") +#define CODE_DCM_CoilPlacementConcern DSRBasicCodedEntry("130571", "DCM", "Coil placement concern") +#define CODE_DCM_CoilSelectionConcern DSRBasicCodedEntry("130572", "DCM", "Coil selection concern") +#define CODE_DCM_StudyPerformedDidNotMatchRequest DSRBasicCodedEntry("130573", "DCM", "Study performed did not match request") +#define CODE_DCM_IncompleteStudy DSRBasicCodedEntry("130574", "DCM", "Incomplete study") +#define CODE_DCM_SuboptimalPatientPreparation DSRBasicCodedEntry("130575", "DCM", "Suboptimal patient preparation") +#define CODE_DCM_AnatomyCoverageIncomplete DSRBasicCodedEntry("130576", "DCM", "Anatomy coverage incomplete") +#define CODE_DCM_PoorFOVSelection DSRBasicCodedEntry("130577", "DCM", "Poor FOV selection") +#define CODE_DCM_PoorSNR DSRBasicCodedEntry("130578", "DCM", "Poor SNR") +#define CODE_DCM_PoorContrastTiming DSRBasicCodedEntry("130579", "DCM", "Poor contrast timing") +#define CODE_DCM_InadequateContrastEnhancement DSRBasicCodedEntry("130580", "DCM", "Inadequate contrast enhancement") +#define CODE_DCM_SubtractionImageMissing DSRBasicCodedEntry("130581", "DCM", "Subtraction image missing") +#define CODE_DCM_UnwantedSubtractionImages DSRBasicCodedEntry("130582", "DCM", "Unwanted subtraction images") +#define CODE_DCM_ExpectedBValueIsMissing DSRBasicCodedEntry("130583", "DCM", "Expected b-value is missing") +#define CODE_DCM_SevereDistortionInTheAreaOfInterest DSRBasicCodedEntry("130584", "DCM", "Severe distortion in the area of interest") +#define CODE_DCM_ExpectedADCMapIsMissing DSRBasicCodedEntry("130585", "DCM", "Expected ADC map is missing") +#define CODE_DCM_DistortionArtifactInTheAreaOfInterest DSRBasicCodedEntry("130586", "DCM", "Distortion artifact in the area of interest") +#define CODE_DCM_NoFamilyHistoryOfProstateCancer DSRBasicCodedEntry("130587", "DCM", "No family history of prostate cancer") +#define CODE_DCM_PreBiopsyLocalizationOfProstateLesion DSRBasicCodedEntry("130588", "DCM", "Pre-biopsy localization of prostate lesion") +#define CODE_DCM_ActiveSurveillanceOfProstateCancer DSRBasicCodedEntry("130589", "DCM", "Active surveillance of prostate cancer") +#define CODE_DCM_AssessChange DSRBasicCodedEntry("130590", "DCM", "Assess change") +#define CODE_DCM_FocalAbnormality DSRBasicCodedEntry("130591", "DCM", "Focal abnormality") +#define CODE_DCM_NonFocalAbnormality DSRBasicCodedEntry("130592", "DCM", "Non-focal abnormality") +#define CODE_DCM_PartiallyEncapsulated DSRBasicCodedEntry("130593", "DCM", "Partially encapsulated") +#define CODE_DCM_CompletelyEncapsulated DSRBasicCodedEntry("130594", "DCM", "Completely encapsulated") +#define CODE_DCM_ADCHyperintense DSRBasicCodedEntry("130595", "DCM", "ADC Hyperintense") +#define CODE_DCM_ADCHypointense DSRBasicCodedEntry("130596", "DCM", "ADC Hypointense") +#define CODE_DCM_PersistentDelayedPhase_Type1Curve DSRBasicCodedEntry("130597", "DCM", "Persistent delayed phase: Type 1 curve") +#define CODE_DCM_PlateauDelayedPhase_Type2Curve DSRBasicCodedEntry("130598", "DCM", "Plateau delayed phase: Type 2 curve") +#define CODE_DCM_WashoutDelayedPhase_Type3Curve DSRBasicCodedEntry("130599", "DCM", "Washout delayed phase: Type 3 curve") +#define CODE_DCM_PositiveDCE DSRBasicCodedEntry("130600", "DCM", "Positive DCE") +#define CODE_DCM_NegativeDCE DSRBasicCodedEntry("130601", "DCM", "Negative DCE") +#define CODE_DCM_EarlyContrastEnhancement DSRBasicCodedEntry("130602", "DCM", "Early Contrast Enhancement") +#define CODE_DCM_DiffuseContrastEnhancement DSRBasicCodedEntry("130603", "DCM", "Diffuse Contrast Enhancement") +#define CODE_DCM_FocalContrastEnhancement DSRBasicCodedEntry("130604", "DCM", "Focal Contrast Enhancement") +#define CODE_DCM_Perfluorocarbon DSRBasicCodedEntry("130605", "DCM", "Perfluorocarbon") +#define CODE_DCM_ESUR2012ProstateMRIAcquisitionRequirements DSRBasicCodedEntry("130606", "DCM", "ESUR 2012 prostate MRI acquisition requirements") +#define CODE_DCM_PIRADS2dot0ProstateMRIAcquisitionRequirements DSRBasicCodedEntry("130607", "DCM", "PI-RADS 2.0 prostate MRI acquisition requirements") +#define CODE_DCM_PIRADS2dot1ProstateMRIAcquisitionRequirements DSRBasicCodedEntry("130608", "DCM", "PI-RADS 2.1 prostate MRI acquisition requirements") +#define CODE_DCM_2DShearWaveElastography DSRBasicCodedEntry("130609", "DCM", "2D Shear Wave Elastography") +#define CODE_DCM_3DShearWaveElastography DSRBasicCodedEntry("130610", "DCM", "3D Shear Wave Elastography") +#define CODE_DCM_ShearWaveSpeed DSRBasicCodedEntry("130611", "DCM", "Shear Wave Speed") +#define CODE_DCM_ShearWaveDispersionSlope DSRBasicCodedEntry("130612", "DCM", "Shear Wave Dispersion Slope") +#define CODE_DCM_ROIDepth DSRBasicCodedEntry("130613", "DCM", "ROI Depth") +#define CODE_DCM_InterquartileRangeOfPopulation DSRBasicCodedEntry("130614", "DCM", "Interquartile Range of population") +#define CODE_DCM_InterquartileRangeToMedianRatioOfPopulation DSRBasicCodedEntry("130615", "DCM", "Interquartile Range to Median Ratio of population") +#define CODE_DCM_PointShearWaveElastography DSRBasicCodedEntry("130616", "DCM", "Point Shear Wave Elastography") +#define CODE_DCM_LeftVentricleApicalAnteroseptalSegment DSRBasicCodedEntry("130620", "DCM", "left ventricle apical anteroseptal segment") +#define CODE_DCM_LeftVentricleApicalInferoseptalSegment DSRBasicCodedEntry("130621", "DCM", "left ventricle apical inferoseptal segment") +#define CODE_DCM_LeftVentricleApicalInferolateralSegment DSRBasicCodedEntry("130622", "DCM", "left ventricle apical inferolateral segment") +#define CODE_DCM_LeftVentricleApicalAnterolateralSegment DSRBasicCodedEntry("130623", "DCM", "left ventricle apical anterolateral segment") +#define CODE_DCM_IsocentricSetupMethod DSRBasicCodedEntry("130630", "DCM", "Isocentric Setup Method") +#define CODE_DCM_ControlledSSDSetupMethod DSRBasicCodedEntry("130631", "DCM", "Controlled SSD Setup Method") +#define CODE_DCM_TBISetupMethod DSRBasicCodedEntry("130632", "DCM", "TBI Setup Method") +#define CODE_DCM_StereotacticSetupMethod DSRBasicCodedEntry("130633", "DCM", "Stereotactic Setup Method") +#define CODE_DCM_SkinAppositionSetupMethod DSRBasicCodedEntry("130634", "DCM", "Skin Apposition Setup Method") +#define CODE_DCM_OcularGazeSetupMethod DSRBasicCodedEntry("130635", "DCM", "Ocular Gaze Setup Method") +#define CODE_DCM_PatientShieldingProcedure DSRBasicCodedEntry("130636", "DCM", "Patient Shielding Procedure") +#define CODE_DCM_PatientFixationProcedure DSRBasicCodedEntry("130637", "DCM", "Patient Fixation Procedure") +#define CODE_DCM_PatientAlignmentProcedure DSRBasicCodedEntry("130638", "DCM", "Patient Alignment Procedure") +#define CODE_DCM_PatientMotionManagementSetupProcedure DSRBasicCodedEntry("130639", "DCM", "Patient Motion Management Setup Procedure") +#define CODE_DCM_CavityRadiationShield DSRBasicCodedEntry("130640", "DCM", "Cavity radiation shield") +#define CODE_DCM_IndependentRadiationShield DSRBasicCodedEntry("130641", "DCM", "Independent radiation shield") +#define CODE_DCM_OpticalDistanceMeter DSRBasicCodedEntry("130642", "DCM", "Optical Distance Meter") +#define CODE_DCM_MechanicalPointer DSRBasicCodedEntry("130643", "DCM", "Mechanical Pointer") +#define CODE_DCM_RadiofrequencyTransponder DSRBasicCodedEntry("130644", "DCM", "Radiofrequency Transponder") +#define CODE_DCM_InfraredMarker DSRBasicCodedEntry("130645", "DCM", "Infrared Marker") +#define CODE_DCM_RadioactiveMarker DSRBasicCodedEntry("130646", "DCM", "Radioactive Marker") +#define CODE_DCM_ThermalImager DSRBasicCodedEntry("130647", "DCM", "Thermal Imager") +#define CODE_DCM_CombinedStructuredLightThermalImager DSRBasicCodedEntry("130648", "DCM", "Combined Structured Light/Thermal Imager") +#define CODE_DCM_OcularFixationLight DSRBasicCodedEntry("130649", "DCM", "Ocular Fixation Light") +#define CODE_DCM_CoachingDevice DSRBasicCodedEntry("130650", "DCM", "Coaching Device") +#define CODE_DCM_PatientDistractionDevice DSRBasicCodedEntry("130651", "DCM", "Patient Distraction Device") +#define CODE_DCM_CollisionChecks DSRBasicCodedEntry("130652", "DCM", "Collision checks") +#define CODE_DCM_BreastBridge DSRBasicCodedEntry("130653", "DCM", "Breast Bridge") +#define CODE_DCM_AbdominalCompressionBelt DSRBasicCodedEntry("130654", "DCM", "Abdominal Compression Belt") +#define CODE_DCM_AbdominalCompressionArch DSRBasicCodedEntry("130655", "DCM", "Abdominal Compression Arch") +#define CODE_DCM_HeadFixationBoard DSRBasicCodedEntry("130656", "DCM", "Head Fixation Board") +#define CODE_DCM_CouchIndexLabel DSRBasicCodedEntry("130657", "DCM", "Couch Index Label") +#define CODE_DCM_FixationDeviceAngle DSRBasicCodedEntry("130658", "DCM", "Fixation Device Angle") +#define CODE_DCM_AbdominalCompressionPlatePositionNumber DSRBasicCodedEntry("130659", "DCM", "Abdominal Compression Plate Position Number") +#define CODE_DCM_AbdominalCompressionBeltLength DSRBasicCodedEntry("130660", "DCM", "Abdominal Compression Belt Length") +#define CODE_DCM_AbdominalCompressionBeltPressure DSRBasicCodedEntry("130661", "DCM", "Abdominal Compression Belt Pressure") +#define CODE_DCM_ReferencedPatientAlignmentReference DSRBasicCodedEntry("130662", "DCM", "Referenced Patient Alignment Reference") +#define CODE_DCM_RTRadiationPreviouslyDelivered DSRBasicCodedEntry("130663", "DCM", "RT Radiation previously delivered") +#define CODE_DCM_TreatmentUnnecessary DSRBasicCodedEntry("130664", "DCM", "Treatment unnecessary") +#define CODE_DCM_TreatmentExceedsPatientTolerance DSRBasicCodedEntry("130665", "DCM", "Treatment exceeds patient tolerance") +#define CODE_DCM_RadiotherapyFiducial DSRBasicCodedEntry("130666", "DCM", "Radiotherapy Fiducial") +#define CODE_DCM_LongitudinalLagrangianStrain DSRBasicCodedEntry("130670", "DCM", "Longitudinal Lagrangian Strain") +#define CODE_DCM_PeakLongitudinalLagrangianStrain DSRBasicCodedEntry("130671", "DCM", "Peak Longitudinal Lagrangian Strain") +#define CODE_DCM_TimeToPeakLongitudinalLagrangianStrain DSRBasicCodedEntry("130672", "DCM", "Time to Peak Longitudinal Lagrangian Strain") +#define CODE_DCM_MechanicalDispersion DSRBasicCodedEntry("130673", "DCM", "Mechanical Dispersion") +#define CODE_DCM_LongitudinalLagrangianStrainRate DSRBasicCodedEntry("130674", "DCM", "Longitudinal Lagrangian Strain Rate") +#define CODE_DCM_RadialLagrangianStrain DSRBasicCodedEntry("130675", "DCM", "Radial Lagrangian Strain") +#define CODE_DCM_RadialLagrangianStrainRate DSRBasicCodedEntry("130676", "DCM", "Radial Lagrangian Strain Rate") +#define CODE_DCM_CircumferentialLagrangianStrain DSRBasicCodedEntry("130677", "DCM", "Circumferential Lagrangian Strain") +#define CODE_DCM_CircumferentialLagrangianStrainRate DSRBasicCodedEntry("130678", "DCM", "Circumferential Lagrangian Strain Rate") +#define CODE_DCM_2DSpeckleTracking DSRBasicCodedEntry("130679", "DCM", "2D Speckle Tracking") +#define CODE_DCM_3DSpeckleTracking DSRBasicCodedEntry("130680", "DCM", "3D Speckle Tracking") +#define CODE_DCM_ApicalFourChamberRVFocused DSRBasicCodedEntry("130681", "DCM", "Apical four chamber RV Focused") +#define CODE_DCM_ApicalFourChamberRVModified DSRBasicCodedEntry("130682", "DCM", "Apical four chamber RV Modified") +#define CODE_DCM_EndocardialMethod DSRBasicCodedEntry("130683", "DCM", "Endocardial Method") +#define CODE_DCM_EpicardialMethod DSRBasicCodedEntry("130684", "DCM", "Epicardial Method") +#define CODE_DCM_MyocardialMidlayerMethod DSRBasicCodedEntry("130685", "DCM", "Myocardial Midlayer Method") +#define CODE_DCM_LVEndSystolicGLSMultiviewMean_Endocardial DSRBasicCodedEntry("130686", "DCM", "LV End-systolic GLS Multiview Mean (Endocardial)") +#define CODE_DCM_LVEndSystolicGLS4CH_Endocardial DSRBasicCodedEntry("130687", "DCM", "LV End-systolic GLS 4CH (Endocardial)") +#define CODE_DCM_LVEndSystolicGLS2CH_Endocardial DSRBasicCodedEntry("130688", "DCM", "LV End-systolic GLS 2CH (Endocardial)") +#define CODE_DCM_LVEndSystolicGLSALAX_Endocardial DSRBasicCodedEntry("130689", "DCM", "LV End-systolic GLS ALAX (Endocardial)") +#define CODE_DCM_LVPeakSystolicGLSMultiviewMean_Endocardial DSRBasicCodedEntry("130690", "DCM", "LV Peak Systolic GLS Multiview Mean (Endocardial)") +#define CODE_DCM_LVPeakSystolicGLS4CH_Endocardial DSRBasicCodedEntry("130691", "DCM", "LV Peak Systolic GLS 4CH (Endocardial)") +#define CODE_DCM_LVPeakSystolicGLS2CH_Endocardial DSRBasicCodedEntry("130692", "DCM", "LV Peak Systolic GLS 2CH (Endocardial)") +#define CODE_DCM_LVPeakSystolicGLSALAX_Endocardial DSRBasicCodedEntry("130693", "DCM", "LV Peak Systolic GLS ALAX (Endocardial)") +#define CODE_DCM_LVPeakGLSMultiviewMean_Endocardial DSRBasicCodedEntry("130694", "DCM", "LV Peak GLS Multiview Mean (Endocardial)") +#define CODE_DCM_LVPeakGLS4CH_Endocardial DSRBasicCodedEntry("130695", "DCM", "LV Peak GLS 4CH (Endocardial)") +#define CODE_DCM_LVPeakGLS2CH_Endocardial DSRBasicCodedEntry("130696", "DCM", "LV Peak GLS 2CH (Endocardial)") +#define CODE_DCM_LVPeakGLSALAX_Endocardial DSRBasicCodedEntry("130697", "DCM", "LV Peak GLS ALAX (Endocardial)") +#define CODE_DCM_LVEndSystolicMechanicalDispersion DSRBasicCodedEntry("130698", "DCM", "LV End-systolic Mechanical Dispersion") +#define CODE_DCM_MitralValveClosure DSRBasicCodedEntry("130699", "DCM", "Mitral Valve Closure") +#define CODE_DCM_MitralValveOpening DSRBasicCodedEntry("130700", "DCM", "Mitral Valve Opening") +#define CODE_DCM_AorticValveClosure DSRBasicCodedEntry("130701", "DCM", "Aortic Valve Closure") +#define CODE_DCM_AorticValveOpening DSRBasicCodedEntry("130702", "DCM", "Aortic Valve Opening") +#define CODE_DCM_Fp9 DSRBasicCodedEntry("130710", "DCM", "Fp9") +#define CODE_DCM_Fp10 DSRBasicCodedEntry("130711", "DCM", "Fp10") +#define CODE_DCM_AF9 DSRBasicCodedEntry("130712", "DCM", "AF9") +#define CODE_DCM_AF10 DSRBasicCodedEntry("130713", "DCM", "AF10") +#define CODE_DCM_PO9 DSRBasicCodedEntry("130714", "DCM", "PO9") +#define CODE_DCM_PO10 DSRBasicCodedEntry("130715", "DCM", "PO10") +#define CODE_DCM_O9 DSRBasicCodedEntry("130716", "DCM", "O9") +#define CODE_DCM_O10 DSRBasicCodedEntry("130717", "DCM", "O10") +#define CODE_DCM_CoronaryArteryDiseaseAssessment DSRBasicCodedEntry("130720", "DCM", "Coronary Artery Disease Assessment") +#define CODE_DCM_OronaryArteryDiseaseAssessmentModifier DSRBasicCodedEntry("130721", "DCM", "oronary Artery Disease Assessment Modifier") +#define CODE_DCM_CoronaryArteryDiseaseStenosisAssessmentModifier DSRBasicCodedEntry("130722", "DCM", "Coronary Artery Disease Stenosis Assessment Modifier") +#define CODE_DCM_0_DocumentedAbsenceOfCAD DSRBasicCodedEntry("130723", "DCM", "0 - Documented absence of CAD") +#define CODE_DCM_1_MinimalNonObstructiveCAD DSRBasicCodedEntry("130724", "DCM", "1 - Minimal non-obstructive CAD") +#define CODE_DCM_2_MildNonObstructiveCAD DSRBasicCodedEntry("130725", "DCM", "2 - Mild non-obstructive CAD") +#define CODE_DCM_3_ModerateStenosis DSRBasicCodedEntry("130726", "DCM", "3 - Moderate stenosis") +#define CODE_DCM_4_SevereStenosis DSRBasicCodedEntry("130727", "DCM", "4 - Severe stenosis") +#define CODE_DCM_4A_SevereStenosis DSRBasicCodedEntry("130728", "DCM", "4A - Severe stenosis") +#define CODE_DCM_4B_SevereStenosis DSRBasicCodedEntry("130729", "DCM", "4B - Severe stenosis") +#define CODE_DCM_5_TotalCoronaryOcclusion DSRBasicCodedEntry("130730", "DCM", "5 - Total coronary occlusion") +#define CODE_DCM_N_NonDiagnosticStudy DSRBasicCodedEntry("130731", "DCM", "N - Non-diagnostic study") +#define CODE_DCM_N_NonDiagnosticSegments DSRBasicCodedEntry("130732", "DCM", "N - Non-diagnostic segments") +#define CODE_DCM_S_Stent DSRBasicCodedEntry("130733", "DCM", "S - Stent") +#define CODE_DCM_G_Graft DSRBasicCodedEntry("130734", "DCM", "G - Graft") +#define CODE_DCM_V_VulnerablePlaque DSRBasicCodedEntry("130735", "DCM", "V - Vulnerable plaque") +#define CODE_DCM_TitaniumAlloy_TitaniumMolybdenum15Zirconium5Aluminium3 DSRBasicCodedEntry("130736", "DCM", "Titanium alloy (Titanium Molybdenum-15 Zirconium-5 Aluminium-3)") +#define CODE_DCM_RTSegmentMaterial DSRBasicCodedEntry("130737", "DCM", "RT Segment Material") +#define CODE_DCM_DoseLimitInterlock DSRBasicCodedEntry("130738", "DCM", "Dose Limit Interlock") +#define CODE_DCM_ClearanceInterlock DSRBasicCodedEntry("130739", "DCM", "Clearance Interlock") +#define CODE_DCM_MachineClearanceInterlock DSRBasicCodedEntry("130740", "DCM", "Machine Clearance Interlock") +#define CODE_DCM_PatientClearanceInterlock DSRBasicCodedEntry("130741", "DCM", "Patient Clearance Interlock") +#define CODE_DCM_AccessoryClearanceInterlock DSRBasicCodedEntry("130742", "DCM", "Accessory Clearance Interlock") +#define CODE_DCM_OutOfToleranceInterlock DSRBasicCodedEntry("130743", "DCM", "Out of Tolerance Interlock") +#define CODE_DCM_InterlockResolved DSRBasicCodedEntry("130744", "DCM", "Interlock Resolved") +#define CODE_DCM_CTDoseLengthProductSubTotal DSRBasicCodedEntry("130745", "DCM", "CT Dose Length Product Sub-Total") +#define CODE_DCM_RTRegistrationMark DSRBasicCodedEntry("130746", "DCM", "RT Registration Mark") +#define CODE_DCM_IsodoseVolume DSRBasicCodedEntry("130747", "DCM", "Isodose Volume") +#define CODE_DCM_RadiotherapyDoseRegion DSRBasicCodedEntry("130748", "DCM", "Radiotherapy Dose Region") +#define CODE_DCM_QualityControlMaterialImage DSRBasicCodedEntry("130750", "DCM", "Quality control material image") +#define CODE_DCM_TissueNotOfInterest DSRBasicCodedEntry("130751", "DCM", "Tissue not of interest") #endif diff -Nru dcmtk-3.6.6/dcmsr/include/dcmtk/dcmsr/codes/ncit.h dcmtk-3.6.7/dcmsr/include/dcmtk/dcmsr/codes/ncit.h --- dcmtk-3.6.6/dcmsr/include/dcmtk/dcmsr/codes/ncit.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmsr/include/dcmtk/dcmsr/codes/ncit.h 2022-04-28 13:47:25.000000000 +0000 @@ -1,12 +1,12 @@ /* * - * Copyright (C) 2015-2020, J. Riesmeier, Oldenburg, Germany + * Copyright (C) 2015-2022, J. Riesmeier, Oldenburg, Germany * All rights reserved. See COPYRIGHT file for details. * * Header file with NCI Thesaurus Code Definitions (Coding Scheme "NCIt") * - * Generated automatically from DICOM PS 3.16-2020e - * File created on 2020-11-25 10:55:26 by J. Riesmeier + * Generated automatically from DICOM PS 3.16-2022b + * File created on 2022-04-11 09:59:32 by J. Riesmeier * */ @@ -34,7 +34,7 @@ * code definitions * *--------------------*/ -// total number of codes: 42 +// total number of codes: 49 // - retired: 0 // - no name: 0 // - not unique: 0 @@ -48,13 +48,17 @@ // The "cleaned camel-case version of the code meaning" is an attempt to map the free text // description of the code meaning to a compiler-friendly but still human-readable representation. +#define CODE_NCIt_IndexLesion DSRBasicCodedEntry("C110961", "NCIt", "Index lesion") #define CODE_NCIt_EnhancingLesion DSRBasicCodedEntry("C113842", "NCIt", "Enhancing Lesion") #define CODE_NCIt_RANO DSRBasicCodedEntry("C114879", "NCIt", "RANO") #define CODE_NCIt_DCFPyL_F18 DSRBasicCodedEntry("C116352", "NCIt", "DCFPyL F^18^") #define CODE_NCIt_Technetium99mTrofolastat DSRBasicCodedEntry("C116887", "NCIt", "Technetium^99m Trofolastat") #define CODE_NCIt_PSMA11_Ga68 DSRBasicCodedEntry("C118961", "NCIt", "PSMA-11 Ga^68^") #define CODE_NCIt_Sarcosine_C11 DSRBasicCodedEntry("C122684", "NCIt", "Sarcosine C^11^") +#define CODE_NCIt_IrreversibleElectroporation DSRBasicCodedEntry("C131483", "NCIt", "Irreversible electroporation") +#define CODE_NCIt_4Kscore DSRBasicCodedEntry("C142184", "NCIt", "4Kscore") #define CODE_NCIt_SoftTissueSarcoma_excludingRhabdomyosarcoma DSRBasicCodedEntry("C148457", "NCIt", "Soft tissue sarcoma, excluding rhabdomyosarcoma") +#define CODE_NCIt_Cryoablation DSRBasicCodedEntry("C15215", "NCIt", "Cryoablation") #define CODE_NCIt_166Holmium DSRBasicCodedEntry("C1943", "NCIt", "^166^Holmium") #define CODE_NCIt_MouseMammaryFatPad DSRBasicCodedEntry("C22550", "NCIt", "Mouse mammary fat pad") #define CODE_NCIt_Middle DSRBasicCodedEntry("C25569", "NCIt", "Middle") @@ -70,10 +74,12 @@ #define CODE_NCIt_NativeHawaiianOrOtherPacificIslander DSRBasicCodedEntry("C41219", "NCIt", "Native Hawaiian or other Pacific Islander") #define CODE_NCIt_AdverseEvent DSRBasicCodedEntry("C41331", "NCIt", "Adverse Event") #define CODE_NCIt_TemperatureSensorDeviceComponent DSRBasicCodedEntry("C50304", "NCIt", "Temperature sensor device component") +#define CODE_NCIt_Experience DSRBasicCodedEntry("C54627", "NCIt", "Experience") #define CODE_NCIt_Reviewer DSRBasicCodedEntry("C54634", "NCIt", "Reviewer") #define CODE_NCIt_Ion DSRBasicCodedEntry("C597", "NCIt", "Ion") #define CODE_NCIt_AdLibitum DSRBasicCodedEntry("C64636", "NCIt", "ad libitum") #define CODE_NCIt_ActivitySession DSRBasicCodedEntry("C67447", "NCIt", "Activity Session") +#define CODE_NCIt_FocusedUltrasoundAblation DSRBasicCodedEntry("C68681", "NCIt", "Focused ultrasound ablation") #define CODE_NCIt_UnitConversionFactor DSRBasicCodedEntry("C70774", "NCIt", "Unit Conversion Factor") #define CODE_NCIt_MedicalProductExpirationDate DSRBasicCodedEntry("C70854", "NCIt", "Medical Product Expiration Date") #define CODE_NCIt_CardiotonicAgent DSRBasicCodedEntry("C78322", "NCIt", "Cardiotonic agent") @@ -86,6 +92,7 @@ #define CODE_NCIt_LightCycle DSRBasicCodedEntry("C90419", "NCIt", "Light cycle") #define CODE_NCIt_WaterDelivery DSRBasicCodedEntry("C90486", "NCIt", "Water delivery") #define CODE_NCIt_Dosimetrist DSRBasicCodedEntry("C93176", "NCIt", "Dosimetrist") +#define CODE_NCIt_Abnormality DSRBasicCodedEntry("C9440", "NCIt", "Abnormality") #define CODE_NCIt_ReferenceRegion DSRBasicCodedEntry("C94970", "NCIt", "Reference Region") #define CODE_NCIt_DCFBC_F18 DSRBasicCodedEntry("C96234", "NCIt", "DCFBC F^18^") #define CODE_NCIt_Adjudicator DSRBasicCodedEntry("C96561", "NCIt", "Adjudicator") diff -Nru dcmtk-3.6.6/dcmsr/include/dcmtk/dcmsr/codes/umls.h dcmtk-3.6.7/dcmsr/include/dcmtk/dcmsr/codes/umls.h --- dcmtk-3.6.6/dcmsr/include/dcmtk/dcmsr/codes/umls.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmsr/include/dcmtk/dcmsr/codes/umls.h 2022-04-28 13:47:25.000000000 +0000 @@ -1,12 +1,12 @@ /* * - * Copyright (C) 2015-2020, J. Riesmeier, Oldenburg, Germany + * Copyright (C) 2015-2022, 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-2020e - * File created on 2020-11-25 10:55:25 by J. Riesmeier + * Generated automatically from DICOM PS 3.16-2022b + * File created on 2022-04-11 09:59:31 by J. Riesmeier * */ @@ -34,7 +34,7 @@ * code definitions * *--------------------*/ -// total number of codes: 50 +// total number of codes: 51 // - retired: 0 // - no name: 0 // - not unique: 0 @@ -61,6 +61,7 @@ #define CODE_UMLS_Thermography DSRBasicCodedEntry("C0039810", "UMLS", "Thermography") #define CODE_UMLS_Alphaxalone DSRBasicCodedEntry("C0051482", "UMLS", "Alphaxalone") #define CODE_UMLS_Fluanisone DSRBasicCodedEntry("C0060473", "UMLS", "Fluanisone") +#define CODE_UMLS_KevlarAramidFiber DSRBasicCodedEntry("C0064329", "UMLS", "Kevlar Aramid Fiber") #define CODE_UMLS_HeatLamp DSRBasicCodedEntry("C0181514", "UMLS", "Heat lamp") #define CODE_UMLS_UnknownPrimaryNeoplasiaSite DSRBasicCodedEntry("C0221297", "UMLS", "unknown primary neoplasia site") #define CODE_UMLS_RestrictedDiet DSRBasicCodedEntry("C0425422", "UMLS", "Restricted diet") diff -Nru dcmtk-3.6.6/dcmsr/include/dcmtk/dcmsr/dsrcomvl.h dcmtk-3.6.7/dcmsr/include/dcmtk/dcmsr/dsrcomvl.h --- dcmtk-3.6.6/dcmsr/include/dcmtk/dcmsr/dsrcomvl.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmsr/include/dcmtk/dcmsr/dsrcomvl.h 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2000-2017, OFFIS e.V. + * Copyright (C) 2000-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -363,25 +363,31 @@ * The only checks performed are that the UID is non-empty and that it conforms to the * corresponding VR (UI) and VM (1). Derived classes should overwrite this method for * more specific tests (e.g. allowing only particular SOP classes). - ** @param sopClassUID SOP class UID to be checked + ** @param sopClassUID SOP class UID to be checked + * @param reportWarnings if enabled, report warning messages to the logger ** @return status, EC_Normal if value is valid, an error code otherwise */ - virtual OFCondition checkSOPClassUID(const OFString &sopClassUID) const; + virtual OFCondition checkSOPClassUID(const OFString &sopClassUID, + const OFBool reportWarnings = OFFalse) const; /** check the specified SOP instance UID for validity. * The only checks performed are that the UID is non-empty and that it conforms to the * corresponding VR (UI) and VM (1). Derived classes should overwrite this method for * more specific tests. - * @param sopInstanceUID SOP instance UID to be checked + ** @param sopInstanceUID SOP instance UID to be checked + * @param reportWarnings if enabled, report warning messages to the logger ** @return status, EC_Normal if value is valid, an error code otherwise */ - virtual OFCondition checkSOPInstanceUID(const OFString &sopInstanceUID) const; + virtual OFCondition checkSOPInstanceUID(const OFString &sopInstanceUID, + const OFBool reportWarnings = OFFalse) const; /** check the currently stored reference value for validity. * See above checkXXX() methods for details. + ** @param reportWarnings if enabled, report a warning message on each deviation + * from an expected value to the logger ** @return status, EC_Normal if current value is valid, an error code otherwise */ - OFCondition checkCurrentValue() const; + OFCondition checkCurrentValue(const OFBool reportWarnings = OFFalse) const; /// reference SOP class UID (VR=UI, type 1) OFString SOPClassUID; diff -Nru dcmtk-3.6.6/dcmsr/include/dcmtk/dcmsr/dsrdoc.h dcmtk-3.6.7/dcmsr/include/dcmtk/dcmsr/dsrdoc.h --- dcmtk-3.6.6/dcmsr/include/dcmtk/dcmsr/dsrdoc.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmsr/include/dcmtk/dcmsr/dsrdoc.h 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2000-2020, OFFIS e.V. + * Copyright (C) 2000-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -34,6 +34,7 @@ #include "dcmtk/dcmdata/dcvrcs.h" #include "dcmtk/dcmdata/dcvrda.h" +#include "dcmtk/dcmdata/dcvrds.h" #include "dcmtk/dcmdata/dcvris.h" #include "dcmtk/dcmdata/dcvrlo.h" #include "dcmtk/dcmdata/dcvrpn.h" @@ -139,10 +140,10 @@ virtual OFCondition readPatientData(DcmItem &dataset, const size_t flags = 0); - /** read study data from DICOM dataset. Also reads patient data. - * The list of data elements that are read can be found under "Patient Module" and - * "General Study Module" in the member variable section of this class. Other data - * is not changed, so be careful when using this method. + /** read study data from DICOM dataset. Also reads patient data. + * The list of data elements that are read can be found under "Patient Module", "General + * Study Module" and "Patient Study Module" in the member variable section of this class. + * Other data is not changed, so be careful when using this method. * @param dataset reference to DICOM dataset from which the data should be read * @param flags optional flag used to customize the reading process (see DSRTypes::RF_xxx) ** @return status, EC_Normal if successful, an error code otherwise @@ -523,6 +524,22 @@ virtual OFCondition getPatientSex(OFString &value, const signed long pos = 0) const; + /** get patient's size + ** @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 + */ + virtual OFCondition getPatientSize(OFString &value, + const signed long pos = 0) const; + + /** get patient's weight + ** @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 + */ + virtual OFCondition getPatientWeight(OFString &value, + const signed long pos = 0) const; + /** get referring physician's name ** @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 @@ -783,6 +800,22 @@ virtual OFCondition setPatientSex(const OFString &value, const OFBool check = OFTrue); + /** set patient's size + ** @param value value to be set (single value only) or "" for no value + * @param check check 'value' for conformance with VR (DS) and VM (1) if enabled + ** @return status, EC_Normal if successful, an error code otherwise + */ + virtual OFCondition setPatientSize(const OFString &value, + const OFBool check = OFTrue); + + /** set patient's weight + ** @param value value to be set (single value only) or "" for no value + * @param check check 'value' for conformance with VR (DS) and VM (1) if enabled + ** @return status, EC_Normal if successful, an error code otherwise + */ + virtual OFCondition setPatientWeight(const OFString &value, + const OFBool check = OFTrue); + /** set referring physician's name ** @param value value to be set (single value only) or "" for no value * @param check check 'value' for conformance with VR (PN) and VM (1) if enabled @@ -981,7 +1014,7 @@ * After generating a new study instance UID the method createNewSeries() is called, * i.e. also a new series instance UID and SOP instance UID are generated. This is * a requirement of the DICOM standard. All other study-related attributes are - * cleared. + * cleared (including the attributes from the Patient Study Module). */ virtual void createNewStudy(); @@ -1361,6 +1394,13 @@ /// Patient's Sex: (CS, 1, 2) DcmCodeString PatientSex; + // --- Patient Study Module (U) --- + + /// Patient's Size: (DS, 1, 3) + DcmDecimalString PatientSize; + /// Patient's Weight: (DS, 1, 3) + DcmDecimalString PatientWeight; + // --- General Equipment Module (M) --- /// Manufacturer: (LO, 1, 2) diff -Nru dcmtk-3.6.6/dcmsr/include/dcmtk/dcmsr/dsrimgvl.h dcmtk-3.6.7/dcmsr/include/dcmtk/dcmsr/dsrimgvl.h --- dcmtk-3.6.6/dcmsr/include/dcmtk/dcmsr/dsrimgvl.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmsr/include/dcmtk/dcmsr/dsrimgvl.h 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2000-2020, OFFIS e.V. + * Copyright (C) 2000-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -442,27 +442,33 @@ * This method further specializes the checks performed in the base class * DSRCompositeReferenceValue. All image and segmentation SOP classes that * are defined in DICOM PS 3.6-2020c are allowed. - ** @param sopClassUID SOP class UID to be checked + ** @param sopClassUID SOP class UID to be checked + * @param reportWarnings if enabled, report warning messages to the logger ** @return status, EC_Normal if value is valid, an error code otherwise */ - virtual OFCondition checkSOPClassUID(const OFString &sopClassUID) const; + virtual OFCondition checkSOPClassUID(const OFString &sopClassUID, + const OFBool reportWarnings = OFFalse) const; /** check the given reference to a presentation state object for validity. * The reference is "valid" if both UIDs are empty or both are not empty and * SOP class UID refers to a softcopy presentation state object (see * DSRTypes::E_PresentationStateType for a list of supported SOP classes). ** @param referenceValue value to be checked + * @param reportWarnings if enabled, report warning messages to the logger ** @return status, EC_Normal if value is valid, an error code otherwise */ - virtual OFCondition checkPresentationState(const DSRCompositeReferenceValue &referenceValue) const; + virtual OFCondition checkPresentationState(const DSRCompositeReferenceValue &referenceValue, + const OFBool reportWarnings = OFFalse) const; /** check the given reference to a real world value mapping object for validity. * The reference is "valid" if both UIDs are empty or both are not empty and * SOP class UID refers to the "Real World Value Mapping Storage SOP Class". ** @param referenceValue value to be checked + * @param reportWarnings if enabled, report warning messages to the logger ** @return status, EC_Normal if value is valid, an error code otherwise */ - virtual OFCondition checkRealWorldValueMapping(const DSRCompositeReferenceValue &referenceValue) const; + virtual OFCondition checkRealWorldValueMapping(const DSRCompositeReferenceValue &referenceValue, + const OFBool reportWarnings = OFFalse) const; /** check the given list of frame and segment numbers for validity. * Either both lists have to be empty or only one of them has to be non-empty, @@ -472,8 +478,7 @@ ** @param sopClassUID SOP class UID of the image object to be checked * @param frameList list of referenced frame numbers to be checked * @param segmentList list of referenced segment numbers to be checked - * @param reportWarnings if enabled, report a warning message on each deviation - * from an expected value to the logger + * @param reportWarnings if enabled, report a warning message to the logger ** @return status, EC_Normal if checked data is valid, an error code otherwise */ OFCondition checkListData(const OFString &sopClassUID, @@ -484,9 +489,11 @@ /** check the currently stored image reference value for validity. * See above checkXXX() methods and DSRCompositeReferenceValue::checkCurrentValue() * for details. + ** @param reportWarnings if enabled, report a warning message on each deviation + * from an expected value to the logger ** @return status, EC_Normal if current value is valid, an error code otherwise */ - OFCondition checkCurrentValue() const; + OFCondition checkCurrentValue(const OFBool reportWarnings = OFFalse) const; private: diff -Nru dcmtk-3.6.6/dcmsr/include/dcmtk/dcmsr/dsrnumvl.h dcmtk-3.6.7/dcmsr/include/dcmtk/dcmsr/dsrnumvl.h --- dcmtk-3.6.6/dcmsr/include/dcmtk/dcmsr/dsrnumvl.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmsr/include/dcmtk/dcmsr/dsrnumvl.h 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2000-2016, OFFIS e.V. + * Copyright (C) 2000-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -62,10 +62,10 @@ const OFBool check = OFTrue); /** constructor - ** @param valueQualifier code representing the numeric value qualifier. Used to - * specify the reason for the absence of the measured value - * sequence, i.e. why the numeric value and measurement unit - * are empty. + ** @param valueQualifier code representing the numeric value qualifier (mandatory). + * Used to specify the reason for the absence of the measured + * value sequence, i.e. why the numeric value and measurement + * unit are empty. * @param check if enabled, check value for validity before setting it. * See corresponding setValue() method for details. */ @@ -75,10 +75,7 @@ /** constructor ** @param numericValue numeric value (VR=DS, mandatory) * @param measurementUnit code representing the units of measurement (mandatory) - * @param valueQualifier code representing the numeric value qualifier (optional). - * Can also be used to specify the reason for the absence of - * the measured value sequence (where 'numericValue' and - * 'measurementUnit' are stored). + * @param valueQualifier code representing the numeric value qualifier (optional) * @param check if enabled, check values for validity before setting them. * See corresponding setValue() method for details. */ @@ -196,7 +193,7 @@ /** write measured value sequence and numeric value qualifier code sequence to dataset. * The measured value sequence is always written (might be empty, though). The numeric - * value qualifier code sequence is optional and, therefore, only written if non-empty. + * value qualifier code sequence is conditional and, therefore, only written if non-empty. ** @param dataset DICOM dataset to which the sequences should be written ** @return status, EC_Normal if successful, an error code otherwise */ @@ -206,7 +203,8 @@ ** @param docStream output stream to which the main HTML/XHTML document is written * @param annexStream output stream to which the HTML/XHTML document annex is written * @param annexNumber reference to the variable where the current annex number is stored. - * Value is increased automatically by 1 after a new entry has been added. + * Value is increased automatically by 1 after a new entry has been + * added. * @param flags flag used to customize the output (see DSRTypes::HF_xxx) ** @return status, EC_Normal if successful, an error code otherwise */ @@ -245,7 +243,7 @@ return MeasurementUnit; } - /** get numeric value qualifier (optional) + /** get numeric value qualifier (conditional) ** @return reference to current numeric value qualifier code (might be invalid or empty) */ inline const DSRCodedEntryValue &getNumericValueQualifier() const @@ -259,8 +257,7 @@ */ OFCondition getMeasurementUnit(DSRCodedEntryValue &measurementUnit) const; - /** get copy of numeric value qualifier (optional). - * Can be used to specify the reason for the absence of the measured value sequence. + /** get copy of numeric value qualifier (conditional) ** @param valueQualifier reference to variable in which the code should be stored ** @return always returns EC_Normal */ @@ -316,8 +313,8 @@ /** set empty numeric value and measurement unit with a numeric value qualifier. * Before setting the value, it is usually checked. If the value is invalid, the * current numeric measurement value is not replaced and remains unchanged. - ** @param valueQualifier numeric value qualifier to be set. Used to specify the - * reason for the absence of the measured value sequence, + ** @param valueQualifier numeric value qualifier to be set. Shall be used to specify + * the reason for the absence of the measured value sequence, * i.e. why the numeric value and measurement unit are empty. * @param check if enabled, check value for validity before setting it. * See checkNumericValueQualifier() method for details. @@ -335,10 +332,8 @@ * needed. ** @param numericValue numeric value to be set (VR=DS, mandatory) * @param measurementUnit measurement unit to be set (mandatory) - * @param valueQualifier numeric value qualifier to be set (optional). Can also be - * used to specify the reason for the absence of the measured - * value sequence (where 'numericValue' and 'measurementUnit' - * are stored). Use an empty code to remove the current value. + * @param valueQualifier numeric value qualifier to be set (optional). + * Use an empty code to remove the current value. * @param check if enabled, check values for validity before setting them. * See checkXXX() methods for details. ** @return status, EC_Normal if successful, an error code otherwise @@ -410,12 +405,12 @@ const OFBool check = OFTrue); /** set numeric value qualifier. - * This optional code specifies the qualification of the Numeric Value in the Measured + * This conditional code specifies the qualification of the Numeric Value in the Measured * Value Sequence, or the reason for the absence of the Measured Value Sequence Item. * Before setting the code, it is usually checked. If the code is invalid the current * code is not replaced and remains unchanged. - ** @param valueQualifier numeric value qualifier to be set (optional). Use an empty - * code to remove the current value. + ** @param valueQualifier numeric value qualifier to be set (conditional). + * Use an empty code to remove the current value. * @param check if enabled, check value for validity before setting it. * See checkNumericValueQualifier() method for details. ** @return status, EC_Normal if successful, an error code otherwise @@ -539,7 +534,7 @@ OFString NumericValue; /// Measurement Unit (type 1 within a type 2 sequence) DSRCodedEntryValue MeasurementUnit; - /// Numeric Value Qualifier (type 3) + /// Numeric Value Qualifier (type 1C) DSRCodedEntryValue ValueQualifier; /// Floating Point Value (VR=FD, type 1C) DcmFloatingPointDouble FloatingPointValue; diff -Nru dcmtk-3.6.6/dcmsr/include/dcmtk/dcmsr/dsrtlist.h dcmtk-3.6.7/dcmsr/include/dcmtk/dcmsr/dsrtlist.h --- dcmtk-3.6.6/dcmsr/include/dcmtk/dcmsr/dsrtlist.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmsr/include/dcmtk/dcmsr/dsrtlist.h 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2000-2018, OFFIS e.V. + * Copyright (C) 2000-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -282,7 +282,7 @@ ItemList.push_back(item); result = EC_Normal; } else { - OFLIST_TYPENAME OFListIterator(T) iterator = ItemList.begin(); + OFLIST_TYPENAME OFListConstIterator(T) iterator = ItemList.begin(); if (gotoItemPos(idx, iterator)) { ItemList.insert(iterator, 1, item); @@ -299,7 +299,7 @@ OFCondition removeItem(const size_t idx) { OFCondition result = EC_IllegalParameter; - OFLIST_TYPENAME OFListIterator(T) iterator = ItemList.begin(); + OFLIST_TYPENAME OFListConstIterator(T) iterator = ItemList.begin(); if (gotoItemPos(idx, iterator)) { ItemList.erase(iterator); diff -Nru dcmtk-3.6.6/dcmsr/include/dcmtk/dcmsr/dsrtypes.h dcmtk-3.6.7/dcmsr/include/dcmtk/dcmsr/dsrtypes.h --- dcmtk-3.6.6/dcmsr/include/dcmtk/dcmsr/dsrtypes.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmsr/include/dcmtk/dcmsr/dsrtypes.h 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2000-2020, OFFIS e.V. + * Copyright (C) 2000-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -521,6 +521,8 @@ DT_ProcedureLog, /// DICOM IOD: X-Ray Radiation Dose SR DT_XRayRadiationDoseSR, + /// DICOM IOD: Enhanced X-Ray Radiation Dose SR (not yet implemented) + DT_EnhancedXRayRadiationDoseSR, /// DICOM IOD: Spectacle Prescription Report DT_SpectaclePrescriptionReport, /// DICOM IOD: Macular Grid Thickness and Volume Report diff -Nru dcmtk-3.6.6/dcmsr/include/dcmtk/dcmsr/dsrwavvl.h dcmtk-3.6.7/dcmsr/include/dcmtk/dcmsr/dsrwavvl.h --- dcmtk-3.6.6/dcmsr/include/dcmtk/dcmsr/dsrwavvl.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmsr/include/dcmtk/dcmsr/dsrwavvl.h 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2000-2020, OFFIS e.V. + * Copyright (C) 2000-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -217,10 +217,12 @@ * This method further specializes the checks performed in the base class * DSRCompositeReferenceValue. All waveform SOP classes that are defined * in DICOM PS 3.6-2020c are allowed. - ** @param sopClassUID SOP class UID to be checked + ** @param sopClassUID SOP class UID to be checked + * @param reportWarnings if enabled, report warning messages to the logger ** @return status, EC_Normal if value is valid, an error code otherwise */ - virtual OFCondition checkSOPClassUID(const OFString &sopClassUID) const; + virtual OFCondition checkSOPClassUID(const OFString &sopClassUID, + const OFBool reportWarnings = OFFalse) const; private: diff -Nru dcmtk-3.6.6/dcmsr/include/dcmtk/dcmsr/dsrxmlc.h dcmtk-3.6.7/dcmsr/include/dcmtk/dcmsr/dsrxmlc.h --- dcmtk-3.6.6/dcmsr/include/dcmtk/dcmsr/dsrxmlc.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmsr/include/dcmtk/dcmsr/dsrxmlc.h 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2003-2019, OFFIS e.V. + * Copyright (C) 2003-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -30,10 +30,6 @@ #include "dcmtk/ofstd/oftypes.h" /* for definition of OFBool */ -#define INCLUDE_CSTDLIB -#define INCLUDE_CSTDDEF -#include "dcmtk/ofstd/ofstdinc.h" - #ifdef WITH_LIBXML #ifdef __ibmxl__ diff -Nru dcmtk-3.6.6/dcmsr/libcmr/cid10013.cc dcmtk-3.6.7/dcmsr/libcmr/cid10013.cc --- dcmtk-3.6.6/dcmsr/libcmr/cid10013.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmsr/libcmr/cid10013.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,12 +1,12 @@ /* * - * Copyright (C) 2015-2020, J. Riesmeier, Oldenburg, Germany + * Copyright (C) 2015-2022, J. Riesmeier, Oldenburg, Germany * All rights reserved. See COPYRIGHT file for details. * * Source file for class CID10013_CTAcquisitionType * - * Generated automatically from DICOM PS 3.16-2020e - * File created on 2020-11-25 11:13:16 by J. Riesmeier + * Generated automatically from DICOM PS 3.16-2022b + * File created on 2022-04-12 13:01:20 by J. Riesmeier * */ diff -Nru dcmtk-3.6.6/dcmsr/libcmr/cid10033.cc dcmtk-3.6.7/dcmsr/libcmr/cid10033.cc --- dcmtk-3.6.6/dcmsr/libcmr/cid10033.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmsr/libcmr/cid10033.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,12 +1,12 @@ /* * - * Copyright (C) 2015-2020, J. Riesmeier, Oldenburg, Germany + * Copyright (C) 2015-2022, J. Riesmeier, Oldenburg, Germany * All rights reserved. See COPYRIGHT file for details. * * Source file for class CID10033_CTReconstructionAlgorithm * - * Generated automatically from DICOM PS 3.16-2020e - * File created on 2020-11-25 11:13:18 by J. Riesmeier + * Generated automatically from DICOM PS 3.16-2022b + * File created on 2022-04-12 13:01:21 by J. Riesmeier * */ diff -Nru dcmtk-3.6.6/dcmsr/libcmr/cid100.cc dcmtk-3.6.7/dcmsr/libcmr/cid100.cc --- dcmtk-3.6.6/dcmsr/libcmr/cid100.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmsr/libcmr/cid100.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,12 +1,12 @@ /* * - * Copyright (C) 2015-2020, J. Riesmeier, Oldenburg, Germany + * Copyright (C) 2015-2022, J. Riesmeier, Oldenburg, Germany * All rights reserved. See COPYRIGHT file for details. * * Source file for class CID100_QuantitativeDiagnosticImagingProcedures * - * Generated automatically from DICOM PS 3.16-2020e - * File created on 2020-11-25 11:12:49 by J. Riesmeier + * Generated automatically from DICOM PS 3.16-2022b + * File created on 2022-04-12 13:01:10 by J. Riesmeier * */ @@ -18,7 +18,7 @@ // general information on CID 100 (Quantitative Diagnostic Imaging Procedures) #define CONTEXT_GROUP_NUMBER "100" -#define CONTEXT_GROUP_VERSION "20190817" +#define CONTEXT_GROUP_VERSION "20210905" #define CONTEXT_GROUP_UID "1.2.840.10008.6.1.998" #define CONTEXT_GROUP_TYPE OFTrue /* extensible */ @@ -152,7 +152,7 @@ Codes->insert(OFMake_pair(ImagingProcedure, DSRBasicCodedEntry("363679005", "SCT", "Imaging procedure"))); Codes->insert(OFMake_pair(MagneticResonanceImagingGuidance, DSRBasicCodedEntry("258177008", "SCT", "Magnetic resonance imaging guidance"))); Codes->insert(OFMake_pair(MultiparametricMRI, DSRBasicCodedEntry("126020", "DCM", "Multiparametric MRI"))); - Codes->insert(OFMake_pair(MultiparametricMRIOfProstate, DSRBasicCodedEntry("126021", "DCM", "Multiparametric MRI of prostate"))); + Codes->insert(OFMake_pair(MultiparametricMRIOfProstate, DSRBasicCodedEntry("719178004", "SCT", "Multiparametric MRI of prostate"))); Codes->insert(OFMake_pair(MultiparametricMRIOfWholeBody, DSRBasicCodedEntry("126022", "DCM", "Multiparametric MRI of whole body"))); Codes->insert(OFMake_pair(DynamicMagneticResonanceImagingOfKnee, DSRBasicCodedEntry("433139009", "SCT", "Dynamic magnetic resonance imaging of knee"))); Codes->insert(OFMake_pair(DynamicMagneticResonanceImagingOfPelvis, DSRBasicCodedEntry("446315002", "SCT", "Dynamic magnetic resonance imaging of pelvis"))); diff -Nru dcmtk-3.6.6/dcmsr/libcmr/cid11.cc dcmtk-3.6.7/dcmsr/libcmr/cid11.cc --- dcmtk-3.6.6/dcmsr/libcmr/cid11.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmsr/libcmr/cid11.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,12 +1,12 @@ /* * - * Copyright (C) 2015-2020, J. Riesmeier, Oldenburg, Germany + * Copyright (C) 2015-2022, J. Riesmeier, Oldenburg, Germany * All rights reserved. See COPYRIGHT file for details. * * Source file for class CID11_RouteOfAdministration * - * Generated automatically from DICOM PS 3.16-2020e - * File created on 2020-11-25 11:12:44 by J. Riesmeier + * Generated automatically from DICOM PS 3.16-2022b + * File created on 2022-04-12 13:01:08 by J. Riesmeier * */ diff -Nru dcmtk-3.6.6/dcmsr/libcmr/cid244.cc dcmtk-3.6.7/dcmsr/libcmr/cid244.cc --- dcmtk-3.6.6/dcmsr/libcmr/cid244.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmsr/libcmr/cid244.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,12 +1,12 @@ /* * - * Copyright (C) 2015-2020, J. Riesmeier, Oldenburg, Germany + * Copyright (C) 2015-2022, J. Riesmeier, Oldenburg, Germany * All rights reserved. See COPYRIGHT file for details. * * Source file for class CID244_Laterality * - * Generated automatically from DICOM PS 3.16-2020e - * File created on 2020-11-25 11:12:51 by J. Riesmeier + * Generated automatically from DICOM PS 3.16-2022b + * File created on 2022-04-12 13:01:11 by J. Riesmeier * */ diff -Nru dcmtk-3.6.6/dcmsr/libcmr/cid247.cc dcmtk-3.6.7/dcmsr/libcmr/cid247.cc --- dcmtk-3.6.6/dcmsr/libcmr/cid247.cc 1970-01-01 00:00:00.000000000 +0000 +++ dcmtk-3.6.7/dcmsr/libcmr/cid247.cc 2022-04-28 13:47:25.000000000 +0000 @@ -0,0 +1,163 @@ +/* + * + * Copyright (C) 2015-2022, J. Riesmeier, Oldenburg, Germany + * All rights reserved. See COPYRIGHT file for details. + * + * Source file for class CID247_LateralityLeftRightOnly + * + * Generated automatically from DICOM PS 3.16-2022b + * File created on 2022-04-12 13:01:11 by J. Riesmeier + * + */ + + +#include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ + +#include "dcmtk/dcmsr/cmr/cid247.h" + + +// general information on CID 247 (Laterality Left-Right Only) +#define CONTEXT_GROUP_NUMBER "247" +#define CONTEXT_GROUP_VERSION "20190524" +#define CONTEXT_GROUP_UID "1.2.840.10008.6.1.1284" +#define CONTEXT_GROUP_TYPE OFTrue /* extensible */ + +// initialize global/static variable +CID247_LateralityLeftRightOnly::CodeList *CID247_LateralityLeftRightOnly::Codes = NULL; + + +CID247_LateralityLeftRightOnly::CID247_LateralityLeftRightOnly(const DSRCodedEntryValue &selectedValue) + : DSRContextGroup(CONTEXT_GROUP_NUMBER, "DCMR", CONTEXT_GROUP_VERSION, CONTEXT_GROUP_UID, selectedValue) +{ + setExtensible(CONTEXT_GROUP_TYPE); +} + + +CID247_LateralityLeftRightOnly::CID247_LateralityLeftRightOnly(const EnumType selectedValue, + const OFBool enhancedEncodingMode) + : DSRContextGroup(CONTEXT_GROUP_NUMBER, "DCMR", CONTEXT_GROUP_VERSION, CONTEXT_GROUP_UID, getCodedEntry(selectedValue, enhancedEncodingMode)) +{ + setExtensible(CONTEXT_GROUP_TYPE); +} + + +OFCondition CID247_LateralityLeftRightOnly::selectValue(const EnumType selectedValue, + const OFBool enhancedEncodingMode) +{ + /* never check the coded entry */ + return DSRContextGroup::selectValue(getCodedEntry(selectedValue, enhancedEncodingMode), OFFalse /*check*/, OFFalse /*definedContextGroup*/); +} + + +OFCondition CID247_LateralityLeftRightOnly::findCodedEntry(const DSRCodedEntryValue &searchForCodedEntry, + DSRCodedEntryValue *foundCodedEntry, + const OFBool enhancedEncodingMode) const +{ + OFCondition result = SR_EC_CodedEntryNotInContextGroup; + /* first, search for standard codes */ + CodeList::const_iterator iter = getCodes().begin(); + CodeList::const_iterator last = getCodes().end(); + /* iterate over coded entry list */ + while (iter != last) + { + /* if found, exit loop */ + if (searchForCodedEntry == iter->second) + { + /* return coded entry (if requested) */ + if (foundCodedEntry != NULL) + { + *foundCodedEntry = iter->second; + /* also set enhanced encoding mode (if enabled) */ + if (!foundCodedEntry->isEmpty() && enhancedEncodingMode) + setEnhancedEncodingMode(*foundCodedEntry); + } + result = SR_EC_CodedEntryInStandardContextGroup; + break; + } + ++iter; + } + /* if not, continue with extended codes */ + if (result.bad()) + { + result = DSRContextGroup::findCodedEntry(searchForCodedEntry, foundCodedEntry); + /* tbd: set "enhanced encoding mode" to mark a local/extended version? */ + } + return result; +} + + +void CID247_LateralityLeftRightOnly::printCodes(STD_NAMESPACE ostream &stream) const +{ + /* print standard codes */ + stream << "Standard codes:" << OFendl; + CodeList::const_iterator iter = getCodes().begin(); + CodeList::const_iterator last = getCodes().end(); + /* iterate over coded entry list */ + while (iter != last) + { + stream << " "; + /* print coded entry */ + DSRCodedEntryValue(iter->second).print(stream); + stream << OFendl; + ++iter; + } + /* print extended codes */ + DSRContextGroup::printCodes(stream); +} + + +// static functions + +void CID247_LateralityLeftRightOnly::initialize() +{ + /* create and initialize code list */ + getCodes(); +} + + +void CID247_LateralityLeftRightOnly::cleanup() +{ + /* delete code list, it will be recreated automatically when needed */ + delete Codes; + Codes = NULL; +} + + +DSRCodedEntryValue CID247_LateralityLeftRightOnly::getCodedEntry(const EnumType value, + const OFBool enhancedEncodingMode) +{ + DSRCodedEntryValue codedEntry; + /* search for given enumerated value */ + CodeList::iterator iter = getCodes().find(value); + /* if found, set the coded entry */ + if (iter != getCodes().end()) + { + codedEntry = iter->second; + /* also set enhanced encoding mode (if enabled) */ + if (!codedEntry.isEmpty() && enhancedEncodingMode) + setEnhancedEncodingMode(codedEntry); + } + return codedEntry; +} + + +CID247_LateralityLeftRightOnly::CodeList &CID247_LateralityLeftRightOnly::getCodes() +{ + /* check whether code list has already been created and initialized */ + if (Codes == NULL) + { + /* create a new code list (should never fail) */ + Codes = new CodeList(); + /* and initialize it by adding the coded entries */ + Codes->insert(OFMake_pair(Right, DSRBasicCodedEntry("24028007", "SCT", "Right"))); + Codes->insert(OFMake_pair(Left, DSRBasicCodedEntry("7771000", "SCT", "Left"))); + } + /* should never be NULL */ + return *Codes; +} + + +OFCondition CID247_LateralityLeftRightOnly::setEnhancedEncodingMode(DSRCodedEntryValue &codedEntryValue) +{ + return codedEntryValue.setEnhancedEncodingMode(CONTEXT_GROUP_NUMBER, "DCMR", CONTEXT_GROUP_VERSION, CONTEXT_GROUP_UID); +} diff -Nru dcmtk-3.6.6/dcmsr/libcmr/cid29.cc dcmtk-3.6.7/dcmsr/libcmr/cid29.cc --- dcmtk-3.6.6/dcmsr/libcmr/cid29.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmsr/libcmr/cid29.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,12 +1,12 @@ /* * - * Copyright (C) 2015-2020, J. Riesmeier, Oldenburg, Germany + * Copyright (C) 2015-2022, J. Riesmeier, Oldenburg, Germany * All rights reserved. See COPYRIGHT file for details. * * Source file for class CID29_AcquisitionModality * - * Generated automatically from DICOM PS 3.16-2020e - * File created on 2020-11-25 11:12:45 by J. Riesmeier + * Generated automatically from DICOM PS 3.16-2022b + * File created on 2022-04-12 13:01:09 by J. Riesmeier * */ diff -Nru dcmtk-3.6.6/dcmsr/libcmr/cid4020.cc dcmtk-3.6.7/dcmsr/libcmr/cid4020.cc --- dcmtk-3.6.6/dcmsr/libcmr/cid4020.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmsr/libcmr/cid4020.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,12 +1,12 @@ /* * - * Copyright (C) 2015-2020, J. Riesmeier, Oldenburg, Germany + * Copyright (C) 2015-2022, J. Riesmeier, Oldenburg, Germany * All rights reserved. See COPYRIGHT file for details. * * Source file for class CID4020_PETRadionuclide * - * Generated automatically from DICOM PS 3.16-2020e - * File created on 2020-11-25 11:12:55 by J. Riesmeier + * Generated automatically from DICOM PS 3.16-2022b + * File created on 2022-04-12 13:01:12 by J. Riesmeier * */ diff -Nru dcmtk-3.6.6/dcmsr/libcmr/cid4021.cc dcmtk-3.6.7/dcmsr/libcmr/cid4021.cc --- dcmtk-3.6.6/dcmsr/libcmr/cid4021.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmsr/libcmr/cid4021.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,12 +1,12 @@ /* * - * Copyright (C) 2015-2020, J. Riesmeier, Oldenburg, Germany + * Copyright (C) 2015-2022, J. Riesmeier, Oldenburg, Germany * All rights reserved. See COPYRIGHT file for details. * * Source file for class CID4021_PETRadiopharmaceutical * - * Generated automatically from DICOM PS 3.16-2020e - * File created on 2020-11-25 11:12:57 by J. Riesmeier + * Generated automatically from DICOM PS 3.16-2022b + * File created on 2022-04-12 13:01:13 by J. Riesmeier * */ @@ -149,7 +149,6 @@ /* create a new code list (should never fail) */ Codes = new CodeList(); /* and initialize it by adding the coded entries */ - Codes->insert(OFMake_pair(_18_FluorineFlortaucipir, DSRBasicCodedEntry("C000591008", "MSH", "^18^Fluorine flortaucipir"))); Codes->insert(OFMake_pair(_28H1_89Zr, DSRBasicCodedEntry("126752", "DCM", "28H1 ^89^Zr"))); Codes->insert(OFMake_pair(_2FA_F18, DSRBasicCodedEntry("126713", "DCM", "2FA F^18^"))); Codes->insert(OFMake_pair(_7D12_89Zr, DSRBasicCodedEntry("126751", "DCM", "7D12 ^89^Zr"))); diff -Nru dcmtk-3.6.6/dcmsr/libcmr/cid4031.cc dcmtk-3.6.7/dcmsr/libcmr/cid4031.cc --- dcmtk-3.6.6/dcmsr/libcmr/cid4031.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmsr/libcmr/cid4031.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,12 +1,12 @@ /* * - * Copyright (C) 2015-2020, J. Riesmeier, Oldenburg, Germany + * Copyright (C) 2015-2022, J. Riesmeier, Oldenburg, Germany * All rights reserved. See COPYRIGHT file for details. * * Source file for class CID4031_CommonAnatomicRegions * - * Generated automatically from DICOM PS 3.16-2020e - * File created on 2020-11-25 11:12:59 by J. Riesmeier + * Generated automatically from DICOM PS 3.16-2022b + * File created on 2022-04-12 13:01:14 by J. Riesmeier * */ @@ -18,7 +18,7 @@ // general information on CID 4031 (Common Anatomic Regions) #define CONTEXT_GROUP_NUMBER "4031" -#define CONTEXT_GROUP_VERSION "20200704" +#define CONTEXT_GROUP_VERSION "20210120" #define CONTEXT_GROUP_UID "1.2.840.10008.6.1.308" #define CONTEXT_GROUP_TYPE OFTrue /* extensible */ @@ -156,6 +156,7 @@ Codes->insert(OFMake_pair(Anus, DSRBasicCodedEntry("53505006", "SCT", "Anus"))); Codes->insert(OFMake_pair(ApexOfLung, DSRBasicCodedEntry("86598002", "SCT", "Apex of Lung"))); Codes->insert(OFMake_pair(BileDuct, DSRBasicCodedEntry("28273000", "SCT", "Bile duct"))); + Codes->insert(OFMake_pair(BiliaryTract, DSRBasicCodedEntry("34707002", "SCT", "Biliary tract"))); Codes->insert(OFMake_pair(Bladder, DSRBasicCodedEntry("89837001", "SCT", "Bladder"))); Codes->insert(OFMake_pair(BoneOfLowerLimb, DSRBasicCodedEntry("72001000", "SCT", "Bone of lower limb"))); Codes->insert(OFMake_pair(BoneOfUpperLimb, DSRBasicCodedEntry("371195002", "SCT", "Bone of upper limb"))); diff -Nru dcmtk-3.6.6/dcmsr/libcmr/cid42.cc dcmtk-3.6.7/dcmsr/libcmr/cid42.cc --- dcmtk-3.6.6/dcmsr/libcmr/cid42.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmsr/libcmr/cid42.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,12 +1,12 @@ /* * - * Copyright (C) 2015-2020, J. Riesmeier, Oldenburg, Germany + * Copyright (C) 2015-2022, J. Riesmeier, Oldenburg, Germany * All rights reserved. See COPYRIGHT file for details. * * Source file for class CID42_NumericValueQualifier * - * Generated automatically from DICOM PS 3.16-2020e - * File created on 2020-11-25 11:12:47 by J. Riesmeier + * Generated automatically from DICOM PS 3.16-2022b + * File created on 2022-04-12 13:01:09 by J. Riesmeier * */ @@ -156,9 +156,9 @@ Codes->insert(OFMake_pair(Underflow, DSRBasicCodedEntry("114004", "DCM", "Underflow"))); Codes->insert(OFMake_pair(Overflow, DSRBasicCodedEntry("114005", "DCM", "Overflow"))); Codes->insert(OFMake_pair(MeasurementFailure, DSRBasicCodedEntry("114006", "DCM", "Measurement failure"))); - Codes->insert(OFMake_pair(MeasurementNotAttempted, DSRBasicCodedEntry("114007", "DCM", "Measurement not attempted"))); Codes->insert(OFMake_pair(CalculationFailure, DSRBasicCodedEntry("114008", "DCM", "Calculation failure"))); Codes->insert(OFMake_pair(ValueOutOfRange, DSRBasicCodedEntry("114009", "DCM", "Value out of range"))); + Codes->insert(OFMake_pair(MeasurementNotAttempted, DSRBasicCodedEntry("114007", "DCM", "Measurement not attempted"))); Codes->insert(OFMake_pair(ValueUnknown, DSRBasicCodedEntry("114010", "DCM", "Value unknown"))); Codes->insert(OFMake_pair(ValueIndeterminate, DSRBasicCodedEntry("114011", "DCM", "Value indeterminate"))); } diff -Nru dcmtk-3.6.6/dcmsr/libcmr/cid6147.cc dcmtk-3.6.7/dcmsr/libcmr/cid6147.cc --- dcmtk-3.6.6/dcmsr/libcmr/cid6147.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmsr/libcmr/cid6147.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,12 +1,12 @@ /* * - * Copyright (C) 2015-2020, J. Riesmeier, Oldenburg, Germany + * Copyright (C) 2015-2022, J. Riesmeier, Oldenburg, Germany * All rights reserved. See COPYRIGHT file for details. * * Source file for class CID6147_ResponseCriteria * - * Generated automatically from DICOM PS 3.16-2020e - * File created on 2020-11-25 11:13:01 by J. Riesmeier + * Generated automatically from DICOM PS 3.16-2022b + * File created on 2022-04-12 13:01:14 by J. Riesmeier * */ diff -Nru dcmtk-3.6.6/dcmsr/libcmr/cid7021.cc dcmtk-3.6.7/dcmsr/libcmr/cid7021.cc --- dcmtk-3.6.6/dcmsr/libcmr/cid7021.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmsr/libcmr/cid7021.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,12 +1,12 @@ /* * - * Copyright (C) 2015-2020, J. Riesmeier, Oldenburg, Germany + * Copyright (C) 2015-2022, J. Riesmeier, Oldenburg, Germany * All rights reserved. See COPYRIGHT file for details. * * Source file for class CID7021_MeasurementReportDocumentTitles * - * Generated automatically from DICOM PS 3.16-2020e - * File created on 2020-11-25 11:13:03 by J. Riesmeier + * Generated automatically from DICOM PS 3.16-2022b + * File created on 2022-04-12 13:01:15 by J. Riesmeier * */ diff -Nru dcmtk-3.6.6/dcmsr/libcmr/cid7181.cc dcmtk-3.6.7/dcmsr/libcmr/cid7181.cc --- dcmtk-3.6.6/dcmsr/libcmr/cid7181.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmsr/libcmr/cid7181.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,12 +1,12 @@ /* * - * Copyright (C) 2015-2020, J. Riesmeier, Oldenburg, Germany + * Copyright (C) 2015-2022, J. Riesmeier, Oldenburg, Germany * All rights reserved. See COPYRIGHT file for details. * * Source file for class CID7181_AbstractMultiDimensionalImageModelComponentUnits * - * Generated automatically from DICOM PS 3.16-2020e - * File created on 2020-11-25 11:13:05 by J. Riesmeier + * Generated automatically from DICOM PS 3.16-2022b + * File created on 2022-04-12 13:01:16 by J. Riesmeier * */ diff -Nru dcmtk-3.6.6/dcmsr/libcmr/cid7445.cc dcmtk-3.6.7/dcmsr/libcmr/cid7445.cc --- dcmtk-3.6.6/dcmsr/libcmr/cid7445.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmsr/libcmr/cid7445.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,12 +1,12 @@ /* * - * Copyright (C) 2015-2020, J. Riesmeier, Oldenburg, Germany + * Copyright (C) 2015-2022, J. Riesmeier, Oldenburg, Germany * All rights reserved. See COPYRIGHT file for details. * * Source file for class CID7445_DeviceParticipatingRoles * - * Generated automatically from DICOM PS 3.16-2020e - * File created on 2020-11-25 11:13:06 by J. Riesmeier + * Generated automatically from DICOM PS 3.16-2022b + * File created on 2022-04-12 13:01:16 by J. Riesmeier * */ diff -Nru dcmtk-3.6.6/dcmsr/libcmr/cid7452.cc dcmtk-3.6.7/dcmsr/libcmr/cid7452.cc --- dcmtk-3.6.6/dcmsr/libcmr/cid7452.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmsr/libcmr/cid7452.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,12 +1,12 @@ /* * - * Copyright (C) 2015-2020, J. Riesmeier, Oldenburg, Germany + * Copyright (C) 2015-2022, J. Riesmeier, Oldenburg, Germany * All rights reserved. See COPYRIGHT file for details. * * Source file for class CID7452_OrganizationalRoles * - * Generated automatically from DICOM PS 3.16-2020e - * File created on 2020-11-25 11:13:08 by J. Riesmeier + * Generated automatically from DICOM PS 3.16-2022b + * File created on 2022-04-12 13:01:17 by J. Riesmeier * */ diff -Nru dcmtk-3.6.6/dcmsr/libcmr/cid7453.cc dcmtk-3.6.7/dcmsr/libcmr/cid7453.cc --- dcmtk-3.6.6/dcmsr/libcmr/cid7453.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmsr/libcmr/cid7453.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,12 +1,12 @@ /* * - * Copyright (C) 2015-2020, J. Riesmeier, Oldenburg, Germany + * Copyright (C) 2015-2022, J. Riesmeier, Oldenburg, Germany * All rights reserved. See COPYRIGHT file for details. * * Source file for class CID7453_PerformingRoles * - * Generated automatically from DICOM PS 3.16-2020e - * File created on 2020-11-25 11:13:10 by J. Riesmeier + * Generated automatically from DICOM PS 3.16-2022b + * File created on 2022-04-12 13:01:18 by J. Riesmeier * */ diff -Nru dcmtk-3.6.6/dcmsr/libcmr/cid7464.cc dcmtk-3.6.7/dcmsr/libcmr/cid7464.cc --- dcmtk-3.6.6/dcmsr/libcmr/cid7464.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmsr/libcmr/cid7464.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,12 +1,12 @@ /* * - * Copyright (C) 2015-2020, J. Riesmeier, Oldenburg, Germany + * Copyright (C) 2015-2022, J. Riesmeier, Oldenburg, Germany * All rights reserved. See COPYRIGHT file for details. * * Source file for class CID7464_GeneralRegionOfInterestMeasurementModifiers * - * Generated automatically from DICOM PS 3.16-2020e - * File created on 2020-11-25 11:13:12 by J. Riesmeier + * Generated automatically from DICOM PS 3.16-2022b + * File created on 2022-04-12 13:01:19 by J. Riesmeier * */ diff -Nru dcmtk-3.6.6/dcmsr/libcmr/cid7469.cc dcmtk-3.6.7/dcmsr/libcmr/cid7469.cc --- dcmtk-3.6.6/dcmsr/libcmr/cid7469.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmsr/libcmr/cid7469.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,12 +1,12 @@ /* * - * Copyright (C) 2015-2020, J. Riesmeier, Oldenburg, Germany + * Copyright (C) 2015-2022, J. Riesmeier, Oldenburg, Germany * All rights reserved. See COPYRIGHT file for details. * * Source file for class CID7469_GenericIntensityAndSizeMeasurements * - * Generated automatically from DICOM PS 3.16-2020e - * File created on 2020-11-25 11:13:14 by J. Riesmeier + * Generated automatically from DICOM PS 3.16-2022b + * File created on 2022-04-12 13:01:20 by J. Riesmeier * */ diff -Nru dcmtk-3.6.6/dcmsr/libcmr/CMakeLists.txt dcmtk-3.6.7/dcmsr/libcmr/CMakeLists.txt --- dcmtk-3.6.6/dcmsr/libcmr/CMakeLists.txt 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmsr/libcmr/CMakeLists.txt 2022-04-28 13:47:25.000000000 +0000 @@ -1,4 +1,44 @@ # create library from source files -DCMTK_ADD_LIBRARY(cmr init logger srnumvl tid300 tid1001 tid1204 tid1411 tid1419m tid1500 tid1501 tid15def tid1600 tid4019 cid11 cid29 cid29e cid42 cid100 cid244 cid244e cid4020 cid4021 cid4031 cid4031e cid5000 cid5001 cid6147 cid7021 cid7181 cid7445 cid7452 cid7453 cid7464 cid7469 cid10013 cid10013e cid10033 cid10033e) +DCMTK_ADD_LIBRARY(cmr + cid100.cc + cid10013.cc + cid10013e.cc + cid10033.cc + cid10033e.cc + cid11.cc + cid244.cc + cid244e.cc + cid247.cc + cid29.cc + cid29e.cc + cid4020.cc + cid4021.cc + cid4031.cc + cid4031e.cc + cid42.cc + cid5000.cc + cid5001.cc + cid6147.cc + cid7021.cc + cid7181.cc + cid7445.cc + cid7452.cc + cid7453.cc + cid7464.cc + cid7469.cc + init.cc + logger.cc + srnumvl.cc + tid1001.cc + tid1204.cc + tid1411.cc + tid1419m.cc + tid1500.cc + tid1501.cc + tid15def.cc + tid1600.cc + tid300.cc + tid4019.cc +) DCMTK_TARGET_LINK_MODULES(cmr dcmsr) diff -Nru dcmtk-3.6.6/dcmsr/libcmr/Makefile.dep dcmtk-3.6.7/dcmsr/libcmr/Makefile.dep --- dcmtk-3.6.6/dcmsr/libcmr/Makefile.dep 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmsr/libcmr/Makefile.dep 2022-04-28 13:47:25.000000000 +0000 @@ -5,12 +5,12 @@ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \ ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ @@ -67,12 +67,12 @@ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \ ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ @@ -130,12 +130,12 @@ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \ ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ @@ -192,12 +192,12 @@ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \ ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ @@ -255,12 +255,12 @@ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \ ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ @@ -317,12 +317,12 @@ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \ ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ @@ -379,12 +379,12 @@ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \ ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ @@ -441,12 +441,74 @@ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \ + ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ + ../../ofstd/include/dcmtk/ofstd/ofthread.h \ + ../../ofstd/include/dcmtk/ofstd/oftypes.h \ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ + ../../ofstd/include/dcmtk/ofstd/ofstream.h \ + ../../ofstd/include/dcmtk/ofstd/ofstring.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ + ../../ofstd/include/dcmtk/ofstd/ofcond.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcxfer.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 \ + ../../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/oftraits.h \ + ../../ofstd/include/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 \ + ../../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/dcitem.h \ + ../../ofstd/include/dcmtk/ofstd/offile.h \ + ../../ofstd/include/dcmtk/ofstd/ofstd.h \ + ../../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/dclist.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcpcache.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 +cid247.o: cid247.cc ../../config/include/dcmtk/config/osconfig.h \ + ../include/dcmtk/dcmsr/cmr/cid247.h ../include/dcmtk/dcmsr/dsrctxgr.h \ + ../include/dcmtk/dcmsr/dsrcodvl.h ../include/dcmtk/dcmsr/dsrtypes.h \ + ../include/dcmtk/dcmsr/dsdefine.h \ + ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ + ../../ofstd/include/dcmtk/ofstd/ofcast.h \ + ../../ofstd/include/dcmtk/ofstd/ofexport.h \ ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \ ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ @@ -503,12 +565,12 @@ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \ ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ @@ -565,12 +627,12 @@ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \ ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ @@ -628,12 +690,12 @@ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \ ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ @@ -690,12 +752,12 @@ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \ ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ @@ -752,12 +814,12 @@ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \ ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ @@ -815,12 +877,12 @@ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \ ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ @@ -877,12 +939,12 @@ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \ ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ @@ -939,12 +1001,12 @@ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \ ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ @@ -1001,12 +1063,12 @@ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \ ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ @@ -1063,12 +1125,12 @@ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \ ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ @@ -1125,12 +1187,12 @@ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \ ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ @@ -1187,12 +1249,12 @@ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \ ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ @@ -1249,12 +1311,12 @@ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \ ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ @@ -1311,12 +1373,12 @@ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \ ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ @@ -1373,12 +1435,12 @@ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \ ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ @@ -1435,12 +1497,12 @@ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \ ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ @@ -1497,12 +1559,12 @@ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \ ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ @@ -1557,7 +1619,6 @@ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../include/dcmtk/dcmsr/cmr/cid11.h ../include/dcmtk/dcmsr/dsrctxgr.h \ ../include/dcmtk/dcmsr/dsrcodvl.h ../include/dcmtk/dcmsr/dsrtypes.h \ ../include/dcmtk/dcmsr/dsdefine.h \ @@ -1566,6 +1627,7 @@ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ @@ -1673,12 +1735,12 @@ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \ ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ @@ -1740,12 +1802,12 @@ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \ ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ @@ -1828,12 +1890,12 @@ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \ ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ @@ -1915,12 +1977,12 @@ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \ ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ @@ -2015,12 +2077,12 @@ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \ ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ @@ -2112,12 +2174,12 @@ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \ ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ @@ -2222,12 +2284,12 @@ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \ ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ @@ -2332,12 +2394,12 @@ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \ ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ @@ -2432,12 +2494,12 @@ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \ ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ @@ -2528,12 +2590,12 @@ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \ ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ diff -Nru dcmtk-3.6.6/dcmsr/libcmr/Makefile.in dcmtk-3.6.7/dcmsr/libcmr/Makefile.in --- dcmtk-3.6.6/dcmsr/libcmr/Makefile.in 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmsr/libcmr/Makefile.in 2022-04-28 13:47:25.000000000 +0000 @@ -23,10 +23,10 @@ objs = init.o logger.o srnumvl.o tid300.o tid1001.o tid1204.o tid1411.o tid1419m.o \ tid1500.o tid1501.o tid15def.o tid1600.o tid4019.o \ - cid11.o cid29.o cid29e.o cid42.o cid100.o cid244.o cid244e.o cid4020.o \ - cid4021.o cid4031.o cid4031e.o cid5000.o cid5001.o cid6147.o cid7021.o \ - cid7181.o cid7445.o cid7452.o cid7453.o cid7464.o cid7469.o cid10013.o \ - cid10013e.o cid10033.o cid10033e.o + cid11.o cid29.o cid29e.o cid42.o cid100.o cid244.o cid244e.o cid247.o \ + cid4020.o cid4021.o cid4031.o cid4031e.o cid5000.o cid5001.o cid6147.o \ + cid7021.o cid7181.o cid7445.o cid7452.o cid7453.o cid7464.o cid7469.o \ + cid10013.o cid10013e.o cid10033.o cid10033e.o library = libcmr.$(LIBEXT) diff -Nru dcmtk-3.6.6/dcmsr/libcmr/tid1411.cc dcmtk-3.6.7/dcmsr/libcmr/tid1411.cc --- dcmtk-3.6.6/dcmsr/libcmr/tid1411.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmsr/libcmr/tid1411.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2016-2019, J. Riesmeier, Oldenburg, Germany + * Copyright (C) 2016-2021, J. Riesmeier, Oldenburg, Germany * All rights reserved. See COPYRIGHT file for details. * * Source file for class TID1411_VolumetricROIMeasurements @@ -83,8 +83,7 @@ { /* check whether base class is valid and all required content items are present */ return DSRSubTemplate::isValid() && - hasMeasurementGroup() && hasTrackingIdentifier() && hasTrackingUniqueIdentifier() && - hasReferencedSegment() && hasSourceSeriesForSegmentation() && hasMeasurements(OFTrue /*checkChildren*/); + hasMeasurementGroup() && hasReferencedSegment() && hasSourceSeriesForSegmentation(); } @@ -147,7 +146,7 @@ if (checkChildren) { DSRDocumentTreeNodeCursor cursor(getRoot()); - /* go to content item at TID 1411 (Volumetric ROI Measurements) Row 13 */ + /* go to content item at TID 1411 (Volumetric ROI Measurements) Row 15 */ if (gotoEntryFromNodeList(cursor, LAST_MEASUREMENT) > 0) { /* check whether any of the "included TID 1419 templates" is non-empty */ diff -Nru dcmtk-3.6.6/dcmsr/libcmr/tid1500.cc dcmtk-3.6.7/dcmsr/libcmr/tid1500.cc --- dcmtk-3.6.6/dcmsr/libcmr/tid1500.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmsr/libcmr/tid1500.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2015-2017, J. Riesmeier, Oldenburg, Germany + * Copyright (C) 2015-2021, J. Riesmeier, Oldenburg, Germany * All rights reserved. See COPYRIGHT file for details. * * Source file for class TID1500_MeasurementReport @@ -32,11 +32,12 @@ #define MEASUREMENT_REPORT 0 #define OBSERVATION_CONTEXT 1 #define LAST_PROCEDURE_REPORTED 2 -#define IMAGING_MEASUREMENTS 3 -#define LAST_VOLUMETRIC_ROI_MEASUREMENTS 4 -#define LAST_MEASUREMENT_GROUP 5 -#define QUALITATIVE_EVALUATIONS 6 -#define NUMBER_OF_LIST_ENTRIES 7 +#define IMAGE_LIBRARY 3 +#define IMAGING_MEASUREMENTS 4 +#define LAST_VOLUMETRIC_ROI_MEASUREMENTS 5 +#define LAST_MEASUREMENT_GROUP 6 +#define QUALITATIVE_EVALUATIONS 7 +#define NUMBER_OF_LIST_ENTRIES 8 // general information on TID 1500 (Measurement Report) #define TEMPLATE_NUMBER "1500" @@ -51,9 +52,9 @@ : DSRRootTemplate(DT_EnhancedSR, TEMPLATE_NUMBER, MAPPING_RESOURCE, MAPPING_RESOURCE_UID), Language(new TID1204_LanguageOfContentItemAndDescendants()), ObservationContext(new TID1001_ObservationContext()), - ImageLibrary(new TID1600_ImageLibrary()), - VolumetricROIMeasurements(new TID1411_Measurements()), - MeasurementGroup(new TID1501_Measurements()) + ImageLibrary(new TID1600_ImageLibrary(OFFalse /*createLibrary*/)), + VolumetricROIMeasurements(new TID1411_Measurements(OFFalse /*createGroup*/)), + MeasurementGroup(new TID1501_Measurements(OFFalse /*createGroup*/)) { setExtensible(TEMPLATE_TYPE); setOrderSignificant(TEMPLATE_ORDER); @@ -80,8 +81,10 @@ { /* check whether base class is valid and all required content items are present */ return DSRRootTemplate::isValid() && - Language->isValid() && ObservationContext->isValid() && ImageLibrary->isValid() && - hasProcedureReported() && (hasImagingMeasurements() || hasQualitativeEvaluations()) && + ObservationContext->isValid() && + (hasImagingMeasurements() || hasQualitativeEvaluations()) && + (Language->isEmpty() || Language->isValid()) && + (ImageLibrary->isEmpty() || ImageLibrary->isValid()) && (VolumetricROIMeasurements->isEmpty() || VolumetricROIMeasurements->isValid()) && (MeasurementGroup->isEmpty() || MeasurementGroup->isValid()); } @@ -94,6 +97,32 @@ } +OFBool TID1500_MeasurementReport::hasImageLibrary(const OFBool checkChildren) const +{ + OFBool result = OFFalse; + /* need to check for child nodes? */ + if (checkChildren) + { + DSRDocumentTreeNodeCursor cursor(getRoot()); + /* go to content item at TID 1500 (Measurement Report) Row 5 */ + if (gotoEntryFromNodeList(cursor, IMAGE_LIBRARY) > 0) + { + /* check whether "included TID 1600 template" is non-empty */ + if (cursor.isValid() && (cursor.getNode()->getValueType() == VT_includedTemplate)) + { + const DSRSubTemplate *subTempl = OFstatic_cast(const DSRIncludedTemplateTreeNode *, cursor.getNode())->getValue().get(); + if (subTempl != NULL) + result = !subTempl->isEmpty() && subTempl->compareTemplateIdentication("1600", "DCMR"); + } + } + } else { + /* check for content item at TID 1500 (Measurement Report) Row 5 */ + result = (getEntryFromNodeList(IMAGE_LIBRARY) > 0); + } + return result; +} + + OFBool TID1500_MeasurementReport::hasImagingMeasurements(const OFBool checkChildren) const { OFBool result = OFFalse; @@ -249,7 +278,7 @@ const OFBool check) { clear(); - /* TID 1500 (Measurement Report) Row 1 */ + /* TID 1500 (Measurement Report) Row 1 ff. */ return createMeasurementReport(title, check); } @@ -296,7 +325,7 @@ if (!checkEmpty || !VolumetricROIMeasurements->isEmpty()) { /* create new instance of TID 1411 (Volumetric ROI Measurements) */ - TID1411_Measurements *subTempl = new TID1411_Measurements(); + TID1411_Measurements *subTempl = new TID1411_Measurements(OFFalse /*createGroup*/); if (subTempl != NULL) { /* store (shared) reference to new instance */ @@ -325,7 +354,7 @@ if (!checkEmpty || !MeasurementGroup->isEmpty()) { /* create new instance of TID 1501 (Measurement Group) */ - TID1501_Measurements *subTempl = new TID1501_Measurements(); + TID1501_Measurements *subTempl = new TID1501_Measurements(OFFalse /*createGroup*/); if (subTempl != NULL) { /* store (shared) reference to new instance */ @@ -419,6 +448,7 @@ /* TID 1500 (Measurement Report) Row 5 */ CHECK_RESULT(includeTemplate(ImageLibrary, AM_afterCurrent, RT_contains)); CHECK_RESULT(getCurrentContentItem().setAnnotationText("TID 1500 - Row 5")); + GOOD_RESULT(storeEntryInNodeList(IMAGE_LIBRARY, getNodeID())); /* TID 1500 (Measurement Report) Row 6 */ CHECK_RESULT(addContentItem(RT_contains, VT_Container, CODE_DCM_ImagingMeasurements)); CHECK_RESULT(getCurrentContentItem().setAnnotationText("TID 1500 - Row 6")); diff -Nru dcmtk-3.6.6/dcmsr/libcmr/tid1501.cc dcmtk-3.6.7/dcmsr/libcmr/tid1501.cc --- dcmtk-3.6.6/dcmsr/libcmr/tid1501.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmsr/libcmr/tid1501.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2017-2019, J. Riesmeier, Oldenburg, Germany + * Copyright (C) 2017-2021, J. Riesmeier, Oldenburg, Germany * All rights reserved. See COPYRIGHT file for details. * * Source file for class TID1501_MeasurementGroup @@ -80,8 +80,7 @@ { /* check whether base class is valid and all required content items are present */ return DSRSubTemplate::isValid() && - hasMeasurementGroup() && hasTrackingIdentifier() && hasTrackingUniqueIdentifier() && - hasMeasurements(OFTrue /*checkChildren*/); + hasMeasurementGroup() && hasMeasurements(OFTrue /*checkChildren*/); } diff -Nru dcmtk-3.6.6/dcmsr/libcmr/tid1600.cc dcmtk-3.6.7/dcmsr/libcmr/tid1600.cc --- dcmtk-3.6.6/dcmsr/libcmr/tid1600.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmsr/libcmr/tid1600.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2015-2019, J. Riesmeier, Oldenburg, Germany + * Copyright (C) 2015-2021, J. Riesmeier, Oldenburg, Germany * All rights reserved. See COPYRIGHT file for details. * * Source file for class TID1600_ImageLibrary @@ -96,7 +96,7 @@ OFCondition TID1600_ImageLibrary::createNewImageLibrary() { clear(); - /* TID 1600 (Image Library) Row 1 */ + /* TID 1600 (Image Library) Row 1 ff. */ return createImageLibrary(); } diff -Nru dcmtk-3.6.6/dcmsr/libsrc/CMakeLists.txt dcmtk-3.6.7/dcmsr/libsrc/CMakeLists.txt --- dcmtk-3.6.6/dcmsr/libsrc/CMakeLists.txt 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmsr/libsrc/CMakeLists.txt 2022-04-28 13:47:25.000000000 +0000 @@ -1,5 +1,81 @@ # create library from source files -DCMTK_ADD_LIBRARY(dcmsr dsrcitem dsrcodtn dsrcodvl dsrcomtn dsrcomvl dsrcontn dsrcsidl dsrdattn dsrdncsr dsrdnflt dsrdoc dsrdocst dsrdoctn dsrdoctr dsrdtitn dsrimgfr dsrimgse dsrimgtn dsrimgvl dsritcsr dsrnumtn dsrnumvl dsrpnmtn dsrposcn dsrrefin dsrreftn dsrscogr dsrsc3gr dsrscotn dsrsc3tn dsrscovl dsrsc3vl dsrsoprf dsrstrvl dsrtcodt dsrtcosp dsrtcotn dsrtcoto dsrtcovl dsrtextn dsrtimtn dsrtpltn dsrtree dsrtypes dsruidtn dsrwavch dsrwavtn dsrwavvl dsrxmlc dsrxmld dsriodcc dsrbascc dsrenhcc dsrcomcc dsrkeycc dsrmamcc dsrchecc dsrcolcc dsrprocc dsrxrdcc dsrspecc dsrmaccc dsrimpcc dsrc3dcc dsrrrdcc dsracqcc dsrsaecc dsrprdcc dsrpficc dsrplicc dsrrsdcc dsrctpl dsrrtpl dsrstpl dsrctxgr) +DCMTK_ADD_LIBRARY(dcmsr + dsracqcc.cc + dsrbascc.cc + dsrc3dcc.cc + dsrchecc.cc + dsrcitem.cc + dsrcodtn.cc + dsrcodvl.cc + dsrcolcc.cc + dsrcomcc.cc + dsrcomtn.cc + dsrcomvl.cc + dsrcontn.cc + dsrcsidl.cc + dsrctpl.cc + dsrctxgr.cc + dsrdattn.cc + dsrdncsr.cc + dsrdnflt.cc + dsrdoc.cc + dsrdocst.cc + dsrdoctn.cc + dsrdoctr.cc + dsrdtitn.cc + dsrenhcc.cc + dsrimgfr.cc + dsrimgse.cc + dsrimgtn.cc + dsrimgvl.cc + dsrimpcc.cc + dsriodcc.cc + dsritcsr.cc + dsrkeycc.cc + dsrmaccc.cc + dsrmamcc.cc + dsrnumtn.cc + dsrnumvl.cc + dsrpficc.cc + dsrplicc.cc + dsrpnmtn.cc + dsrposcn.cc + dsrprdcc.cc + dsrprocc.cc + dsrrefin.cc + dsrreftn.cc + dsrrrdcc.cc + dsrrsdcc.cc + dsrrtpl.cc + dsrsaecc.cc + dsrsc3gr.cc + dsrsc3tn.cc + dsrsc3vl.cc + dsrscogr.cc + dsrscotn.cc + dsrscovl.cc + dsrsoprf.cc + dsrspecc.cc + dsrstpl.cc + dsrstrvl.cc + dsrtcodt.cc + dsrtcosp.cc + dsrtcotn.cc + dsrtcoto.cc + dsrtcovl.cc + dsrtextn.cc + dsrtimtn.cc + dsrtpltn.cc + dsrtree.cc + dsrtypes.cc + dsruidtn.cc + dsrwavch.cc + dsrwavtn.cc + dsrwavvl.cc + dsrxmlc.cc + dsrxmld.cc + dsrxrdcc.cc +) DCMTK_TARGET_LINK_MODULES(dcmsr ofstd oflog dcmdata dcmimgle dcmimage) DCMTK_TARGET_LINK_LIBRARIES(dcmsr ${LIBXML_LIBS}) diff -Nru dcmtk-3.6.6/dcmsr/libsrc/dsracqcc.cc dcmtk-3.6.7/dcmsr/libsrc/dsracqcc.cc --- dcmtk-3.6.6/dcmsr/libsrc/dsracqcc.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmsr/libsrc/dsracqcc.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2015-2019, J. Riesmeier, Oldenburg, Germany + * Copyright (C) 2015-2021, J. Riesmeier, Oldenburg, Germany * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation are maintained by @@ -84,9 +84,9 @@ /* row 2 of the table */ else if ((relationshipType == RT_hasObsContext) && ((sourceValueType == VT_Container))) { - result = (targetValueType == VT_Code) || (targetValueType == VT_Date) || (targetValueType == VT_DateTime) || - (targetValueType == VT_Num) || (targetValueType == VT_PName) || (targetValueType == VT_Text) || - (targetValueType == VT_Time) || (targetValueType == VT_UIDRef); + result = (targetValueType == VT_Code) || (targetValueType == VT_Date) || (targetValueType == VT_DateTime) || + (targetValueType == VT_Num) || (targetValueType == VT_PName) || (targetValueType == VT_Text) || + (targetValueType == VT_Time) || (targetValueType == VT_UIDRef) || (targetValueType == VT_Container) /* see CP-2084 */; } /* row 3 of the table */ else if ((relationshipType == RT_hasObsContext) && (sourceValueType == VT_Code)) diff -Nru dcmtk-3.6.6/dcmsr/libsrc/dsrbascc.cc dcmtk-3.6.7/dcmsr/libsrc/dsrbascc.cc --- dcmtk-3.6.6/dcmsr/libsrc/dsrbascc.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmsr/libsrc/dsrbascc.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2003-2016, OFFIS e.V. + * Copyright (C) 2003-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -85,9 +85,9 @@ /* row 2 of the table */ else if ((relationshipType == RT_hasObsContext) && (sourceValueType == VT_Container)) { - result = (targetValueType == VT_Text) || (targetValueType == VT_Code) || (targetValueType == VT_DateTime) || - (targetValueType == VT_Date) || (targetValueType == VT_Time) || (targetValueType == VT_UIDRef) || - (targetValueType == VT_PName) || (targetValueType == VT_Composite); + result = (targetValueType == VT_Text) || (targetValueType == VT_Code) || (targetValueType == VT_DateTime) || + (targetValueType == VT_Date) || (targetValueType == VT_Time) || (targetValueType == VT_UIDRef) || + (targetValueType == VT_PName) || (targetValueType == VT_Composite) || (targetValueType == VT_Container) /* see CP-2084 */; } /* row 3 of the table */ else if ((relationshipType == RT_hasAcqContext) && ((sourceValueType == VT_Container) || @@ -110,7 +110,7 @@ (targetValueType == VT_PName) || (targetValueType == VT_Image) || (targetValueType == VT_Waveform) || (targetValueType == VT_Composite); } - /* row 6 of the table - introduced with CP-1076 */ + /* row 6 of the table */ else if ((relationshipType == RT_hasProperties) && (sourceValueType == VT_PName)) { result = (targetValueType == VT_Text) || (targetValueType == VT_Code) || (targetValueType == VT_DateTime) || diff -Nru dcmtk-3.6.6/dcmsr/libsrc/dsrc3dcc.cc dcmtk-3.6.7/dcmsr/libsrc/dsrc3dcc.cc --- dcmtk-3.6.6/dcmsr/libsrc/dsrc3dcc.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmsr/libsrc/dsrc3dcc.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2013-2015, J. Riesmeier, Oldenburg, Germany + * Copyright (C) 2013-2021, J. Riesmeier, Oldenburg, Germany * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation are maintained by @@ -74,11 +74,11 @@ /* row 1 of the table */ if ((relationshipType == RT_contains) && (sourceValueType == VT_Container)) { - result = (targetValueType == VT_Text) || (targetValueType == VT_Code) || (targetValueType == VT_Num) || - (targetValueType == VT_DateTime) || (targetValueType == VT_Date) || (targetValueType == VT_Time) || - (targetValueType == VT_UIDRef) || (targetValueType == VT_PName) || (targetValueType == VT_SCoord) || - (targetValueType == VT_SCoord3D) || (targetValueType == VT_TCoord) || (targetValueType == VT_Composite) || - (targetValueType == VT_Image) || (targetValueType == VT_Waveform) || + result = (targetValueType == VT_Text) || (targetValueType == VT_Code) || (targetValueType == VT_Num) || + (targetValueType == VT_DateTime) || (targetValueType == VT_Date) || (targetValueType == VT_Time) || + (targetValueType == VT_UIDRef) || (targetValueType == VT_PName) || (targetValueType == VT_SCoord) || + (targetValueType == VT_SCoord3D) || (targetValueType == VT_TCoord) || (targetValueType == VT_Composite) || + (targetValueType == VT_Image) || (targetValueType == VT_Waveform) || ((targetValueType == VT_Container) && !byReference /* only by-value */); } /* row 2 of the table */ @@ -89,6 +89,11 @@ (targetValueType == VT_DateTime) || (targetValueType == VT_Date) || (targetValueType == VT_Time) || (targetValueType == VT_UIDRef) || (targetValueType == VT_PName) || (targetValueType == VT_Composite); } + /* new row introduced with CP-2084 */ + else if ((relationshipType == RT_hasObsContext) && (sourceValueType == VT_Container)) + { + result = (targetValueType == VT_Container); + } /* row 3 of the table */ else if ((relationshipType == RT_hasAcqContext) && ((sourceValueType == VT_Container) || (sourceValueType == VT_Image) || (sourceValueType == VT_Waveform) || (sourceValueType == VT_Composite) || (sourceValueType == VT_Num))) diff -Nru dcmtk-3.6.6/dcmsr/libsrc/dsrchecc.cc dcmtk-3.6.7/dcmsr/libsrc/dsrchecc.cc --- dcmtk-3.6.6/dcmsr/libsrc/dsrchecc.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmsr/libsrc/dsrchecc.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2003-2015, OFFIS e.V. + * Copyright (C) 2003-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -81,10 +81,15 @@ else if ((relationshipType == RT_hasObsContext) && !byReference && ((sourceValueType == VT_Container) || (sourceValueType == VT_Text) || (sourceValueType == VT_Code) || (sourceValueType == VT_Num))) { - result = (targetValueType == VT_Text) || (targetValueType == VT_Code) || (targetValueType == VT_Num) || - (targetValueType == VT_Date) || (targetValueType == VT_Time) || (targetValueType == VT_PName) || + result = (targetValueType == VT_Text) || (targetValueType == VT_Code) || (targetValueType == VT_Num) || + (targetValueType == VT_Date) || (targetValueType == VT_Time) || (targetValueType == VT_PName) || (targetValueType == VT_UIDRef) || (targetValueType == VT_Composite); } + /* new row introduced with CP-2084 */ + else if ((relationshipType == RT_hasObsContext) && (sourceValueType == VT_Container)) + { + result = (targetValueType == VT_Container); + } /* row 3 of the table */ else if ((relationshipType == RT_hasAcqContext) && !byReference && ((sourceValueType == VT_Image) || (sourceValueType == VT_Waveform))) @@ -103,17 +108,17 @@ ((sourceValueType == VT_Text) || (sourceValueType == VT_Code) || (sourceValueType == VT_Num))) { /* by-reference allowed */ - result = (targetValueType == VT_Container) || (targetValueType == VT_Text) || (targetValueType == VT_Code) || - (targetValueType == VT_Num) || (targetValueType == VT_Date) || (targetValueType == VT_Image) || - (targetValueType == VT_Waveform) || (targetValueType == VT_SCoord) || (targetValueType == VT_TCoord) || + result = (targetValueType == VT_Container) || (targetValueType == VT_Text) || (targetValueType == VT_Code) || + (targetValueType == VT_Num) || (targetValueType == VT_Date) || (targetValueType == VT_Image) || + (targetValueType == VT_Waveform) || (targetValueType == VT_SCoord) || (targetValueType == VT_TCoord) || (targetValueType == VT_UIDRef); } /* row 6 of the table */ else if ((relationshipType == RT_inferredFrom) && ((sourceValueType == VT_Code) || (sourceValueType == VT_Num))) { /* by-reference allowed */ - result = (targetValueType == VT_Code) || (targetValueType == VT_Num) || (targetValueType == VT_Image) || - (targetValueType == VT_Waveform) || (targetValueType == VT_SCoord) || (targetValueType == VT_TCoord) || + result = (targetValueType == VT_Code) || (targetValueType == VT_Num) || (targetValueType == VT_Image) || + (targetValueType == VT_Waveform) || (targetValueType == VT_SCoord) || (targetValueType == VT_TCoord) || (targetValueType == VT_Container) || (targetValueType == VT_Text); } /* row 7 of the table */ diff -Nru dcmtk-3.6.6/dcmsr/libsrc/dsrcolcc.cc dcmtk-3.6.7/dcmsr/libsrc/dsrcolcc.cc --- dcmtk-3.6.6/dcmsr/libsrc/dsrcolcc.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmsr/libsrc/dsrcolcc.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2010-2015, OFFIS e.V. + * Copyright (C) 2010-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -74,24 +74,29 @@ /* row 1 of the table */ if ((relationshipType == RT_contains) && !byReference && (sourceValueType == VT_Container)) { - result = (targetValueType == VT_Code) || (targetValueType == VT_Num) || (targetValueType == VT_Image) || - (targetValueType == VT_Container) || (targetValueType == VT_UIDRef) || (targetValueType == VT_Date) || + result = (targetValueType == VT_Code) || (targetValueType == VT_Num) || (targetValueType == VT_Image) || + (targetValueType == VT_Container) || (targetValueType == VT_UIDRef) || (targetValueType == VT_Date) || (targetValueType == VT_Time); } /* row 2 of the table */ else if ((relationshipType == RT_hasObsContext) && !byReference && ((sourceValueType == VT_Container) || (sourceValueType == VT_Text) || (sourceValueType == VT_Code) || (sourceValueType == VT_Num))) { - result = (targetValueType == VT_Text) || (targetValueType == VT_Code) || (targetValueType == VT_Num) || - (targetValueType == VT_Date) || (targetValueType == VT_Time) || (targetValueType == VT_PName) || + result = (targetValueType == VT_Text) || (targetValueType == VT_Code) || (targetValueType == VT_Num) || + (targetValueType == VT_Date) || (targetValueType == VT_Time) || (targetValueType == VT_PName) || (targetValueType == VT_UIDRef) || (targetValueType == VT_Composite); } + /* new row introduced with CP-2084 */ + else if ((relationshipType == RT_hasObsContext) && (sourceValueType == VT_Container)) + { + result = (targetValueType == VT_Container); + } /* row 3 of the table */ else if ((relationshipType == RT_hasAcqContext) && (sourceValueType == VT_Image)) { /* by-reference allowed */ result = (targetValueType == VT_Text) || (targetValueType == VT_Code) || (targetValueType == VT_Date) || - (targetValueType == VT_Time) || (targetValueType == VT_Num) || (targetValueType == VT_Container); + (targetValueType == VT_Time) || (targetValueType == VT_Num) || (targetValueType == VT_Container); } /* row 4 of the table */ else if ((relationshipType == RT_hasConceptMod) && !byReference && ((sourceValueType == VT_Container) || @@ -103,15 +108,15 @@ else if ((relationshipType == RT_hasProperties) && !byReference && ((sourceValueType == VT_Text) || (sourceValueType == VT_Code) || (sourceValueType == VT_Num))) { - result = (targetValueType == VT_Container) || (targetValueType == VT_Text) || (targetValueType == VT_Code) || - (targetValueType == VT_Num) || (targetValueType == VT_Date) || (targetValueType == VT_Image) || - (targetValueType == VT_SCoord) || (targetValueType == VT_SCoord3D) || (targetValueType == VT_UIDRef); + result = (targetValueType == VT_Container) || (targetValueType == VT_Text) || (targetValueType == VT_Code) || + (targetValueType == VT_Num) || (targetValueType == VT_Date) || (targetValueType == VT_Image) || + (targetValueType == VT_SCoord) || (targetValueType == VT_SCoord3D) || (targetValueType == VT_UIDRef); } /* row 6 of the table */ else if ((relationshipType == RT_inferredFrom) && ((sourceValueType == VT_Code) || (sourceValueType == VT_Num))) { /* by-reference allowed */ - result = (targetValueType == VT_Code) || (targetValueType == VT_Num) || (targetValueType == VT_Image) || + result = (targetValueType == VT_Code) || (targetValueType == VT_Num) || (targetValueType == VT_Image) || (targetValueType == VT_SCoord) || (targetValueType == VT_SCoord3D) || (targetValueType == VT_Container) || (targetValueType == VT_Text); } diff -Nru dcmtk-3.6.6/dcmsr/libsrc/dsrcomcc.cc dcmtk-3.6.7/dcmsr/libsrc/dsrcomcc.cc --- dcmtk-3.6.6/dcmsr/libsrc/dsrcomcc.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmsr/libsrc/dsrcomcc.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2003-2016, OFFIS e.V. + * Copyright (C) 2003-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -88,6 +88,11 @@ (targetValueType == VT_DateTime) || (targetValueType == VT_Date) || (targetValueType == VT_Time) || (targetValueType == VT_UIDRef) || (targetValueType == VT_PName) || (targetValueType == VT_Composite); } + /* new row introduced with CP-2084 */ + else if ((relationshipType == RT_hasObsContext) && (sourceValueType == VT_Container)) + { + result = (targetValueType == VT_Container); + } /* row 3 of the table */ else if ((relationshipType == RT_hasAcqContext) && ((sourceValueType == VT_Container) || (sourceValueType == VT_Image) || (sourceValueType == VT_Waveform) || (sourceValueType == VT_Composite) || (sourceValueType == VT_Num))) @@ -111,7 +116,7 @@ (targetValueType == VT_Waveform) || (targetValueType == VT_Composite) || (targetValueType == VT_SCoord) || (targetValueType == VT_TCoord) || (targetValueType == VT_Container); } - /* row 6 of the table - introduced with CP-1076 */ + /* row 6 of the table */ else if ((relationshipType == RT_hasProperties) && (sourceValueType == VT_PName)) { result = (targetValueType == VT_Text) || (targetValueType == VT_Code) || (targetValueType == VT_DateTime) || diff -Nru dcmtk-3.6.6/dcmsr/libsrc/dsrcomvl.cc dcmtk-3.6.7/dcmsr/libsrc/dsrcomvl.cc --- dcmtk-3.6.6/dcmsr/libsrc/dsrcomvl.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmsr/libsrc/dsrcomvl.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2000-2017, OFFIS e.V. + * Copyright (C) 2000-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -413,7 +413,8 @@ } -OFCondition DSRCompositeReferenceValue::checkSOPClassUID(const OFString &sopClassUID) const +OFCondition DSRCompositeReferenceValue::checkSOPClassUID(const OFString &sopClassUID, + const OFBool /*reportWarnings*/) const { OFCondition result = sopClassUID.empty() ? SR_EC_InvalidValue : EC_Normal; if (result.good()) @@ -422,7 +423,8 @@ } -OFCondition DSRCompositeReferenceValue::checkSOPInstanceUID(const OFString &sopInstanceUID) const +OFCondition DSRCompositeReferenceValue::checkSOPInstanceUID(const OFString &sopInstanceUID, + const OFBool /*reportWarnings*/) const { OFCondition result = sopInstanceUID.empty() ? SR_EC_InvalidValue : EC_Normal; if (result.good()) @@ -431,10 +433,10 @@ } -OFCondition DSRCompositeReferenceValue::checkCurrentValue() const +OFCondition DSRCompositeReferenceValue::checkCurrentValue(const OFBool reportWarnings) const { - OFCondition result = checkSOPClassUID(SOPClassUID); + OFCondition result = checkSOPClassUID(SOPClassUID, reportWarnings); if (result.good()) - result = checkSOPInstanceUID(SOPInstanceUID); + result = checkSOPInstanceUID(SOPInstanceUID, reportWarnings); return result; } diff -Nru dcmtk-3.6.6/dcmsr/libsrc/dsrdoc.cc dcmtk-3.6.7/dcmsr/libsrc/dsrdoc.cc --- dcmtk-3.6.6/dcmsr/libsrc/dsrdoc.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmsr/libsrc/dsrdoc.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2000-2020, OFFIS e.V. + * Copyright (C) 2000-2022, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -82,6 +82,8 @@ IssuerOfPatientID(DCM_IssuerOfPatientID), PatientBirthDate(DCM_PatientBirthDate), PatientSex(DCM_PatientSex), + PatientSize(DCM_PatientSize), + PatientWeight(DCM_PatientWeight), Manufacturer(DCM_Manufacturer), ManufacturerModelName(DCM_ManufacturerModelName), DeviceSerialNumber(DCM_DeviceSerialNumber), @@ -154,6 +156,8 @@ IssuerOfPatientID.clear(); PatientBirthDate.clear(); PatientSex.clear(); + PatientSize.clear(); + PatientWeight.clear(); Manufacturer.clear(); ManufacturerModelName.clear(); DeviceSerialNumber.clear(); @@ -630,6 +634,9 @@ getAndCheckElementFromDataset(dataset, StudyID, "1", "2", "GeneralStudyModule"); getAndCheckElementFromDataset(dataset, AccessionNumber, "1", "2", "GeneralStudyModule"); getAndCheckElementFromDataset(dataset, StudyDescription, "1", "3", "GeneralStudyModule"); + // --- Patient Study Module --- + getAndCheckElementFromDataset(dataset, PatientSize, "1", "3", "PatientStudyModule"); + getAndCheckElementFromDataset(dataset, PatientWeight, "1", "3", "PatientStudyModule"); /* also read data from Patient Module */ return readPatientData(dataset, flags); } @@ -687,6 +694,10 @@ addElementToDataset(result, dataset, new DcmDate(PatientBirthDate), "1", "2", "PatientModule"); addElementToDataset(result, dataset, new DcmCodeString(PatientSex), "1", "2", "PatientModule"); + // --- Patient Study Module --- + addElementToDataset(result, dataset, new DcmDecimalString(PatientSize), "1", "3", "PatientStudyModule"); + addElementToDataset(result, dataset, new DcmDecimalString(PatientWeight), "1", "3", "PatientStudyModule"); + if (requiresEnhancedEquipmentModule(getDocumentType())) { // --- Enhanced General Equipment Module --- @@ -805,8 +816,8 @@ { OFString sopClassUID; getSOPClassUID(sopClassUID); - /* create new document of specified type (also checks for support) */ - result = createNewDocument(sopClassUIDToDocumentType(sopClassUID)); + /* change document type (also checks for support) */ + result = changeDocumentType(sopClassUIDToDocumentType(sopClassUID)); if (result.good()) { /* proceed with document header */ @@ -967,7 +978,10 @@ } else if (doc.getElementFromNodeContent(cursor, PatientID, "id").bad() && doc.getElementFromNodeContent(cursor, IssuerOfPatientID, "issuer").bad() && - doc.getElementFromNodeContent(cursor, PatientSex, "sex").bad()) + doc.getElementFromNodeContent(cursor, PatientSex, "sex").bad() && + /* strictly speaking, Patient's Size and Weight belong to the Study IE */ + doc.getElementFromNodeContent(cursor, PatientSize, "size").bad() && + doc.getElementFromNodeContent(cursor, PatientWeight, "weight").bad()) { doc.printUnexpectedNodeWarning(cursor); } @@ -1107,10 +1121,10 @@ /* Instance Creator UID */ doc.getElementFromAttribute(cursor, InstanceCreatorUID, "uid", OFFalse /*encoding*/, OFFalse /*required*/); /* Instance Creation Date */ - DSRDateTreeNode::getValueFromXMLNodeContent(doc, doc.getNamedChildNode(cursor, "date"), tmpString); + DSRDateTreeNode::getValueFromXMLNodeContent(doc, doc.getNamedChildNode(cursor, "date", OFFalse /*required*/), tmpString); InstanceCreationDate.putOFStringArray(tmpString); /* Instance Creation Time */ - DSRTimeTreeNode::getValueFromXMLNodeContent(doc, doc.getNamedChildNode(cursor, "time"), tmpString); + DSRTimeTreeNode::getValueFromXMLNodeContent(doc, doc.getNamedChildNode(cursor, "time", OFFalse /*required*/), tmpString); InstanceCreationTime.putOFStringArray(tmpString); } else if (doc.getElementFromNodeContent(cursor, InstanceNumber, "number").bad()) @@ -1363,6 +1377,9 @@ stream << "" << OFendl; } writeStringFromElementToXML(stream, PatientSex, "sex", (flags & XF_writeEmptyTags) > 0); + /* strictly speaking, Patient's Size and Weight belong to the Study IE */ + writeStringFromElementToXML(stream, PatientSize, "size", (flags & XF_writeEmptyTags) > 0); + writeStringFromElementToXML(stream, PatientWeight, "weight", (flags & XF_writeEmptyTags) > 0); stream << "" << OFendl; stream << "" << OFendl; @@ -2285,6 +2302,20 @@ } +OFCondition DSRDocument::getPatientSize(OFString &value, + const signed long pos) const +{ + return getStringValueFromElement(PatientSize, value, pos); +} + + +OFCondition DSRDocument::getPatientWeight(OFString &value, + const signed long pos) const +{ + return getStringValueFromElement(PatientWeight, value, pos); +} + + OFCondition DSRDocument::getReferringPhysicianName(OFString &value, const signed long pos) const { @@ -2535,6 +2566,26 @@ } +OFCondition DSRDocument::setPatientSize(const OFString &value, + const OFBool check) +{ + OFCondition result = (check) ? DcmDecimalString::checkStringValue(value, "1") : EC_Normal; + if (result.good()) + result = PatientSize.putOFStringArray(value); + return result; +} + + +OFCondition DSRDocument::setPatientWeight(const OFString &value, + const OFBool check) +{ + OFCondition result = (check) ? DcmDecimalString::checkStringValue(value, "1") : EC_Normal; + if (result.good()) + result = PatientWeight.putOFStringArray(value); + return result; +} + + OFCondition DSRDocument::setReferringPhysicianName(const OFString &value, const OFBool check) { @@ -2777,7 +2828,10 @@ StudyID.clear(); AccessionNumber.clear(); StudyDescription.clear(); - /* also creates new study (since UID is empty) and SOP instance */ + /* also need to clear the attributes from the Patient Study Module */ + PatientSize.clear(); + PatientWeight.clear(); + /* the following method also creates new a study (since UID is empty) and SOP instance */ createNewSeries(); } @@ -3069,8 +3123,6 @@ InstanceCreationDate.putOFStringArray(currentDate(tmpString)); /* set instance creation time to current time (HHMMSS) */ InstanceCreationTime.putOFStringArray(currentTime(tmpString)); - /* set instance creator UID to identify instances that have been created by this toolkit */ - InstanceCreatorUID.putString(OFFIS_INSTANCE_CREATOR_UID); } /* create new study instance UID if required */ if (StudyInstanceUID.isEmpty()) diff -Nru dcmtk-3.6.6/dcmsr/libsrc/dsrenhcc.cc dcmtk-3.6.7/dcmsr/libsrc/dsrenhcc.cc --- dcmtk-3.6.6/dcmsr/libsrc/dsrenhcc.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmsr/libsrc/dsrenhcc.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2003-2016, OFFIS e.V. + * Copyright (C) 2003-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -86,9 +86,10 @@ /* row 2 of the table */ else if ((relationshipType == RT_hasObsContext) && (sourceValueType == VT_Container)) { - result = (targetValueType == VT_Text) || (targetValueType == VT_Code) || (targetValueType == VT_Num) || - (targetValueType == VT_DateTime) || (targetValueType == VT_Date) || (targetValueType == VT_Time) || - (targetValueType == VT_UIDRef) || (targetValueType == VT_PName) || (targetValueType == VT_Composite); + result = (targetValueType == VT_Text) || (targetValueType == VT_Code) || (targetValueType == VT_Num) || + (targetValueType == VT_DateTime) || (targetValueType == VT_Date) || (targetValueType == VT_Time) || + (targetValueType == VT_UIDRef) || (targetValueType == VT_PName) || (targetValueType == VT_Composite) || + (targetValueType == VT_Container) /* see CP-2084 */; } /* row 3 of the table */ else if ((relationshipType == RT_hasAcqContext) && ((sourceValueType == VT_Container) || (sourceValueType == VT_Image) || @@ -113,7 +114,7 @@ (targetValueType == VT_Waveform) || (targetValueType == VT_Composite) || (targetValueType == VT_SCoord) || (targetValueType == VT_TCoord); } - /* row 6 of the table - introduced with CP-1076 */ + /* row 6 of the table */ else if ((relationshipType == RT_hasProperties) && (sourceValueType == VT_PName)) { result = (targetValueType == VT_Text) || (targetValueType == VT_Code) || (targetValueType == VT_DateTime) || diff -Nru dcmtk-3.6.6/dcmsr/libsrc/dsrimgfr.cc dcmtk-3.6.7/dcmsr/libsrc/dsrimgfr.cc --- dcmtk-3.6.6/dcmsr/libsrc/dsrimgfr.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmsr/libsrc/dsrimgfr.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2000-2018, OFFIS e.V. + * Copyright (C) 2000-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -28,10 +28,6 @@ #include "dcmtk/dcmdata/dcdeftag.h" #include "dcmtk/dcmdata/dcvris.h" -#define INCLUDE_CSTDIO -#define INCLUDE_CINTTYPES -#include "dcmtk/ofstd/ofstdinc.h" - template<> const Sint32& DSRgetEmptyItem() diff -Nru dcmtk-3.6.6/dcmsr/libsrc/dsrimgse.cc dcmtk-3.6.7/dcmsr/libsrc/dsrimgse.cc --- dcmtk-3.6.6/dcmsr/libsrc/dsrimgse.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmsr/libsrc/dsrimgse.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2013-2017, J. Riesmeier, Oldenburg, Germany + * Copyright (C) 2013-2021, J. Riesmeier, Oldenburg, Germany * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation are maintained by @@ -28,10 +28,6 @@ #include "dcmtk/dcmdata/dcdeftag.h" #include "dcmtk/dcmdata/dcvrus.h" -#define INCLUDE_CSTDIO -#include "dcmtk/ofstd/ofstdinc.h" - - template<> const Uint16& DSRgetEmptyItem() { diff -Nru dcmtk-3.6.6/dcmsr/libsrc/dsrimgvl.cc dcmtk-3.6.7/dcmsr/libsrc/dsrimgvl.cc --- dcmtk-3.6.6/dcmsr/libsrc/dsrimgvl.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmsr/libsrc/dsrimgvl.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2000-2020, OFFIS e.V. + * Copyright (C) 2000-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -376,7 +376,7 @@ } } /* check data and report warnings if any */ - checkListData(SOPClassUID, FrameList, SegmentList, OFTrue /*reportWarnings*/); + checkCurrentValue(OFTrue /*reportWarnings*/); } return result; } @@ -393,47 +393,47 @@ result = FrameList.write(dataset); else if (!SegmentList.isEmpty()) result = SegmentList.write(dataset); - } - /* write ReferencedSOPSequence (Presentation State, optional) */ - if (result.good()) - { - if (PresentationState.isValid()) - result = PresentationState.writeSequence(dataset, DCM_ReferencedSOPSequence); - } - /* write ReferencedRealWorldValueMappingInstanceSequence (optional) */ - if (result.good()) - { - if (RealWorldValueMapping.isValid()) - result = RealWorldValueMapping.writeSequence(dataset, DCM_ReferencedRealWorldValueMappingInstanceSequence); - } - /* write IconImageSequence (optional) */ - if (result.good() && (IconImage != NULL)) - { - DcmItem *ditem = NULL; - /* create sequence with a single item */ - result = dataset.findOrCreateSequenceItem(DCM_IconImageSequence, ditem, 0 /*position*/); + /* write ReferencedSOPSequence (Presentation State, optional) */ + if (result.good()) + { + if (PresentationState.isValid()) + result = PresentationState.writeSequence(dataset, DCM_ReferencedSOPSequence); + } + /* write ReferencedRealWorldValueMappingInstanceSequence (optional) */ if (result.good()) { - /* monochrome images can be written directly */ - if (IconImage->isMonochrome()) + if (RealWorldValueMapping.isValid()) + result = RealWorldValueMapping.writeSequence(dataset, DCM_ReferencedRealWorldValueMappingInstanceSequence); + } + /* write IconImageSequence (optional) */ + if (result.good() && (IconImage != NULL)) + { + DcmItem *ditem = NULL; + /* create sequence with a single item */ + result = dataset.findOrCreateSequenceItem(DCM_IconImageSequence, ditem, 0 /*position*/); + if (result.good()) { - /* write icon image to dataset */ - if (IconImage->writeFrameToDataset(*ditem)) + /* monochrome images can be written directly */ + if (IconImage->isMonochrome()) { - /* delete unwanted element NumberOfFrames (0028,0008) */ - ditem->findAndDeleteElement(DCM_NumberOfFrames); - } else - result = EC_CorruptedData; - } else { - OFString tmpString; - /* color images need to be converted to "PALETTE COLOR" */ - result = DcmQuant::createPaletteColorImage(*IconImage, *ditem, OFTrue /*writeAsOW*/, OFFalse /*write16BitEntries*/, - OFFalse /*floydSteinberg*/, 256 /*numberOfColors*/, tmpString /*description*/); + /* write icon image to dataset */ + if (IconImage->writeFrameToDataset(*ditem)) + { + /* delete unwanted element NumberOfFrames (0028,0008) */ + ditem->findAndDeleteElement(DCM_NumberOfFrames); + } else + result = EC_CorruptedData; + } else { + OFString tmpString; + /* color images need to be converted to "PALETTE COLOR" */ + result = DcmQuant::createPaletteColorImage(*IconImage, *ditem, OFTrue /*writeAsOW*/, OFFalse /*write16BitEntries*/, + OFFalse /*floydSteinberg*/, 256 /*numberOfColors*/, tmpString /*description*/); + } } } + /* check data and report warnings if any */ + checkCurrentValue(OFTrue /*reportWarnings*/); } - /* check data and report warnings if any */ - checkListData(SOPClassUID, FrameList, SegmentList, OFTrue /*reportWarnings*/); return result; } @@ -693,7 +693,11 @@ } -OFCondition DSRImageReferenceValue::checkSOPClassUID(const OFString &sopClassUID) const +// helper macro to avoid annoying check of boolean flag +#define REPORT_WARNING(msg) { if (reportWarnings) DCMSR_WARN(msg); } + +OFCondition DSRImageReferenceValue::checkSOPClassUID(const OFString &sopClassUID, + const OFBool reportWarnings) const { OFCondition result = DSRCompositeReferenceValue::checkSOPClassUID(sopClassUID); if (result.good()) @@ -701,6 +705,7 @@ /* check for all valid/known SOP classes (according to DICOM PS 3.6) */ if (!dcmIsImageStorageSOPClassUID(sopClassUID.c_str()) && !isSegmentationObject(sopClassUID)) { + REPORT_WARNING("Invalid or unknown image SOP class referenced from IMAGE content item") result = SR_EC_InvalidValue; } } @@ -708,35 +713,40 @@ } -OFCondition DSRImageReferenceValue::checkPresentationState(const DSRCompositeReferenceValue &referenceValue) const +OFCondition DSRImageReferenceValue::checkPresentationState(const DSRCompositeReferenceValue &referenceValue, + const OFBool reportWarnings) const { OFCondition result = EC_Normal; /* the reference to a presentation state object is optional, so an empty value is also valid */ if (!referenceValue.isEmpty()) { if (DSRTypes::sopClassUIDToPresentationStateType(referenceValue.getSOPClassUID()) == DSRTypes::PT_invalid) + { + REPORT_WARNING("Invalid or unknown presentation state SOP class referenced from IMAGE content item") result = SR_EC_InvalidValue; + } } return result; } -OFCondition DSRImageReferenceValue::checkRealWorldValueMapping(const DSRCompositeReferenceValue &referenceValue) const +OFCondition DSRImageReferenceValue::checkRealWorldValueMapping(const DSRCompositeReferenceValue &referenceValue, + const OFBool reportWarnings) const { OFCondition result = EC_Normal; /* the reference to a real world value mapping object is optional, so an empty value is also valid */ if (!referenceValue.isEmpty()) { if (referenceValue.getSOPClassUID() != UID_RealWorldValueMappingStorage) + { + REPORT_WARNING("Invalid or unknown real world value mapping SOP class referenced from IMAGE content item") result = SR_EC_InvalidValue; + } } return result; } -// helper macro to avoid annoying check of boolean flag -#define REPORT_WARNING(msg) { if (reportWarnings) DCMSR_WARN(msg); } - OFCondition DSRImageReferenceValue::checkListData(const OFString &sopClassUID, const DSRImageFrameList &frameList, const DSRImageSegmentList &segmentList, @@ -760,14 +770,14 @@ } -OFCondition DSRImageReferenceValue::checkCurrentValue() const +OFCondition DSRImageReferenceValue::checkCurrentValue(const OFBool reportWarnings) const { - OFCondition result = DSRCompositeReferenceValue::checkCurrentValue(); + OFCondition result = DSRCompositeReferenceValue::checkCurrentValue(reportWarnings); if (result.good()) - result = checkPresentationState(PresentationState); + result = checkPresentationState(PresentationState, reportWarnings); if (result.good()) - result = checkRealWorldValueMapping(RealWorldValueMapping); + result = checkRealWorldValueMapping(RealWorldValueMapping, reportWarnings); if (result.good()) - result = checkListData(SOPClassUID, FrameList, SegmentList); + result = checkListData(SOPClassUID, FrameList, SegmentList, reportWarnings); return result; } diff -Nru dcmtk-3.6.6/dcmsr/libsrc/dsrimpcc.cc dcmtk-3.6.7/dcmsr/libsrc/dsrimpcc.cc --- dcmtk-3.6.6/dcmsr/libsrc/dsrimpcc.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmsr/libsrc/dsrimpcc.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2010-2015, OFFIS e.V. + * Copyright (C) 2010-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -77,16 +77,16 @@ /* row 1 of the table */ if ((relationshipType == RT_contains) && (sourceValueType == VT_Container)) { - result = (targetValueType == VT_Text) || (targetValueType == VT_Code) || (targetValueType == VT_Num) || + result = (targetValueType == VT_Text) || (targetValueType == VT_Code) || (targetValueType == VT_Num) || (targetValueType == VT_UIDRef) || (targetValueType == VT_Composite) || (targetValueType == VT_Image) || (targetValueType == VT_Container); } /* row 2 of the table */ else if ((relationshipType == RT_hasObsContext) && (sourceValueType == VT_Container)) { - result = (targetValueType == VT_Text) || (targetValueType == VT_Code) || (targetValueType == VT_Num) || - (targetValueType == VT_Date) || (targetValueType == VT_UIDRef) || (targetValueType == VT_PName) || - (targetValueType == VT_Composite); + result = (targetValueType == VT_Text) || (targetValueType == VT_Code) || (targetValueType == VT_Num) || + (targetValueType == VT_Date) || (targetValueType == VT_UIDRef) || (targetValueType == VT_PName) || + (targetValueType == VT_Composite) || (targetValueType == VT_Container) /* see CP-2084 */; } /* row 3 of the table */ else if (relationshipType == RT_hasConceptMod) @@ -95,7 +95,7 @@ } /* row 4 of the table */ else if ((relationshipType == RT_hasProperties) && - ((sourceValueType == VT_Text) || (sourceValueType == VT_Code) || (sourceValueType == VT_Num) || + ((sourceValueType == VT_Text) || (sourceValueType == VT_Code) || (sourceValueType == VT_Num) || (sourceValueType == VT_Image) || (sourceValueType == VT_UIDRef) || (sourceValueType == VT_Composite))) { result = (targetValueType == VT_Composite); diff -Nru dcmtk-3.6.6/dcmsr/libsrc/dsrkeycc.cc dcmtk-3.6.7/dcmsr/libsrc/dsrkeycc.cc --- dcmtk-3.6.6/dcmsr/libsrc/dsrkeycc.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmsr/libsrc/dsrkeycc.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2003-2015, OFFIS e.V. + * Copyright (C) 2003-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -77,14 +77,14 @@ /* row 1 of the table */ if ((relationshipType == RT_contains) && (sourceValueType == VT_Container)) { - result = (targetValueType == VT_Text) || (targetValueType == VT_Image) || - (targetValueType == VT_Waveform) || (targetValueType == VT_Composite); + result = (targetValueType == VT_Text) || (targetValueType == VT_Image) || (targetValueType == VT_Waveform) || + (targetValueType == VT_Composite); } /* row 2 of the table */ else if ((relationshipType == RT_hasObsContext) && (sourceValueType == VT_Container)) { - result = (targetValueType == VT_Text) || (targetValueType == VT_Code) || - (targetValueType == VT_UIDRef) || (targetValueType == VT_PName); + result = (targetValueType == VT_Text) || (targetValueType == VT_Code) || (targetValueType == VT_UIDRef) || + (targetValueType == VT_PName) || (targetValueType == VT_Container) /* see CP-2084 */; } /* row 3 of the table */ else if ((relationshipType == RT_hasConceptMod) && (sourceValueType == VT_Container)) diff -Nru dcmtk-3.6.6/dcmsr/libsrc/dsrmaccc.cc dcmtk-3.6.7/dcmsr/libsrc/dsrmaccc.cc --- dcmtk-3.6.6/dcmsr/libsrc/dsrmaccc.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmsr/libsrc/dsrmaccc.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2010-2015, OFFIS e.V. + * Copyright (C) 2010-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -77,15 +77,15 @@ /* row 1 of the table */ if ((relationshipType == RT_hasObsContext) && (sourceValueType == VT_Container)) { - result = (targetValueType == VT_Code) || (targetValueType == VT_PName) || - (targetValueType == VT_Text) || (targetValueType == VT_UIDRef) || - (targetValueType == VT_Date) || (targetValueType == VT_Num); + result = (targetValueType == VT_Code) || (targetValueType == VT_PName) || (targetValueType == VT_Text) || + (targetValueType == VT_UIDRef) || (targetValueType == VT_Date) || (targetValueType == VT_Num) || + (targetValueType == VT_Container) /* see CP-2084 */; } /* row 2 of the table */ else if ((relationshipType == RT_contains) && (sourceValueType == VT_Container)) { - result = (targetValueType == VT_Container) || (targetValueType == VT_Num) || - (targetValueType == VT_Text) || (targetValueType == VT_Code); + result = (targetValueType == VT_Container) || (targetValueType == VT_Num) || (targetValueType == VT_Text) || + (targetValueType == VT_Code); } /* row 3 of the table */ else if (relationshipType == RT_hasConceptMod) diff -Nru dcmtk-3.6.6/dcmsr/libsrc/dsrmamcc.cc dcmtk-3.6.7/dcmsr/libsrc/dsrmamcc.cc --- dcmtk-3.6.6/dcmsr/libsrc/dsrmamcc.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmsr/libsrc/dsrmamcc.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2003-2015, OFFIS e.V. + * Copyright (C) 2003-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -86,11 +86,16 @@ (targetValueType == VT_Date) || (targetValueType == VT_Time) || (targetValueType == VT_PName) || (targetValueType == VT_UIDRef) || (targetValueType == VT_Composite); } + /* new row introduced with CP-2084 */ + else if ((relationshipType == RT_hasObsContext) && (sourceValueType == VT_Container)) + { + result = (targetValueType == VT_Container); + } /* row 3 of the table */ else if ((relationshipType == RT_hasAcqContext) && !byReference && (sourceValueType == VT_Image)) { result = (targetValueType == VT_Text) || (targetValueType == VT_Code) || (targetValueType == VT_Date) || - (targetValueType == VT_Time) || (targetValueType == VT_Num); + (targetValueType == VT_Time) || (targetValueType == VT_Num) || (targetValueType == VT_UIDRef) /* see CP-2053 */; } /* row 4 of the table */ else if ((relationshipType == RT_hasConceptMod) && !byReference && diff -Nru dcmtk-3.6.6/dcmsr/libsrc/dsrnumvl.cc dcmtk-3.6.7/dcmsr/libsrc/dsrnumvl.cc --- dcmtk-3.6.6/dcmsr/libsrc/dsrnumvl.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmsr/libsrc/dsrnumvl.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2000-2017, OFFIS e.V. + * Copyright (C) 2000-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -163,7 +163,7 @@ OFBool DSRNumericMeasurementValue::isComplete() const { - /* officially, the NumericValueQualifierCodeSequence is optional (type 3) */ + /* the NumericValueQualifierCodeSequence is conditional (type 1C) */ return (!NumericValue.empty() && MeasurementUnit.isComplete()) || ValueQualifier.isComplete(); } @@ -215,7 +215,7 @@ result = EC_Normal; if (result.good()) { - /* get "qualifier" element (optional, do not report if absent or erroneous) */ + /* get "qualifier" element (conditional, do not report if absent or erroneous) */ ValueQualifier.readXML(doc, doc.getNamedNode(cursor, "qualifier", OFFalse /*required*/), flags); } if (!isValid()) @@ -340,8 +340,8 @@ } if (result.good()) { - /* read NumericValueQualifierCodeSequence (optional) */ - ValueQualifier.readSequence(dataset, DCM_NumericValueQualifierCodeSequence, "3" /*type*/, flags); + /* read NumericValueQualifierCodeSequence (conditional) */ + ValueQualifier.readSequence(dataset, DCM_NumericValueQualifierCodeSequence, "1C" /*type*/, flags); } return result; } @@ -379,7 +379,7 @@ } if (result.good()) { - /* write NumericValueQualifierCodeSequence (optional) */ + /* write NumericValueQualifierCodeSequence (conditional) */ if (!ValueQualifier.isEmpty()) ValueQualifier.writeSequence(dataset, DCM_NumericValueQualifierCodeSequence); } @@ -554,6 +554,12 @@ } if (result.good()) { + /* make sure that at least one of the two values is non-empty */ + if (numericValue.empty() && valueQualifier.isEmpty()) + result = EC_IllegalParameter; + } + if (result.good()) + { NumericValue = numericValue; MeasurementUnit = measurementUnit; ValueQualifier = valueQualifier; @@ -730,20 +736,33 @@ OFCondition DSRNumericMeasurementValue::checkCurrentValue() const { - OFCondition result = checkNumericValue(NumericValue); - if (result.good()) - result = checkMeasurementUnit(MeasurementUnit); - if (result.good()) - result = checkNumericValueQualifier(ValueQualifier); - if (result.good()) + OFCondition result = EC_Normal; + /* numeric value is empty (i.e. unknown) */ + if (NumericValue.empty()) { - Sint32 numeratorValue; - Uint32 denominatorValue; - result = getRationalRepresentation(numeratorValue, denominatorValue); + /* numeric value qualifier should not be empty */ + if (ValueQualifier.isEmpty()) + result = SR_EC_InvalidValue; + else + result = checkNumericValueQualifier(ValueQualifier); + /* tbc: should additional representations be absent? */ + } else { + /* numeric value is not empty */ + result = checkNumericValue(NumericValue); if (result.good()) - result = checkRationalRepresentation(numeratorValue, denominatorValue); - else if (result == SR_EC_RepresentationNotAvailable) - result = EC_Normal; + result = checkMeasurementUnit(MeasurementUnit); + if (result.good()) + result = checkNumericValueQualifier(ValueQualifier); + if (result.good()) + { + Sint32 numeratorValue; + Uint32 denominatorValue; + result = getRationalRepresentation(numeratorValue, denominatorValue); + if (result.good()) + result = checkRationalRepresentation(numeratorValue, denominatorValue); + else if (result == SR_EC_RepresentationNotAvailable) + result = EC_Normal; + } } return result; } diff -Nru dcmtk-3.6.6/dcmsr/libsrc/dsrpficc.cc dcmtk-3.6.7/dcmsr/libsrc/dsrpficc.cc --- dcmtk-3.6.6/dcmsr/libsrc/dsrpficc.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmsr/libsrc/dsrpficc.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2019, J. Riesmeier, Oldenburg, Germany + * Copyright (C) 2019-2021, J. Riesmeier, Oldenburg, Germany * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation are maintained by @@ -90,6 +90,11 @@ (targetValueType == VT_DateTime) || (targetValueType == VT_Date) || (targetValueType == VT_UIDRef) || (targetValueType == VT_PName) || (targetValueType == VT_Composite); } + /* new row introduced with CP-2084 */ + else if ((relationshipType == RT_hasObsContext) && (sourceValueType == VT_Container)) + { + result = (targetValueType == VT_Container); + } /* row 3 of the table */ else if ((relationshipType == RT_hasAcqContext) && ((sourceValueType == VT_Container) || (sourceValueType == VT_Image) || (sourceValueType == VT_Waveform) || diff -Nru dcmtk-3.6.6/dcmsr/libsrc/dsrplicc.cc dcmtk-3.6.7/dcmsr/libsrc/dsrplicc.cc --- dcmtk-3.6.6/dcmsr/libsrc/dsrplicc.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmsr/libsrc/dsrplicc.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2019, J. Riesmeier, Oldenburg, Germany + * Copyright (C) 2019-2021, J. Riesmeier, Oldenburg, Germany * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation are maintained by @@ -89,6 +89,11 @@ (targetValueType == VT_DateTime) || (targetValueType == VT_Date) || (targetValueType == VT_UIDRef) || (targetValueType == VT_PName); } + /* new row introduced with CP-2084 */ + else if ((relationshipType == RT_hasObsContext) && (sourceValueType == VT_Container)) + { + result = (targetValueType == VT_Container); + } /* row 3 of the table */ else if ((relationshipType == RT_hasAcqContext) && ((sourceValueType == VT_Container) || (sourceValueType == VT_Num))) diff -Nru dcmtk-3.6.6/dcmsr/libsrc/dsrprdcc.cc dcmtk-3.6.7/dcmsr/libsrc/dsrprdcc.cc --- dcmtk-3.6.6/dcmsr/libsrc/dsrprdcc.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmsr/libsrc/dsrprdcc.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2017, J. Riesmeier, Oldenburg, Germany + * Copyright (C) 2017-2021, J. Riesmeier, Oldenburg, Germany * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation are maintained by @@ -78,31 +78,31 @@ /* row 1 of the table */ if ((relationshipType == RT_contains) && (sourceValueType == VT_Container)) { - result = (targetValueType == VT_Text) || (targetValueType == VT_Code) || (targetValueType == VT_Num) || - (targetValueType == VT_DateTime) || (targetValueType == VT_UIDRef) || (targetValueType == VT_PName) || - (targetValueType == VT_Image) || (targetValueType == VT_Composite) || (targetValueType == VT_Container); + result = (targetValueType == VT_Text) || (targetValueType == VT_Code) || (targetValueType == VT_Num) || + (targetValueType == VT_DateTime) || (targetValueType == VT_UIDRef) || (targetValueType == VT_PName) || + (targetValueType == VT_Image) || (targetValueType == VT_Composite) || (targetValueType == VT_Container); } /* row 2 of the table */ else if ((relationshipType == RT_hasObsContext) && (sourceValueType == VT_Container)) { - result = (targetValueType == VT_DateTime) || (targetValueType == VT_Code) || (targetValueType == VT_Text) || - (targetValueType == VT_UIDRef) || (targetValueType == VT_PName); + result = (targetValueType == VT_DateTime) || (targetValueType == VT_Code) || (targetValueType == VT_Text) || + (targetValueType == VT_UIDRef) || (targetValueType == VT_PName) || (targetValueType == VT_Container) /* see CP-2084 */; } /* row 3 of the table */ else if ((relationshipType == RT_hasObsContext) && ((sourceValueType == VT_Text) || (sourceValueType == VT_Code) || (sourceValueType == VT_Num) || (sourceValueType == VT_Composite))) { - result = (targetValueType == VT_Text) || (targetValueType == VT_Code) || (targetValueType == VT_Num) || - (targetValueType == VT_DateTime) || (targetValueType == VT_UIDRef) || (targetValueType == VT_PName) || - (targetValueType == VT_Composite); + result = (targetValueType == VT_Text) || (targetValueType == VT_Code) || (targetValueType == VT_Num) || + (targetValueType == VT_DateTime) || (targetValueType == VT_UIDRef) || (targetValueType == VT_PName) || + (targetValueType == VT_Composite); } /* row 4 of the table */ else if ((relationshipType == RT_hasAcqContext) && ((sourceValueType == VT_Container) || (sourceValueType == VT_Image) || (sourceValueType == VT_Composite))) { - result = (targetValueType == VT_Text) || (targetValueType == VT_Code) || (targetValueType == VT_Num) || - (targetValueType == VT_DateTime) || (targetValueType == VT_UIDRef) || (targetValueType == VT_PName) || - (targetValueType == VT_Container); + result = (targetValueType == VT_Text) || (targetValueType == VT_Code) || (targetValueType == VT_Num) || + (targetValueType == VT_DateTime) || (targetValueType == VT_UIDRef) || (targetValueType == VT_PName) || + (targetValueType == VT_Container); } /* row 5 of the table */ else if (relationshipType == RT_hasConceptMod) @@ -113,24 +113,24 @@ else if ((relationshipType == RT_hasProperties) && ((sourceValueType == VT_Text) || (sourceValueType == VT_Code) || (sourceValueType == VT_Num) || (sourceValueType == VT_Composite))) { - result = (targetValueType == VT_Text) || (targetValueType == VT_Code) || (targetValueType == VT_Num) || - (targetValueType == VT_DateTime) || (targetValueType == VT_UIDRef) || (targetValueType == VT_PName) || - (targetValueType == VT_Image) || (targetValueType == VT_Composite) || (targetValueType == VT_Container); + result = (targetValueType == VT_Text) || (targetValueType == VT_Code) || (targetValueType == VT_Num) || + (targetValueType == VT_DateTime) || (targetValueType == VT_UIDRef) || (targetValueType == VT_PName) || + (targetValueType == VT_Image) || (targetValueType == VT_Composite) || (targetValueType == VT_Container); } /* row 7 of the table */ else if ((relationshipType == RT_hasProperties) && (sourceValueType == VT_PName)) { result = (targetValueType == VT_Text) || (targetValueType == VT_Code) || (targetValueType == VT_DateTime) || - (targetValueType == VT_Date) || (targetValueType == VT_Time) || (targetValueType == VT_UIDRef) || - (targetValueType == VT_PName); + (targetValueType == VT_Date) || (targetValueType == VT_Time) || (targetValueType == VT_UIDRef) || + (targetValueType == VT_PName); } /* row 8 of the table */ else if ((relationshipType == RT_inferredFrom) && ((sourceValueType == VT_Text) || (sourceValueType == VT_Code) || (sourceValueType == VT_Num))) { - result = (targetValueType == VT_Text) || (targetValueType == VT_Code) || (targetValueType == VT_Num) || - (targetValueType == VT_DateTime) || (targetValueType == VT_UIDRef) || (targetValueType == VT_Image) || - (targetValueType == VT_Composite) || (targetValueType == VT_Container); + result = (targetValueType == VT_Text) || (targetValueType == VT_Code) || (targetValueType == VT_Num) || + (targetValueType == VT_DateTime) || (targetValueType == VT_UIDRef) || (targetValueType == VT_Image) || + (targetValueType == VT_Composite) || (targetValueType == VT_Container); } } return result; diff -Nru dcmtk-3.6.6/dcmsr/libsrc/dsrprocc.cc dcmtk-3.6.7/dcmsr/libsrc/dsrprocc.cc --- dcmtk-3.6.6/dcmsr/libsrc/dsrprocc.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmsr/libsrc/dsrprocc.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2003-2015, OFFIS e.V. + * Copyright (C) 2003-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -87,6 +87,11 @@ result = (targetValueType == VT_Text) || (targetValueType == VT_Code) || (targetValueType == VT_Num) || (targetValueType == VT_DateTime) || (targetValueType == VT_UIDRef) || (targetValueType == VT_PName); } + /* new row introduced with CP-2084 */ + else if ((relationshipType == RT_hasObsContext) && (sourceValueType == VT_Container)) + { + result = (targetValueType == VT_Container); + } /* row 3 of the table */ else if ((relationshipType == RT_hasAcqContext) && ((sourceValueType == VT_Container) || (sourceValueType == VT_Image) || (sourceValueType == VT_Waveform) || (sourceValueType == VT_Composite))) diff -Nru dcmtk-3.6.6/dcmsr/libsrc/dsrrrdcc.cc dcmtk-3.6.7/dcmsr/libsrc/dsrrrdcc.cc --- dcmtk-3.6.6/dcmsr/libsrc/dsrrrdcc.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmsr/libsrc/dsrrrdcc.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2014-2019, J. Riesmeier, Oldenburg, Germany + * Copyright (C) 2014-2021, J. Riesmeier, Oldenburg, Germany * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation are maintained by @@ -88,6 +88,11 @@ result = (targetValueType == VT_Text) || (targetValueType == VT_Code) || (targetValueType == VT_Num) || (targetValueType == VT_DateTime) || (targetValueType == VT_UIDRef) || (targetValueType == VT_PName); } + /* new row introduced with CP-2084 */ + else if ((relationshipType == RT_hasObsContext) && (sourceValueType == VT_Container)) + { + result = (targetValueType == VT_Container); + } /* row 3 of the table */ else if ((relationshipType == RT_hasAcqContext) && (sourceValueType == VT_Container)) { diff -Nru dcmtk-3.6.6/dcmsr/libsrc/dsrrsdcc.cc dcmtk-3.6.7/dcmsr/libsrc/dsrrsdcc.cc --- dcmtk-3.6.6/dcmsr/libsrc/dsrrsdcc.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmsr/libsrc/dsrrsdcc.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2020, J. Riesmeier, Oldenburg, Germany + * Copyright (C) 2020-2021, J. Riesmeier, Oldenburg, Germany * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation are maintained by @@ -77,14 +77,14 @@ /* row 1 of the table */ if ((relationshipType == RT_contains) && (sourceValueType == VT_Container)) { - result = (targetValueType == VT_Text) || (targetValueType == VT_Image) || - (targetValueType == VT_Waveform) || (targetValueType == VT_Composite); + result = (targetValueType == VT_Text) || (targetValueType == VT_Image) || (targetValueType == VT_Waveform) || + (targetValueType == VT_Composite); } /* row 2 of the table */ else if ((relationshipType == RT_hasObsContext) && (sourceValueType == VT_Container)) { - result = (targetValueType == VT_Text) || (targetValueType == VT_Code) || - (targetValueType == VT_UIDRef) || (targetValueType == VT_PName); + result = (targetValueType == VT_Text) || (targetValueType == VT_Code) || (targetValueType == VT_UIDRef) || + (targetValueType == VT_PName) || (targetValueType == VT_Container) /* see CP-2084 */; } /* row 3 of the table */ else if ((relationshipType == RT_hasConceptMod) && (sourceValueType == VT_Container)) diff -Nru dcmtk-3.6.6/dcmsr/libsrc/dsrsaecc.cc dcmtk-3.6.7/dcmsr/libsrc/dsrsaecc.cc --- dcmtk-3.6.6/dcmsr/libsrc/dsrsaecc.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmsr/libsrc/dsrsaecc.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2016, J. Riesmeier, Oldenburg, Germany + * Copyright (C) 2016-2021, J. Riesmeier, Oldenburg, Germany * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation are maintained by @@ -77,22 +77,22 @@ /* row 1 of the table */ if ((relationshipType == RT_contains) && (sourceValueType == VT_Container)) { - result = (targetValueType == VT_Text) || (targetValueType == VT_Code) || (targetValueType == VT_Num) || + result = (targetValueType == VT_Text) || (targetValueType == VT_Code) || (targetValueType == VT_Num) || (targetValueType == VT_DateTime) || (targetValueType == VT_UIDRef) || (targetValueType == VT_PName) || (targetValueType == VT_Container); } /* row 2 of the table */ - else if ((relationshipType == RT_hasObsContext) && - ((sourceValueType == VT_Text) || (sourceValueType == VT_Code) || (sourceValueType == VT_Num))) + else if ((relationshipType == RT_hasObsContext) && ((sourceValueType == VT_Text) || (sourceValueType == VT_Code) || + (sourceValueType == VT_Num) || (sourceValueType == VT_Container) /* see CP-2084 */)) { - result = (targetValueType == VT_Text) || (targetValueType == VT_Code) || (targetValueType == VT_Num) || + result = (targetValueType == VT_Text) || (targetValueType == VT_Code) || (targetValueType == VT_Num) || (targetValueType == VT_DateTime) || (targetValueType == VT_UIDRef) || (targetValueType == VT_PName) || (targetValueType == VT_Composite); } /* row 3 of the table */ else if ((relationshipType == RT_hasAcqContext) && (sourceValueType == VT_Container)) { - result = (targetValueType == VT_Text) || (targetValueType == VT_Code) || (targetValueType == VT_Num) || + result = (targetValueType == VT_Text) || (targetValueType == VT_Code) || (targetValueType == VT_Num) || (targetValueType == VT_DateTime) || (targetValueType == VT_UIDRef) || (targetValueType == VT_PName) || (targetValueType == VT_Container); } @@ -105,7 +105,7 @@ else if ((relationshipType == RT_hasProperties) && ((sourceValueType == VT_Text) || (sourceValueType == VT_Code) || (sourceValueType == VT_Num))) { - result = (targetValueType == VT_Text) || (targetValueType == VT_Code) || (targetValueType == VT_Num) || + result = (targetValueType == VT_Text) || (targetValueType == VT_Code) || (targetValueType == VT_Num) || (targetValueType == VT_DateTime) || (targetValueType == VT_UIDRef) || (targetValueType == VT_PName) || (targetValueType == VT_Container); } @@ -113,9 +113,9 @@ else if ((relationshipType == RT_inferredFrom) && ((sourceValueType == VT_Text) || (sourceValueType == VT_Code) || (sourceValueType == VT_Num))) { - result = (targetValueType == VT_Text) || (targetValueType == VT_Code) || (targetValueType == VT_Num) || + result = (targetValueType == VT_Text) || (targetValueType == VT_Code) || (targetValueType == VT_Num) || (targetValueType == VT_DateTime) || (targetValueType == VT_UIDRef) || (targetValueType == VT_Container) || - (targetValueType == VT_Image) || (targetValueType == VT_SCoord) || (targetValueType == VT_Waveform) || + (targetValueType == VT_Image) || (targetValueType == VT_SCoord) || (targetValueType == VT_Waveform) || (targetValueType == VT_TCoord); } /* row 7 of the table */ diff -Nru dcmtk-3.6.6/dcmsr/libsrc/dsrsc3gr.cc dcmtk-3.6.7/dcmsr/libsrc/dsrsc3gr.cc --- dcmtk-3.6.6/dcmsr/libsrc/dsrsc3gr.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmsr/libsrc/dsrsc3gr.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2010-2018, OFFIS e.V. + * Copyright (C) 2010-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -76,11 +76,11 @@ while (iterator != endPos) { /* need to convert float to avoid problems with decimal point ('.' or ',') */ - OFStandard::ftoa(buffer, sizeof(buffer), (*iterator).XCoord, 0, 0, 8 /* FLT_DIG + 2 for DICOM FL */); + OFStandard::ftoa(buffer, sizeof(buffer), (*iterator).XCoord, 0, 0, 9 /* FLT_DECIMAL_DIG for DICOM FL */); stream << buffer << tripletSeparator; - OFStandard::ftoa(buffer, sizeof(buffer), (*iterator).YCoord, 0, 0, 8 /* FLT_DIG + 2 for DICOM FL */); + OFStandard::ftoa(buffer, sizeof(buffer), (*iterator).YCoord, 0, 0, 9 /* FLT_DECIMAL_DIG for DICOM FL */); stream << buffer << tripletSeparator; - OFStandard::ftoa(buffer, sizeof(buffer), (*iterator).ZCoord, 0, 0, 8 /* FLT_DIG + 2 for DICOM FL */); + OFStandard::ftoa(buffer, sizeof(buffer), (*iterator).ZCoord, 0, 0, 9 /* FLT_DECIMAL_DIG for DICOM FL */); stream << buffer; iterator++; if (iterator != endPos) diff -Nru dcmtk-3.6.6/dcmsr/libsrc/dsrscogr.cc dcmtk-3.6.7/dcmsr/libsrc/dsrscogr.cc --- dcmtk-3.6.6/dcmsr/libsrc/dsrscogr.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmsr/libsrc/dsrscogr.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2000-2018, OFFIS e.V. + * Copyright (C) 2000-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -76,9 +76,9 @@ while (iterator != endPos) { /* need to convert float to avoid problems with decimal point ('.' or ',') */ - OFStandard::ftoa(buffer, sizeof(buffer), (*iterator).Column, 0, 0, 8 /* FLT_DIG + 2 for DICOM FL */); + OFStandard::ftoa(buffer, sizeof(buffer), (*iterator).Column, 0, 0, 9 /* FLT_DECIMAL_DIG for DICOM FL */); stream << buffer << pairSeparator; - OFStandard::ftoa(buffer, sizeof(buffer), (*iterator).Row, 0, 0, 8 /* FLT_DIG + 2 for DICOM FL */); + OFStandard::ftoa(buffer, sizeof(buffer), (*iterator).Row, 0, 0, 9 /* FLT_DECIMAL_DIG for DICOM FL */); stream << buffer; iterator++; if (iterator != endPos) diff -Nru dcmtk-3.6.6/dcmsr/libsrc/dsrspecc.cc dcmtk-3.6.7/dcmsr/libsrc/dsrspecc.cc --- dcmtk-3.6.6/dcmsr/libsrc/dsrspecc.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmsr/libsrc/dsrspecc.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2010-2015, OFFIS e.V. + * Copyright (C) 2010-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -78,7 +78,7 @@ if ((relationshipType == RT_contains) && (sourceValueType == VT_Container)) { result = (targetValueType == VT_Container) || (targetValueType == VT_Code) || - (targetValueType == VT_Num) || (targetValueType == VT_Text); + (targetValueType == VT_Num) || (targetValueType == VT_Text); } } return result; diff -Nru dcmtk-3.6.6/dcmsr/libsrc/dsrtcosp.cc dcmtk-3.6.7/dcmsr/libsrc/dsrtcosp.cc --- dcmtk-3.6.6/dcmsr/libsrc/dsrtcosp.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmsr/libsrc/dsrtcosp.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2000-2017, OFFIS e.V. + * Copyright (C) 2000-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -28,10 +28,6 @@ #include "dcmtk/dcmdata/dcdeftag.h" #include "dcmtk/dcmdata/dcvrul.h" -#define INCLUDE_CSTDIO -#define INCLUDE_CINTTYPES -#include "dcmtk/ofstd/ofstdinc.h" - template<> const Uint32& DSRgetEmptyItem() diff -Nru dcmtk-3.6.6/dcmsr/libsrc/dsrtcoto.cc dcmtk-3.6.7/dcmsr/libsrc/dsrtcoto.cc --- dcmtk-3.6.6/dcmsr/libsrc/dsrtcoto.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmsr/libsrc/dsrtcoto.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2000-2018, OFFIS e.V. + * Copyright (C) 2000-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -29,9 +29,6 @@ #include "dcmtk/dcmdata/dcvrds.h" #include "dcmtk/ofstd/ofstd.h" -#define INCLUDE_CSTDIO -#include "dcmtk/ofstd/ofstdinc.h" - template<> const Float64& DSRgetEmptyItem() @@ -76,7 +73,7 @@ while (iterator != endPos) { /* need to convert float to avoid problems with decimal point ('.' or ',') */ - OFStandard::ftoa(buffer, sizeof(buffer), *iterator, 0 ,0, 17 /* DBL_DIG + 2 for DICOM FD */); + OFStandard::ftoa(buffer, sizeof(buffer), *iterator, 0, 0, 17 /* DBL_DECIMAL_DIG for DICOM FD */); stream << buffer; iterator++; if (iterator != endPos) diff -Nru dcmtk-3.6.6/dcmsr/libsrc/dsrtypes.cc dcmtk-3.6.7/dcmsr/libsrc/dsrtypes.cc --- dcmtk-3.6.6/dcmsr/libsrc/dsrtypes.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmsr/libsrc/dsrtypes.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2000-2020, OFFIS e.V. + * Copyright (C) 2000-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -69,11 +69,6 @@ #include "dcmtk/ofstd/ofstd.h" -#define INCLUDE_CSTDIO -#define INCLUDE_CCTYPE -#include "dcmtk/ofstd/ofstdinc.h" - - /*---------------------------------* * constant definitions (part 1) * *---------------------------------*/ @@ -335,6 +330,7 @@ {DSRTypes::DT_ColonCadSR, UID_ColonCADSRStorage, EM_EnhancedEquipment, "SR", "Colon CAD SR"}, {DSRTypes::DT_ProcedureLog, UID_ProcedureLogStorage, EM_Synchronization, "SR", "Procedure Log"}, {DSRTypes::DT_XRayRadiationDoseSR, UID_XRayRadiationDoseSRStorage, EM_EnhancedEquipment, "SR", "X-Ray Radiation Dose SR"}, + {DSRTypes::DT_EnhancedXRayRadiationDoseSR, UID_EnhancedXRayRadiationDoseSRStorage, EM_EnhancedEquipment, "SR", "Enhanced X-Ray Radiation Dose SR"}, {DSRTypes::DT_SpectaclePrescriptionReport, UID_SpectaclePrescriptionReportStorage, EM_EnhancedEquipment, "SR", "Spectacle Prescription Report"}, {DSRTypes::DT_MacularGridThicknessAndVolumeReport, UID_MacularGridThicknessAndVolumeReportStorage, EM_EnhancedEquipment, "SR", "Macular Grid Thickness and Volume Report"}, {DSRTypes::DT_ImplantationPlanSRDocument, UID_ImplantationPlanSRDocumentStorage, EM_EnhancedEquipment, "SR", "Implantation Plan SR Document"}, @@ -956,7 +952,7 @@ OFBool DSRTypes::isDocumentTypeSupported(const E_DocumentType documentType) { - return (documentType != DT_invalid) && (documentType != DT_ExtensibleSR); + return (documentType != DT_invalid) && (documentType != DT_ExtensibleSR) && (documentType != DT_EnhancedXRayRadiationDoseSR); } @@ -1555,6 +1551,9 @@ case DT_RenditionSelectionDocument: checker = new DSRRenditionSelectionDocumentConstraintChecker(); break; + case DT_EnhancedXRayRadiationDoseSR: + /* not yet supported */ + break; case DT_invalid: /* nothing to do */ break; diff -Nru dcmtk-3.6.6/dcmsr/libsrc/dsrwavch.cc dcmtk-3.6.7/dcmsr/libsrc/dsrwavch.cc --- dcmtk-3.6.6/dcmsr/libsrc/dsrwavch.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmsr/libsrc/dsrwavch.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2000-2017, OFFIS e.V. + * Copyright (C) 2000-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -29,10 +29,6 @@ #include "dcmtk/dcmdata/dcdeftag.h" #include "dcmtk/dcmdata/dcvrus.h" -#define INCLUDE_CSTDIO -#include "dcmtk/ofstd/ofstdinc.h" - - // global empty item object so it gets initialized and cleaned up by the linker const DSRWaveformChannelItem DSRWaveformChannelEmptyItem(0, 0); diff -Nru dcmtk-3.6.6/dcmsr/libsrc/dsrwavvl.cc dcmtk-3.6.7/dcmsr/libsrc/dsrwavvl.cc --- dcmtk-3.6.6/dcmsr/libsrc/dsrwavvl.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmsr/libsrc/dsrwavvl.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2000-2020, OFFIS e.V. + * Copyright (C) 2000-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -167,7 +167,11 @@ OFCondition result = DSRCompositeReferenceValue::readItem(dataset, flags); /* read ReferencedWaveformChannels (conditional) */ if (result.good()) + { ChannelList.read(dataset, flags); + /* check data and report warnings if any */ + checkCurrentValue(OFTrue /*reportWarnings*/); + } return result; } @@ -181,6 +185,8 @@ { if (!ChannelList.isEmpty()) result = ChannelList.write(dataset); + /* check data and report warnings if any */ + checkCurrentValue(OFTrue /*reportWarnings*/); } return result; } @@ -256,12 +262,16 @@ } -OFCondition DSRWaveformReferenceValue::checkSOPClassUID(const OFString &sopClassUID) const +// helper macro to avoid annoying check of boolean flag +#define REPORT_WARNING(msg) { if (reportWarnings) DCMSR_WARN(msg); } + +OFCondition DSRWaveformReferenceValue::checkSOPClassUID(const OFString &sopClassUID, + const OFBool reportWarnings) const { OFCondition result = DSRCompositeReferenceValue::checkSOPClassUID(sopClassUID); if (result.good()) { - /* check for all valid/known SOP classes (according to DICOM PS 3.6-2020c) */ + /* check for all valid/known SOP classes (according to DICOM PS 3.6-2021c) */ if ((sopClassUID != UID_TwelveLeadECGWaveformStorage) && (sopClassUID != UID_GeneralECGWaveformStorage) && (sopClassUID != UID_AmbulatoryECGWaveformStorage) && @@ -278,6 +288,7 @@ (sopClassUID != UID_SleepElectroencephalogramWaveformStorage) && (sopClassUID != UID_BodyPositionWaveformStorage)) { + REPORT_WARNING("Invalid or unknown waveform SOP class referenced from WAVEFORM content item") result = SR_EC_InvalidValue; } } diff -Nru dcmtk-3.6.6/dcmsr/libsrc/dsrxmld.cc dcmtk-3.6.7/dcmsr/libsrc/dsrxmld.cc --- dcmtk-3.6.6/dcmsr/libsrc/dsrxmld.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmsr/libsrc/dsrxmld.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2003-2019, OFFIS e.V. + * Copyright (C) 2003-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -25,9 +25,6 @@ #include "dcmtk/dcmsr/dsrxmld.h" -#define INCLUDE_CSTDARG -#include "dcmtk/ofstd/ofstdinc.h" - #ifdef WITH_LIBXML #include @@ -36,7 +33,11 @@ #endif /* LIBXML_SCHEMAS_ENABLED */ // This function is also used in xml2dcm, try to stay in sync! +#if defined(HAVE_VSNPRINTF) && defined(HAVE_PROTOTYPE_VSNPRINTF) extern "C" void errorFunction(void * ctx, const char *msg, ...) +#else +extern "C" void errorFunction(void * /* ctx */, const char *msg, ...) +#endif { OFLogger xmlLogger = OFLog::getLogger("dcmtk.dcmsr.libxml"); diff -Nru dcmtk-3.6.6/dcmsr/libsrc/dsrxrdcc.cc dcmtk-3.6.7/dcmsr/libsrc/dsrxrdcc.cc --- dcmtk-3.6.6/dcmsr/libsrc/dsrxrdcc.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmsr/libsrc/dsrxrdcc.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2005-2016, OFFIS e.V. + * Copyright (C) 2005-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -84,8 +84,8 @@ /* row 2 of the table */ else if ((relationshipType == RT_hasObsContext) && (sourceValueType == VT_Container)) { - result = (targetValueType == VT_Text) || (targetValueType == VT_Code) || (targetValueType == VT_DateTime) || - (targetValueType == VT_UIDRef) || (targetValueType == VT_PName); + result = (targetValueType == VT_Text) || (targetValueType == VT_Code) || (targetValueType == VT_DateTime) || + (targetValueType == VT_UIDRef) || (targetValueType == VT_PName) || (targetValueType == VT_Container) /* see CP-2084 */; } /* row 3 of the table */ else if ((relationshipType == RT_hasObsContext) && @@ -116,7 +116,7 @@ (targetValueType == VT_DateTime) || (targetValueType == VT_UIDRef) || (targetValueType == VT_PName) || (targetValueType == VT_Image) || (targetValueType == VT_Composite) || (targetValueType == VT_Container); } - /* row 7 of the table - introduced with CP-1076 */ + /* row 7 of the table */ else if ((relationshipType == RT_hasProperties) && (sourceValueType == VT_PName)) { result = (targetValueType == VT_Text) || (targetValueType == VT_Code) || (targetValueType == VT_DateTime) || diff -Nru dcmtk-3.6.6/dcmsr/libsrc/Makefile.dep dcmtk-3.6.7/dcmsr/libsrc/Makefile.dep --- dcmtk-3.6.6/dcmsr/libsrc/Makefile.dep 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmsr/libsrc/Makefile.dep 2022-04-28 13:47:25.000000000 +0000 @@ -4,12 +4,12 @@ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \ ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ @@ -62,12 +62,12 @@ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \ ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ @@ -120,12 +120,12 @@ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \ ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ @@ -178,12 +178,12 @@ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \ ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ @@ -236,12 +236,12 @@ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \ ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ @@ -319,12 +319,12 @@ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \ ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ @@ -384,12 +384,12 @@ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \ ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ @@ -458,12 +458,12 @@ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \ ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ @@ -516,12 +516,12 @@ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \ ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ @@ -573,12 +573,12 @@ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \ ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ @@ -640,12 +640,12 @@ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \ ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ @@ -703,12 +703,12 @@ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \ ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ @@ -769,12 +769,12 @@ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \ ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ @@ -837,12 +837,12 @@ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \ ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ @@ -921,12 +921,12 @@ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \ ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ @@ -979,12 +979,12 @@ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \ ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ @@ -1048,13 +1048,13 @@ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../include/dcmtk/dcmsr/dsrtncsr.h ../include/dcmtk/dcmsr/dsrtypes.h \ ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \ ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ @@ -1114,13 +1114,13 @@ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../include/dcmtk/dcmsr/dsrcodvl.h ../include/dcmtk/dcmsr/dsrtypes.h \ ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \ ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ @@ -1184,12 +1184,12 @@ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \ ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ @@ -1263,6 +1263,7 @@ ../../dcmdata/include/dcmtk/dcmdata/dcvrcs.h \ ../../dcmdata/include/dcmtk/dcmdata/dcbytstr.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrda.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcvrds.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvris.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrlo.h \ ../../dcmdata/include/dcmtk/dcmdata/dcchrstr.h \ @@ -1283,12 +1284,12 @@ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \ ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ @@ -1368,12 +1369,12 @@ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \ ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ @@ -1446,12 +1447,12 @@ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \ ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ @@ -1529,12 +1530,12 @@ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \ ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ @@ -1601,12 +1602,12 @@ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \ ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ @@ -1659,12 +1660,12 @@ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \ ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ @@ -1721,12 +1722,12 @@ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \ ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ @@ -1781,12 +1782,12 @@ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \ ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ @@ -1850,12 +1851,12 @@ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \ ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ @@ -1936,12 +1937,12 @@ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \ ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ @@ -1994,12 +1995,12 @@ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \ ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ @@ -2051,13 +2052,13 @@ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../include/dcmtk/dcmsr/dsrtncsr.h ../include/dcmtk/dcmsr/dsrtypes.h \ ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \ ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ @@ -2133,12 +2134,12 @@ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \ ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ @@ -2191,12 +2192,12 @@ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \ ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ @@ -2249,12 +2250,12 @@ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \ ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ @@ -2306,12 +2307,12 @@ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \ ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ @@ -2374,12 +2375,12 @@ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \ ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ @@ -2441,12 +2442,12 @@ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \ ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ @@ -2499,12 +2500,12 @@ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \ ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ @@ -2556,12 +2557,12 @@ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \ ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ @@ -2625,9 +2626,9 @@ ../../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/ofstring.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../../ofstd/include/dcmtk/ofstd/oflist.h \ ../include/dcmtk/dcmsr/dsrtypes.h \ @@ -2684,12 +2685,12 @@ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \ ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ @@ -2742,12 +2743,12 @@ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \ ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ @@ -2800,12 +2801,12 @@ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \ ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ @@ -2864,12 +2865,12 @@ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \ ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ @@ -2931,12 +2932,70 @@ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \ + ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ + ../../ofstd/include/dcmtk/ofstd/ofthread.h \ + ../../ofstd/include/dcmtk/ofstd/oftypes.h \ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ + ../../ofstd/include/dcmtk/ofstd/ofstream.h \ + ../../ofstd/include/dcmtk/ofstd/ofstring.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ + ../../ofstd/include/dcmtk/ofstd/ofcond.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcxfer.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 \ + ../../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/oftraits.h \ + ../../ofstd/include/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 \ + ../../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/dcitem.h \ + ../../ofstd/include/dcmtk/ofstd/offile.h \ + ../../ofstd/include/dcmtk/ofstd/ofstd.h \ + ../../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/dclist.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcpcache.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcsequen.h +dsrrsdcc.o: dsrrsdcc.cc ../../config/include/dcmtk/config/osconfig.h \ + ../include/dcmtk/dcmsr/dsrrsdcc.h ../include/dcmtk/dcmsr/dsriodcc.h \ + ../include/dcmtk/dcmsr/dsrtypes.h ../include/dcmtk/dcmsr/dsdefine.h \ + ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ + ../../ofstd/include/dcmtk/ofstd/ofcast.h \ + ../../ofstd/include/dcmtk/ofstd/ofexport.h \ ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \ ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ @@ -2990,12 +3049,12 @@ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \ ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ @@ -3072,12 +3131,12 @@ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \ ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ @@ -3130,12 +3189,12 @@ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \ ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ @@ -3190,12 +3249,12 @@ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \ ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ @@ -3257,12 +3316,12 @@ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \ ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ @@ -3320,12 +3379,12 @@ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \ ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ @@ -3380,12 +3439,12 @@ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \ ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ @@ -3447,12 +3506,12 @@ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \ ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ @@ -3510,12 +3569,12 @@ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \ ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ @@ -3579,12 +3638,12 @@ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \ ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ @@ -3638,12 +3697,12 @@ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \ ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ @@ -3718,12 +3777,12 @@ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \ ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ @@ -3777,12 +3836,12 @@ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \ ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ @@ -3842,12 +3901,12 @@ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \ ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ @@ -3902,12 +3961,12 @@ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \ ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ @@ -3970,12 +4029,12 @@ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \ ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ @@ -4032,12 +4091,12 @@ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \ ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ @@ -4093,12 +4152,12 @@ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \ ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ @@ -4162,12 +4221,12 @@ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \ ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ @@ -4231,12 +4290,12 @@ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \ ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ @@ -4315,12 +4374,12 @@ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \ ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ @@ -4375,12 +4434,12 @@ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \ ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ @@ -4462,6 +4521,7 @@ ../include/dcmtk/dcmsr/dsrrrdcc.h ../include/dcmtk/dcmsr/dsracqcc.h \ ../include/dcmtk/dcmsr/dsrsaecc.h ../include/dcmtk/dcmsr/dsrprdcc.h \ ../include/dcmtk/dcmsr/dsrpficc.h ../include/dcmtk/dcmsr/dsrplicc.h \ + ../include/dcmtk/dcmsr/dsrrsdcc.h \ ../../dcmdata/include/dcmtk/dcmdata/dcuid.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrda.h \ ../../dcmdata/include/dcmtk/dcmdata/dcbytstr.h \ @@ -4477,12 +4537,12 @@ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \ ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ @@ -4546,12 +4606,12 @@ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \ ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ @@ -4607,12 +4667,12 @@ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \ ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ @@ -4675,12 +4735,12 @@ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \ ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ @@ -4736,8 +4796,8 @@ ../../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/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h dsrxmld.o: dsrxmld.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmsr/dsrxmld.h ../include/dcmtk/dcmsr/dsrtypes.h \ @@ -4745,12 +4805,12 @@ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \ ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ @@ -4804,12 +4864,12 @@ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \ ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ diff -Nru dcmtk-3.6.6/dcmsr/tests/CMakeLists.txt dcmtk-3.6.7/dcmsr/tests/CMakeLists.txt --- dcmtk-3.6.6/dcmsr/tests/CMakeLists.txt 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmsr/tests/CMakeLists.txt 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,16 @@ # declare executables -DCMTK_ADD_EXECUTABLE(mkreport mkreport) -DCMTK_ADD_EXECUTABLE(dcmsr_tests tests tsrtree tsrdoctr tsrdoc tsrcodvl tsrnumvl tsrtpl tsrcmr tsrlist) +DCMTK_ADD_EXECUTABLE(mkreport mkreport.cc) +DCMTK_ADD_EXECUTABLE(dcmsr_tests + tests.cc + tsrcmr.cc + tsrcodvl.cc + tsrdoc.cc + tsrdoctr.cc + tsrlist.cc + tsrnumvl.cc + tsrtpl.cc + tsrtree.cc +) # make sure executables are linked to the corresponding libraries DCMTK_TARGET_LINK_MODULES(mkreport dcmsr dcmimage dcmimgle dcmdata oflog ofstd) diff -Nru dcmtk-3.6.6/dcmsr/tests/Makefile.dep dcmtk-3.6.7/dcmsr/tests/Makefile.dep --- dcmtk-3.6.6/dcmsr/tests/Makefile.dep 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmsr/tests/Makefile.dep 2022-04-28 13:47:25.000000000 +0000 @@ -1,12 +1,12 @@ mkreport.o: mkreport.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofconsol.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.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/ofstring.h \ ../include/dcmtk/dcmsr/dsrdoc.h ../include/dcmtk/dcmsr/dsrdoctr.h \ ../include/dcmtk/dcmsr/dsrdocst.h ../include/dcmtk/dcmsr/dsrtree.h \ @@ -85,6 +85,7 @@ ../../dcmdata/include/dcmtk/dcmdata/dcvrcs.h \ ../../dcmdata/include/dcmtk/dcmdata/dcbytstr.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrda.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcvrds.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvris.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrlo.h \ ../../dcmdata/include/dcmtk/dcmdata/dcchrstr.h \ @@ -113,7 +114,6 @@ ../../dcmdata/include/dcmtk/dcmdata/dcofsetl.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrae.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvras.h \ - ../../dcmdata/include/dcmtk/dcmdata/dcvrds.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrdt.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrur.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrlt.h \ @@ -247,6 +247,8 @@ ../../dcmdata/include/dcmtk/dcmdata/dcstack.h \ ../../dcmdata/include/dcmtk/dcmdata/dclist.h \ ../../dcmdata/include/dcmtk/dcmdata/dcpcache.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcdict.h \ + ../../dcmdata/include/dcmtk/dcmdata/dchashdi.h \ ../include/dcmtk/dcmsr/dsrdoc.h ../include/dcmtk/dcmsr/dsrdoctr.h \ ../include/dcmtk/dcmsr/dsrdocst.h ../include/dcmtk/dcmsr/dsrtree.h \ ../include/dcmtk/dcmsr/dsrtypes.h ../include/dcmtk/dcmsr/dsdefine.h \ @@ -278,6 +280,7 @@ ../../dcmdata/include/dcmtk/dcmdata/dcvrcs.h \ ../../dcmdata/include/dcmtk/dcmdata/dcbytstr.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrda.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcvrds.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvris.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrlo.h \ ../../dcmdata/include/dcmtk/dcmdata/dcchrstr.h \ @@ -383,6 +386,8 @@ ../../dcmdata/include/dcmtk/dcmdata/dcstack.h \ ../../dcmdata/include/dcmtk/dcmdata/dclist.h \ ../../dcmdata/include/dcmtk/dcmdata/dcpcache.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcdict.h \ + ../../dcmdata/include/dcmtk/dcmdata/dchashdi.h \ ../include/dcmtk/dcmsr/dsrcodvl.h ../include/dcmtk/dcmsr/dsrtypes.h \ ../include/dcmtk/dcmsr/dsdefine.h \ ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \ @@ -479,6 +484,7 @@ ../../dcmdata/include/dcmtk/dcmdata/dcvrcs.h \ ../../dcmdata/include/dcmtk/dcmdata/dcbytstr.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrda.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcvrds.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvris.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrlo.h \ ../../dcmdata/include/dcmtk/dcmdata/dcchrstr.h \ @@ -578,6 +584,7 @@ ../../dcmdata/include/dcmtk/dcmdata/dcvrcs.h \ ../../dcmdata/include/dcmtk/dcmdata/dcbytstr.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrda.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcvrds.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvris.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrlo.h \ ../../dcmdata/include/dcmtk/dcmdata/dcchrstr.h \ @@ -805,6 +812,7 @@ ../../dcmdata/include/dcmtk/dcmdata/dcvrcs.h \ ../../dcmdata/include/dcmtk/dcmdata/dcbytstr.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrda.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcvrds.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvris.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrlo.h \ ../../dcmdata/include/dcmtk/dcmdata/dcchrstr.h \ diff -Nru dcmtk-3.6.6/dcmsr/tests/mkreport.cc dcmtk-3.6.7/dcmsr/tests/mkreport.cc --- dcmtk-3.6.6/dcmsr/tests/mkreport.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmsr/tests/mkreport.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2000-2019, OFFIS e.V. + * Copyright (C) 2000-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -185,7 +185,8 @@ OFString filename = "report"; filename += array[i]; filename += ".dcm"; - fileformat->saveFile(filename.c_str(), EXS_LittleEndianExplicit); + if (fileformat->saveFile(filename, EXS_LittleEndianExplicit).bad()) + CERR << "ERROR: could not save dataset to file '" << filename << "'" << OFendl; } else CERR << "ERROR: could not write SR document into dataset" << OFendl; } diff -Nru dcmtk-3.6.6/dcmsr/tests/tests.cc dcmtk-3.6.7/dcmsr/tests/tests.cc --- dcmtk-3.6.6/dcmsr/tests/tests.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmsr/tests/tests.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2012-2019, OFFIS e.V. + * Copyright (C) 2012-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -65,6 +65,7 @@ OFTEST_REGISTER(dcmsr_extractDocSubTree_2); OFTEST_REGISTER(dcmsr_extractAndInsertDocSubTree_1); OFTEST_REGISTER(dcmsr_extractAndInsertDocSubTree_2); +OFTEST_REGISTER(dcmsr_setAndGetPatientData); OFTEST_REGISTER(dcmsr_setSpecificCharacterSet); OFTEST_REGISTER(dcmsr_changeDocumentType_1); OFTEST_REGISTER(dcmsr_changeDocumentType_2); @@ -83,6 +84,9 @@ OFTEST_REGISTER(dcmsr_compareCodedEntry); OFTEST_REGISTER(dcmsr_useBasicCodedEntry); OFTEST_REGISTER(dcmsr_setNumericMeasurementValue); +OFTEST_REGISTER(dcmsr_emptyMeasurementValueSequence); +OFTEST_REGISTER(dcmsr_setAndGetFloatingPointRepresentation); +OFTEST_REGISTER(dcmsr_setAndGetRationalRepresentation); OFTEST_REGISTER(dcmsr_CID29e_AcquisitionModality); OFTEST_REGISTER(dcmsr_CID42_NumericValueQualifier); OFTEST_REGISTER(dcmsr_CID244e_Laterality); @@ -94,6 +98,7 @@ OFTEST_REGISTER(dcmsr_TID1204_LanguageOfContentItemAndDescendants); OFTEST_REGISTER(dcmsr_TID1411_VolumetricROIMeasurements); OFTEST_REGISTER(dcmsr_TID1500_MeasurementReport); +OFTEST_REGISTER(dcmsr_TID1500_MeasurementReport_minimal); OFTEST_REGISTER(dcmsr_TID1501_MeasurementGroup); OFTEST_REGISTER(dcmsr_TID1600_ImageLibrary); OFTEST_REGISTER(dcmsr_CMR_SRNumericMeasurementValue); diff -Nru dcmtk-3.6.6/dcmsr/tests/tsrcmr.cc dcmtk-3.6.7/dcmsr/tests/tsrcmr.cc --- dcmtk-3.6.6/dcmsr/tests/tsrcmr.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmsr/tests/tsrcmr.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2015-2020, J. Riesmeier, Oldenburg, Germany + * Copyright (C) 2015-2021, J. Riesmeier, Oldenburg, Germany * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation are maintained by @@ -297,9 +297,12 @@ /* set details on the observation context */ OFCHECK(report.getObservationContext().addPersonObserver("Doe^Jane", "Some Organization").good()); /* create new image library (only needed after clear) */ + OFCHECK(report.hasImageLibrary(OFFalse /*checkChildren*/)); + OFCHECK(!report.hasImageLibrary(OFTrue /*checkChildren*/)); OFCHECK(report.getImageLibrary().createNewImageLibrary().good()); + OFCHECK(report.hasImageLibrary(OFFalse /*checkChildren*/)); + OFCHECK(report.hasImageLibrary(OFTrue /*checkChildren*/)); /* set two values for "procedure reported" */ - OFCHECK(!report.isValid()); OFCHECK(!report.hasProcedureReported()); OFCHECK(report.addProcedureReported(CMR_CID100::PETWholeBody).good()); OFCHECK(report.addProcedureReported(DSRCodedEntryValue("4711", "99TEST", "Some other test code")).good()); @@ -358,7 +361,7 @@ OFCHECK(volMeasurements.setRealWorldValueMap(dataset).good()); OFCHECK(volMeasurements.addFindingSite(CODE_SCT_AorticArch).good()); OFCHECK(volMeasurements.setMeasurementMethod(DSRCodedEntryValue(CODE_DCM_SUVBodyWeightCalculationMethod)).good()); - OFCHECK(!volMeasurements.isValid()); + OFCHECK(volMeasurements.isValid()); /* add two measurement values */ const CMR_TID1411_in_TID1500::MeasurementValue numVal1("99", CMR_CID7181::StandardizedUptakeValueBodyWeight); const CMR_TID1411_in_TID1500::MeasurementValue numVal2(CMR_CID42::MeasurementFailure); @@ -411,7 +414,7 @@ } else OFCHECK_FAIL("could create expanded tree"); - /* try to insert the root template into a document */ + /* try to insert the root template into an SR document */ DSRDocument doc; OFCHECK(!doc.isValid()); OFCHECK_EQUAL(doc.getDocumentType(), DSRTypes::DT_BasicTextSR); @@ -431,6 +434,56 @@ } } + +OFTEST(dcmsr_TID1500_MeasurementReport_minimal) +{ + /* make sure data dictionary is loaded */ + if (!dcmDataDict.isDictionaryLoaded()) + { + OFCHECK_FAIL("no data dictionary loaded, check environment variable: " DCM_DICT_ENVIRONMENT_VARIABLE); + return; + } + + /* create a minimal TID 1500 report (to test changes introduced by CP-1998) */ + TID1500_MeasurementReport report(CMR_CID7021::ImagingMeasurementReport); + /* set details on the observation context */ + OFCHECK(report.getObservationContext().addPersonObserver("Doe^Jane", "Some Organization").good()); + /* and add a single qualitative evaluation */ + OFCHECK(report.addQualitativeEvaluation(DSRBasicCodedEntry("4711", "99TEST", "Some other test code"), "very good").good()); + + /* perform some checks */ + OFCHECK(report.isValid()); + OFCHECK(!report.hasProcedureReported()); + OFCHECK(report.hasImageLibrary(OFFalse /*checkChildren*/)); + OFCHECK(!report.hasImageLibrary(OFTrue/*checkChildren*/)); + OFCHECK(report.hasImagingMeasurements(OFFalse /*checkChildren*/)); + OFCHECK(!report.hasImagingMeasurements(OFTrue /*checkChildren*/)); + OFCHECK(!report.hasVolumetricROIMeasurements(OFTrue /*checkChildren*/)); + OFCHECK(!report.hasIndividualMeasurements(OFTrue /*checkChildren*/)); + OFCHECK(report.hasQualitativeEvaluations(OFTrue /*checkChildren*/)); + + /* try to insert the root template into an SR document */ + DSRDocument doc; + OFCHECK(doc.setTreeFromRootTemplate(report, OFTrue /*expandTree*/).good()); + OFCHECK(doc.isValid()); + + /* remove empty "Imaging Measurements" (TID 1500 - Row 6) CONTAINER */ + OFCHECK_EQUAL(doc.getTree().countNodes(), 7); + OFCHECK(doc.getTree().gotoNamedChildNode(CODE_DCM_ImagingMeasurements) > 0); + OFCHECK(doc.getTree().removeCurrentContentItem() > 0); + OFCHECK_EQUAL(doc.getTree().countNodes(), 6); + + /* output content of both the tree and the SR document (in debug mode only) */ + if (DCM_dcmsrCmrLogger.isEnabledFor(OFLogger::DEBUG_LOG_LEVEL)) + { + report.print(COUT, DSRTypes::PF_printTemplateIdentification | DSRTypes::PF_printAllCodes | DSRTypes::PF_printSOPInstanceUID | + DSRTypes::PF_printNodeID | DSRTypes::PF_printAnnotation | DSRTypes::PF_printLongSOPClassName); + COUT << "---" << OFendl; + doc.print(COUT, DSRTypes::PF_printTemplateIdentification | DSRTypes::PF_printAllCodes | DSRTypes::PF_printSOPInstanceUID | + DSRTypes::PF_printNodeID | DSRTypes::PF_printAnnotation | DSRTypes::PF_printLongSOPClassName); + } +} + OFTEST(dcmsr_TID1501_MeasurementGroup) { diff -Nru dcmtk-3.6.6/dcmsr/tests/tsrdoc.cc dcmtk-3.6.7/dcmsr/tests/tsrdoc.cc --- dcmtk-3.6.6/dcmsr/tests/tsrdoc.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmsr/tests/tsrdoc.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2014-2016, J. Riesmeier, Oldenburg, Germany + * Copyright (C) 2014-2021, J. Riesmeier, Oldenburg, Germany * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation are maintained by @@ -28,6 +28,36 @@ #include "dcmtk/dcmsr/dsrdoc.h" +OFTEST(dcmsr_setAndGetPatientData) +{ + DSRDocument doc; + OFString value; + /* check whether the values are set correctly */ + OFCHECK(doc.setPatientName("Dow^John").good()); + OFCHECK(doc.getPatientName(value).good()); + OFCHECK_EQUAL(value, "Dow^John"); + OFCHECK(doc.setPatientBirthDate("19600707").good()); + OFCHECK(doc.getPatientBirthDate(value).good()); + OFCHECK_EQUAL(value, "19600707"); + OFCHECK(doc.setPatientID("0815").good()); + OFCHECK(doc.getPatientID(value).good()); + OFCHECK_EQUAL(value, "0815"); + OFCHECK(doc.setIssuerOfPatientID("The Assigning Authority").good()); + OFCHECK(doc.getIssuerOfPatientID(value).good()); + OFCHECK_EQUAL(value, "The Assigning Authority"); + OFCHECK(doc.setPatientSex("M").good()); + OFCHECK(doc.getPatientSex(value).good()); + OFCHECK_EQUAL(value, "M"); + /* also check some recently introduced attributes */ + OFCHECK(doc.setPatientSize("1.88").good()); + OFCHECK(doc.getPatientSize(value).good()); + OFCHECK_EQUAL(value, "1.88"); + OFCHECK(doc.setPatientWeight("80").good()); + OFCHECK(doc.getPatientWeight(value).good()); + OFCHECK_EQUAL(value, "80"); +} + + OFTEST(dcmsr_setSpecificCharacterSet) { /* first, create an SR document and set the character set */ diff -Nru dcmtk-3.6.6/dcmsr/tests/tsrnumvl.cc dcmtk-3.6.7/dcmsr/tests/tsrnumvl.cc --- dcmtk-3.6.6/dcmsr/tests/tsrnumvl.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmsr/tests/tsrnumvl.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2015-2016, J. Riesmeier, Oldenburg, Germany + * Copyright (C) 2015-2021, J. Riesmeier, Oldenburg, Germany * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation are maintained by @@ -36,19 +36,19 @@ OFCHECK(numValue.isValid()); OFCHECK(!numValue.isComplete()); /* set valid coded entry */ - OFCHECK(numValue.setValue("", DSRCodedEntryValue(), OFTrue /*check*/).good()); + OFCHECK(numValue.setValue("", DSRCodedEntryValue(), CODE_DCM_ValueIndeterminate, OFTrue /*check*/).good()); OFCHECK(numValue.isEmpty()); OFCHECK(numValue.isValid()); - OFCHECK(!numValue.isComplete()); + OFCHECK(numValue.isComplete()); OFCHECK(numValue.setValue(CODE_DCM_NotANumber, OFTrue /*check*/).good()); OFCHECK(numValue.isEmpty()); OFCHECK(numValue.isValid()); OFCHECK(numValue.isComplete()); - OFCHECK(numValue.setValue("1.5", DSRBasicCodedEntry("cm", "UCUM", "1.4", "centimeter"), OFTrue /*check*/).good()); + OFCHECK(numValue.setValue("1.5", DSRBasicCodedEntry("cm", "UCUM", "centimeter"), OFTrue /*check*/).good()); OFCHECK(!numValue.isEmpty()); OFCHECK(numValue.isValid()); OFCHECK(numValue.isComplete()); - OFCHECK(numValue.setValue("99999", DSRBasicCodedEntry("cm", "UCUM", "1.4", "centimeter"), CODE_DCM_ValueOutOfRange, OFTrue /*check*/).good()); + OFCHECK(numValue.setValue("99999", DSRBasicCodedEntry("cm", "UCUM", "centimeter"), CODE_DCM_ValueOutOfRange, OFTrue /*check*/).good()); OFCHECK(!numValue.isEmpty()); OFCHECK(numValue.isValid()); OFCHECK(numValue.isComplete()); @@ -61,3 +61,43 @@ OFCHECK(numValue.isValid()); OFCHECK(!numValue.isComplete()); } + + +OFTEST(dcmsr_emptyMeasurementValueSequence) +{ + DSRNumericMeasurementValue numValue(CODE_DCM_ValueUnknown); + OFCHECK(numValue.isEmpty()); + OFCHECK(numValue.isValid()); + OFCHECK(numValue.isComplete()); + /* clear the value qualifier */ + OFCHECK(numValue.setNumericValueQualifier(DSRCodedEntryValue()).good()); + OFCHECK(numValue.isEmpty()); + OFCHECK(numValue.isValid()); + OFCHECK(!numValue.isComplete()); +} + + +OFTEST(dcmsr_setAndGetFloatingPointRepresentation) +{ + Float64 value; + /* set numeric value with additional representation */ + DSRNumericMeasurementValue numValue("1.5", DSRBasicCodedEntry("cm", "UCUM", "centimeter")); + OFCHECK(numValue.setFloatingPointRepresentation(1.5).good()); + /* get and check the value */ + OFCHECK(numValue.getFloatingPointRepresentation(value).good()); + OFCHECK_EQUAL(value, 1.5); +} + + +OFTEST(dcmsr_setAndGetRationalRepresentation) +{ + Sint32 value1; + Uint32 value2; + /* set numeric value with additional representation */ + DSRNumericMeasurementValue numValue("1.5", DSRBasicCodedEntry("cm", "UCUM", "centimeter")); + OFCHECK(numValue.setRationalRepresentation(3, 2).good()); + /* get and check the value */ + OFCHECK(numValue.getRationalRepresentation(value1, value2).good()); + OFCHECK_EQUAL(value1, 3); + OFCHECK_EQUAL(value2, 2); +} diff -Nru dcmtk-3.6.6/dcmtls/docs/certstor.dox dcmtk-3.6.7/dcmtls/docs/certstor.dox --- dcmtk-3.6.6/dcmtls/docs/certstor.dox 1970-01-01 00:00:00.000000000 +0000 +++ dcmtk-3.6.7/dcmtls/docs/certstor.dox 2022-04-28 13:47:25.000000000 +0000 @@ -0,0 +1,304 @@ +/*! + +\page dcmtls_certstore certificate and certification authority management in dcmtls + +\section dcmtls_certstore_system_cert System certificate and private key + +The TLS protocol requires that a server (that is, an application that accepts +incoming TLS network connections) \b must identify itself cryptographically +using a certificate and a private key, whereas a client (an application that +initiates outgoing TLS network connections) \b may identify itself using a +certificate and a private key, or may remain anonymous. + +All DCMTK tools that support TLS encrypted network connections offer command +line options for selecting unencrypted network communication, TLS with +certificates, or (in the case of client applications) TLS in anonymous mode: + +\verbatim + -tls --disable-tls + use normal TCP/IP connection (default) + + +tls --enable-tls [p]rivate key file, [c]ertificate file: string + use authenticated secure TLS connection + + +tla --anonymous-tls + use secure TLS connection without certificate +\endverbatim + +Two different file formats are supported for certificates, private keys and +other cryptographic material: The text-based PEM ("Privacy Enhanced Mail") +format, which is the default, and binary ASN.1 files in DER encoding +("Distinguished Encoding Rules"). The file format can be selected through the +following options: + +\verbatim + -pem --pem-keys + read keys and certificates as PEM file (default) + + -der --der-keys + read keys and certificates as DER file +\endverbatim + +Note that the PEM format supports multiple certificates in a single file, which +is an important feature when certificates issued by an intermediate CA are used +with TLS. The DER format only supports a single certificate per file. + +In many cases, the private key is stored in encrypted form and a password is +needed to decrypt the private key file. In this case the following options are +provided: + +\verbatim + +ps --std-passwd + prompt user to type password on stdin (default) + + +pw --use-passwd [p]assword: string + use password specified on the command line + + -pw --null-passwd + use empty string as password +\endverbatim + +\section dcmtls_certstore_security_profiles Security profiles + +The DICOM standard defines a number of security profiles for the use of the +DICOM network protocol over TLS. DCMTK supports the following profiles: + +\verbatim + +py --profile-bcp195-nd + Non-downgrading BCP 195 TLS Profile (default) + + +px --profile-bcp195 + BCP 195 TLS Profile + + +pz --profile-bcp195-ex + Extended BCP 195 TLS Profile + + +pa --profile-aes + AES TLS Secure Transport Connection Profile (retired) + + +pb --profile-basic + Basic TLS Secure Transport Connection Profile (retired) + + +pn --profile-null + Authenticated unencrypted communication + (retired, was used in IHE ATNA) +\endverbatim + +The Non-downgrading BCP 195 TLS Profile, which is selected by default, is +currently the most secure choice, as older protocol versions and cipher suites +are explicitly disabled. It does not support backward compatibility with the +older profiles. It uses either TLS version 1.2 or 1.3 and will default to TLS +1.3 when possible. + +The BCP 195 TLS Profile, which was the default up to DCMTK 3.6.6, will try to +negotiate cryptographic algorithms that are currently considered secure, but +provides backward compatibility to older applications implementing the retired +AES or Basic TLS profile. This profile is no longer compliant with BCP 195 as +amended by RFC 8996 (2021). + +The Extended BCP 195 TLS Profile is similar to the Non-downgrading BCP 195 TLS +Profile, but uses a more restricted selection of cipher suites and is restricted +to TLS version 1.2. + +The AES TLS Secure Transport Connection Profile uses AES encryption and TLS +version 1.0 and newer and has been retired from the DICOM standard. It should +only be used where backward compatibility with devices implementing this profile +is required. + +The Basic TLS Secure Transport Connection Profile uses Triple DES encryption +and TLS version 1.0 and newer and has also been retired from the DICOM standard. +It should only be used where backward compatibility with devices implementing +this profile is required, in particular since the effective key length of 112 +bits is not sufficiently secure against brute force attacks anymore. + +Authenticated unencrypted communication finally is a retired profile that was +defined in older versions of the IHE Audit Trail and Node Authentication +profile. It uses an unencrypted communication with cryptographic checksums. +This profile should be avoided. + +It should be noted that support for the Basic TLS profile will only be available +when the OpenSSL library has been compiled such that support for Triple DES is +enabled, which is not the default anymore. + +The list of TLS ciphersuites offered during the TLS handshake can be extended +using the following option: + +\verbatim + +cs --cipher [c]iphersuite name: string + add ciphersuite to list of negotiated suites +\endverbatim + +The list of supported ciphersuites can be printed using the following option: + +\verbatim + +cc --list-ciphers + show list of supported TLS ciphersuites and exit +\endverbatim + +\section dcmtls_certstore_peer_authentication Peer authentication + +By default, the TLS implementation in dcmtls will require both client and server +to provide a certificate as proof of identity, and will verify the validity and +trustworthiness of the certificate. This process has several steps: + +\li The TLS handshake will require a proof that the application has access to + the private key belonging to the public key encoded in the certificate. +\li The digital signature in the certificate will be verified. +\li The validity period of the certificate will be checked. +\li It will be checked whether the certificate was issued by a trusted + Certification Authority (CA) (see \ref dcmtls_certstore_certification_authority). +\li Depending on the command line options, the Certificate Revocation Lists + (CRLs) of all CAs up to the root CA may be checked to see if any certificate + in the certificate chain has been revoked (see \ref dcmtls_certstore_crl). + +This behavior can be modified with the following command line options: + +\verbatim + -rc --require-peer-cert + verify peer certificate, fail if absent (default) + + -vc --verify-peer-cert + verify peer certificate if present + + -ic --ignore-peer-cert + don't verify peer certificate +\endverbatim + +The first option will cause the connection to fail if the peer does not present +a certificate (i.e. is working in anonymous mode) or if the certificate cannot +be fully verified. The second option will perform a certificate verification if +a certificate is present, but will also accept anonymous connections. The third +option does not perform any certificate verification and also accepts anonymous +connections. + +It should be noted that the latter two modes are susceptible to +man-in-the-middle attacks and should thus be avoided. + +The \c \--verify-peer-cert option is not available in client applications, +since TLS servers will always present a certificate. + +\section dcmtls_certstore_certification_authority Certification authority + +All tools in DCMTK that support TLS encrypted network connections need to have +a list of trusted root certificates (i.e. self-signed certificates) that are +used in the verification of the peer certificate when establishing the TLS +connection. + +There are two ways of managing this list of trusted certificates: file-based and +directory-based. The command line tools in DCMTK offer the following command +line options for this purpose: + +\verbatim + certification authority: + +cf --add-cert-file [f]ilename: string + add certificate file to list of certificates + + +cd --add-cert-dir [d]irectory: string + add certificates in d to list of certificates +\endverbatim + +\subsection dcmtls_certstore_certification_authority_file File-based management of trusted root certificates + +The file-based option loads a file and adds all the certificates or CRLs present +in that file into the pool of trusted certificates. File format is ASCII text +containing concatenated PEM certificates and CRLs, unless ASN.1 DER format has +been selected. + +\subsection dcmtls_certstore_certification_authority_dir Directory-based management of trusted root certificates + +The directory-based option specifies a directory containing certificates and +CRLs. These certificates and CRLs are loaded on demand, and cached in memory +once they are loaded. + +The directory should contain one certificate or CRL per file in PEM format, with +a file name of the form hash.N for a certificate, or hash.rN for a CRL. The hash +is computed from the subject name (for certificates) or the issuer name (for +CRLs). The hash value can be obtained by calling the openssl command line tool: + +\verbatim + openssl x509 -hash -noout -in +\endverbatim + +where should be replaced by the filename of the certificate or CRL. + +The .N or .rN suffix is a sequence number that starts at zero, and is +incremented consecutively for each certificate or CRL with the same hash value. +Gaps in the sequence numbers are not supported, it is assumed that there are no +more objects with the same hash beyond the first missing number in the sequence. + +Sequence numbers make it possible for the directory to contain multiple +certificates with same subject name hash value. For example, it is possible to +have in the store several certificates with same subject or several CRLs with +same issuer (and, for example, different validity period). + +\subsection dcmtls_certstore_certification_authority_intermed Intermediate CAs + +In many cases, the system certificates are not directly signed by a root CA +(that is, a CA using a self-signed certificate), but by an intermediate CA. The +certificate of the intermediate CA will be signed by the root CA (or another +level of intermediate CA). + +In the TLS handshake, an application can provide more than one certificate: it +can provide its certificate, followed by the certificates of any intermediate +CAs up to and optionally including the root CA certificate. + +DCMTK tools will provide such intermediate certificates during the TLS handshake +if they are present in the same file as the system certificate, which is +provided as the second parameter of the \c \--enable-tls option. This requires +the use of the PEM format, since DER does not support multiple certificates in +one file. + +The PEM format allows the certificates to simply be concatenated in a text file, +starting with the system certificate, followed by intermediate CA certificates +and optionally the root CA certificate. On Linux/Posix systems, such a file may +be created as follows: + +\verbatim + cat system_cert.pem intermediate_ca.pem root_ca.pem > fullchain.pem +\endverbatim + +Users using LetsEncrypt certificates will notice that LetsEncrypt automatically +provides a "fullchain.pem" file containing such a certificate chain. + +The certificates defined as trustworthy using \c \--add-cert-file or +\c \--add-cert-dir can only be root CA certificates. It is not possible to add +intermediate CA certificates to the "trust store". + +\section dcmtls_certstore_crl Certificate revocation lists + +The last, optional step in certificate verification is the look-up of the +certificate revocation lists (CRLs) to check whether any certificate in the +certificate chain has been revoked. CRLs cannot be transmitted in the TLS +handshake, they must be pre-configured, and it should be noted that CRLs also +have a limited validity period, defined in the file. + +The following CRL options are available starting with DCMTK 3.6.7: + +\verbatim + +crl --add-crl-file [f]ilename: string + add certificate revocation list file + (implies --enable-crl-vfy) + + +crv --enable-crl-vfy + enable leaf CRL verification + + +cra --enable-crl-all + enable full chain CRL verification +\endverbatim + +The \c \--add-crl-file option will load a CRL file that can be used for CRL +look-up. This option can be specified more than once. Alternatively, CRL files +can be located in the CA directory specified with \c \--add-cert-dir. See +\ref dcmtls_certstore_certification_authority_dir for a discussion of how CRL +files must be named in this case. + +The \c \--enable-crl-vfy option will enable a look-up of the CRL of the leaf CA, +i.e. only a single CRL will be checked in order to determine whether or not the +peer's system certificate is revoked. The \c \--enable-crl-all option will +enable a look-up of all CRLs up to the root CA, which will also cover the case +where an intermediate CA certificate has been revoked. + +Once CRL verification has been enabled, certificate verification will fail if +one of the required CRLs is absent. + +*/ diff -Nru dcmtk-3.6.6/dcmtls/docs/certstor.txt dcmtk-3.6.7/dcmtls/docs/certstor.txt --- dcmtk-3.6.6/dcmtls/docs/certstor.txt 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmtls/docs/certstor.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1,68 +0,0 @@ -============================================================ -CERTIFICATION AUTHORITY (CA) CERTIFICATE MANAGEMENT IN DCMTK -============================================================ - -All tools in DCMTK that support TLS encrypted network connections -need to have a list of trusted certificates (typically CA certificates) -that are used in the verification of the peer certificate when -establishing the TLS connection. - -There are two ways of managing this list of trusted certificates: -file-based and directory-based. The command line tools in DCMTK -offer the following command line options for this purpose: - - certification authority: - +cf --add-cert-file [f]ilename: string - add certificate file to list of certificates - - +cd --add-cert-dir [d]irectory: string - add certificates in d to list of certificates - -When using DCMTK at library level, the methods corresponding to these -command line options are DcmTransportLayer::addTrustedCertificateFile() -and DcmTransportLayer::addTrustedCertificateDir(). - - -FILE BASED MANAGEMENT OF TRUSTED CERTIFICATES - -The file-based option loads a file and adds all the certificates or CRLs -present in that file into the pool of trusted certificates. File format -is ASCII text containing concatenated PEM certificates and CRLs. - - -DIRECTORY BASED MANAGEMENT OF TRUSTED CERTIFICATES - -The directory-based option specifies a directory containing certificates -and CRLs. These certificates and CRLs are loaded on demand, and cached -in memory once they are loaded. - -The directory should contain one certificate or CRL per file in PEM -format, with a file name of the form hash.N for a certificate, or -hash.rN for a CRL. The hash is computed from the subject name (for -certificates) or the issuer name (for CRLs). The hash value can be -obtained by calling the openssl command line tool: - - openssl x509 -hash -noout -in - -where should be replaced by the filename of the certificate -or CRL. - -The .N or .rN suffix is a sequence number that starts at zero, and is -incremented consecutively for each certificate or CRL with the same hash -value. Gaps in the sequence numbers are not supported, it is assumed -that there are no more objects with the same hash beyond the first -missing number in the sequence. - -Sequence numbers make it possible for the directory to contain multiple -certificates with same subject name hash value. For example, it is -possible to have in the store several certificates with same subject or -several CRLs with same issuer (and, for example, different validity -period). - -Note that the hash algorithm used for subject name hashing changed in -OpenSSL 1.0.0, and all certificate stores have to be rehashed when -moving from OpenSSL 0.9.x to 1.0.0. - -Note: This file contains text adapted from the OpenSSL API -documentation, which is available under the OpenSSL license. -The OpenSSL license is reproduced in DCMTK's COPYRIGHT file. diff -Nru dcmtk-3.6.6/dcmtls/docs/CMakeLists.txt dcmtk-3.6.7/dcmtls/docs/CMakeLists.txt --- dcmtk-3.6.6/dcmtls/docs/CMakeLists.txt 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmtls/docs/CMakeLists.txt 2022-04-28 13:47:25.000000000 +0000 @@ -1,2 +1,2 @@ # declare installation files -install(FILES ciphers.txt randseed.txt certstor.txt DESTINATION "${CMAKE_INSTALL_DOCDIR}" COMPONENT doc) +install(FILES ciphers.txt randseed.txt DESTINATION "${CMAKE_INSTALL_DOCDIR}" COMPONENT doc) diff -Nru dcmtk-3.6.6/dcmtls/docs/dcmtls.dox dcmtk-3.6.7/dcmtls/docs/dcmtls.dox --- dcmtk-3.6.6/dcmtls/docs/dcmtls.dox 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmtls/docs/dcmtls.dox 2022-04-28 13:47:25.000000000 +0000 @@ -14,7 +14,7 @@ \section Files The following files provide further documentation: -\li \ref file_certstor +\li \ref dcmtls_certstore \li \ref file_ciphers \li \ref file_randseed @@ -35,12 +35,12 @@ DcmTLSTransportLayer *tLayer = new DcmTLSTransportLayer( NET_REQUESTOR, "random.dat"); -if (TCS_ok != tLayer->setPrivateKeyFile("privkey.pem", SSL_FILETYPE_PEM)) +if (tLayer->setPrivateKeyFile("privkey.pem", SSL_FILETYPE_PEM).bad()) { cerr << "unable to load private key" << endl; return; } -if (TCS_ok != tLayer->setCertificateFile("certificate.pem", SSL_FILETYPE_PEM)) +if (tLayer->setCertificateFile("certificate.pem", SSL_FILETYPE_PEM).bad()) { cerr << "unable to load certificate" << endl; return; @@ -61,11 +61,6 @@ */ /*! - \page file_certstor certstor.txt file - \verbinclude certstor.txt -*/ - -/*! \page file_ciphers ciphers.txt file \verbinclude ciphers.txt */ diff -Nru dcmtk-3.6.6/dcmtls/docs/Makefile.in dcmtk-3.6.7/dcmtls/docs/Makefile.in --- dcmtk-3.6.6/dcmtls/docs/Makefile.in 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmtls/docs/Makefile.in 2022-04-28 13:47:25.000000000 +0000 @@ -11,7 +11,7 @@ include $(configdir)/@common_makefile@ -files = ciphers.txt randseed.txt certstor.txt +files = ciphers.txt randseed.txt all: diff -Nru dcmtk-3.6.6/dcmtls/include/dcmtk/dcmtls/tlsciphr.h dcmtk-3.6.7/dcmtls/include/dcmtk/dcmtls/tlsciphr.h --- dcmtk-3.6.6/dcmtls/include/dcmtk/dcmtls/tlsciphr.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmtls/include/dcmtk/dcmtls/tlsciphr.h 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2018-2019, OFFIS e.V. + * Copyright (C) 2018-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -27,11 +27,11 @@ #ifdef WITH_OPENSSL +#include "dcmtk/ofstd/ofcond.h" /* for class OFCondition */ #include "dcmtk/ofstd/ofstring.h" /* for class OFString */ #include "dcmtk/ofstd/ofstream.h" /* for class ostream */ #include "dcmtk/ofstd/ofvector.h" /* for class OFVector */ #include "dcmtk/dcmtls/tlsdefin.h" /* for DCMTK_DCMTLS_EXPORT */ -#include "dcmtk/dcmnet/dcmlayer.h" /* for DcmTransportLayerStatus */ // include this file in doxygen documentation @@ -132,7 +132,7 @@ /// Static RSA key exchange TKE_RSA, - /// Elliptic Curve Diffie–Hellman + /// Elliptic Curve Diffie-Hellman TKE_ECDH, /// Fixed ECDH with ECDSA-signed certificates @@ -141,7 +141,7 @@ /// Fixed ECDH with RSA signatures TKE_ECDH_RSA, - /// Diffie–Hellman key exchange + /// Diffie-Hellman key exchange TKE_DH }; @@ -157,7 +157,7 @@ /// Digital Signature Standard TCA_DSS, - /// Elliptic Curve Diffie–Hellman + /// Elliptic Curve Diffie-Hellman TCA_ECDH, /// Elliptic Curve Digital Signature Algorithm @@ -217,6 +217,27 @@ }; +/** This enum describes the verification approach + * for certificate revocation lists (CRL) + * @remark this enum is only available if DCMTK is compiled with + * OpenSSL support enabled. + */ +enum DcmTLSCRLVerification +{ + /// Certificates are not checked against a CRL + TCR_noCRL, + + /// Check chain leaf certificate against its CRL. + /// An error occurs if a suitable CRL cannot be found. + TCR_checkLeafCRL, + + /// Check the entire certificate chain against their CRLs. + /// An error occurs if any required CRL cannot be found. + TCR_checkAllCRL + +}; + + /** This helper class manages the list of TLS ciphersuites supported by DCMTK, * translates DcmTLSSecurityProfile enums into the corresponding sets of * ciphersuites, and permits translation between the official TLS ciphersuite @@ -241,9 +262,9 @@ /** replace the current list of ciphersuites by the list of ciphersuites * for the given profile. * @param profile TLS Security Profile - * @return TCS_ok if successful, an error code otherwise + * @return EC_Normal if successful, an error code otherwise */ - DcmTransportLayerStatus setTLSProfile(DcmTLSSecurityProfile profile); + OFCondition setTLSProfile(DcmTLSSecurityProfile profile); /** return the currently selected TLS profile * @return currently selected TLS profile @@ -262,9 +283,9 @@ * It is the responsibility of the user to ensure that the added ciphersuite * does not break the rules of the selected profile. Use with care! * @param suite TLS ciphersuite name, in the official TLS name form. - * @return TCS_ok if successful, an error code otherwise + * @return EC_Normal if successful, an error code otherwise */ - DcmTransportLayerStatus addCipherSuite(const char *suite); + OFCondition addCipherSuite(const char *suite); /** returns a string in OpenSSL syntax that contains the currently defined * list of TLS ciphersuites. @@ -319,7 +340,7 @@ static size_t lookupCiphersuite(const char *tlsCipherSuiteName); /** looks up the index of the given ciphersuite by OpenSSL name - * @param tlsCipherSuiteName ciphersuite name in the form used by OpenSSL + * @param opensslCipherSuiteName ciphersuite name in the form used by OpenSSL * @returns index into list of ciphersuites, DcmTLSCiphersuiteHandler::unknownCipherSuiteIndex if ciphersuite unknown */ static size_t lookupCiphersuiteByOpenSSLName(const char *opensslCipherSuiteName); @@ -380,6 +401,7 @@ static size_t getCipherSuiteEffectiveKeySize(size_t idx); /** look up the name of the given security profile + * @param profile the given security profile * @return name of security profile, never NULL. */ static const char *lookupProfileName(DcmTLSSecurityProfile profile); @@ -402,9 +424,9 @@ /** add ciphersuite by name, print error if unsupported * @param name ciphersuite name in RFC 2246 form - * @return TCS_ok if successful, an error code otherwise + * @return EC_Normal if successful, an error code otherwise */ - DcmTransportLayerStatus addRequiredCipherSuite(const char *name); + OFCondition addRequiredCipherSuite(const char *name); /** add 3DES ciphersuite, print warning if unsupported */ @@ -417,7 +439,7 @@ DcmTLSSecurityProfile currentProfile; /// indicator whether TLS 1.3 is enabled or disabled for the current profile - OFBool tls13_enabled; + OFBool tls13_enabled; /** an array of booleans indicating which ciphersuites known to DCMTK are * actually supported by the OpenSSL library we are using. diff -Nru dcmtk-3.6.6/dcmtls/include/dcmtk/dcmtls/tlscond.h dcmtk-3.6.7/dcmtls/include/dcmtk/dcmtls/tlscond.h --- dcmtk-3.6.6/dcmtls/include/dcmtk/dcmtls/tlscond.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmtls/include/dcmtk/dcmtls/tlscond.h 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2017, OFFIS e.V. + * Copyright (C) 2017-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -28,6 +28,18 @@ #include "dcmtk/dcmdata/dcerror.h" #include "dcmtk/dcmtls/tlsdefin.h" +// offset added to error codes returned by OpenSSL's X509_STORE_CTX_get_error() +// function to convert them into OFCondition codes. +#define DCMTLS_EC_X509Verify_Offset 1024 + +// highest OpenSSL X.509 verification error code for which a mapping to +// DCMTK OFCondition constants has been defined. +#define DCMTLS_EC_X509Verify_Max 94 + +// offset added to ERR_LIB_SSL error codes returned by OpenSSL's ERR_GET_REASON() +// macro to convert them into OFCondition codes. +#define DCMTLS_EC_SSL_Offset 2048 + // These classes allow creating error conditions that may either give a general // description of the error or may also contain some specific information, // e.g. a file name, while both a specialized object and a generic one would @@ -130,14 +142,1332 @@ OFCondition operator()( const char* seedFile ) const; }; +/** A struct for creating an error condition related to a generic OpenSSL error + */ +struct DCMTK_DCMTLS_EXPORT DcmTLSECGenericOpenSSLError : OFConditionConst +{ + /** Constructor, initializes the OFConditionConst base. + * Don't use this if you don't have a very good reason. + */ + DcmTLSECGenericOpenSSLError(); + + /** Create a specialized OpenSSL error condition + * that refers to the OpenSSL error code. + * @param errorCode OpenSSL error code + * @return an OFCondition that compares equal to + * DCMTLS_EC_GenericOpenSSLError but also refers to + * the OpenSSL error code, library and reason in its descriptive text. + */ + OFCondition operator()(unsigned long errorCode) const; + +}; + // Declaration of generic error code instances +/// condition constant: TLS ciphersuite not supported extern DCMTK_DCMTLS_EXPORT const DcmTLSECUnknownCiphersuiteConst DCMTLS_EC_UnknownCiphersuite; + +/// condition constant: creation of the TLS transport layer failed extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_FailedToCreateTLSTransportLayer; + +/// condition constant: loading of the private key failed extern DCMTK_DCMTLS_EXPORT const DcmTLSECFailedToLoadPrivateKeyConst DCMTLS_EC_FailedToLoadPrivateKey; + +/// condition constant: loading of the certificate failed extern DCMTK_DCMTLS_EXPORT const DcmTLSECFailedToLoadCertificateConst DCMTLS_EC_FailedToLoadCertificate; + +/// condition constant: mismatch between private key and certificate extern DCMTK_DCMTLS_EXPORT const DcmTLSECMismatchedPrivateKeyAndCertificateConst DCMTLS_EC_MismatchedPrivateKeyAndCertificate; + +/// condition constant: activation of ciphersuites failed extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_FailedToSetCiphersuites; + +/// condition constant: failed to write file with PRNG seed extern DCMTK_DCMTLS_EXPORT const DcmTLSECFailedToWriteRandomSeedFileConst DCMTLS_EC_FailedToWriteRandomSeedFile; +/// condition constant: TLS function called but no TLS transport connection present +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_NoTLSTransportConnectionPresent; + +/// condition constant: ciphersuite not allowed in current DICOM security profile +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_CiphersuiteNotAllowed; + +/// condition constant: TLS read operation did not complete (SSL_ERROR_WANT_READ) +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSReadOperationDidNotComplete; + +/// condition constant: TLS write operation did not complete (SSL_ERROR_WANT_WRITE) +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSWriteOperationDidNotComplete; + +/// condition constant: TLS X.509 lookup operation did not complete (SSL_ERROR_WANT_X509_LOOKUP) +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSX509LookupOperationDidNotComplete; + +/// condition constant: TLS connection closed by peer (SSL_ERROR_ZERO_RETURN) +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSConnectionClosedByPeer; + +/// condition constant: TLS connect operation did not complete (SSL_ERROR_WANT_CONNECT) +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSConnectOperationDidNotComplete; + +/// condition constant: TLS accept operation did not complete (SSL_ERROR_WANT_ACCEPT) +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSAcceptOperationDidNotComplete; + +/// condition constant: TLS operation did not complete because an asynchronous engine is still processing data (SSL_ERROR_WANT_ASYNC) +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSAsyncOperationDidNotComplete; + +/// condition constant: TLS asynchronous job could not be started (SSL_ERROR_WANT_ASYNC_JOB) +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSAsyncJobCouldNotBeStarted; + +/// condition constant: TLS client hello callback needed (SSL_ERROR_WANT_CLIENT_HELLO_CB) +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSClientHelloCallbackNeeded; + +/// condition constant: other TLS error (unknown SSL_ERROR code) +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_OtherSSLError; + +/// condition constant: setting of the X.509 verification mode failed +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_FailedToSetVerificationMode; + +/// condition constant: certificate store context initialization failed +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_CertStoreCtxInitFailed; + +/// condition constant: OpenSSL error +extern DCMTK_DCMTLS_EXPORT const DcmTLSECGenericOpenSSLError DCMTLS_EC_GenericOpenSSLError; + +/// condition constant: OpenSSL I/O error, not further specified (SSL_ERROR_SYSCALL) +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_OpenSSLIOError; + +// X.509 Verification Errors. These use condition codes > DCMTLS_EC_X509Verify_Offset. + +/// condition constant: X.509 certificate verification error - unspecified +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyUnspecified; + +/// condition constant: X.509 certificate verification error - unable to get issuer certificate +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyUnableToGetIssuerCert; + +/// condition constant: X.509 certificate verification error - unable to get certificate CRL +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyUnableToGetCRL; + +/// condition constant: X.509 certificate verification error - unable to decrypt certificate's signature +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyUnableToDecryptCertSignature; + +/// condition constant: X.509 certificate verification error - unable to decrypt CRL's signature +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyUnableToDecryptCRLSignature; + +/// condition constant: X.509 certificate verification error - unable to decode issuer public key +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyUnableToDecodeIssuerPublicKey; + +/// condition constant: X.509 certificate verification error - certificate signature failure +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyCertSignatureFailure; + +/// condition constant: X.509 certificate verification error - CRL signature failure +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyCRLSignatureFailure; + +/// condition constant: X.509 certificate verification error - certificate is not yet valid +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyCertNotYetValid; + +/// condition constant: X.509 certificate verification error - certificate has expired +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyCertHasExpired; + +/// condition constant: X.509 certificate verification error - CRL is not yet valid +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyCRLNotYetValid; + +/// condition constant: X.509 certificate verification error - CRL has expired +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyCRLHasExpired; + +/// condition constant: X.509 certificate verification error - format error in certificate's notBefore field +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyErrorInCertNotBeforeField; + +/// condition constant: X.509 certificate verification error - format error in certificate's notAfter field +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyErrorInCertNotAfterField; + +/// condition constant: X.509 certificate verification error - format error in CRL's lastUpdate field +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyErrorInCRLLastUpdateField; + +/// condition constant: X.509 certificate verification error - format error in CRL's nextUpdate field +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyErrorInCRLNextUpdateField; + +/// condition constant: X.509 certificate verification error - out of memory +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyOutOfMem; + +/// condition constant: X.509 certificate verification error - self signed certificate +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyDepthZeroSelfSignedCert; + +/// condition constant: X.509 certificate verification error - self signed certificate in certificate chain +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifySelfSignedCertInChain; + +/// condition constant: X.509 certificate verification error - unable to get local issuer certificate +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyUnableToGetIssuerCertLocally; + +/// condition constant: X.509 certificate verification error - unable to verify the first certificate +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyUnableToVerifyLeafSignature; + +/// condition constant: X.509 certificate verification error - certificate chain too long +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyCertChainTooLong; + +/// condition constant: X.509 certificate verification error - certificate revoked +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyCertRevoked; + +/// condition constant: X.509 certificate verification error - issuer certificate doesn't have a public key +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyNoIssuerPublicKey; + +/// condition constant: X.509 certificate verification error - path length constraint exceeded +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyPathLengthExceeded; + +/// condition constant: X.509 certificate verification error - unsupported certificate purpose +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyInvalidPurpose; + +/// condition constant: X.509 certificate verification error - certificate not trusted +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyCertUntrusted; + +/// condition constant: X.509 certificate verification error - certificate rejected +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyCertRejected; + +/// condition constant: X.509 certificate verification error - subject issuer mismatch +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifySubjectIssuerMismatch; + +/// condition constant: X.509 certificate verification error - authority and subject key identifier mismatch +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyAkidSkidMismatch; + +/// condition constant: X.509 certificate verification error - authority and issuer serial number mismatch +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyAkidIssuerSerialMismatch; + +/// condition constant: X.509 certificate verification error - key usage does not include certificate signing +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyKeyusageNoCertsign; + +/// condition constant: X.509 certificate verification error - unable to get CRL issuer certificate +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyUnableToGetCRLIssuer; + +/// condition constant: X.509 certificate verification error - unhandled critical extension +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyUnhandledCriticalExtension; + +/// condition constant: X.509 certificate verification error - key usage does not include CRL signing +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyKeyusageNoCRLSign; + +/// condition constant: X.509 certificate verification error - unhandled critical CRL extension +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyUnhandledCriticalCRLExtension; + +/// condition constant: X.509 certificate verification error - invalid non-CA certificate (has CA markings) +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyInvalidNonCA; + +/// condition constant: X.509 certificate verification error - proxy path length constraint exceeded +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyProxyPathLengthExceeded; + +/// condition constant: X.509 certificate verification error - key usage does not include digital signature +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyKeyusageNoDigitalSignature; + +/// condition constant: X.509 certificate verification error - proxy certificates not allowed, please set the appropriate flag +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyProxyCertificatesNotAllowed; + +/// condition constant: X.509 certificate verification error - invalid or inconsistent certificate extension +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyInvalidExtension; + +/// condition constant: X.509 certificate verification error - invalid or inconsistent certificate policy extension +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyInvalidPolicyExtension; + +/// condition constant: X.509 certificate verification error - no explicit policy +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyNoExplicitPolicy; + +/// condition constant: X.509 certificate verification error - Different CRL scope +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyDifferentCRLScope; + +/// condition constant: X.509 certificate verification error - Unsupported extension feature +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyUnsupportedExtensionFeature; + +/// condition constant: X.509 certificate verification error - RFC 3779 resource not subset of parent's resources +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyUnnestedResource; + +/// condition constant: X.509 certificate verification error - permitted subtree violation +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyPermittedViolation; + +/// condition constant: X.509 certificate verification error - excluded subtree violation +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyExcludedViolation; + +/// condition constant: X.509 certificate verification error - name constraints minimum and maximum not supported +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifySubtreeMinmax; + +/// condition constant: X.509 certificate verification error - application verification failure +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyApplicationVerification; + +/// condition constant: X.509 certificate verification error - unsupported name constraint type +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyUnsupportedConstraintType; + +/// condition constant: X.509 certificate verification error - unsupported or invalid name constraint syntax +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyUnsupportedConstraintSyntax; + +/// condition constant: X.509 certificate verification error - unsupported or invalid name syntax +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyUnsupportedNameSyntax; + +/// condition constant: X.509 certificate verification error - CRL path validation error +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyCRLPathValidationError; + +/// condition constant: X.509 certificate verification error - Path Loop +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyPathLoop; + +/// condition constant: X.509 certificate verification error - Suite B: certificate version invalid +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifySuiteBInvalidVersion; + +/// condition constant: X.509 certificate verification error - Suite B: invalid public key algorithm +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifySuiteBInvalidAlgorithm; + +/// condition constant: X.509 certificate verification error - Suite B: invalid ECC curve +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifySuiteBInvalidCurve; + +/// condition constant: X.509 certificate verification error - Suite B: invalid signature algorithm +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifySuiteBInvalidSignatureAlgorithm; + +/// condition constant: X.509 certificate verification error - Suite B: curve not allowed for this LOS +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifySuiteBLosNotAllowed; + +/// condition constant: X.509 certificate verification error - Suite B: cannot sign P-384 with P-256 +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifySuiteBCannotSignP384WithP256; + +/// condition constant: X.509 certificate verification error - Hostname mismatch +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyHostnameMismatch; + +/// condition constant: X.509 certificate verification error - Email address mismatch +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyEmailMismatch; + +/// condition constant: X.509 certificate verification error - IP address mismatch +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyIPAddressMismatch; + +/// condition constant: X.509 certificate verification error - No matching DANE TLSA records +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyDANENoMatch; + +/// condition constant: X.509 certificate verification error - EE certificate key too weak +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyEEKeyTooSmall; + +/// condition constant: X.509 certificate verification error - CA certificate key too weak +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyCAKeyTooSmall; + +/// condition constant: X.509 certificate verification error - CA signature digest algorithm too weak +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyCAMDTooWeak; + +/// condition constant: X.509 certificate verification error - Invalid certificate verification context +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyInvalidCall; + +/// condition constant: X.509 certificate verification error - Issuer certificate lookup error +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyStoreLookup; + +/// condition constant: X.509 certificate verification error - Certificate Transparency required, but no valid SCTs found +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyNoValidSCTs; + +/// condition constant: X.509 certificate verification error - proxy subject name violation +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyProxySubjectNameViolation; + +/// condition constant: X.509 certificate verification error - OCSP verification needed +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyOCSPVerifyNeeded; + +/// condition constant: X.509 certificate verification error - OCSP verification failed +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyOCSPVerifyFailed; + +/// condition constant: X.509 certificate verification error - OCSP unknown cert +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyOCSPCertUnknown; + +/// condition constant: X.509 certificate verification error - Cannot find certificate signature algorithm +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyUnsupportedSignatureAlgorithm; + +/// condition constant: X.509 certificate verification error - subject signature algorithm and issuer public key algorithm mismatch +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifySignatureAlgorithmMismatch; + +/// condition constant: X.509 certificate verification error - cert info siganature and signature algorithm mismatch +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifySignatureAlgorithmInconsistency; + +/// condition constant: X.509 certificate verification error - invalid CA certificate +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyInvalidCA; + +/// condition constant: X.509 certificate verification error - Path length invalid for non-CA cert +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyPathlenInvalidForNonCA; + +/// condition constant: X.509 certificate verification error - Path length given without key usage keyCertSign +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyPathlenWithoutKUKeyCertSign; + +/// condition constant: X.509 certificate verification error - Key usage keyCertSign invalid for non-CA cert +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyKUKeyCertSignInvalidForNonCA; + +/// condition constant: X.509 certificate verification error - Issuer name empty +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyIssuerNameEmpty; + +/// condition constant: X.509 certificate verification error - Subject name empty +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifySubjectNameEmpty; + +/// condition constant: X.509 certificate verification error - Missing Authority Key Identifier +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyMissingAuthorityKeyIdentifier; + +/// condition constant: X.509 certificate verification error - Missing Subject Key Identifier +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyMissingSubjectKeyIdentifier; + +/// condition constant: X.509 certificate verification error - Empty Subject Alternative Name extension +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyEmptySubjectAltName; + +/// condition constant: X.509 certificate verification error - Basic Constraints of CA cert not marked critical +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyEmptySubjectSanNotCritical; + +/// condition constant: X.509 certificate verification error - Subject empty and Subject Alt Name extension not critical +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyCABconsNotCritical; + +/// condition constant: X.509 certificate verification error - Authority Key Identifier marked critical +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyAuthorityKeyIdentifierCritical; + +/// condition constant: X.509 certificate verification error - Subject Key Identifier marked critical +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifySubjectKeyIdentifierCritical; + +/// condition constant: X.509 certificate verification error - CA cert does not include key usage extension +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyCACertMissingKeyUsage; + +/// condition constant: X.509 certificate verification error - Using cert extension requires at least X509v3 +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyExtensionsRequireVersion3; + +/// condition constant: X.509 certificate verification error - Certificate public key has explicit ECC parameters +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyECKeyExplicitParams; + +// TLS errors and alerts. These use condition codes > DCMTLS_EC_SSL_Offset. + +/// condition constant: TLS error: app data in handshake +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSAppDataInHandshake; + +/// condition constant: TLS error: no suitable key share +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSNoSuitableKeyShare; + +/// condition constant: TLS error: bad dh value +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSBadDHValue; + +/// condition constant: TLS error: bad change cipher spec +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSBadChangeCipherSpec; + +/// condition constant: TLS error: inconsistent extms +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSInconsistentExtms; + +/// condition constant: TLS error: bad hello request +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSBadHelloRequest; + +/// condition constant: TLS error: bad data returned by callback +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSBadDataReturnedByCallback; + +/// condition constant: TLS error: bad decompression +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSBadDecompression; + +/// condition constant: TLS error: bad key share +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSBadKeyShare; + +/// condition constant: TLS error: cannot change cipher +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSCannotChangeCipher; + +/// condition constant: TLS error: bad extension +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSBadExtension; + +/// condition constant: TLS error: bad digest length +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSBadDigestLength; + +/// condition constant: TLS error: missing sigalgs extension +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSMissingSigalgsExtension; + +/// condition constant: TLS error: invalid configuration name +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSInvalidConfigurationName; + +/// condition constant: TLS error: bad psk identity +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSBadPSKIdentity; + +/// condition constant: TLS error: bad packet length +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSBadPacketLength; + +/// condition constant: TLS error: bad protocol version number +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSBadProtocolVersionNumber; + +/// condition constant: TLS error: ssl command section empty +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSSSLCommandSectionEmpty; + +/// condition constant: TLS error: no suitable signature algorithm +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSNoSuitableSignatureAlgorithm; + +/// condition constant: TLS error: bad rsa encrypt +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSBadRSAEncrypt; + +/// condition constant: TLS error: invalid key update type +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSInvalidKeyUpdateType; + +/// condition constant: TLS error: still in init +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSStillInInit; + +/// condition constant: TLS error: bad key update +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSBadKeyUpdate; + +/// condition constant: TLS error: bad signature +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSBadSignature; + +/// condition constant: TLS error: bad ssl filetype +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSBadSSLFiletype; + +/// condition constant: TLS error: ssl command section not found +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSSSLCommandSectionNotFound; + +/// condition constant: TLS error: ssl section empty +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSSSLSectionEmpty; + +/// condition constant: TLS error: bad write retry +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSBadWriteRetry; + +/// condition constant: TLS error: bio not set +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSBioNotSet; + +/// condition constant: TLS error: block cipher pad is wrong +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSBlockCipherPadIsWrong; + +/// condition constant: TLS error: bn lib +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSBNLib; + +/// condition constant: TLS error: ca dn length mismatch +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSCADNLengthMismatch; + +/// condition constant: TLS error: too many key updates +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSTooManyKeyUpdates; + +/// condition constant: TLS error: ccs received early +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSCCSReceivedEarly; + +/// condition constant: TLS error: certificate verify failed +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSCertificateVerifyFailed; + +/// condition constant: TLS error: cert length mismatch +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSCertLengthMismatch; + +/// condition constant: TLS error: ssl section not found +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSSSLSectionNotFound; + +/// condition constant: TLS error: cipher code wrong length +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSCipherCodeWrongLength; + +/// condition constant: TLS error: unknown command +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSUnknownCommand; + +/// condition constant: TLS error: compressed length too long +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSCompressedLengthTooLong; + +/// condition constant: TLS error: compression failure +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSCompressionFailure; + +/// condition constant: TLS error: compression library error +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSCompressionLibraryError; + +/// condition constant: TLS error: at least TLS 1.0 needed in FIPS mode +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSAtLeastTLS10NeededInFIPSMode; + +/// condition constant: TLS error: connection type not set +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSConnectionTypeNotSet; + +/// condition constant: TLS error: data between ccs and finished +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSDataBetweenCCSAndFinished; + +/// condition constant: TLS error: data length too long +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSDataLengthTooLong; + +/// condition constant: TLS error: decryption failed +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSDecryptionFailed; + +/// condition constant: TLS error: dh public value length is wrong +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSDHPublicValueLengthIsWrong; + +/// condition constant: TLS error: digest check failed +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSDigestCheckFailed; + +/// condition constant: TLS error: encrypted length too long +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSEncryptedLengthTooLong; + +/// condition constant: TLS error: error in received cipher list +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSErrorInReceivedCipherList; + +/// condition constant: TLS error: excessive message size +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSExcessiveMessageSize; + +/// condition constant: TLS error: extra data in message +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSExtraDataInMessage; + +/// condition constant: TLS error: got a fin before a ccs +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSGotAFinBeforeACCS; + +/// condition constant: TLS error: https proxy request +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSHTTPSProxyRequest; + +/// condition constant: TLS error: http request +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSHTTPRequest; + +/// condition constant: TLS error: tls invalid ecpointformat list +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSTLSInvalidECPointformatList; + +/// condition constant: TLS error: at least (D)TLS 1.2 needed in Suite B mode +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSAtLeastTLS12NeededInSuiteBMode; + +/// condition constant: TLS error: length mismatch +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSLengthMismatch; + +/// condition constant: TLS error: length too short +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSLengthTooShort; + +/// condition constant: TLS error: library has no ciphers +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSLibraryHasNoCiphers; + +/// condition constant: TLS error: illegal point compression +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSIllegalPointCompression; + +/// condition constant: TLS error: ext length mismatch +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSExtLengthMismatch; + +/// condition constant: TLS error: too much early data +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSTooMuchEarlyData; + +/// condition constant: TLS error: missing dsa signing cert +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSMissingDSASigningCert; + +/// condition constant: TLS error: version too high +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSVersionTooHigh; + +/// condition constant: TLS error: context not dane enabled +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSContextNotDANEEnabled; + +/// condition constant: TLS error: missing rsa certificate +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSMissingRSACertificate; + +/// condition constant: TLS error: missing rsa encrypting cert +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSMissingRSAEncryptingCert; + +/// condition constant: TLS error: missing rsa signing cert +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSMissingRSASigningCert; + +/// condition constant: TLS error: missing tmp dh key +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSMissingTmpDHKey; + +/// condition constant: TLS error: dane already enabled +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSDANEAlreadyEnabled; + +/// condition constant: TLS error: dane cannot override mtype full +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSDANECannotOverrideMtypeFull; + +/// condition constant: TLS error: invalid max early data +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSInvalidMaxEarlyData; + +/// condition constant: TLS error: dane not enabled +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSDANENotEnabled; + +/// condition constant: TLS error: no certificates returned +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSNoCertificatesReturned; + +/// condition constant: TLS error: no certificate assigned +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSNoCertificateAssigned; + +/// condition constant: TLS error: unexpected end of early data +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSUnexpectedEndOfEarlyData; + +/// condition constant: TLS error: no certificate set +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSNoCertificateSet; + +/// condition constant: TLS error: dane tlsa bad certificate +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSDANETLSABadCertificate; + +/// condition constant: TLS error: no ciphers available +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSNoCiphersAvailable; + +/// condition constant: TLS error: not on record boundary +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSNotOnRecordBoundary; + +/// condition constant: TLS error: no ciphers specified +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSNoCiphersSpecified; + +/// condition constant: TLS error: dane tlsa bad certificate usage +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSDANETLSABadCertificateUsage; + +/// condition constant: TLS error: no cipher match +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSNoCipherMatch; + +/// condition constant: TLS error: bad cipher +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSBadCipher; + +/// condition constant: TLS error: no compression specified +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSNoCompressionSpecified; + +/// condition constant: TLS error: no method specified +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSNoMethodSpecified; + +/// condition constant: TLS error: dane tlsa bad data length +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSDANETLSABadDataLength; + +/// condition constant: TLS error: no private key assigned +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSNoPrivateKeyAssigned; + +/// condition constant: TLS error: no protocols available +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSNoProtocolsAvailable; + +/// condition constant: TLS error: dane tlsa bad digest length +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSDANETLSABadDigestLength; + +/// condition constant: TLS error: no shared cipher +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSNoSharedCipher; + +/// condition constant: TLS error: exceeds max fragment size +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSExceedsMaxFragmentSize; + +/// condition constant: TLS error: null ssl ctx +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSNullSSLCtx; + +/// condition constant: TLS error: null ssl method passed +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSNullSSLMethodPassed; + +/// condition constant: TLS error: old session cipher not returned +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSOldSessionCipherNotReturned; + +/// condition constant: TLS error: packet length too long +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSPacketLengthTooLong; + +/// condition constant: TLS error: peer did not return a certificate +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSPeerDidNotReturnACertificate; + +/// condition constant: TLS error: dane tlsa bad matching type +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSDANETLSABadMatchingType; + +/// condition constant: TLS error: dane tlsa bad public key +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSDANETLSABadPublicKey; + +/// condition constant: TLS error: dane tlsa bad selector +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSDANETLSABadSelector; + +/// condition constant: TLS error: dane tlsa null data +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSDANETLSANullData; + +/// condition constant: TLS error: error setting tlsa base domain +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSErrorSettingTLSABaseDomain; + +/// condition constant: TLS error: invalid alert +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSInvalidAlert; + +/// condition constant: TLS error: custom ext handler already installed +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSCustomExtHandlerAlreadyInstalled; + +/// condition constant: TLS error: protocol is shutdown +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSProtocolIsShutdown; + +/// condition constant: TLS error: sct verification failed +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSSCTVerificationFailed; + +/// condition constant: TLS error: missing supported groups extension +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSMissingSupportedGroupsExtension; + +/// condition constant: TLS error: ssl session version mismatch +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSSSLSessionVersionMismatch; + +/// condition constant: TLS error: read bio not set +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSReadBioNotSet; + +/// condition constant: TLS error: invalid ct validation type +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSInvalidCTValidationType; + +/// condition constant: TLS error: record length mismatch +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSRecordLengthMismatch; + +/// condition constant: TLS error: no change following hrr +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSNoChangeFollowingHRR; + +/// condition constant: TLS error: required cipher missing +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSRequiredCipherMissing; + +/// condition constant: TLS error: no valid scts +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSNoValidSCTs; + +/// condition constant: TLS error: unsolicited extension +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSUnsolicitedExtension; + +/// condition constant: TLS error: ciphersuite digest has changed +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSCiphersuiteDigestHasChanged; + +/// condition constant: TLS error: bad psk +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSBadPSK; + +/// condition constant: TLS error: signature for non signing certificate +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSSignatureForNonSigningCertificate; + +/// condition constant: TLS error: missing signing cert +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSMissingSigningCert; + +/// condition constant: TLS error: inconsistent early data alpn +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSInconsistentEarlyDataAlpn; + +/// condition constant: TLS error: psk identity not found +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSPSKIdentityNotFound; + +/// condition constant: TLS error: psk no client cb +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSPSKNoClientCb; + +/// condition constant: TLS error: psk no server cb +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSPSKNoServerCb; + +/// condition constant: TLS error: clienthello tlsext +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSClienthelloTlsext; + +/// condition constant: TLS error: parse tlsext +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSParseTlsext; + +/// condition constant: TLS error: ssl ctx has no default ssl version +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSSSLCtxHasNoDefaultSSLVersion; + +/// condition constant: TLS error: ssl handshake failure +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSSSLHandshakeFailure; + +/// condition constant: TLS error: ssl library has no ciphers +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSSSLLibraryHasNoCiphers; + +/// condition constant: TLS error: inconsistent early data sni +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSInconsistentEarlyDataSNI; + +/// condition constant: TLS error: ssl3 ext invalid max fragment length +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSSSL3ExtInvalidMaxFragmentLength; + +/// condition constant: TLS error: bad early data +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSBadEarlyData; + +/// condition constant: TLS error: callback failed +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSCallbackFailed; + +/// condition constant: TLS error: no application protocol +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSNoApplicationProtocol; + +/// condition constant: TLS error: bad handshake state +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSBadHandshakeState; + +/// condition constant: TLS error: overflow error +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSOverflowError; + +/// condition constant: TLS error: invalid certificate or alg +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSInvalidCertificateOrAlg; + +/// condition constant: TLS error: unable to find public key parameters +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSUnableToFindPublicKeyParameters; + +/// condition constant: TLS error: bad packet +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSBadPacket; + +/// condition constant: TLS error: insufficient security +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSInsufficientSecurity; + +/// condition constant: TLS error: unable to load ssl3 md5 routines +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSUnableToLoadSSL3MD5Routines; + +/// condition constant: TLS error: unable to load ssl3 sha1 routines +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSUnableToLoadSSL3SHA1Routines; + +/// condition constant: TLS error: unexpected message +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSUnexpectedMessage; + +/// condition constant: TLS error: unexpected record +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSUnexpectedRecord; + +/// condition constant: TLS error: unknown alert type +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSUnknownAlertType; + +/// condition constant: TLS error: unknown certificate type +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSUnknownCertificateType; + +/// condition constant: TLS error: unknown cipher returned +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSUnknownCipherReturned; + +/// condition constant: TLS error: unknown cipher type +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSUnknownCipherType; + +/// condition constant: TLS error: unknown key exchange type +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSUnknownKeyExchangeType; + +/// condition constant: TLS error: unknown pkey type +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSUnknownPkeyType; + +/// condition constant: TLS error: unknown protocol +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSUnknownProtocol; + +/// condition constant: TLS error: binder does not verify +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSBinderDoesNotVerify; + +/// condition constant: TLS error: unknown ssl version +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSUnknownSSLVersion; + +/// condition constant: TLS error: unknown state +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSUnknownState; + +/// condition constant: TLS error: missing fatal +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSMissingFatal; + +/// condition constant: TLS error: unsupported compression algorithm +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSUnsupportedCompressionAlgorithm; + +/// condition constant: TLS error: unsupported protocol +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSUnsupportedProtocol; + +/// condition constant: TLS error: unsupported ssl version +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSUnsupportedSSLVersion; + +/// condition constant: TLS error: invalid ccs message +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSInvalidCCSMessage; + +/// condition constant: TLS error: wrong cipher returned +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSWrongCipherReturned; + +/// condition constant: TLS error: unexpected ccs message +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSUnexpectedCCSMessage; + +/// condition constant: TLS error: bad hrr version +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSBadHrrVersion; + +/// condition constant: TLS error: wrong signature length +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSWrongSignatureLength; + +/// condition constant: TLS error: wrong signature size +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSWrongSignatureSize; + +/// condition constant: TLS error: wrong ssl version +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSWrongSSLVersion; + +/// condition constant: TLS error: wrong version number +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSWrongVersionNumber; + +/// condition constant: TLS error: x509 lib +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSX509Lib; + +/// condition constant: TLS error: x509 verification setup problems +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSX509VerificationSetupProblems; + +/// condition constant: TLS error: path too long +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSPathTooLong; + +/// condition constant: TLS error: bad length +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSBadLength; + +/// condition constant: TLS error: attempt to reuse session in different context +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSAttemptToReuseSessionInDifferentContext; + +/// condition constant: TLS error: ssl session id context too long +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSSSLSessionIDContextTooLong; + +/// condition constant: TLS error: library bug +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSLibraryBug; + +/// condition constant: TLS error: serverhello tlsext +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSServerhelloTlsext; + +/// condition constant: TLS error: uninitialized +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSUninitialized; + +/// condition constant: TLS error: session id context uninitialized +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSSessionIDContextUninitialized; + +/// condition constant: TLS error: post handshake auth encoding err +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSPostHandshakeAuthEncodingErr; + +/// condition constant: TLS error: extension not received +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSExtensionNotReceived; + +/// condition constant: TLS error: invalid command +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSInvalidCommand; + +/// condition constant: TLS error: decryption failed or bad record mac +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSDecryptionFailedOrBadRecordMac; + +/// condition constant: TLS error: invalid context +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSInvalidContext; + +/// condition constant: TLS error: invalid config +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSInvalidConfig; + +/// condition constant: TLS error: not server +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSNotServer; + +/// condition constant: TLS error: request pending +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSRequestPending; + +/// condition constant: TLS error: request sent +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSRequestSent; + +/// condition constant: TLS error: no cookie callback set +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSNoCookieCallbackSet; + +/// condition constant: TLS error: private key mismatch +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSPrivateKeyMismatch; + +/// condition constant: TLS error: not replacing certificate +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSNotReplacingCertificate; + +/// condition constant: TLS error: missing parameters +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSMissingParameters; + +/// condition constant: TLS error: application data after close notify +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSApplicationDataAfterCloseNotify; + +/// condition constant: TLS error: bad legacy version +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSBadLegacyVersion; + +/// condition constant: TLS error: mixed handshake and non handshake data +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSMixedHandshakeAndNonHandshakeData; + +/// condition constant: TLS error: unexpected eof while reading +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSUnexpectedEofWhileReading; + +/// condition constant: TLS error: no suitable groups +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSNoSuitableGroups; + +/// condition constant: TLS error: copy parameters failed +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSCopyParametersFailed; + +/// condition constant: TLS error: no suitable digest algorithm +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSNoSuitableDigestAlgorithm; + +/// condition constant: TLS error: record too small +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSRecordTooSmall; + +/// condition constant: TLS error: cannot get group name +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSCannotGetGroupName; + +/// condition constant: TLS error: ssl3 session id too long +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSSSL3SessionIDTooLong; + +/// condition constant: TLS error: ssl session id callback failed +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSSSLSessionIDCallbackFailed; + +/// condition constant: TLS error: ssl session id conflict +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSSSLSessionIDConflict; + +/// condition constant: TLS error: ssl session id has bad length +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSSSLSessionIDHasBadLength; + +/// condition constant: TLS error: bad ecc cert +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSBadECCCert; + +/// condition constant: TLS error: bad ecpoint +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSBadEcpoint; + +/// condition constant: TLS error: compression id not within private range +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSCompressionIDNotWithinPrivateRange; + +/// condition constant: TLS error: cookie mismatch +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSCookieMismatch; + +/// condition constant: TLS error: duplicate compression id +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSDuplicateCompressionId; + +/// condition constant: TLS error: missing tmp ecdh key +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSMissingTmpECDHKey; + +/// condition constant: TLS error: read timeout expired +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSReadTimeoutExpired; + +/// condition constant: TLS error: unable to find ecdh parameters +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSUnableToFindECDHParameters; + +/// condition constant: TLS error: unsupported elliptic curve +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSUnsupportedEllipticCurve; + +/// condition constant: TLS error: ecc cert not for signing +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSECCCertNotForSigning; + +/// condition constant: TLS error: ssl3 ext invalid servername +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSSSL3ExtInvalidServername; + +/// condition constant: TLS error: ssl3 ext invalid servername type +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSSSL3ExtInvalidServernameType; + +/// condition constant: TLS error: no required digest +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSNoRequiredDigest; + +/// condition constant: TLS error: invalid ticket keys length +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSInvalidTicketKeysLength; + +/// condition constant: TLS error: invalid status response +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSInvalidStatusResponse; + +/// condition constant: TLS error: unsupported status type +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSUnsupportedStatusType; + +/// condition constant: TLS error: Peer haven't sent GOST certificate, required for selected ciphersuite +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSNoGostCertificateSentByPeer; + +/// condition constant: TLS error: no client cert method +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSNoClientCertMethod; + +/// condition constant: TLS error: bad handshake length +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSBadHandshakeLength; + +/// condition constant: TLS error: dtls message too big +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSDTLSMessageTooBig; + +/// condition constant: TLS error: renegotiate ext too long +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSRenegotiateExtTooLong; + +/// condition constant: TLS error: renegotiation encoding err +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSRenegotiationEncodingErr; + +/// condition constant: TLS error: renegotiation mismatch +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSRenegotiationMismatch; + +/// condition constant: TLS error: unsafe legacy renegotiation disabled +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSUnsafeLegacyRenegotiationDisabled; + +/// condition constant: TLS error: no renegotiation +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSNoRenegotiation; + +/// condition constant: TLS error: inconsistent compression +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSInconsistentCompression; + +/// condition constant: TLS error: invalid compression algorithm +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSInvalidCompressionAlgorithm; + +/// condition constant: TLS error: required compression algorithm missing +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSRequiredCompressionAlgorithmMissing; + +/// condition constant: TLS error: compression disabled +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSCompressionDisabled; + +/// condition constant: TLS error: old session compression algorithm not returned +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSOldSessionCompressionAlgorithmNotReturned; + +/// condition constant: TLS error: scsv received when renegotiating +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSSCSVReceivedWhenRenegotiating; + +/// condition constant: TLS error: bad srp a length +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSBadSRPALength; + +/// condition constant: TLS error: bad srtp mki value +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSBadSrtpMkiValue; + +/// condition constant: TLS error: bad srtp protection profile list +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSBadSrtpProtectionProfileList; + +/// condition constant: TLS error: empty srtp protection profile list +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSEmptySrtpProtectionProfileList; + +/// condition constant: TLS error: invalid srp username +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSInvalidSrpUsername; + +/// condition constant: TLS error: can't find SRP server param +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSMissingSrpParam; + +/// condition constant: TLS error: no srtp profiles +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSNoSrtpProfiles; + +/// condition constant: TLS error: signature algorithms error +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSSignatureAlgorithmsError; + +/// condition constant: TLS error: error with the srp params +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSSrpACalc; + +/// condition constant: TLS error: srtp could not allocate profiles +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSSrtpCouldNotAllocateProfiles; + +/// condition constant: TLS error: srtp protection profile list too long +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSSrtpProtectionProfileListTooLong; + +/// condition constant: TLS error: srtp unknown protection profile +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSSrtpUnknownProtectionProfile; + +/// condition constant: TLS error: tls illegal exporter label +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSTLSIllegalExporterLabel; + +/// condition constant: TLS error: unknown digest +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSUnknownDigest; + +/// condition constant: TLS error: use srtp not negotiated +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSUseSrtpNotNegotiated; + +/// condition constant: TLS error: wrong signature type +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSWrongSignatureType; + +/// condition constant: TLS error: bad srp parameters +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSBadSrpParameters; + +/// condition constant: TLS error: ssl negative length +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSSSLNegativeLength; + +/// condition constant: TLS error: inappropriate fallback +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSInappropriateFallback; + +/// condition constant: TLS error: ecdh required for suiteb mode +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSECDHRequiredForSuiteBMode; + +/// condition constant: TLS error: no shared signature algorithms +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSNoSharedSignatureAlgorithms; + +/// condition constant: TLS error: cert cb error +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSCertCbError; + +/// condition constant: TLS error: wrong curve +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSWrongCurve; + +/// condition constant: TLS error: illegal Suite B digest +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSIllegalSuiteBDigest; + +/// condition constant: TLS error: missing ecdsa signing cert +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSMissingECDSASigningCert; + +/// condition constant: TLS error: wrong certificate type +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSWrongCertificateType; + +/// condition constant: TLS error: bad value +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSBadValue; + +/// condition constant: TLS error: invalid null cmd name +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSInvalidNullCmdName; + +/// condition constant: TLS error: unknown cmd name +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSUnknownCmdName; + +/// condition constant: TLS error: invalid serverinfo data +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSInvalidServerinfoData; + +/// condition constant: TLS error: no pem extensions +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSNoPEMExtensions; + +/// condition constant: TLS error: bad data +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSBadData; + +/// condition constant: TLS error: pem name bad prefix +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSPEMNameBadPrefix; + +/// condition constant: TLS error: pem name too short +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSPEMNameTooShort; + +/// condition constant: TLS error: dh key too small +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSDHKeyTooSmall; + +/// condition constant: TLS error: version too low +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSVersionTooLow; + +/// condition constant: TLS error: ca key too small +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSCAKeyTooSmall; + +/// condition constant: TLS error: ca md too weak +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSCAMDTooWeak; + +/// condition constant: TLS error: ee key too small +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSEeKeyTooSmall; + +/// condition constant: TLS error: cookie gen callback failure +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSCookieGenCallbackFailure; + +/// condition constant: TLS error: fragmented client hello +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSFragmentedClientHello; + +/// condition constant: TLS error: invalid sequence number +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSInvalidSequenceNumber; + +/// condition constant: TLS error: no verify cookie callback +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSNoVerifyCookieCallback; + +/// condition constant: TLS error: length too long +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSLengthTooLong; + +/// condition constant: TLS error: failed to init async +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSFailedToInitAsync; + +/// condition constant: TLS error: pipeline failure +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSPipelineFailure; + +/// condition constant: TLS error: shutdown while in init +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSShutdownWhileInInit; + +/// condition constant: TLS error: ssl session id too long +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSSSLSessionIDTooLong; + +/// condition constant: TLS error: too many warn alerts +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSTooManyWarnAlerts; + +/// condition constant: TLS error: no shared groups +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSNoSharedGroups; + +/// condition constant: TLS error: bad record type +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSBadRecordType; + +/// condition constant: TLS error: invalid session id +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSInvalidSessionId; + +/// condition constant: TLS alert: unexpected message +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSSSLv3AlertUnexpectedMessage; + +/// condition constant: TLS alert: bad record mac +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSSSLv3AlertBadRecordMac; + +/// condition constant: TLS alert: decryption failed +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSTLSv1AlertDecryptionFailed; + +/// condition constant: TLS alert: record overflow +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSTLSv1AlertRecordOverflow; + +/// condition constant: TLS alert: decompression failure +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSSSLv3AlertDecompressionFailure; + +/// condition constant: TLS alert: handshake failure +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSSSLv3AlertHandshakeFailure; + +/// condition constant: TLS alert: no certificate +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSSSLv3AlertNoCertificate; + +/// condition constant: TLS alert: bad certificate +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSSSLv3AlertBadCertificate; + +/// condition constant: TLS alert: unsupported certificate +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSSSLv3AlertUnsupportedCertificate; + +/// condition constant: TLS alert: certificate revoked +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSSSLv3AlertCertificateRevoked; + +/// condition constant: TLS alert: certificate expired +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSSSLv3AlertCertificateExpired; + +/// condition constant: TLS alert: certificate unknown +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSSSLv3AlertCertificateUnknown; + +/// condition constant: TLS alert: illegal parameter +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSSSLv3AlertIllegalParameter; + +/// condition constant: TLS alert: unknown ca, +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSTLSv1AlertUnknownCa; + +/// condition constant: TLS alert: access denied +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSTLSv1AlertAccessDenied; + +/// condition constant: TLS alert: decode error, +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSTLSv1AlertDecodeError; + +/// condition constant: TLS alert: decrypt error +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSTLSv1AlertDecryptError; + +/// condition constant: TLS alert: export restriction +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSTLSv1AlertExportRestriction; + +/// condition constant: TLS alert: protocol version +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSTLSv1AlertProtocolVersion; + +/// condition constant: TLS alert: insufficient security +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSTLSv1AlertInsufficientSecurity; + +/// condition constant: TLS alert: internal error +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSTLSv1AlertInternalError; + +/// condition constant: TLS alert: inappropriate fallback +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSTLSv1AlertInappropriateFallback; + +/// condition constant: TLS alert: user cancelled +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSTLSv1AlertUserCancelled; + +/// condition constant: TLS alert: no renegotiation +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSTLSv1AlertNoRenegotiation; + +/// condition constant: TLS alert: missing extension +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSTLSv13AlertMissingExtension; + +/// condition constant: TLS error: unsupported extension +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSTLSv1UnsupportedExtension; + +/// condition constant: TLS error: certificate unobtainable +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSTLSv1CertificateUnobtainable; + +/// condition constant: TLS error: unrecognized name +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSTLSv1UnrecognizedName; + +/// condition constant: TLS error: bad certificate status response +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSTLSv1BadCertificateStatusResponse; + +/// condition constant: TLS error: bad certificate hash value +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSTLSv1BadCertificateHashValue; + +/// condition constant: TLS alert: certificate required +extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSTLSv13AlertCertificateRequired; + #endif // TLSCOND_H diff -Nru dcmtk-3.6.6/dcmtls/include/dcmtk/dcmtls/tlslayer.h dcmtk-3.6.7/dcmtls/include/dcmtk/dcmtls/tlslayer.h --- dcmtk-3.6.6/dcmtls/include/dcmtk/dcmtls/tlslayer.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmtls/include/dcmtk/dcmtls/tlslayer.h 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1998-2019, OFFIS e.V. + * Copyright (C) 1998-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -190,16 +190,16 @@ /** loads the private key used for authentication of this application from a file. * @param fileName path to the private key file * @param fileType, must be SSL_FILETYPE_PEM or SSL_FILETYPE_ASN1 - * @return TCS_ok if successful, an error code otherwise + * @return EC_Normal if successful, an error code otherwise */ - DcmTransportLayerStatus setPrivateKeyFile(const char *fileName, DcmKeyFileFormat fileType); + OFCondition setPrivateKeyFile(const char *fileName, DcmKeyFileFormat fileType); /** loads the certificate (public key) used for authentication of this application from a file. * @param fileName path to the certificate file * @param fileType, must be SSL_FILETYPE_PEM or SSL_FILETYPE_ASN1 - * @return TCS_ok if successful, an error code otherwise + * @return EC_Normal if successful, an error code otherwise */ - DcmTransportLayerStatus setCertificateFile(const char *fileName, DcmKeyFileFormat fileType); + OFCondition setCertificateFile(const char *fileName, DcmKeyFileFormat fileType); /** checks if the private key and the certificate set using setPrivateKeyFile() * and setCertificateFile() match, i.e. if they establish a private/public key pair. @@ -210,24 +210,40 @@ /** loads a certificate from a file and adds it to the pool of trusted certificates. * @param fileName path to the certificate file * @param fileType, must be SSL_FILETYPE_PEM or SSL_FILETYPE_ASN1 - * @return TCS_ok if successful, an error code otherwise + * @return EC_Normal if successful, an error code otherwise */ - DcmTransportLayerStatus addTrustedCertificateFile(const char *fileName, DcmKeyFileFormat fileType); + OFCondition addTrustedCertificateFile(const char *fileName, DcmKeyFileFormat fileType); /** loads all files as certificates from the specified directory and adds them * to the pool of trusted certificates. * @param fileName path to the directory containing certificate files * @param fileType, must be SSL_FILETYPE_PEM or SSL_FILETYPE_ASN1 - * @return TCS_ok if successful, an error code otherwise + * @return EC_Normal if successful, an error code otherwise */ - DcmTransportLayerStatus addTrustedCertificateDir(const char *pathName, DcmKeyFileFormat fileType); + OFCondition addTrustedCertificateDir(const char *pathName, DcmKeyFileFormat fileType); + + /** loads a certificate revocation list (CRL) in X.509 format from a file and + * adds it to the pool of trusted certificates and CRLs. + * @param fileName path to the CRL file + * @param filetype file format: X509_FILETYPE_PEM or X509_FILETYPE_ASN1 + * @return EC_Normal if successful, an error code otherwise + */ + OFCondition addCertificateRevocationList(const char *fileName, DcmKeyFileFormat fileType); + + /** set the verification mode for certificate revocation lists. + * When enabled, a CRL is expected to be present either for the leaf + * certificate, or for the entire certificate chain, + * and certificate verification will fail if no CRL is found. + * @param crlmode CRL verification mode + */ + OFCondition setCRLverification(DcmTLSCRLVerification crlmode); /** loads certificates from a file and adds them to the pool of trusted client * certificates. * @param fileName path to the certificate file - * @return TCS_ok if successful, an error code otherwise + * @return EC_Normal if successful, an error code otherwise */ - DcmTransportLayerStatus addTrustedClientCertificateFile(const char *fileName); + OFCondition addTrustedClientCertificateFile(const char *fileName); /** appends the given verification flags to the existing ones in this OpenSSL context * (using binary or). @@ -235,17 +251,33 @@ * therefore, these semantics were guessed based on looking at the OpenSSL source * code! * @param flags the verification flags to append, e. g. X509_V_FLAG_CRL_CHECK. - * @return TCS_ok if the flags were appended to the existing ones, TCS_unspecifiedError - * if OpenSSL returns an (unspecified, since the documentation is missing) error. + * @return EC_Normal if the flags were appended to the existing ones, an error code otherwise. + */ + OFCondition addVerificationFlags(unsigned long flags); + + /** loads a certificate or certificate chain from a file and checks whether + * it can be verified against the current settings of the trust store. + * @param fileName path to the certificate file + * @param fileType, must be SSL_FILETYPE_PEM or SSL_FILETYPE_ASN1 + * @return EC_Normal if verification succeeded, an error code otherwise */ - DcmTransportLayerStatus addVerificationFlags(unsigned long flags); + OFCondition verifyClientCertificate(const char *fileName, DcmKeyFileFormat fileType); + + /** loads a certificate file and checks whether it is a + * valid (e.g. non-expired), self-signed root certificate that + * can be verified against itself + * @param fileName path to the certificate file + * @param fileType, must be SSL_FILETYPE_PEM or SSL_FILETYPE_ASN1 + * @return EC_Normal if certificate is a root certificate, an error code otherwise + */ + static OFCondition isRootCertificate(const char *fileName, DcmKeyFileFormat fileType); /** replace the current list of ciphersuites by the list of ciphersuites * for the given profile. * @param profile TLS Security Profile - * @return TCS_ok if successful, an error code otherwise + * @return EC_Normal if successful, an error code otherwise */ - DcmTransportLayerStatus setTLSProfile(DcmTLSSecurityProfile profile); + OFCondition setTLSProfile(DcmTLSSecurityProfile profile); /** clear the current list of ciphersuites. Equivalent to * calling setTLSProfile(TSP_Profile_None). @@ -256,16 +288,16 @@ * It is the responsibility of the user to ensure that the added ciphersuite * does not break the rules of the selected profile. Use with care! * @param suite TLS ciphersuite name, in the official TLS name form. - * @return TCS_ok if successful, an error code otherwise + * @return EC_Normal if successful, an error code otherwise */ - DcmTransportLayerStatus addCipherSuite(const char *suite); + OFCondition addCipherSuite(const char *suite); /** activate the current list of ciphersuites by transferring to the OpenSSL layer * This method needs to be called once after the list of ciphersuites has been * defined used setTLSProfile() and addCipherSuite(). - * @return TCS_ok if successful, an error code otherwise + * @return EC_Normal if successful, an error code otherwise */ - DcmTransportLayerStatus activateCipherSuites(); + OFCondition activateCipherSuites(); /** sets the list of ciphersuites to negotiate, in OpenSSL syntax. * @note This method is deprecated because it breaks the encapsulation of the @@ -278,9 +310,9 @@ * The list must be in OpenSSL syntax (use findOpenSSLCipherSuiteName to convert * from RFC 2246 ciphersuite names to OpenSSL names), with ciphersuites separated * by ':' characters. - * @return TCS_ok if successful, an error code otherwise + * @return EC_Normal if successful, an error code otherwise */ - DcmTransportLayerStatus setCipherSuites(const char *suites); + OFCondition setCipherSuites(const char *suites); /** checks if enough entropy data is available to write back a modified * random seed file. @@ -307,7 +339,7 @@ /** modifies the PRNG by adding random data from the given buffer * to the PRNG state. * @param buf pointer to buffer containing random data - * @bufSize number of bytes in buffer + * @param bufSize number of bytes in buffer */ void addPRNGseed(void *buf, size_t bufSize); @@ -330,6 +362,12 @@ */ void setPrivateKeyPasswdFromConsole(); + /** loads the hard-coded set of Diffie-Hellman parameters from memory. + * These parameters are required for DH, DHE or DSS ciphersuites. + * @return OFTrue if successful, OFFalse otherwise. + */ + OFBool setBuiltInDHParameters(); + /** loads a set of Diffie-Hellman parameters from file. * These parameters are required for DH, DHE or DSS ciphersuites. * @param filename path to the DH parameter file @@ -376,12 +414,28 @@ /** load an X.509 certificate from file. * @param fileName path to the certificate file - * @param fileType, must be SSL_FILETYPE_PEM or SSL_FILETYPE_ASN1 + * @param fileType must be SSL_FILETYPE_PEM or SSL_FILETYPE_ASN1 * @return pointer to X509 object if successful, NULL otherwise. * The X509 object must be freed by the caller. */ static X509 *loadCertificateFile(const char *fileName, DcmKeyFileFormat fileType); + /** convert an error code as returned by the OpenSSL functions ERR_get_error(), + * ERR_peek_error() and ERR_peek_last_error() into an OFCondition error code. + * @param errorCode OpenSSL error code + * @param logAsError if true, write the error description to the logger with severity ERROR + * @return OFCondition object + */ + static OFCondition convertOpenSSLError(unsigned long errorCode, OFBool logAsError); + + /** convert an error code as returned by the OpenSSL function X509_STORE_CTX_get_error() + * into an OFCondition error code. + * @param errorCode OpenSSL error code + * @param logAsError if true, write the error description to the logger with severity ERROR + * @return OFCondition object + */ + static OFCondition convertOpenSSLX509VerificationError(int errorCode, OFBool logAsError); + /** returns a string in OpenSSL syntax that contains the currently defined * list of TLS ciphersuites. * @param cslist The list of ciphersuites in OpenSSL syntax is written to this string. diff -Nru dcmtk-3.6.6/dcmtls/include/dcmtk/dcmtls/tlsopt.h dcmtk-3.6.7/dcmtls/include/dcmtk/dcmtls/tlsopt.h --- dcmtk-3.6.6/dcmtls/include/dcmtk/dcmtls/tlsopt.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmtls/include/dcmtk/dcmtls/tlsopt.h 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2017-2019, OFFIS e.V. + * Copyright (C) 2017-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -110,9 +110,25 @@ */ DcmTransportLayer *getTransportLayer(); + /** loads a certificate or certificate chain from a file and checks whether + * it can be verified against the current settings of the trust store. + * @param fileName path to the certificate file + * @return EC_Normal if verification succeeded, an error code otherwise + */ + OFCondition verifyClientCertificate(const char *fileName); + + /** loads a certificate file and checks whether it is a + * valid (e.g. non-expired), self-signed root certificate that + * can be verified against itself + * @param fileName path to the certificate file + * @return EC_Normal if certificate is a root certificate, an error code otherwise + */ + OFCondition isRootCertificate(const char *fileName); + /** checks if the command line option --list-ciphers was given. * In this case the list of supported TLS ciphersuites should be * printed to stdout and the application should terminate. + * @param cmd the command line that was used * @return true if --list-ciphers option was found, false otherwise. */ static OFBool listOfCiphersRequested(OFCommandLine& cmd); diff -Nru dcmtk-3.6.6/dcmtls/include/dcmtk/dcmtls/tlsscu.h dcmtk-3.6.7/dcmtls/include/dcmtk/dcmtls/tlsscu.h --- dcmtk-3.6.6/dcmtls/include/dcmtk/dcmtls/tlsscu.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmtls/include/dcmtk/dcmtls/tlsscu.h 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2010-2019, OFFIS e.V. + * Copyright (C) 2010-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -114,18 +114,18 @@ /** replace the current list of ciphersuites by the list of ciphersuites * for the given profile. Caller must ensure that initNetwork() is executed before this call. * @param profile TLS Security Profile - * @return TCS_ok if successful, an error code otherwise + * @return EC_Normal if successful, an error code otherwise */ - virtual DcmTransportLayerStatus setTLSProfile(DcmTLSSecurityProfile profile); + virtual OFCondition setTLSProfile(DcmTLSSecurityProfile profile); /** adds a ciphersuite to the list of ciphersuites for TLS negotiation. * Caller must ensure that initNetwork() is executed before this call. * It is the responsibility of the user to ensure that the added ciphersuite * does not break the rules of the selected profile. Use with care! * @param suite TLS ciphersuite name, in the official TLS name form. - * @return TCS_ok if successful, an error code otherwise + * @return EC_Normal if successful, an error code otherwise */ - virtual DcmTransportLayerStatus addCipherSuite(const OFString& suite); + virtual OFCondition addCipherSuite(const OFString& suite); /** Set file to be used as random seed for initializing the Pseudo Random * Number Generator (PRNG) diff -Nru dcmtk-3.6.6/dcmtls/include/dcmtk/dcmtls/tlstrans.h dcmtk-3.6.7/dcmtls/include/dcmtk/dcmtls/tlstrans.h --- dcmtk-3.6.6/dcmtls/include/dcmtk/dcmtls/tlstrans.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmtls/include/dcmtk/dcmtls/tlstrans.h 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1998-2018, OFFIS e.V. + * Copyright (C) 1998-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -59,24 +59,24 @@ /** performs server side handshake on established socket. * This function is used to establish a secure transport connection * over the established TCP connection. - * @return TCS_ok if successful, an error code otherwise. + * @return EC_Normal if successful, an error code otherwise. */ - virtual DcmTransportLayerStatus serverSideHandshake(); + virtual OFCondition serverSideHandshake(); /** performs client side handshake on established socket. * This function is used to establish a secure transport connection * over the established TCP connection. - * @return TCS_ok if successful, an error code otherwise. + * @return EC_Normal if successful, an error code otherwise. */ - virtual DcmTransportLayerStatus clientSideHandshake(); + virtual OFCondition clientSideHandshake(); /** performs a re-negotiation of the connection with different * connection parameters. Used to change the parameters of the * secure transport connection. * @param newSuite string identifying the ciphersuite to be negotiated. - * @return TCS_ok if successful, an error code otherwise. + * @return EC_Normal if successful, an error code otherwise. */ - virtual DcmTransportLayerStatus renegotiate(const char *newSuite); + virtual OFCondition renegotiate(const char *newSuite); /** attempts to read nbyte bytes from the transport connection and * writes them into the given buffer. @@ -100,6 +100,12 @@ */ virtual void close(); + /** Closes the transport connection directly. If a secure connection + * is used, a closure alert is NOT sent before the connection + * is closed. + */ + virtual void closeTransportConnection(); + /** returns the size in bytes of the peer certificate of a secure connection. * @return peer certificate length in bytes */ @@ -132,12 +138,6 @@ */ virtual OFString& dumpConnectionParameters(OFString& str); - /** returns an error string for a given error code. - * @param code error code - * @return description for error code - */ - virtual const char *errorString(DcmTransportLayerStatus code); - private: /// private undefined copy constructor @@ -152,8 +152,6 @@ /// pointer to the TLS connection structure used by the OpenSSL library SSL *tlsConnection; - /// last error code returned by the OpenSSL library - unsigned long lastError; }; #endif /* WITH_OPENSSL */ diff -Nru dcmtk-3.6.6/dcmtls/libsrc/CMakeLists.txt dcmtk-3.6.7/dcmtls/libsrc/CMakeLists.txt --- dcmtk-3.6.6/dcmtls/libsrc/CMakeLists.txt 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmtls/libsrc/CMakeLists.txt 2022-04-28 13:47:25.000000000 +0000 @@ -1,5 +1,13 @@ # create library from source files -DCMTK_ADD_LIBRARY(dcmtls tlscond tlslayer tlsopt tlstrans tlsscu tlsciphr) +DCMTK_ADD_LIBRARY(dcmtls + tlscond.cc + tlslayer.cc + tlsopt.cc + tlstrans.cc + tlsscu.cc + tlsciphr.cc +) DCMTK_TARGET_LINK_MODULES(dcmtls ofstd dcmdata dcmnet) DCMTK_TARGET_LINK_LIBRARIES(dcmtls ${OPENSSL_LIBS}) +set_property(TARGET dcmtls PROPERTY OUTPUT_NAME "dcmtls${DCMTK_TLS_LIBRARY_POSTFIX}") diff -Nru dcmtk-3.6.6/dcmtls/libsrc/Makefile.dep dcmtk-3.6.7/dcmtls/libsrc/Makefile.dep --- dcmtk-3.6.6/dcmtls/libsrc/Makefile.dep 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmtls/libsrc/Makefile.dep 2022-04-28 13:47:25.000000000 +0000 @@ -1,31 +1,30 @@ tlsciphr.o: tlsciphr.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmtls/tlsciphr.h \ - ../../ofstd/include/dcmtk/ofstd/ofstring.h \ + ../../ofstd/include/dcmtk/ofstd/ofcond.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/ofstring.h \ ../../ofstd/include/dcmtk/ofstd/ofvector.h \ - ../include/dcmtk/dcmtls/tlsdefin.h \ + ../include/dcmtk/dcmtls/tlsdefin.h ../include/dcmtk/dcmtls/tlscond.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ + ../include/dcmtk/dcmtls/tlslayer.h \ ../../dcmnet/include/dcmtk/dcmnet/dcmlayer.h \ ../../ofstd/include/dcmtk/ofstd/ofutil.h \ ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../dcmnet/include/dcmtk/dcmnet/dndefine.h \ ../../dcmnet/include/dcmtk/dcmnet/dntypes.h \ - ../include/dcmtk/dcmtls/tlslayer.h \ ../../dcmnet/include/dcmtk/dcmnet/assoc.h \ ../../dcmnet/include/dcmtk/dcmnet/dicom.h \ ../../dcmnet/include/dcmtk/dcmnet/cond.h \ ../../ofstd/include/dcmtk/ofstd/ofconsol.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ - ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ - ../../ofstd/include/dcmtk/ofstd/ofcond.h \ - ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../../dcmnet/include/dcmtk/dcmnet/dcompat.h \ - ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \ ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \ ../../oflog/include/dcmtk/oflog/oflog.h \ ../../oflog/include/dcmtk/oflog/logger.h \ @@ -57,13 +56,13 @@ ../../dcmnet/include/dcmtk/dcmnet/dcuserid.h tlscond.o: tlscond.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../include/dcmtk/dcmtls/tlscond.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.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/ofstring.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ @@ -92,7 +91,6 @@ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../../dcmnet/include/dcmtk/dcmnet/dcompat.h \ - ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \ ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \ ../../oflog/include/dcmtk/oflog/oflog.h \ ../../oflog/include/dcmtk/oflog/logger.h \ @@ -124,18 +122,22 @@ ../../dcmnet/include/dcmtk/dcmnet/extneg.h \ ../../dcmnet/include/dcmtk/dcmnet/dcuserid.h \ ../include/dcmtk/dcmtls/tlsdefin.h ../include/dcmtk/dcmtls/tlsciphr.h \ + ../include/dcmtk/dcmtls/tlscond.h \ + ../../ofstd/include/dcmtk/ofstd/ofdiag.h \ ../include/dcmtk/dcmtls/tlstrans.h \ - ../../dcmnet/include/dcmtk/dcmnet/dcmtrans.h + ../../dcmnet/include/dcmtk/dcmnet/dcmtrans.h \ + ../../ofstd/include/dcmtk/ofstd/ofrand.h \ + ../../ofstd/include/dcmtk/ofstd/diag/constexp.def tlsopt.o: tlsopt.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmtls/tlsopt.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../include/dcmtk/dcmtls/tlslayer.h \ ../../dcmnet/include/dcmtk/dcmnet/dcmlayer.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/ofstring.h \ ../../ofstd/include/dcmtk/ofstd/ofutil.h \ ../../ofstd/include/dcmtk/ofstd/oftraits.h \ @@ -151,7 +153,6 @@ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../../dcmnet/include/dcmtk/dcmnet/dcompat.h \ - ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \ ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \ ../../oflog/include/dcmtk/oflog/oflog.h \ ../../oflog/include/dcmtk/oflog/logger.h \ @@ -198,13 +199,13 @@ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../include/dcmtk/dcmtls/tlsscu.h ../../dcmnet/include/dcmtk/dcmnet/scu.h \ ../../dcmdata/include/dcmtk/dcmdata/dctk.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 \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../oflog/include/dcmtk/oflog/config/defines.h \ ../../oflog/include/dcmtk/oflog/helpers/threadcf.h \ ../../oflog/include/dcmtk/oflog/loglevel.h \ @@ -317,7 +318,6 @@ ../../dcmnet/include/dcmtk/dcmnet/cond.h \ ../../ofstd/include/dcmtk/ofstd/ofconsol.h \ ../../dcmnet/include/dcmtk/dcmnet/dcompat.h \ - ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \ ../../dcmnet/include/dcmtk/dcmnet/lst.h \ ../../dcmnet/include/dcmtk/dcmnet/dul.h \ ../../dcmnet/include/dcmtk/dcmnet/extneg.h \ @@ -332,35 +332,37 @@ ../../dcmnet/include/dcmtk/dcmnet/dimse.h \ ../include/dcmtk/dcmtls/tlstrans.h \ ../../dcmnet/include/dcmtk/dcmnet/dcmtrans.h \ + ../include/dcmtk/dcmtls/tlslayer.h \ ../../dcmnet/include/dcmtk/dcmnet/dcmlayer.h \ - ../include/dcmtk/dcmtls/tlslayer.h ../include/dcmtk/dcmtls/tlsciphr.h \ - ../../dcmnet/include/dcmtk/dcmnet/diutil.h + ../include/dcmtk/dcmtls/tlsciphr.h \ + ../../dcmnet/include/dcmtk/dcmnet/diutil.h \ + ../include/dcmtk/dcmtls/tlscond.h tlstrans.o: tlstrans.cc ../../config/include/dcmtk/config/osconfig.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ + ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ + ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../include/dcmtk/dcmtls/tlstrans.h \ ../../dcmnet/include/dcmtk/dcmnet/dcmtrans.h \ + ../../ofstd/include/dcmtk/ofstd/ofcond.h \ + ../../ofstd/include/dcmtk/ofstd/ofstring.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ - ../../ofstd/include/dcmtk/ofstd/oftypes.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 \ + ../include/dcmtk/dcmtls/tlsdefin.h ../include/dcmtk/dcmtls/tlslayer.h \ ../../dcmnet/include/dcmtk/dcmnet/dcmlayer.h \ ../../ofstd/include/dcmtk/ofstd/ofutil.h \ ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ - ../../dcmnet/include/dcmtk/dcmnet/dndefine.h \ - ../../dcmnet/include/dcmtk/dcmnet/dntypes.h \ - ../include/dcmtk/dcmtls/tlsdefin.h ../include/dcmtk/dcmtls/tlslayer.h \ ../../dcmnet/include/dcmtk/dcmnet/assoc.h \ ../../dcmnet/include/dcmtk/dcmnet/dicom.h \ ../../dcmnet/include/dcmtk/dcmnet/cond.h \ ../../ofstd/include/dcmtk/ofstd/ofconsol.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ - ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../../dcmnet/include/dcmtk/dcmnet/dcompat.h \ ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \ @@ -409,4 +411,5 @@ ../../dcmdata/include/dcmtk/dcmdata/dcstack.h \ ../../dcmdata/include/dcmtk/dcmdata/dclist.h \ ../../dcmdata/include/dcmtk/dcmdata/dcpcache.h \ - ../../dcmnet/include/dcmtk/dcmnet/dimse.h + ../../dcmnet/include/dcmtk/dcmnet/dimse.h \ + ../include/dcmtk/dcmtls/tlscond.h diff -Nru dcmtk-3.6.6/dcmtls/libsrc/tlsciphr.cc dcmtk-3.6.7/dcmtls/libsrc/tlsciphr.cc --- dcmtk-3.6.6/dcmtls/libsrc/tlsciphr.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmtls/libsrc/tlsciphr.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2018-2019, OFFIS e.V. + * Copyright (C) 2018-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -23,6 +23,7 @@ #include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ #include "dcmtk/dcmtls/tlsciphr.h" #include "dcmtk/dcmtls/tlsdefin.h" +#include "dcmtk/dcmtls/tlscond.h" #include "dcmtk/dcmtls/tlslayer.h" /* for TLS_ERROR macro */ #ifdef WITH_OPENSSL @@ -32,7 +33,7 @@ #include END_EXTERN_C -#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER) +#ifndef HAVE_OPENSSL_PROTOTYPE_SSL_CTX_GET_CIPHERS #define SSL_CTX_get_ciphers(ctx) (ctx)->cipher_list #endif @@ -125,7 +126,8 @@ {"TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA", TLS1_TXT_ECDHE_RSA_WITH_AES_256_CBC_SHA, TPV_SSLv3, TKE_ECDH, TCA_RSA, TCE_AES, TCM_SHA1, 256, 256}, {"TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384", TLS1_TXT_ECDHE_ECDSA_WITH_AES_256_SHA384, TPV_TLSv12, TKE_ECDH, TCA_ECDSA, TCE_AES, TCM_SHA384, 256, 256}, {"TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384", TLS1_TXT_ECDHE_RSA_WITH_AES_256_SHA384, TPV_TLSv12, TKE_ECDH, TCA_RSA, TCE_AES, TCM_SHA384, 256, 256}, -#if OPENSSL_VERSION_NUMBER >= 0x10100000L + +#ifdef HAVE_OPENSSL_PROTOTYPE_TLS1_TXT_ECDHE_RSA_WITH_CHACHA20_POLY1305 /* OpenSSL 1.1.0 supports the ChaCha20-Poly1305 ciphersuites defined in RFC 7905 */ {"TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256", TLS1_TXT_ECDHE_ECDSA_WITH_CHACHA20_POLY1305, TPV_TLSv12, TKE_ECDH, TCA_ECDSA, TCE_ChaCha20, TCM_AEAD, 256, 256}, {"TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256", TLS1_TXT_ECDHE_RSA_WITH_CHACHA20_POLY1305, TPV_TLSv12, TKE_ECDH, TCA_RSA, TCE_ChaCha20, TCM_AEAD, 256, 256}, @@ -140,7 +142,7 @@ {"TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA", TLS1_TXT_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA, TPV_SSLv3, TKE_DH, TCA_RSA, TCE_Camellia, TCM_SHA1, 256, 256}, {"TLS_DHE_DSS_WITH_AES_256_CBC_SHA256", TLS1_TXT_DHE_DSS_WITH_AES_256_SHA256, TPV_TLSv12, TKE_DH, TCA_DSS, TCE_AES, TCM_SHA256, 256, 256}, {"TLS_DHE_RSA_WITH_AES_256_CBC_SHA256", TLS1_TXT_DHE_RSA_WITH_AES_256_SHA256, TPV_TLSv12, TKE_DH, TCA_RSA, TCE_AES, TCM_SHA256, 256, 256}, -#if OPENSSL_VERSION_NUMBER >= 0x10100000L +#ifdef HAVE_OPENSSL_PROTOTYPE_TLS1_TXT_ECDHE_RSA_WITH_CHACHA20_POLY1305 /* OpenSSL 1.1.0 supports the ChaCha20-Poly1305 ciphersuites defined in RFC 7905 */ {"TLS_DHE_RSA_WITH_CHACHA20_POLY1305_SHA256", TLS1_TXT_DHE_RSA_WITH_CHACHA20_POLY1305, TPV_TLSv12, TKE_DH, TCA_RSA, TCE_ChaCha20, TCM_AEAD, 256, 256}, #endif @@ -173,7 +175,7 @@ size_t numEntries = GLOBAL_NUM_CIPHERSUITES; for (size_t i = 0; i < numEntries; i++) ciphersuiteSupported[i] = OFFalse; -#if OPENSSL_VERSION_NUMBER < 0x10100000L +#ifndef HAVE_OPENSSL_PROTOTYPE_TLS_METHOD SSL_CTX *ctx = SSL_CTX_new(SSLv23_method()); #else SSL_CTX *ctx = SSL_CTX_new(TLS_method()); @@ -211,17 +213,17 @@ } -DcmTransportLayerStatus DcmTLSCiphersuiteHandler::addRequiredCipherSuite(const char *name) +OFCondition DcmTLSCiphersuiteHandler::addRequiredCipherSuite(const char *name) { - if (NULL == name) return TCS_illegalCall; + if (NULL == name) return EC_IllegalCall; size_t idx = lookupCiphersuite(name); if (idx < GLOBAL_NUM_CIPHERSUITES) ciphersuiteList.push_back(idx); else { DCMTLS_FATAL("Ciphersuite '" << name << "' not supported by the OpenSSL library used to compile this application."); - return TCS_tlsError; + return DCMTLS_EC_UnknownCiphersuite(name); } - return TCS_ok; + return EC_Normal; } @@ -238,10 +240,10 @@ } -DcmTransportLayerStatus DcmTLSCiphersuiteHandler::setTLSProfile(DcmTLSSecurityProfile profile) +OFCondition DcmTLSCiphersuiteHandler::setTLSProfile(DcmTLSSecurityProfile profile) { currentProfile = profile; - DcmTransportLayerStatus result = TCS_ok; + OFCondition result = EC_Normal; switch (profile) { @@ -252,66 +254,66 @@ case TSP_Profile_Basic: tls13_enabled = OFFalse; result = addRequiredCipherSuite("TLS_RSA_WITH_3DES_EDE_CBC_SHA"); - if (TCS_ok != result) return result; + if (result.bad()) return result; break; case TSP_Profile_AES: tls13_enabled = OFFalse; result = addRequiredCipherSuite("TLS_RSA_WITH_AES_128_CBC_SHA"); - if (TCS_ok != result) return result; + if (result.bad()) return result; addOptional3DESCipherSuite(); break; case TSP_Profile_BCP195: tls13_enabled = OFTrue; // recommended ciphersuites as defined in the DICOM profile, plus backwards compatibility result = addRequiredCipherSuite("TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256"); - if (TCS_ok != result) return result; + if (result.bad()) return result; result = addRequiredCipherSuite("TLS_DHE_RSA_WITH_AES_128_GCM_SHA256"); - if (TCS_ok != result) return result; + if (result.bad()) return result; result = addRequiredCipherSuite("TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384"); - if (TCS_ok != result) return result; + if (result.bad()) return result; result = addRequiredCipherSuite("TLS_DHE_RSA_WITH_AES_256_GCM_SHA384"); - if (TCS_ok != result) return result; + if (result.bad()) return result; result = addRequiredCipherSuite("TLS_RSA_WITH_AES_128_CBC_SHA"); - if (TCS_ok != result) return result; + if (result.bad()) return result; addOptional3DESCipherSuite(); break; case TSP_Profile_BCP195_ND: tls13_enabled = OFTrue; // required ciphersuites as defined in the DICOM profile result = addRequiredCipherSuite("TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256"); - if (TCS_ok != result) return result; + if (result.bad()) return result; result = addRequiredCipherSuite("TLS_DHE_RSA_WITH_AES_128_GCM_SHA256"); - if (TCS_ok != result) return result; + if (result.bad()) return result; result = addRequiredCipherSuite("TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384"); - if (TCS_ok != result) return result; + if (result.bad()) return result; result = addRequiredCipherSuite("TLS_DHE_RSA_WITH_AES_256_GCM_SHA384"); - if (TCS_ok != result) return result; + if (result.bad()) return result; break; case TSP_Profile_BCP195_Extended: tls13_enabled = OFFalse; // required ciphersuites as defined in the DICOM profile result = addRequiredCipherSuite("TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256"); - if (TCS_ok != result) return result; + if (result.bad()) return result; result = addRequiredCipherSuite("TLS_DHE_RSA_WITH_AES_128_GCM_SHA256"); - if (TCS_ok != result) return result; + if (result.bad()) return result; result = addRequiredCipherSuite("TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384"); - if (TCS_ok != result) return result; + if (result.bad()) return result; result = addRequiredCipherSuite("TLS_DHE_RSA_WITH_AES_256_GCM_SHA384"); - if (TCS_ok != result) return result; + if (result.bad()) return result; result = addRequiredCipherSuite("TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384"); - if (TCS_ok != result) return result; + if (result.bad()) return result; result = addRequiredCipherSuite("TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256"); - if (TCS_ok != result) return result; + if (result.bad()) return result; break; case TSP_Profile_IHE_ATNA_Unencrypted: tls13_enabled = OFFalse; result = addRequiredCipherSuite("TLS_RSA_WITH_NULL_SHA"); - if (TCS_ok != result) return result; + if (result.bad()) return result; break; // we don't want a default case here } - return TCS_ok; + return EC_Normal; } void DcmTLSCiphersuiteHandler::clearTLSProfile() @@ -321,7 +323,7 @@ ciphersuiteList.clear(); } -DcmTransportLayerStatus DcmTLSCiphersuiteHandler::addCipherSuite(const char *suite) +OFCondition DcmTLSCiphersuiteHandler::addCipherSuite(const char *suite) { // first look up the index for the TLS ciphersuite name, // then look up the OpenSSL ciphersuite name based on this index. @@ -332,7 +334,7 @@ { // user has selected a ciphersuite not supported by the OpenSSL version we are using DCMTLS_FATAL("Ciphersuite '" << suite << "' not supported by the OpenSSL library used to compile this application."); - return TCS_tlsError; + return DCMTLS_EC_UnknownCiphersuite(suite); } size_t keySize = 0; @@ -350,7 +352,7 @@ if (keySize == 0) { DCMTLS_FATAL("Unencrypted ciphersuite '" << suite << "' not permitted with security profile '" << lookupProfileName(currentProfile) << "'"); - return TCS_tlsError; + return DCMTLS_EC_CiphersuiteNotAllowed; } if (TKE_RSA == getCipherSuiteKeyExchange(idx)) { @@ -364,7 +366,7 @@ case TSP_Profile_BCP195_Extended: DCMTLS_FATAL("Additional ciphersuites not permitted with security profile '" << lookupProfileName(currentProfile) << "'"); - return TCS_tlsError; + return DCMTLS_EC_CiphersuiteNotAllowed; break; case TSP_Profile_None: @@ -374,10 +376,10 @@ } ciphersuiteList.push_back(idx); - return TCS_ok; + return EC_Normal; } // invalid/unknown cipher suite name - return TCS_illegalCall; + return EC_IllegalCall; } // Static helper function for the qsort() call in @@ -575,7 +577,7 @@ long DcmTLSCiphersuiteHandler::getTLSOptions() const { long result = 0; -#if OPENSSL_VERSION_NUMBER < 0x10100000L +#ifndef HAVE_OPENSSL_PROTOTYPE_TLS_METHOD // When compiling with OpenSSL 1.1.0, SSL support is disabled in DcmTLSTransportLayer anyway. // For older OpenSSL versions we explicitly disable them here. result |= SSL_OP_NO_SSLv2; diff -Nru dcmtk-3.6.6/dcmtls/libsrc/tlscond.cc dcmtk-3.6.7/dcmtls/libsrc/tlscond.cc --- dcmtk-3.6.6/dcmtls/libsrc/tlscond.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmtls/libsrc/tlscond.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2017, OFFIS e.V. + * Copyright (C) 2017-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -13,7 +13,7 @@ * * Module: dcmtls * - * Author: Jan Schlamelcher + * Author: Jan Schlamelcher, Marco Eichelberg * * Purpose: error conditions for DcmTLS * @@ -24,10 +24,34 @@ #include "dcmtk/ofstd/ofstream.h" #include "dcmtk/dcmtls/tlscond.h" +#ifdef WITH_OPENSSL +BEGIN_EXTERN_C +#include +#include +#include +END_EXTERN_C +#endif + // instantiation of pure generic error codes -makeOFConditionConst( DCMTLS_EC_FailedToCreateTLSTransportLayer, OFM_dcmtls, 1, OF_error, "Unable to create TLS transport layer" ); -makeOFConditionConst( DCMTLS_EC_FailedToSetCiphersuites, OFM_dcmtls, 2, OF_error, "Unable to set selected cipher suites" ); +makeOFConditionConst( DCMTLS_EC_FailedToCreateTLSTransportLayer, OFM_dcmtls, 1, OF_error, "Unable to create TLS transport layer" ); +makeOFConditionConst( DCMTLS_EC_FailedToSetCiphersuites, OFM_dcmtls, 2, OF_error, "Unable to set selected cipher suites" ); +// error codes 3..8 are used by the specializable error codes defined below +makeOFConditionConst( DCMTLS_EC_NoTLSTransportConnectionPresent, OFM_dcmtls, 9, OF_error, "TLS function called but no TLS transport connection present" ); +makeOFConditionConst( DCMTLS_EC_CiphersuiteNotAllowed, OFM_dcmtls, 10, OF_error, "Ciphersuite not allowed in current DICOM security profile" ); +makeOFConditionConst( DCMTLS_EC_TLSReadOperationDidNotComplete, OFM_dcmtls, 11, OF_error, "TLS read operation did not complete (SSL_ERROR_WANT_READ)" ); +makeOFConditionConst( DCMTLS_EC_TLSWriteOperationDidNotComplete, OFM_dcmtls, 12, OF_error, "TLS write operation did not complete (SSL_ERROR_WANT_WRITE)" ); +makeOFConditionConst( DCMTLS_EC_TLSX509LookupOperationDidNotComplete, OFM_dcmtls, 13, OF_error, "TLS X.509 lookup operation did not complete (SSL_ERROR_WANT_X509_LOOKUP)" ); +makeOFConditionConst( DCMTLS_EC_TLSConnectionClosedByPeer, OFM_dcmtls, 14, OF_error, "TLS connection closed by peer (SSL_ERROR_ZERO_RETURN)" ); +makeOFConditionConst( DCMTLS_EC_TLSConnectOperationDidNotComplete, OFM_dcmtls, 15, OF_error, "TLS connect operation did not complete (SSL_ERROR_WANT_CONNECT)" ); +makeOFConditionConst( DCMTLS_EC_TLSAcceptOperationDidNotComplete, OFM_dcmtls, 16, OF_error, "TLS accept operation did not complete (SSL_ERROR_WANT_ACCEPT)" ); +makeOFConditionConst( DCMTLS_EC_TLSAsyncOperationDidNotComplete, OFM_dcmtls, 17, OF_error, "TLS operation did not complete because an asynchronous engine is still processing data (SSL_ERROR_WANT_ASYNC)" ); +makeOFConditionConst( DCMTLS_EC_TLSAsyncJobCouldNotBeStarted, OFM_dcmtls, 18, OF_error, "TLS asynchronous job could not be started (SSL_ERROR_WANT_ASYNC_JOB)" ); +makeOFConditionConst( DCMTLS_EC_TLSClientHelloCallbackNeeded, OFM_dcmtls, 19, OF_error, "TLS client hello callback needed (SSL_ERROR_WANT_CLIENT_HELLO_CB)" ); +makeOFConditionConst( DCMTLS_EC_OtherSSLError, OFM_dcmtls, 20, OF_error, "Other TLS error (unknown SSL_ERROR code)" ); +makeOFConditionConst( DCMTLS_EC_FailedToSetVerificationMode, OFM_dcmtls, 21, OF_error, "Setting of the X.509 verification mode failed" ); +makeOFConditionConst( DCMTLS_EC_CertStoreCtxInitFailed, OFM_dcmtls, 22, OF_error, "Certificate store context initialization failed" ); +makeOFConditionConst( DCMTLS_EC_OpenSSLIOError, OFM_dcmtls, 23, OF_error, "OpenSSL I/O error (SSL_ERROR_SYSCALL)" ); // implementation of specializable error codes @@ -137,6 +161,39 @@ return cond; } +DcmTLSECGenericOpenSSLError::DcmTLSECGenericOpenSSLError() +{ + theModule = OFM_dcmtls; + theCode = 8; + theStatus = OF_error; + theText = "OpenSSL error"; +} + +OFCondition DcmTLSECGenericOpenSSLError::operator()(unsigned long errorCode) const +{ +#ifdef WITH_OPENSSL + const char *ls = ERR_lib_error_string(errorCode); + if (ls == NULL) ls = "unknown library"; + + const char *rs = ERR_reason_error_string(errorCode); + if (rs == NULL) rs = "unknown error"; +#else + const char *ls = "unknown library"; + const char *rs = "unknown error"; +#endif + + OFOStringStream os; + os << theText << " " + << STD_NAMESPACE hex << STD_NAMESPACE setfill('0') << STD_NAMESPACE setw(8) << errorCode + << ": " << ls << ": " << rs; + + OFCondition cond; + OFSTRINGSTREAM_GETSTR( os, c ) + cond = makeOFCondition( theModule, theCode, theStatus, c ); + OFSTRINGSTREAM_FREESTR( c ) + return cond; +} + // instantiation of specializable error codes const DcmTLSECUnknownCiphersuiteConst DCMTLS_EC_UnknownCiphersuite; @@ -144,3 +201,2087 @@ const DcmTLSECFailedToLoadCertificateConst DCMTLS_EC_FailedToLoadCertificate; const DcmTLSECMismatchedPrivateKeyAndCertificateConst DCMTLS_EC_MismatchedPrivateKeyAndCertificate; const DcmTLSECFailedToWriteRandomSeedFileConst DCMTLS_EC_FailedToWriteRandomSeedFile; +const DcmTLSECGenericOpenSSLError DCMTLS_EC_GenericOpenSSLError; + +// define all constants that may be missing. + +// the following defines are present in OpenSSL 1.0.1 + +#ifndef X509_V_ERR_UNSPECIFIED +#define X509_V_ERR_UNSPECIFIED 1 +#endif +#ifndef X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT +#define X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT 2 +#endif +#ifndef X509_V_ERR_UNABLE_TO_GET_CRL +#define X509_V_ERR_UNABLE_TO_GET_CRL 3 +#endif +#ifndef X509_V_ERR_UNABLE_TO_DECRYPT_CERT_SIGNATURE +#define X509_V_ERR_UNABLE_TO_DECRYPT_CERT_SIGNATURE 4 +#endif +#ifndef X509_V_ERR_UNABLE_TO_DECRYPT_CRL_SIGNATURE +#define X509_V_ERR_UNABLE_TO_DECRYPT_CRL_SIGNATURE 5 +#endif +#ifndef X509_V_ERR_UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY +#define X509_V_ERR_UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY 6 +#endif +#ifndef X509_V_ERR_CERT_SIGNATURE_FAILURE +#define X509_V_ERR_CERT_SIGNATURE_FAILURE 7 +#endif +#ifndef X509_V_ERR_CRL_SIGNATURE_FAILURE +#define X509_V_ERR_CRL_SIGNATURE_FAILURE 8 +#endif +#ifndef X509_V_ERR_CERT_NOT_YET_VALID +#define X509_V_ERR_CERT_NOT_YET_VALID 9 +#endif +#ifndef X509_V_ERR_CERT_HAS_EXPIRED +#define X509_V_ERR_CERT_HAS_EXPIRED 10 +#endif +#ifndef X509_V_ERR_CRL_NOT_YET_VALID +#define X509_V_ERR_CRL_NOT_YET_VALID 11 +#endif +#ifndef X509_V_ERR_CRL_HAS_EXPIRED +#define X509_V_ERR_CRL_HAS_EXPIRED 12 +#endif +#ifndef X509_V_ERR_ERROR_IN_CERT_NOT_BEFORE_FIELD +#define X509_V_ERR_ERROR_IN_CERT_NOT_BEFORE_FIELD 13 +#endif +#ifndef X509_V_ERR_ERROR_IN_CERT_NOT_AFTER_FIELD +#define X509_V_ERR_ERROR_IN_CERT_NOT_AFTER_FIELD 14 +#endif +#ifndef X509_V_ERR_ERROR_IN_CRL_LAST_UPDATE_FIELD +#define X509_V_ERR_ERROR_IN_CRL_LAST_UPDATE_FIELD 15 +#endif +#ifndef X509_V_ERR_ERROR_IN_CRL_NEXT_UPDATE_FIELD +#define X509_V_ERR_ERROR_IN_CRL_NEXT_UPDATE_FIELD 16 +#endif +#ifndef X509_V_ERR_OUT_OF_MEM +#define X509_V_ERR_OUT_OF_MEM 17 +#endif +#ifndef X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT +#define X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT 18 +#endif +#ifndef X509_V_ERR_SELF_SIGNED_CERT_IN_CHAIN +#define X509_V_ERR_SELF_SIGNED_CERT_IN_CHAIN 19 +#endif +#ifndef X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY +#define X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY 20 +#endif +#ifndef X509_V_ERR_UNABLE_TO_VERIFY_LEAF_SIGNATURE +#define X509_V_ERR_UNABLE_TO_VERIFY_LEAF_SIGNATURE 21 +#endif +#ifndef X509_V_ERR_CERT_CHAIN_TOO_LONG +#define X509_V_ERR_CERT_CHAIN_TOO_LONG 22 +#endif +#ifndef X509_V_ERR_CERT_REVOKED +#define X509_V_ERR_CERT_REVOKED 23 +#endif +#ifndef X509_V_ERR_INVALID_CA +#define X509_V_ERR_INVALID_CA 24 +#endif +#ifndef X509_V_ERR_PATH_LENGTH_EXCEEDED +#define X509_V_ERR_PATH_LENGTH_EXCEEDED 25 +#endif +#ifndef X509_V_ERR_INVALID_PURPOSE +#define X509_V_ERR_INVALID_PURPOSE 26 +#endif +#ifndef X509_V_ERR_CERT_UNTRUSTED +#define X509_V_ERR_CERT_UNTRUSTED 27 +#endif +#ifndef X509_V_ERR_CERT_REJECTED +#define X509_V_ERR_CERT_REJECTED 28 +#endif +#ifndef X509_V_ERR_SUBJECT_ISSUER_MISMATCH +#define X509_V_ERR_SUBJECT_ISSUER_MISMATCH 29 +#endif +#ifndef X509_V_ERR_AKID_SKID_MISMATCH +#define X509_V_ERR_AKID_SKID_MISMATCH 30 +#endif +#ifndef X509_V_ERR_AKID_ISSUER_SERIAL_MISMATCH +#define X509_V_ERR_AKID_ISSUER_SERIAL_MISMATCH 31 +#endif +#ifndef X509_V_ERR_KEYUSAGE_NO_CERTSIGN +#define X509_V_ERR_KEYUSAGE_NO_CERTSIGN 32 +#endif +#ifndef X509_V_ERR_UNABLE_TO_GET_CRL_ISSUER +#define X509_V_ERR_UNABLE_TO_GET_CRL_ISSUER 33 +#endif +#ifndef X509_V_ERR_UNHANDLED_CRITICAL_EXTENSION +#define X509_V_ERR_UNHANDLED_CRITICAL_EXTENSION 34 +#endif +#ifndef X509_V_ERR_KEYUSAGE_NO_CRL_SIGN +#define X509_V_ERR_KEYUSAGE_NO_CRL_SIGN 35 +#endif +#ifndef X509_V_ERR_UNHANDLED_CRITICAL_CRL_EXTENSION +#define X509_V_ERR_UNHANDLED_CRITICAL_CRL_EXTENSION 36 +#endif +#ifndef X509_V_ERR_INVALID_NON_CA +#define X509_V_ERR_INVALID_NON_CA 37 +#endif +#ifndef X509_V_ERR_PROXY_PATH_LENGTH_EXCEEDED +#define X509_V_ERR_PROXY_PATH_LENGTH_EXCEEDED 38 +#endif +#ifndef X509_V_ERR_KEYUSAGE_NO_DIGITAL_SIGNATURE +#define X509_V_ERR_KEYUSAGE_NO_DIGITAL_SIGNATURE 39 +#endif +#ifndef X509_V_ERR_PROXY_CERTIFICATES_NOT_ALLOWED +#define X509_V_ERR_PROXY_CERTIFICATES_NOT_ALLOWED 40 +#endif +#ifndef X509_V_ERR_INVALID_EXTENSION +#define X509_V_ERR_INVALID_EXTENSION 41 +#endif +#ifndef X509_V_ERR_INVALID_POLICY_EXTENSION +#define X509_V_ERR_INVALID_POLICY_EXTENSION 42 +#endif +#ifndef X509_V_ERR_NO_EXPLICIT_POLICY +#define X509_V_ERR_NO_EXPLICIT_POLICY 43 +#endif +#ifndef X509_V_ERR_DIFFERENT_CRL_SCOPE +#define X509_V_ERR_DIFFERENT_CRL_SCOPE 44 +#endif +#ifndef X509_V_ERR_UNSUPPORTED_EXTENSION_FEATURE +#define X509_V_ERR_UNSUPPORTED_EXTENSION_FEATURE 45 +#endif +#ifndef X509_V_ERR_UNNESTED_RESOURCE +#define X509_V_ERR_UNNESTED_RESOURCE 46 +#endif +#ifndef X509_V_ERR_PERMITTED_VIOLATION +#define X509_V_ERR_PERMITTED_VIOLATION 47 +#endif +#ifndef X509_V_ERR_EXCLUDED_VIOLATION +#define X509_V_ERR_EXCLUDED_VIOLATION 48 +#endif +#ifndef X509_V_ERR_SUBTREE_MINMAX +#define X509_V_ERR_SUBTREE_MINMAX 49 +#endif +#ifndef X509_V_ERR_APPLICATION_VERIFICATION +#define X509_V_ERR_APPLICATION_VERIFICATION 50 +#endif +#ifndef X509_V_ERR_UNSUPPORTED_CONSTRAINT_TYPE +#define X509_V_ERR_UNSUPPORTED_CONSTRAINT_TYPE 51 +#endif +#ifndef X509_V_ERR_UNSUPPORTED_CONSTRAINT_SYNTAX +#define X509_V_ERR_UNSUPPORTED_CONSTRAINT_SYNTAX 52 +#endif +#ifndef X509_V_ERR_UNSUPPORTED_NAME_SYNTAX +#define X509_V_ERR_UNSUPPORTED_NAME_SYNTAX 53 +#endif +#ifndef X509_V_ERR_CRL_PATH_VALIDATION_ERROR +#define X509_V_ERR_CRL_PATH_VALIDATION_ERROR 54 +#endif +#ifndef X509_V_ERR_SUITE_B_INVALID_VERSION +#define X509_V_ERR_SUITE_B_INVALID_VERSION 56 +#endif +#ifndef X509_V_ERR_SUITE_B_INVALID_ALGORITHM +#define X509_V_ERR_SUITE_B_INVALID_ALGORITHM 57 +#endif +#ifndef X509_V_ERR_SUITE_B_INVALID_CURVE +#define X509_V_ERR_SUITE_B_INVALID_CURVE 58 +#endif +#ifndef X509_V_ERR_SUITE_B_INVALID_SIGNATURE_ALGORITHM +#define X509_V_ERR_SUITE_B_INVALID_SIGNATURE_ALGORITHM 59 +#endif +#ifndef X509_V_ERR_SUITE_B_LOS_NOT_ALLOWED +#define X509_V_ERR_SUITE_B_LOS_NOT_ALLOWED 60 +#endif +#ifndef X509_V_ERR_SUITE_B_CANNOT_SIGN_P_384_WITH_P_256 +#define X509_V_ERR_SUITE_B_CANNOT_SIGN_P_384_WITH_P_256 61 +#endif +#ifndef X509_V_ERR_HOSTNAME_MISMATCH +#define X509_V_ERR_HOSTNAME_MISMATCH 62 +#endif +#ifndef X509_V_ERR_EMAIL_MISMATCH +#define X509_V_ERR_EMAIL_MISMATCH 63 +#endif +#ifndef X509_V_ERR_IP_ADDRESS_MISMATCH +#define X509_V_ERR_IP_ADDRESS_MISMATCH 64 +#endif +#ifndef X509_V_ERR_INVALID_CALL +#define X509_V_ERR_INVALID_CALL 65 +#endif +#ifndef X509_V_ERR_STORE_LOOKUP +#define X509_V_ERR_STORE_LOOKUP 66 +#endif +#ifndef X509_V_ERR_PROXY_SUBJECT_NAME_VIOLATION +#define X509_V_ERR_PROXY_SUBJECT_NAME_VIOLATION 67 +#endif + +// the following defines were added in OpenSSL 1.0.2 + +#ifndef X509_V_ERR_PATH_LOOP +#define X509_V_ERR_PATH_LOOP 55 +#endif +#ifndef X509_V_ERR_SUITE_B_INVALID_VERSION +#define X509_V_ERR_SUITE_B_INVALID_VERSION 56 +#endif +#ifndef X509_V_ERR_SUITE_B_INVALID_ALGORITHM +#define X509_V_ERR_SUITE_B_INVALID_ALGORITHM 57 +#endif +#ifndef X509_V_ERR_SUITE_B_INVALID_CURVE +#define X509_V_ERR_SUITE_B_INVALID_CURVE 58 +#endif +#ifndef X509_V_ERR_SUITE_B_INVALID_SIGNATURE_ALGORITHM +#define X509_V_ERR_SUITE_B_INVALID_SIGNATURE_ALGORITHM 59 +#endif +#ifndef X509_V_ERR_SUITE_B_LOS_NOT_ALLOWED +#define X509_V_ERR_SUITE_B_LOS_NOT_ALLOWED 60 +#endif +#ifndef X509_V_ERR_SUITE_B_CANNOT_SIGN_P_384_WITH_P_256 +#define X509_V_ERR_SUITE_B_CANNOT_SIGN_P_384_WITH_P_256 61 +#endif +#ifndef X509_V_ERR_HOSTNAME_MISMATCH +#define X509_V_ERR_HOSTNAME_MISMATCH 62 +#endif +#ifndef X509_V_ERR_EMAIL_MISMATCH +#define X509_V_ERR_EMAIL_MISMATCH 63 +#endif +#ifndef X509_V_ERR_IP_ADDRESS_MISMATCH +#define X509_V_ERR_IP_ADDRESS_MISMATCH 64 +#endif +#ifndef X509_V_ERR_DANE_NO_MATCH +#define X509_V_ERR_DANE_NO_MATCH 65 +#endif +#ifndef X509_V_ERR_EE_KEY_TOO_SMALL +#define X509_V_ERR_EE_KEY_TOO_SMALL 66 +#endif +#ifndef X509_V_ERR_CA_KEY_TOO_SMALL +#define X509_V_ERR_CA_KEY_TOO_SMALL 67 +#endif + +// the following defines were added in OpenSSL 1.1.0 + +#ifndef X509_V_ERR_PATH_LOOP +#define X509_V_ERR_PATH_LOOP 55 +#endif +#ifndef X509_V_ERR_DANE_NO_MATCH +#define X509_V_ERR_DANE_NO_MATCH 65 +#endif +#ifndef X509_V_ERR_EE_KEY_TOO_SMALL +#define X509_V_ERR_EE_KEY_TOO_SMALL 66 +#endif +#ifndef X509_V_ERR_CA_KEY_TOO_SMALL +#define X509_V_ERR_CA_KEY_TOO_SMALL 67 +#endif + +// the following defines were added in OpenSSL 1.1.1 + +#ifndef X509_V_ERR_CA_MD_TOO_WEAK +#define X509_V_ERR_CA_MD_TOO_WEAK 68 +#endif +#ifndef X509_V_ERR_INVALID_CALL +#define X509_V_ERR_INVALID_CALL 69 +#endif +#ifndef X509_V_ERR_STORE_LOOKUP +#define X509_V_ERR_STORE_LOOKUP 70 +#endif +#ifndef X509_V_ERR_NO_VALID_SCTS +#define X509_V_ERR_NO_VALID_SCTS 71 +#endif +#ifndef X509_V_ERR_PROXY_SUBJECT_NAME_VIOLATION +#define X509_V_ERR_PROXY_SUBJECT_NAME_VIOLATION 72 +#endif +#ifndef X509_V_ERR_OCSP_VERIFY_NEEDED +#define X509_V_ERR_OCSP_VERIFY_NEEDED 73 +#endif +#ifndef X509_V_ERR_OCSP_VERIFY_FAILED +#define X509_V_ERR_OCSP_VERIFY_FAILED 74 +#endif +#ifndef X509_V_ERR_OCSP_CERT_UNKNOWN +#define X509_V_ERR_OCSP_CERT_UNKNOWN 75 +#endif +#ifndef X509_V_ERR_INVALID_CA +#define X509_V_ERR_INVALID_CA 79 +#endif + +// the following defines were added in OpenSSL 3.0.0 + +#ifndef X509_V_ERR_UNSUPPORTED_SIGNATURE_ALGORITHM +#define X509_V_ERR_UNSUPPORTED_SIGNATURE_ALGORITHM 76 +#endif +#ifndef X509_V_ERR_SIGNATURE_ALGORITHM_MISMATCH +#define X509_V_ERR_SIGNATURE_ALGORITHM_MISMATCH 77 +#endif +#ifndef X509_V_ERR_SIGNATURE_ALGORITHM_INCONSISTENCY +#define X509_V_ERR_SIGNATURE_ALGORITHM_INCONSISTENCY 78 +#endif +#ifndef X509_V_ERR_PATHLEN_INVALID_FOR_NON_CA +#define X509_V_ERR_PATHLEN_INVALID_FOR_NON_CA 80 +#endif +#ifndef X509_V_ERR_PATHLEN_WITHOUT_KU_KEY_CERT_SIGN +#define X509_V_ERR_PATHLEN_WITHOUT_KU_KEY_CERT_SIGN 81 +#endif +#ifndef X509_V_ERR_KU_KEY_CERT_SIGN_INVALID_FOR_NON_CA +#define X509_V_ERR_KU_KEY_CERT_SIGN_INVALID_FOR_NON_CA 82 +#endif +#ifndef X509_V_ERR_ISSUER_NAME_EMPTY +#define X509_V_ERR_ISSUER_NAME_EMPTY 83 +#endif +#ifndef X509_V_ERR_SUBJECT_NAME_EMPTY +#define X509_V_ERR_SUBJECT_NAME_EMPTY 84 +#endif +#ifndef X509_V_ERR_MISSING_AUTHORITY_KEY_IDENTIFIER +#define X509_V_ERR_MISSING_AUTHORITY_KEY_IDENTIFIER 85 +#endif +#ifndef X509_V_ERR_MISSING_SUBJECT_KEY_IDENTIFIER +#define X509_V_ERR_MISSING_SUBJECT_KEY_IDENTIFIER 86 +#endif +#ifndef X509_V_ERR_EMPTY_SUBJECT_ALT_NAME +#define X509_V_ERR_EMPTY_SUBJECT_ALT_NAME 87 +#endif +#ifndef X509_V_ERR_EMPTY_SUBJECT_SAN_NOT_CRITICAL +#define X509_V_ERR_EMPTY_SUBJECT_SAN_NOT_CRITICAL 88 +#endif +#ifndef X509_V_ERR_CA_BCONS_NOT_CRITICAL +#define X509_V_ERR_CA_BCONS_NOT_CRITICAL 89 +#endif +#ifndef X509_V_ERR_AUTHORITY_KEY_IDENTIFIER_CRITICAL +#define X509_V_ERR_AUTHORITY_KEY_IDENTIFIER_CRITICAL 90 +#endif +#ifndef X509_V_ERR_SUBJECT_KEY_IDENTIFIER_CRITICAL +#define X509_V_ERR_SUBJECT_KEY_IDENTIFIER_CRITICAL 91 +#endif +#ifndef X509_V_ERR_CA_CERT_MISSING_KEY_USAGE +#define X509_V_ERR_CA_CERT_MISSING_KEY_USAGE 92 +#endif +#ifndef X509_V_ERR_EXTENSIONS_REQUIRE_VERSION_3 +#define X509_V_ERR_EXTENSIONS_REQUIRE_VERSION_3 93 +#endif +#ifndef X509_V_ERR_EC_KEY_EXPLICIT_PARAMS +#define X509_V_ERR_EC_KEY_EXPLICIT_PARAMS 94 +#endif + +// OpenSSL 1.x defines X509_V_ERR_INVALID_CA as 24 and does not define X509_V_ERR_NO_ISSUER_PUBLIC_KEY. +// OpenSSL 3.x defines X509_V_ERR_INVALID_CA as 79 and X509_V_ERR_NO_ISSUER_PUBLIC_KEY as 24. +// Since we're using the values defined in OpenSSL's header files when possible, this should work +// in both cases. +#ifndef X509_V_ERR_NO_ISSUER_PUBLIC_KEY +#define X509_V_ERR_NO_ISSUER_PUBLIC_KEY 24 +#endif + +// X.509 certificate verification errors use condition codes > DCMTLS_EC_X509Verify_Offset. + +makeOFConditionConst( DCMTLS_EC_X509VerifyUnspecified, OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_UNSPECIFIED, OF_error, "X.509 certificate verification error - unspecified" ); +makeOFConditionConst( DCMTLS_EC_X509VerifyUnableToGetIssuerCert, OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT, OF_error, "X.509 certificate verification error - unable to get issuer certificate" ); +makeOFConditionConst( DCMTLS_EC_X509VerifyUnableToGetCRL, OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_UNABLE_TO_GET_CRL, OF_error, "X.509 certificate verification error - unable to get certificate CRL" ); +makeOFConditionConst( DCMTLS_EC_X509VerifyUnableToDecryptCertSignature, OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_UNABLE_TO_DECRYPT_CERT_SIGNATURE, OF_error, "X.509 certificate verification error - unable to decrypt certificate's signature" ); +makeOFConditionConst( DCMTLS_EC_X509VerifyUnableToDecryptCRLSignature, OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_UNABLE_TO_DECRYPT_CRL_SIGNATURE, OF_error, "X.509 certificate verification error - unable to decrypt CRL's signature" ); +makeOFConditionConst( DCMTLS_EC_X509VerifyUnableToDecodeIssuerPublicKey, OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY, OF_error, "X.509 certificate verification error - unable to decode issuer public key" ); +makeOFConditionConst( DCMTLS_EC_X509VerifyCertSignatureFailure, OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_CERT_SIGNATURE_FAILURE, OF_error, "X.509 certificate verification error - certificate signature failure" ); +makeOFConditionConst( DCMTLS_EC_X509VerifyCRLSignatureFailure, OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_CRL_SIGNATURE_FAILURE, OF_error, "X.509 certificate verification error - CRL signature failure" ); +makeOFConditionConst( DCMTLS_EC_X509VerifyCertNotYetValid, OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_CERT_NOT_YET_VALID, OF_error, "X.509 certificate verification error - certificate is not yet valid" ); +makeOFConditionConst( DCMTLS_EC_X509VerifyCertHasExpired, OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_CERT_HAS_EXPIRED, OF_error, "X.509 certificate verification error - certificate has expired" ); +makeOFConditionConst( DCMTLS_EC_X509VerifyCRLNotYetValid, OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_CRL_NOT_YET_VALID, OF_error, "X.509 certificate verification error - CRL is not yet valid" ); +makeOFConditionConst( DCMTLS_EC_X509VerifyCRLHasExpired, OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_CRL_HAS_EXPIRED, OF_error, "X.509 certificate verification error - CRL has expired" ); +makeOFConditionConst( DCMTLS_EC_X509VerifyErrorInCertNotBeforeField, OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_ERROR_IN_CERT_NOT_BEFORE_FIELD, OF_error, "X.509 certificate verification error - format error in certificate's notBefore field" ); +makeOFConditionConst( DCMTLS_EC_X509VerifyErrorInCertNotAfterField, OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_ERROR_IN_CERT_NOT_AFTER_FIELD, OF_error, "X.509 certificate verification error - format error in certificate's notAfter field" ); +makeOFConditionConst( DCMTLS_EC_X509VerifyErrorInCRLLastUpdateField, OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_ERROR_IN_CRL_LAST_UPDATE_FIELD, OF_error, "X.509 certificate verification error - format error in CRL's lastUpdate field" ); +makeOFConditionConst( DCMTLS_EC_X509VerifyErrorInCRLNextUpdateField, OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_ERROR_IN_CRL_NEXT_UPDATE_FIELD, OF_error, "X.509 certificate verification error - format error in CRL's nextUpdate field" ); +makeOFConditionConst( DCMTLS_EC_X509VerifyOutOfMem, OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_OUT_OF_MEM, OF_error, "X.509 certificate verification error - out of memory" ); +makeOFConditionConst( DCMTLS_EC_X509VerifyDepthZeroSelfSignedCert, OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT, OF_error, "X.509 certificate verification error - self signed certificate" ); +makeOFConditionConst( DCMTLS_EC_X509VerifySelfSignedCertInChain, OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_SELF_SIGNED_CERT_IN_CHAIN, OF_error, "X.509 certificate verification error - self signed certificate in certificate chain" ); +makeOFConditionConst( DCMTLS_EC_X509VerifyUnableToGetIssuerCertLocally, OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY, OF_error, "X.509 certificate verification error - unable to get local issuer certificate" ); +makeOFConditionConst( DCMTLS_EC_X509VerifyUnableToVerifyLeafSignature, OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_UNABLE_TO_VERIFY_LEAF_SIGNATURE, OF_error, "X.509 certificate verification error - unable to verify the first certificate" ); +makeOFConditionConst( DCMTLS_EC_X509VerifyCertChainTooLong, OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_CERT_CHAIN_TOO_LONG, OF_error, "X.509 certificate verification error - certificate chain too long" ); +makeOFConditionConst( DCMTLS_EC_X509VerifyCertRevoked, OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_CERT_REVOKED, OF_error, "X.509 certificate verification error - certificate revoked" ); +makeOFConditionConst( DCMTLS_EC_X509VerifyNoIssuerPublicKey, OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_NO_ISSUER_PUBLIC_KEY, OF_error, "X.509 certificate verification error - issuer certificate doesn't have a public key" ); +makeOFConditionConst( DCMTLS_EC_X509VerifyPathLengthExceeded, OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_PATH_LENGTH_EXCEEDED, OF_error, "X.509 certificate verification error - path length constraint exceeded" ); +makeOFConditionConst( DCMTLS_EC_X509VerifyInvalidPurpose, OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_INVALID_PURPOSE, OF_error, "X.509 certificate verification error - unsupported certificate purpose" ); +makeOFConditionConst( DCMTLS_EC_X509VerifyCertUntrusted, OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_CERT_UNTRUSTED, OF_error, "X.509 certificate verification error - certificate not trusted" ); +makeOFConditionConst( DCMTLS_EC_X509VerifyCertRejected, OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_CERT_REJECTED, OF_error, "X.509 certificate verification error - certificate rejected" ); +makeOFConditionConst( DCMTLS_EC_X509VerifySubjectIssuerMismatch, OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_SUBJECT_ISSUER_MISMATCH, OF_error, "X.509 certificate verification error - subject issuer mismatch" ); +makeOFConditionConst( DCMTLS_EC_X509VerifyAkidSkidMismatch, OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_AKID_SKID_MISMATCH, OF_error, "X.509 certificate verification error - authority and subject key identifier mismatch" ); +makeOFConditionConst( DCMTLS_EC_X509VerifyAkidIssuerSerialMismatch, OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_AKID_ISSUER_SERIAL_MISMATCH, OF_error, "X.509 certificate verification error - authority and issuer serial number mismatch" ); +makeOFConditionConst( DCMTLS_EC_X509VerifyKeyusageNoCertsign, OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_KEYUSAGE_NO_CERTSIGN, OF_error, "X.509 certificate verification error - key usage does not include certificate signing" ); +makeOFConditionConst( DCMTLS_EC_X509VerifyUnableToGetCRLIssuer, OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_UNABLE_TO_GET_CRL_ISSUER, OF_error, "X.509 certificate verification error - unable to get CRL issuer certificate" ); +makeOFConditionConst( DCMTLS_EC_X509VerifyUnhandledCriticalExtension, OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_UNHANDLED_CRITICAL_EXTENSION, OF_error, "X.509 certificate verification error - unhandled critical extension" ); +makeOFConditionConst( DCMTLS_EC_X509VerifyKeyusageNoCRLSign, OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_KEYUSAGE_NO_CRL_SIGN, OF_error, "X.509 certificate verification error - key usage does not include CRL signing" ); +makeOFConditionConst( DCMTLS_EC_X509VerifyUnhandledCriticalCRLExtension, OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_UNHANDLED_CRITICAL_CRL_EXTENSION, OF_error, "X.509 certificate verification error - unhandled critical CRL extension" ); +makeOFConditionConst( DCMTLS_EC_X509VerifyInvalidNonCA, OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_INVALID_NON_CA, OF_error, "X.509 certificate verification error - invalid non-CA certificate (has CA markings)" ); +makeOFConditionConst( DCMTLS_EC_X509VerifyProxyPathLengthExceeded, OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_PROXY_PATH_LENGTH_EXCEEDED, OF_error, "X.509 certificate verification error - proxy path length constraint exceeded" ); +makeOFConditionConst( DCMTLS_EC_X509VerifyKeyusageNoDigitalSignature, OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_KEYUSAGE_NO_DIGITAL_SIGNATURE, OF_error, "X.509 certificate verification error - key usage does not include digital signature" ); +makeOFConditionConst( DCMTLS_EC_X509VerifyProxyCertificatesNotAllowed, OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_PROXY_CERTIFICATES_NOT_ALLOWED, OF_error, "X.509 certificate verification error - proxy certificates not allowed, please set the appropriate flag" ); +makeOFConditionConst( DCMTLS_EC_X509VerifyInvalidExtension, OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_INVALID_EXTENSION, OF_error, "X.509 certificate verification error - invalid or inconsistent certificate extension" ); +makeOFConditionConst( DCMTLS_EC_X509VerifyInvalidPolicyExtension, OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_INVALID_POLICY_EXTENSION, OF_error, "X.509 certificate verification error - invalid or inconsistent certificate policy extension" ); +makeOFConditionConst( DCMTLS_EC_X509VerifyNoExplicitPolicy, OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_NO_EXPLICIT_POLICY, OF_error, "X.509 certificate verification error - no explicit policy" ); +makeOFConditionConst( DCMTLS_EC_X509VerifyDifferentCRLScope, OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_DIFFERENT_CRL_SCOPE, OF_error, "X.509 certificate verification error - Different CRL scope" ); +makeOFConditionConst( DCMTLS_EC_X509VerifyUnsupportedExtensionFeature, OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_UNSUPPORTED_EXTENSION_FEATURE, OF_error, "X.509 certificate verification error - Unsupported extension feature" ); +makeOFConditionConst( DCMTLS_EC_X509VerifyUnnestedResource, OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_UNNESTED_RESOURCE, OF_error, "X.509 certificate verification error - RFC 3779 resource not subset of parent's resources" ); +makeOFConditionConst( DCMTLS_EC_X509VerifyPermittedViolation, OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_PERMITTED_VIOLATION, OF_error, "X.509 certificate verification error - permitted subtree violation" ); +makeOFConditionConst( DCMTLS_EC_X509VerifyExcludedViolation, OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_EXCLUDED_VIOLATION, OF_error, "X.509 certificate verification error - excluded subtree violation" ); +makeOFConditionConst( DCMTLS_EC_X509VerifySubtreeMinmax, OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_SUBTREE_MINMAX, OF_error, "X.509 certificate verification error - name constraints minimum and maximum not supported" ); +makeOFConditionConst( DCMTLS_EC_X509VerifyApplicationVerification, OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_APPLICATION_VERIFICATION, OF_error, "X.509 certificate verification error - application verification failure" ); +makeOFConditionConst( DCMTLS_EC_X509VerifyUnsupportedConstraintType, OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_UNSUPPORTED_CONSTRAINT_TYPE, OF_error, "X.509 certificate verification error - unsupported name constraint type" ); +makeOFConditionConst( DCMTLS_EC_X509VerifyUnsupportedConstraintSyntax, OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_UNSUPPORTED_CONSTRAINT_SYNTAX, OF_error, "X.509 certificate verification error - unsupported or invalid name constraint syntax" ); +makeOFConditionConst( DCMTLS_EC_X509VerifyUnsupportedNameSyntax, OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_UNSUPPORTED_NAME_SYNTAX, OF_error, "X.509 certificate verification error - unsupported or invalid name syntax" ); +makeOFConditionConst( DCMTLS_EC_X509VerifyCRLPathValidationError, OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_CRL_PATH_VALIDATION_ERROR, OF_error, "X.509 certificate verification error - CRL path validation error" ); +makeOFConditionConst( DCMTLS_EC_X509VerifyPathLoop, OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_PATH_LOOP, OF_error, "X.509 certificate verification error - Path Loop" ); +makeOFConditionConst( DCMTLS_EC_X509VerifySuiteBInvalidVersion, OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_SUITE_B_INVALID_VERSION, OF_error, "X.509 certificate verification error - Suite B: certificate version invalid" ); +makeOFConditionConst( DCMTLS_EC_X509VerifySuiteBInvalidAlgorithm, OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_SUITE_B_INVALID_ALGORITHM, OF_error, "X.509 certificate verification error - Suite B: invalid public key algorithm" ); +makeOFConditionConst( DCMTLS_EC_X509VerifySuiteBInvalidCurve, OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_SUITE_B_INVALID_CURVE, OF_error, "X.509 certificate verification error - Suite B: invalid ECC curve" ); +makeOFConditionConst( DCMTLS_EC_X509VerifySuiteBInvalidSignatureAlgorithm, OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_SUITE_B_INVALID_SIGNATURE_ALGORITHM, OF_error, "X.509 certificate verification error - Suite B: invalid signature algorithm" ); +makeOFConditionConst( DCMTLS_EC_X509VerifySuiteBLosNotAllowed, OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_SUITE_B_LOS_NOT_ALLOWED, OF_error, "X.509 certificate verification error - Suite B: curve not allowed for this LOS" ); +makeOFConditionConst( DCMTLS_EC_X509VerifySuiteBCannotSignP384WithP256, OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_SUITE_B_CANNOT_SIGN_P_384_WITH_P_256, OF_error, "X.509 certificate verification error - Suite B: cannot sign P-384 with P-256" ); +makeOFConditionConst( DCMTLS_EC_X509VerifyHostnameMismatch, OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_HOSTNAME_MISMATCH, OF_error, "X.509 certificate verification error - Hostname mismatch" ); +makeOFConditionConst( DCMTLS_EC_X509VerifyEmailMismatch, OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_EMAIL_MISMATCH, OF_error, "X.509 certificate verification error - Email address mismatch" ); +makeOFConditionConst( DCMTLS_EC_X509VerifyIPAddressMismatch, OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_IP_ADDRESS_MISMATCH, OF_error, "X.509 certificate verification error - IP address mismatch" ); +makeOFConditionConst( DCMTLS_EC_X509VerifyDANENoMatch, OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_DANE_NO_MATCH, OF_error, "X.509 certificate verification error - No matching DANE TLSA records" ); +makeOFConditionConst( DCMTLS_EC_X509VerifyEEKeyTooSmall, OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_EE_KEY_TOO_SMALL, OF_error, "X.509 certificate verification error - EE certificate key too weak" ); +makeOFConditionConst( DCMTLS_EC_X509VerifyCAKeyTooSmall, OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_CA_KEY_TOO_SMALL, OF_error, "X.509 certificate verification error - CA certificate key too weak" ); +makeOFConditionConst( DCMTLS_EC_X509VerifyCAMDTooWeak, OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_CA_MD_TOO_WEAK, OF_error, "X.509 certificate verification error - CA signature digest algorithm too weak" ); +makeOFConditionConst( DCMTLS_EC_X509VerifyInvalidCall, OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_INVALID_CALL, OF_error, "X.509 certificate verification error - Invalid certificate verification context" ); +makeOFConditionConst( DCMTLS_EC_X509VerifyStoreLookup, OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_STORE_LOOKUP, OF_error, "X.509 certificate verification error - Issuer certificate lookup error" ); +makeOFConditionConst( DCMTLS_EC_X509VerifyNoValidSCTs, OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_NO_VALID_SCTS, OF_error, "X.509 certificate verification error - Certificate Transparency required, but no valid SCTs found" ); +makeOFConditionConst( DCMTLS_EC_X509VerifyProxySubjectNameViolation, OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_PROXY_SUBJECT_NAME_VIOLATION, OF_error, "X.509 certificate verification error - proxy subject name violation" ); +makeOFConditionConst( DCMTLS_EC_X509VerifyOCSPVerifyNeeded, OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_OCSP_VERIFY_NEEDED, OF_error, "X.509 certificate verification error - OCSP verification needed" ); +makeOFConditionConst( DCMTLS_EC_X509VerifyOCSPVerifyFailed, OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_OCSP_VERIFY_FAILED, OF_error, "X.509 certificate verification error - OCSP verification failed" ); +makeOFConditionConst( DCMTLS_EC_X509VerifyOCSPCertUnknown, OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_OCSP_CERT_UNKNOWN, OF_error, "X.509 certificate verification error - OCSP unknown cert" ); +makeOFConditionConst( DCMTLS_EC_X509VerifyUnsupportedSignatureAlgorithm, OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_UNSUPPORTED_SIGNATURE_ALGORITHM, OF_error, "X.509 certificate verification error - Cannot find certificate signature algorithm" ); +makeOFConditionConst( DCMTLS_EC_X509VerifySignatureAlgorithmMismatch, OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_SIGNATURE_ALGORITHM_MISMATCH, OF_error, "X.509 certificate verification error - subject signature algorithm and issuer public key algorithm mismatch" ); +makeOFConditionConst( DCMTLS_EC_X509VerifySignatureAlgorithmInconsistency, OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_SIGNATURE_ALGORITHM_INCONSISTENCY, OF_error, "X.509 certificate verification error - cert info siganature and signature algorithm mismatch" ); +makeOFConditionConst( DCMTLS_EC_X509VerifyInvalidCA, OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_INVALID_CA, OF_error, "X.509 certificate verification error - invalid CA certificate" ); +makeOFConditionConst( DCMTLS_EC_X509VerifyPathlenInvalidForNonCA, OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_PATHLEN_INVALID_FOR_NON_CA, OF_error, "X.509 certificate verification error - Path length invalid for non-CA cert" ); +makeOFConditionConst( DCMTLS_EC_X509VerifyPathlenWithoutKUKeyCertSign, OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_PATHLEN_WITHOUT_KU_KEY_CERT_SIGN, OF_error, "X.509 certificate verification error - Path length given without key usage keyCertSign" ); +makeOFConditionConst( DCMTLS_EC_X509VerifyKUKeyCertSignInvalidForNonCA, OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_KU_KEY_CERT_SIGN_INVALID_FOR_NON_CA, OF_error, "X.509 certificate verification error - Key usage keyCertSign invalid for non-CA cert" ); +makeOFConditionConst( DCMTLS_EC_X509VerifyIssuerNameEmpty, OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_ISSUER_NAME_EMPTY, OF_error, "X.509 certificate verification error - Issuer name empty" ); +makeOFConditionConst( DCMTLS_EC_X509VerifySubjectNameEmpty, OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_SUBJECT_NAME_EMPTY, OF_error, "X.509 certificate verification error - Subject name empty" ); +makeOFConditionConst( DCMTLS_EC_X509VerifyMissingAuthorityKeyIdentifier, OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_MISSING_AUTHORITY_KEY_IDENTIFIER, OF_error, "X.509 certificate verification error - Missing Authority Key Identifier" ); +makeOFConditionConst( DCMTLS_EC_X509VerifyMissingSubjectKeyIdentifier, OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_MISSING_SUBJECT_KEY_IDENTIFIER, OF_error, "X.509 certificate verification error - Missing Subject Key Identifier" ); +makeOFConditionConst( DCMTLS_EC_X509VerifyEmptySubjectAltName, OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_EMPTY_SUBJECT_ALT_NAME, OF_error, "X.509 certificate verification error - Empty Subject Alternative Name extension" ); +makeOFConditionConst( DCMTLS_EC_X509VerifyEmptySubjectSanNotCritical, OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_EMPTY_SUBJECT_SAN_NOT_CRITICAL, OF_error, "X.509 certificate verification error - Basic Constraints of CA cert not marked critical" ); +makeOFConditionConst( DCMTLS_EC_X509VerifyCABconsNotCritical, OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_CA_BCONS_NOT_CRITICAL, OF_error, "X.509 certificate verification error - Subject empty and Subject Alt Name extension not critical" ); +makeOFConditionConst( DCMTLS_EC_X509VerifyAuthorityKeyIdentifierCritical, OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_AUTHORITY_KEY_IDENTIFIER_CRITICAL, OF_error, "X.509 certificate verification error - Authority Key Identifier marked critical" ); +makeOFConditionConst( DCMTLS_EC_X509VerifySubjectKeyIdentifierCritical, OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_SUBJECT_KEY_IDENTIFIER_CRITICAL, OF_error, "X.509 certificate verification error - Subject Key Identifier marked critical" ); +makeOFConditionConst( DCMTLS_EC_X509VerifyCACertMissingKeyUsage, OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_CA_CERT_MISSING_KEY_USAGE, OF_error, "X.509 certificate verification error - CA cert does not include key usage extension" ); +makeOFConditionConst( DCMTLS_EC_X509VerifyExtensionsRequireVersion3, OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_EXTENSIONS_REQUIRE_VERSION_3, OF_error, "X.509 certificate verification error - Using cert extension requires at least X509v3" ); +makeOFConditionConst( DCMTLS_EC_X509VerifyECKeyExplicitParams, OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_EC_KEY_EXPLICIT_PARAMS, OF_error, "X.509 certificate verification error - Certificate public key has explicit ECC parameters" ); + +// the following defines are present in OpenSSL 1.0.1 + +#ifndef SSL_R_APP_DATA_IN_HANDSHAKE +#define SSL_R_APP_DATA_IN_HANDSHAKE 100 +#endif +#ifndef SSL_R_ATTEMPT_TO_REUSE_SESSION_IN_DIFFERENT_CONTEXT +#define SSL_R_ATTEMPT_TO_REUSE_SESSION_IN_DIFFERENT_CONTEXT 272 +#endif +#ifndef SSL_R_BAD_ALERT_RECORD +#define SSL_R_BAD_ALERT_RECORD 101 +#endif +#ifndef SSL_R_BAD_AUTHENTICATION_TYPE +#define SSL_R_BAD_AUTHENTICATION_TYPE 102 +#endif +#ifndef SSL_R_BAD_CHANGE_CIPHER_SPEC +#define SSL_R_BAD_CHANGE_CIPHER_SPEC 103 +#endif +#ifndef SSL_R_BAD_CHECKSUM +#define SSL_R_BAD_CHECKSUM 104 +#endif +#ifndef SSL_R_BAD_DATA_RETURNED_BY_CALLBACK +#define SSL_R_BAD_DATA_RETURNED_BY_CALLBACK 106 +#endif +#ifndef SSL_R_BAD_DECOMPRESSION +#define SSL_R_BAD_DECOMPRESSION 107 +#endif +#ifndef SSL_R_BAD_DH_G_LENGTH +#define SSL_R_BAD_DH_G_LENGTH 108 +#endif +#ifndef SSL_R_BAD_DH_G_VALUE +#define SSL_R_BAD_DH_G_VALUE 375 +#endif +#ifndef SSL_R_BAD_DH_PUB_KEY_LENGTH +#define SSL_R_BAD_DH_PUB_KEY_LENGTH 109 +#endif +#ifndef SSL_R_BAD_DH_PUB_KEY_VALUE +#define SSL_R_BAD_DH_PUB_KEY_VALUE 393 +#endif +#ifndef SSL_R_BAD_DH_P_LENGTH +#define SSL_R_BAD_DH_P_LENGTH 110 +#endif +#ifndef SSL_R_BAD_DH_P_VALUE +#define SSL_R_BAD_DH_P_VALUE 395 +#endif +#ifndef SSL_R_BAD_DIGEST_LENGTH +#define SSL_R_BAD_DIGEST_LENGTH 111 +#endif +#ifndef SSL_R_BAD_DSA_SIGNATURE +#define SSL_R_BAD_DSA_SIGNATURE 112 +#endif +#ifndef SSL_R_BAD_ECC_CERT +#define SSL_R_BAD_ECC_CERT 304 +#endif +#ifndef SSL_R_BAD_ECDSA_SIGNATURE +#define SSL_R_BAD_ECDSA_SIGNATURE 305 +#endif +#ifndef SSL_R_BAD_ECPOINT +#define SSL_R_BAD_ECPOINT 306 +#endif +#ifndef SSL_R_BAD_HANDSHAKE_LENGTH +#define SSL_R_BAD_HANDSHAKE_LENGTH 332 +#endif +#ifndef SSL_R_BAD_HELLO_REQUEST +#define SSL_R_BAD_HELLO_REQUEST 105 +#endif +#ifndef SSL_R_BAD_LENGTH +#define SSL_R_BAD_LENGTH 271 +#endif +#ifndef SSL_R_BAD_MAC_DECODE +#define SSL_R_BAD_MAC_DECODE 113 +#endif +#ifndef SSL_R_BAD_MAC_LENGTH +#define SSL_R_BAD_MAC_LENGTH 333 +#endif +#ifndef SSL_R_BAD_MESSAGE_TYPE +#define SSL_R_BAD_MESSAGE_TYPE 114 +#endif +#ifndef SSL_R_BAD_PACKET_LENGTH +#define SSL_R_BAD_PACKET_LENGTH 115 +#endif +#ifndef SSL_R_BAD_PROTOCOL_VERSION_NUMBER +#define SSL_R_BAD_PROTOCOL_VERSION_NUMBER 116 +#endif +#ifndef SSL_R_BAD_PSK_IDENTITY_HINT_LENGTH +#define SSL_R_BAD_PSK_IDENTITY_HINT_LENGTH 316 +#endif +#ifndef SSL_R_BAD_RESPONSE_ARGUMENT +#define SSL_R_BAD_RESPONSE_ARGUMENT 117 +#endif +#ifndef SSL_R_BAD_RSA_DECRYPT +#define SSL_R_BAD_RSA_DECRYPT 118 +#endif +#ifndef SSL_R_BAD_RSA_ENCRYPT +#define SSL_R_BAD_RSA_ENCRYPT 119 +#endif +#ifndef SSL_R_BAD_RSA_E_LENGTH +#define SSL_R_BAD_RSA_E_LENGTH 120 +#endif +#ifndef SSL_R_BAD_RSA_MODULUS_LENGTH +#define SSL_R_BAD_RSA_MODULUS_LENGTH 121 +#endif +#ifndef SSL_R_BAD_RSA_SIGNATURE +#define SSL_R_BAD_RSA_SIGNATURE 122 +#endif +#ifndef SSL_R_BAD_SIGNATURE +#define SSL_R_BAD_SIGNATURE 123 +#endif +#ifndef SSL_R_BAD_SRP_A_LENGTH +#define SSL_R_BAD_SRP_A_LENGTH 347 +#endif +#ifndef SSL_R_BAD_SRP_B_LENGTH +#define SSL_R_BAD_SRP_B_LENGTH 348 +#endif +#ifndef SSL_R_BAD_SRP_G_LENGTH +#define SSL_R_BAD_SRP_G_LENGTH 349 +#endif +#ifndef SSL_R_BAD_SRP_N_LENGTH +#define SSL_R_BAD_SRP_N_LENGTH 350 +#endif +#ifndef SSL_R_BAD_SRP_PARAMETERS +#define SSL_R_BAD_SRP_PARAMETERS 371 +#endif +#ifndef SSL_R_BAD_SRP_S_LENGTH +#define SSL_R_BAD_SRP_S_LENGTH 351 +#endif +#ifndef SSL_R_BAD_SRTP_MKI_VALUE +#define SSL_R_BAD_SRTP_MKI_VALUE 352 +#endif +#ifndef SSL_R_BAD_SRTP_PROTECTION_PROFILE_LIST +#define SSL_R_BAD_SRTP_PROTECTION_PROFILE_LIST 353 +#endif +#ifndef SSL_R_BAD_SSL_FILETYPE +#define SSL_R_BAD_SSL_FILETYPE 124 +#endif +#ifndef SSL_R_BAD_SSL_SESSION_ID_LENGTH +#define SSL_R_BAD_SSL_SESSION_ID_LENGTH 125 +#endif +#ifndef SSL_R_BAD_STATE +#define SSL_R_BAD_STATE 126 +#endif +#ifndef SSL_R_BAD_WRITE_RETRY +#define SSL_R_BAD_WRITE_RETRY 127 +#endif +#ifndef SSL_R_BIO_NOT_SET +#define SSL_R_BIO_NOT_SET 128 +#endif +#ifndef SSL_R_BLOCK_CIPHER_PAD_IS_WRONG +#define SSL_R_BLOCK_CIPHER_PAD_IS_WRONG 129 +#endif +#ifndef SSL_R_BN_LIB +#define SSL_R_BN_LIB 130 +#endif +#ifndef SSL_R_CA_DN_LENGTH_MISMATCH +#define SSL_R_CA_DN_LENGTH_MISMATCH 131 +#endif +#ifndef SSL_R_CA_DN_TOO_LONG +#define SSL_R_CA_DN_TOO_LONG 132 +#endif +#ifndef SSL_R_CCS_RECEIVED_EARLY +#define SSL_R_CCS_RECEIVED_EARLY 133 +#endif +#ifndef SSL_R_CERTIFICATE_VERIFY_FAILED +#define SSL_R_CERTIFICATE_VERIFY_FAILED 134 +#endif +#ifndef SSL_R_CERT_LENGTH_MISMATCH +#define SSL_R_CERT_LENGTH_MISMATCH 135 +#endif +#ifndef SSL_R_CHALLENGE_IS_DIFFERENT +#define SSL_R_CHALLENGE_IS_DIFFERENT 136 +#endif +#ifndef SSL_R_CIPHER_CODE_WRONG_LENGTH +#define SSL_R_CIPHER_CODE_WRONG_LENGTH 137 +#endif +#ifndef SSL_R_CIPHER_OR_HASH_UNAVAILABLE +#define SSL_R_CIPHER_OR_HASH_UNAVAILABLE 138 +#endif +#ifndef SSL_R_CIPHER_TABLE_SRC_ERROR +#define SSL_R_CIPHER_TABLE_SRC_ERROR 139 +#endif +#ifndef SSL_R_CLIENTHELLO_TLSEXT +#define SSL_R_CLIENTHELLO_TLSEXT 226 +#endif +#ifndef SSL_R_COMPRESSED_LENGTH_TOO_LONG +#define SSL_R_COMPRESSED_LENGTH_TOO_LONG 140 +#endif +#ifndef SSL_R_COMPRESSION_DISABLED +#define SSL_R_COMPRESSION_DISABLED 343 +#endif +#ifndef SSL_R_COMPRESSION_FAILURE +#define SSL_R_COMPRESSION_FAILURE 141 +#endif +#ifndef SSL_R_COMPRESSION_ID_NOT_WITHIN_PRIVATE_RANGE +#define SSL_R_COMPRESSION_ID_NOT_WITHIN_PRIVATE_RANGE 307 +#endif +#ifndef SSL_R_COMPRESSION_LIBRARY_ERROR +#define SSL_R_COMPRESSION_LIBRARY_ERROR 142 +#endif +#ifndef SSL_R_CONNECTION_ID_IS_DIFFERENT +#define SSL_R_CONNECTION_ID_IS_DIFFERENT 143 +#endif +#ifndef SSL_R_CONNECTION_TYPE_NOT_SET +#define SSL_R_CONNECTION_TYPE_NOT_SET 144 +#endif +#ifndef SSL_R_COOKIE_MISMATCH +#define SSL_R_COOKIE_MISMATCH 308 +#endif +#ifndef SSL_R_DATA_BETWEEN_CCS_AND_FINISHED +#define SSL_R_DATA_BETWEEN_CCS_AND_FINISHED 145 +#endif +#ifndef SSL_R_DATA_LENGTH_TOO_LONG +#define SSL_R_DATA_LENGTH_TOO_LONG 146 +#endif +#ifndef SSL_R_DECRYPTION_FAILED +#define SSL_R_DECRYPTION_FAILED 147 +#endif +#ifndef SSL_R_DECRYPTION_FAILED_OR_BAD_RECORD_MAC +#define SSL_R_DECRYPTION_FAILED_OR_BAD_RECORD_MAC 281 +#endif +#ifndef SSL_R_DH_KEY_TOO_SMALL +#define SSL_R_DH_KEY_TOO_SMALL 372 +#endif +#ifndef SSL_R_DH_PUBLIC_VALUE_LENGTH_IS_WRONG +#define SSL_R_DH_PUBLIC_VALUE_LENGTH_IS_WRONG 148 +#endif +#ifndef SSL_R_DIGEST_CHECK_FAILED +#define SSL_R_DIGEST_CHECK_FAILED 149 +#endif +#ifndef SSL_R_DTLS_MESSAGE_TOO_BIG +#define SSL_R_DTLS_MESSAGE_TOO_BIG 334 +#endif +#ifndef SSL_R_DUPLICATE_COMPRESSION_ID +#define SSL_R_DUPLICATE_COMPRESSION_ID 309 +#endif +#ifndef SSL_R_ECC_CERT_NOT_FOR_KEY_AGREEMENT +#define SSL_R_ECC_CERT_NOT_FOR_KEY_AGREEMENT 317 +#endif +#ifndef SSL_R_ECC_CERT_NOT_FOR_SIGNING +#define SSL_R_ECC_CERT_NOT_FOR_SIGNING 318 +#endif +#ifndef SSL_R_ECC_CERT_SHOULD_HAVE_RSA_SIGNATURE +#define SSL_R_ECC_CERT_SHOULD_HAVE_RSA_SIGNATURE 322 +#endif +#ifndef SSL_R_ECC_CERT_SHOULD_HAVE_SHA1_SIGNATURE +#define SSL_R_ECC_CERT_SHOULD_HAVE_SHA1_SIGNATURE 323 +#endif +#ifndef SSL_R_ECGROUP_TOO_LARGE_FOR_CIPHER +#define SSL_R_ECGROUP_TOO_LARGE_FOR_CIPHER 310 +#endif +#ifndef SSL_R_EMPTY_SRTP_PROTECTION_PROFILE_LIST +#define SSL_R_EMPTY_SRTP_PROTECTION_PROFILE_LIST 354 +#endif +#ifndef SSL_R_ENCRYPTED_LENGTH_TOO_LONG +#define SSL_R_ENCRYPTED_LENGTH_TOO_LONG 150 +#endif +#ifndef SSL_R_ERROR_GENERATING_TMP_RSA_KEY +#define SSL_R_ERROR_GENERATING_TMP_RSA_KEY 282 +#endif +#ifndef SSL_R_ERROR_IN_RECEIVED_CIPHER_LIST +#define SSL_R_ERROR_IN_RECEIVED_CIPHER_LIST 151 +#endif +#ifndef SSL_R_EXCESSIVE_MESSAGE_SIZE +#define SSL_R_EXCESSIVE_MESSAGE_SIZE 152 +#endif +#ifndef SSL_R_EXTRA_DATA_IN_MESSAGE +#define SSL_R_EXTRA_DATA_IN_MESSAGE 153 +#endif +#ifndef SSL_R_GOT_A_FIN_BEFORE_A_CCS +#define SSL_R_GOT_A_FIN_BEFORE_A_CCS 154 +#endif +#ifndef SSL_R_GOT_NEXT_PROTO_BEFORE_A_CCS +#define SSL_R_GOT_NEXT_PROTO_BEFORE_A_CCS 355 +#endif +#ifndef SSL_R_GOT_NEXT_PROTO_WITHOUT_EXTENSION +#define SSL_R_GOT_NEXT_PROTO_WITHOUT_EXTENSION 356 +#endif +#ifndef SSL_R_HTTPS_PROXY_REQUEST +#define SSL_R_HTTPS_PROXY_REQUEST 155 +#endif +#ifndef SSL_R_HTTP_REQUEST +#define SSL_R_HTTP_REQUEST 156 +#endif +#ifndef SSL_R_ILLEGAL_PADDING +#define SSL_R_ILLEGAL_PADDING 283 +#endif +#ifndef SSL_R_INAPPROPRIATE_FALLBACK +#define SSL_R_INAPPROPRIATE_FALLBACK 373 +#endif +#ifndef SSL_R_INCONSISTENT_COMPRESSION +#define SSL_R_INCONSISTENT_COMPRESSION 340 +#endif +#ifndef SSL_R_INVALID_CHALLENGE_LENGTH +#define SSL_R_INVALID_CHALLENGE_LENGTH 158 +#endif +#ifndef SSL_R_INVALID_COMMAND +#define SSL_R_INVALID_COMMAND 280 +#endif +#ifndef SSL_R_INVALID_COMPRESSION_ALGORITHM +#define SSL_R_INVALID_COMPRESSION_ALGORITHM 341 +#endif +#ifndef SSL_R_INVALID_PURPOSE +#define SSL_R_INVALID_PURPOSE 278 +#endif +#ifndef SSL_R_INVALID_SRP_USERNAME +#define SSL_R_INVALID_SRP_USERNAME 357 +#endif +#ifndef SSL_R_INVALID_STATUS_RESPONSE +#define SSL_R_INVALID_STATUS_RESPONSE 328 +#endif +#ifndef SSL_R_INVALID_TICKET_KEYS_LENGTH +#define SSL_R_INVALID_TICKET_KEYS_LENGTH 325 +#endif +#ifndef SSL_R_INVALID_TRUST +#define SSL_R_INVALID_TRUST 279 +#endif +#ifndef SSL_R_KEY_ARG_TOO_LONG +#define SSL_R_KEY_ARG_TOO_LONG 284 +#endif +#ifndef SSL_R_KRB5 +#define SSL_R_KRB5 285 +#endif +#ifndef SSL_R_KRB5_C_CC_PRINC +#define SSL_R_KRB5_C_CC_PRINC 286 +#endif +#ifndef SSL_R_KRB5_C_GET_CRED +#define SSL_R_KRB5_C_GET_CRED 287 +#endif +#ifndef SSL_R_KRB5_C_INIT +#define SSL_R_KRB5_C_INIT 288 +#endif +#ifndef SSL_R_KRB5_C_MK_REQ +#define SSL_R_KRB5_C_MK_REQ 289 +#endif +#ifndef SSL_R_KRB5_S_BAD_TICKET +#define SSL_R_KRB5_S_BAD_TICKET 290 +#endif +#ifndef SSL_R_KRB5_S_INIT +#define SSL_R_KRB5_S_INIT 291 +#endif +#ifndef SSL_R_KRB5_S_RD_REQ +#define SSL_R_KRB5_S_RD_REQ 292 +#endif +#ifndef SSL_R_KRB5_S_TKT_EXPIRED +#define SSL_R_KRB5_S_TKT_EXPIRED 293 +#endif +#ifndef SSL_R_KRB5_S_TKT_NYV +#define SSL_R_KRB5_S_TKT_NYV 294 +#endif +#ifndef SSL_R_KRB5_S_TKT_SKEW +#define SSL_R_KRB5_S_TKT_SKEW 295 +#endif +#ifndef SSL_R_LENGTH_MISMATCH +#define SSL_R_LENGTH_MISMATCH 159 +#endif +#ifndef SSL_R_LENGTH_TOO_SHORT +#define SSL_R_LENGTH_TOO_SHORT 160 +#endif +#ifndef SSL_R_LIBRARY_BUG +#define SSL_R_LIBRARY_BUG 274 +#endif +#ifndef SSL_R_LIBRARY_HAS_NO_CIPHERS +#define SSL_R_LIBRARY_HAS_NO_CIPHERS 161 +#endif +#ifndef SSL_R_MESSAGE_TOO_LONG +#define SSL_R_MESSAGE_TOO_LONG 296 +#endif +#ifndef SSL_R_MISSING_DH_DSA_CERT +#define SSL_R_MISSING_DH_DSA_CERT 162 +#endif +#ifndef SSL_R_MISSING_DH_KEY +#define SSL_R_MISSING_DH_KEY 163 +#endif +#ifndef SSL_R_MISSING_DH_RSA_CERT +#define SSL_R_MISSING_DH_RSA_CERT 164 +#endif +#ifndef SSL_R_MISSING_DSA_SIGNING_CERT +#define SSL_R_MISSING_DSA_SIGNING_CERT 165 +#endif +#ifndef SSL_R_MISSING_EXPORT_TMP_DH_KEY +#define SSL_R_MISSING_EXPORT_TMP_DH_KEY 166 +#endif +#ifndef SSL_R_MISSING_EXPORT_TMP_RSA_KEY +#define SSL_R_MISSING_EXPORT_TMP_RSA_KEY 167 +#endif +#ifndef SSL_R_MISSING_RSA_CERTIFICATE +#define SSL_R_MISSING_RSA_CERTIFICATE 168 +#endif +#ifndef SSL_R_MISSING_RSA_ENCRYPTING_CERT +#define SSL_R_MISSING_RSA_ENCRYPTING_CERT 169 +#endif +#ifndef SSL_R_MISSING_RSA_SIGNING_CERT +#define SSL_R_MISSING_RSA_SIGNING_CERT 170 +#endif +#ifndef SSL_R_MISSING_SRP_PARAM +#define SSL_R_MISSING_SRP_PARAM 358 +#endif +#ifndef SSL_R_MISSING_TMP_DH_KEY +#define SSL_R_MISSING_TMP_DH_KEY 171 +#endif +#ifndef SSL_R_MISSING_TMP_ECDH_KEY +#define SSL_R_MISSING_TMP_ECDH_KEY 311 +#endif +#ifndef SSL_R_MISSING_TMP_RSA_KEY +#define SSL_R_MISSING_TMP_RSA_KEY 172 +#endif +#ifndef SSL_R_MISSING_TMP_RSA_PKEY +#define SSL_R_MISSING_TMP_RSA_PKEY 173 +#endif +#ifndef SSL_R_MISSING_VERIFY_MESSAGE +#define SSL_R_MISSING_VERIFY_MESSAGE 174 +#endif +#ifndef SSL_R_MULTIPLE_SGC_RESTARTS +#define SSL_R_MULTIPLE_SGC_RESTARTS 346 +#endif +#ifndef SSL_R_NON_SSLV2_INITIAL_PACKET +#define SSL_R_NON_SSLV2_INITIAL_PACKET 175 +#endif +#ifndef SSL_R_NO_CERTIFICATES_RETURNED +#define SSL_R_NO_CERTIFICATES_RETURNED 176 +#endif +#ifndef SSL_R_NO_CERTIFICATE_ASSIGNED +#define SSL_R_NO_CERTIFICATE_ASSIGNED 177 +#endif +#ifndef SSL_R_NO_CERTIFICATE_RETURNED +#define SSL_R_NO_CERTIFICATE_RETURNED 178 +#endif +#ifndef SSL_R_NO_CERTIFICATE_SET +#define SSL_R_NO_CERTIFICATE_SET 179 +#endif +#ifndef SSL_R_NO_CERTIFICATE_SPECIFIED +#define SSL_R_NO_CERTIFICATE_SPECIFIED 180 +#endif +#ifndef SSL_R_NO_CIPHERS_AVAILABLE +#define SSL_R_NO_CIPHERS_AVAILABLE 181 +#endif +#ifndef SSL_R_NO_CIPHERS_PASSED +#define SSL_R_NO_CIPHERS_PASSED 182 +#endif +#ifndef SSL_R_NO_CIPHERS_SPECIFIED +#define SSL_R_NO_CIPHERS_SPECIFIED 183 +#endif +#ifndef SSL_R_NO_CIPHER_LIST +#define SSL_R_NO_CIPHER_LIST 184 +#endif +#ifndef SSL_R_NO_CIPHER_MATCH +#define SSL_R_NO_CIPHER_MATCH 185 +#endif +#ifndef SSL_R_NO_CLIENT_CERT_METHOD +#define SSL_R_NO_CLIENT_CERT_METHOD 331 +#endif +#ifndef SSL_R_NO_CLIENT_CERT_RECEIVED +#define SSL_R_NO_CLIENT_CERT_RECEIVED 186 +#endif +#ifndef SSL_R_NO_COMPRESSION_SPECIFIED +#define SSL_R_NO_COMPRESSION_SPECIFIED 187 +#endif +#ifndef SSL_R_NO_GOST_CERTIFICATE_SENT_BY_PEER +#define SSL_R_NO_GOST_CERTIFICATE_SENT_BY_PEER 330 +#endif +#ifndef SSL_R_NO_METHOD_SPECIFIED +#define SSL_R_NO_METHOD_SPECIFIED 188 +#endif +#ifndef SSL_R_NO_PRIVATEKEY +#define SSL_R_NO_PRIVATEKEY 189 +#endif +#ifndef SSL_R_NO_PRIVATE_KEY_ASSIGNED +#define SSL_R_NO_PRIVATE_KEY_ASSIGNED 190 +#endif +#ifndef SSL_R_NO_PROTOCOLS_AVAILABLE +#define SSL_R_NO_PROTOCOLS_AVAILABLE 191 +#endif +#ifndef SSL_R_NO_PUBLICKEY +#define SSL_R_NO_PUBLICKEY 192 +#endif +#ifndef SSL_R_NO_RENEGOTIATION +#define SSL_R_NO_RENEGOTIATION 339 +#endif +#ifndef SSL_R_NO_REQUIRED_DIGEST +#define SSL_R_NO_REQUIRED_DIGEST 324 +#endif +#ifndef SSL_R_NO_SHARED_CIPHER +#define SSL_R_NO_SHARED_CIPHER 193 +#endif +#ifndef SSL_R_NO_SRTP_PROFILES +#define SSL_R_NO_SRTP_PROFILES 359 +#endif +#ifndef SSL_R_NO_VERIFY_CALLBACK +#define SSL_R_NO_VERIFY_CALLBACK 194 +#endif +#ifndef SSL_R_NULL_SSL_CTX +#define SSL_R_NULL_SSL_CTX 195 +#endif +#ifndef SSL_R_NULL_SSL_METHOD_PASSED +#define SSL_R_NULL_SSL_METHOD_PASSED 196 +#endif +#ifndef SSL_R_OLD_SESSION_CIPHER_NOT_RETURNED +#define SSL_R_OLD_SESSION_CIPHER_NOT_RETURNED 197 +#endif +#ifndef SSL_R_OLD_SESSION_COMPRESSION_ALGORITHM_NOT_RETURNED +#define SSL_R_OLD_SESSION_COMPRESSION_ALGORITHM_NOT_RETURNED 344 +#endif +#ifndef SSL_R_ONLY_TLS_ALLOWED_IN_FIPS_MODE +#define SSL_R_ONLY_TLS_ALLOWED_IN_FIPS_MODE 297 +#endif +#ifndef SSL_R_OPAQUE_PRF_INPUT_TOO_LONG +#define SSL_R_OPAQUE_PRF_INPUT_TOO_LONG 327 +#endif +#ifndef SSL_R_PACKET_LENGTH_TOO_LONG +#define SSL_R_PACKET_LENGTH_TOO_LONG 198 +#endif +#ifndef SSL_R_PARSE_TLSEXT +#define SSL_R_PARSE_TLSEXT 227 +#endif +#ifndef SSL_R_PATH_TOO_LONG +#define SSL_R_PATH_TOO_LONG 270 +#endif +#ifndef SSL_R_PEER_DID_NOT_RETURN_A_CERTIFICATE +#define SSL_R_PEER_DID_NOT_RETURN_A_CERTIFICATE 199 +#endif +#ifndef SSL_R_PEER_ERROR +#define SSL_R_PEER_ERROR 200 +#endif +#ifndef SSL_R_PEER_ERROR_CERTIFICATE +#define SSL_R_PEER_ERROR_CERTIFICATE 201 +#endif +#ifndef SSL_R_PEER_ERROR_NO_CERTIFICATE +#define SSL_R_PEER_ERROR_NO_CERTIFICATE 202 +#endif +#ifndef SSL_R_PEER_ERROR_NO_CIPHER +#define SSL_R_PEER_ERROR_NO_CIPHER 203 +#endif +#ifndef SSL_R_PEER_ERROR_UNSUPPORTED_CERTIFICATE_TYPE +#define SSL_R_PEER_ERROR_UNSUPPORTED_CERTIFICATE_TYPE 204 +#endif +#ifndef SSL_R_PRE_MAC_LENGTH_TOO_LONG +#define SSL_R_PRE_MAC_LENGTH_TOO_LONG 205 +#endif +#ifndef SSL_R_PROBLEMS_MAPPING_CIPHER_FUNCTIONS +#define SSL_R_PROBLEMS_MAPPING_CIPHER_FUNCTIONS 206 +#endif +#ifndef SSL_R_PROTOCOL_IS_SHUTDOWN +#define SSL_R_PROTOCOL_IS_SHUTDOWN 207 +#endif +#ifndef SSL_R_PSK_IDENTITY_NOT_FOUND +#define SSL_R_PSK_IDENTITY_NOT_FOUND 223 +#endif +#ifndef SSL_R_PSK_NO_CLIENT_CB +#define SSL_R_PSK_NO_CLIENT_CB 224 +#endif +#ifndef SSL_R_PSK_NO_SERVER_CB +#define SSL_R_PSK_NO_SERVER_CB 225 +#endif +#ifndef SSL_R_PUBLIC_KEY_ENCRYPT_ERROR +#define SSL_R_PUBLIC_KEY_ENCRYPT_ERROR 208 +#endif +#ifndef SSL_R_PUBLIC_KEY_IS_NOT_RSA +#define SSL_R_PUBLIC_KEY_IS_NOT_RSA 209 +#endif +#ifndef SSL_R_PUBLIC_KEY_NOT_RSA +#define SSL_R_PUBLIC_KEY_NOT_RSA 210 +#endif +#ifndef SSL_R_READ_BIO_NOT_SET +#define SSL_R_READ_BIO_NOT_SET 211 +#endif +#ifndef SSL_R_READ_TIMEOUT_EXPIRED +#define SSL_R_READ_TIMEOUT_EXPIRED 312 +#endif +#ifndef SSL_R_READ_WRONG_PACKET_TYPE +#define SSL_R_READ_WRONG_PACKET_TYPE 212 +#endif +#ifndef SSL_R_RECORD_LENGTH_MISMATCH +#define SSL_R_RECORD_LENGTH_MISMATCH 213 +#endif +#ifndef SSL_R_RECORD_TOO_LARGE +#define SSL_R_RECORD_TOO_LARGE 214 +#endif +#ifndef SSL_R_RECORD_TOO_SMALL +#define SSL_R_RECORD_TOO_SMALL 298 +#endif +#ifndef SSL_R_RENEGOTIATE_EXT_TOO_LONG +#define SSL_R_RENEGOTIATE_EXT_TOO_LONG 335 +#endif +#ifndef SSL_R_RENEGOTIATION_ENCODING_ERR +#define SSL_R_RENEGOTIATION_ENCODING_ERR 336 +#endif +#ifndef SSL_R_RENEGOTIATION_MISMATCH +#define SSL_R_RENEGOTIATION_MISMATCH 337 +#endif +#ifndef SSL_R_REQUIRED_CIPHER_MISSING +#define SSL_R_REQUIRED_CIPHER_MISSING 215 +#endif +#ifndef SSL_R_REQUIRED_COMPRESSSION_ALGORITHM_MISSING +#define SSL_R_REQUIRED_COMPRESSSION_ALGORITHM_MISSING 342 +#endif +#ifndef SSL_R_REUSE_CERT_LENGTH_NOT_ZERO +#define SSL_R_REUSE_CERT_LENGTH_NOT_ZERO 216 +#endif +#ifndef SSL_R_REUSE_CERT_TYPE_NOT_ZERO +#define SSL_R_REUSE_CERT_TYPE_NOT_ZERO 217 +#endif +#ifndef SSL_R_REUSE_CIPHER_LIST_NOT_ZERO +#define SSL_R_REUSE_CIPHER_LIST_NOT_ZERO 218 +#endif +#ifndef SSL_R_SCSV_RECEIVED_WHEN_RENEGOTIATING +#define SSL_R_SCSV_RECEIVED_WHEN_RENEGOTIATING 345 +#endif +#ifndef SSL_R_SERVERHELLO_TLSEXT +#define SSL_R_SERVERHELLO_TLSEXT 275 +#endif +#ifndef SSL_R_SESSION_ID_CONTEXT_UNINITIALIZED +#define SSL_R_SESSION_ID_CONTEXT_UNINITIALIZED 277 +#endif +#ifndef SSL_R_SHORT_READ +#define SSL_R_SHORT_READ 219 +#endif +#ifndef SSL_R_SIGNATURE_ALGORITHMS_ERROR +#define SSL_R_SIGNATURE_ALGORITHMS_ERROR 360 +#endif +#ifndef SSL_R_SIGNATURE_FOR_NON_SIGNING_CERTIFICATE +#define SSL_R_SIGNATURE_FOR_NON_SIGNING_CERTIFICATE 220 +#endif +#ifndef SSL_R_SRP_A_CALC +#define SSL_R_SRP_A_CALC 361 +#endif +#ifndef SSL_R_SRTP_COULD_NOT_ALLOCATE_PROFILES +#define SSL_R_SRTP_COULD_NOT_ALLOCATE_PROFILES 362 +#endif +#ifndef SSL_R_SRTP_PROTECTION_PROFILE_LIST_TOO_LONG +#define SSL_R_SRTP_PROTECTION_PROFILE_LIST_TOO_LONG 363 +#endif +#ifndef SSL_R_SRTP_UNKNOWN_PROTECTION_PROFILE +#define SSL_R_SRTP_UNKNOWN_PROTECTION_PROFILE 364 +#endif +#ifndef SSL_R_SSL23_DOING_SESSION_ID_REUSE +#define SSL_R_SSL23_DOING_SESSION_ID_REUSE 221 +#endif +#ifndef SSL_R_SSL2_CONNECTION_ID_TOO_LONG +#define SSL_R_SSL2_CONNECTION_ID_TOO_LONG 299 +#endif +#ifndef SSL_R_SSL3_EXT_INVALID_ECPOINTFORMAT +#define SSL_R_SSL3_EXT_INVALID_ECPOINTFORMAT 321 +#endif +#ifndef SSL_R_SSL3_EXT_INVALID_SERVERNAME +#define SSL_R_SSL3_EXT_INVALID_SERVERNAME 319 +#endif +#ifndef SSL_R_SSL3_EXT_INVALID_SERVERNAME_TYPE +#define SSL_R_SSL3_EXT_INVALID_SERVERNAME_TYPE 320 +#endif +#ifndef SSL_R_SSL3_SESSION_ID_TOO_LONG +#define SSL_R_SSL3_SESSION_ID_TOO_LONG 300 +#endif +#ifndef SSL_R_SSL3_SESSION_ID_TOO_SHORT +#define SSL_R_SSL3_SESSION_ID_TOO_SHORT 222 +#endif +#ifndef SSL_R_SSLV3_ALERT_BAD_CERTIFICATE +#define SSL_R_SSLV3_ALERT_BAD_CERTIFICATE 1042 +#endif +#ifndef SSL_R_SSLV3_ALERT_BAD_RECORD_MAC +#define SSL_R_SSLV3_ALERT_BAD_RECORD_MAC 1020 +#endif +#ifndef SSL_R_SSLV3_ALERT_CERTIFICATE_EXPIRED +#define SSL_R_SSLV3_ALERT_CERTIFICATE_EXPIRED 1045 +#endif +#ifndef SSL_R_SSLV3_ALERT_CERTIFICATE_REVOKED +#define SSL_R_SSLV3_ALERT_CERTIFICATE_REVOKED 1044 +#endif +#ifndef SSL_R_SSLV3_ALERT_CERTIFICATE_UNKNOWN +#define SSL_R_SSLV3_ALERT_CERTIFICATE_UNKNOWN 1046 +#endif +#ifndef SSL_R_SSLV3_ALERT_DECOMPRESSION_FAILURE +#define SSL_R_SSLV3_ALERT_DECOMPRESSION_FAILURE 1030 +#endif +#ifndef SSL_R_SSLV3_ALERT_HANDSHAKE_FAILURE +#define SSL_R_SSLV3_ALERT_HANDSHAKE_FAILURE 1040 +#endif +#ifndef SSL_R_SSLV3_ALERT_ILLEGAL_PARAMETER +#define SSL_R_SSLV3_ALERT_ILLEGAL_PARAMETER 1047 +#endif +#ifndef SSL_R_SSLV3_ALERT_NO_CERTIFICATE +#define SSL_R_SSLV3_ALERT_NO_CERTIFICATE 1041 +#endif +#ifndef SSL_R_SSLV3_ALERT_UNEXPECTED_MESSAGE +#define SSL_R_SSLV3_ALERT_UNEXPECTED_MESSAGE 1010 +#endif +#ifndef SSL_R_SSLV3_ALERT_UNSUPPORTED_CERTIFICATE +#define SSL_R_SSLV3_ALERT_UNSUPPORTED_CERTIFICATE 1043 +#endif +#ifndef SSL_R_SSL_CTX_HAS_NO_DEFAULT_SSL_VERSION +#define SSL_R_SSL_CTX_HAS_NO_DEFAULT_SSL_VERSION 228 +#endif +#ifndef SSL_R_SSL_HANDSHAKE_FAILURE +#define SSL_R_SSL_HANDSHAKE_FAILURE 229 +#endif +#ifndef SSL_R_SSL_LIBRARY_HAS_NO_CIPHERS +#define SSL_R_SSL_LIBRARY_HAS_NO_CIPHERS 230 +#endif +#ifndef SSL_R_SSL_SESSION_ID_CALLBACK_FAILED +#define SSL_R_SSL_SESSION_ID_CALLBACK_FAILED 301 +#endif +#ifndef SSL_R_SSL_SESSION_ID_CONFLICT +#define SSL_R_SSL_SESSION_ID_CONFLICT 302 +#endif +#ifndef SSL_R_SSL_SESSION_ID_CONTEXT_TOO_LONG +#define SSL_R_SSL_SESSION_ID_CONTEXT_TOO_LONG 273 +#endif +#ifndef SSL_R_SSL_SESSION_ID_HAS_BAD_LENGTH +#define SSL_R_SSL_SESSION_ID_HAS_BAD_LENGTH 303 +#endif +#ifndef SSL_R_SSL_SESSION_ID_IS_DIFFERENT +#define SSL_R_SSL_SESSION_ID_IS_DIFFERENT 231 +#endif +#ifndef SSL_R_TLSV1_ALERT_ACCESS_DENIED +#define SSL_R_TLSV1_ALERT_ACCESS_DENIED 1049 +#endif +#ifndef SSL_R_TLSV1_ALERT_DECODE_ERROR +#define SSL_R_TLSV1_ALERT_DECODE_ERROR 1050 +#endif +#ifndef SSL_R_TLSV1_ALERT_DECRYPTION_FAILED +#define SSL_R_TLSV1_ALERT_DECRYPTION_FAILED 1021 +#endif +#ifndef SSL_R_TLSV1_ALERT_DECRYPT_ERROR +#define SSL_R_TLSV1_ALERT_DECRYPT_ERROR 1051 +#endif +#ifndef SSL_R_TLSV1_ALERT_EXPORT_RESTRICTION +#define SSL_R_TLSV1_ALERT_EXPORT_RESTRICTION 1060 +#endif +#ifndef SSL_R_TLSV1_ALERT_INAPPROPRIATE_FALLBACK +#define SSL_R_TLSV1_ALERT_INAPPROPRIATE_FALLBACK 1086 +#endif +#ifndef SSL_R_TLSV1_ALERT_INSUFFICIENT_SECURITY +#define SSL_R_TLSV1_ALERT_INSUFFICIENT_SECURITY 1071 +#endif +#ifndef SSL_R_TLSV1_ALERT_INTERNAL_ERROR +#define SSL_R_TLSV1_ALERT_INTERNAL_ERROR 1080 +#endif +#ifndef SSL_R_TLSV1_ALERT_NO_RENEGOTIATION +#define SSL_R_TLSV1_ALERT_NO_RENEGOTIATION 1100 +#endif +#ifndef SSL_R_TLSV1_ALERT_PROTOCOL_VERSION +#define SSL_R_TLSV1_ALERT_PROTOCOL_VERSION 1070 +#endif +#ifndef SSL_R_TLSV1_ALERT_RECORD_OVERFLOW +#define SSL_R_TLSV1_ALERT_RECORD_OVERFLOW 1022 +#endif +#ifndef SSL_R_TLSV1_ALERT_UNKNOWN_CA +#define SSL_R_TLSV1_ALERT_UNKNOWN_CA 1048 +#endif +#ifndef SSL_R_TLSV1_ALERT_USER_CANCELLED +#define SSL_R_TLSV1_ALERT_USER_CANCELLED 1090 +#endif +#ifndef SSL_R_TLSV1_BAD_CERTIFICATE_HASH_VALUE +#define SSL_R_TLSV1_BAD_CERTIFICATE_HASH_VALUE 1114 +#endif +#ifndef SSL_R_TLSV1_BAD_CERTIFICATE_STATUS_RESPONSE +#define SSL_R_TLSV1_BAD_CERTIFICATE_STATUS_RESPONSE 1113 +#endif +#ifndef SSL_R_TLSV1_CERTIFICATE_UNOBTAINABLE +#define SSL_R_TLSV1_CERTIFICATE_UNOBTAINABLE 1111 +#endif +#ifndef SSL_R_TLSV1_UNRECOGNIZED_NAME +#define SSL_R_TLSV1_UNRECOGNIZED_NAME 1112 +#endif +#ifndef SSL_R_TLSV1_UNSUPPORTED_EXTENSION +#define SSL_R_TLSV1_UNSUPPORTED_EXTENSION 1110 +#endif +#ifndef SSL_R_TLS_CLIENT_CERT_REQ_WITH_ANON_CIPHER +#define SSL_R_TLS_CLIENT_CERT_REQ_WITH_ANON_CIPHER 232 +#endif +#ifndef SSL_R_TLS_HEARTBEAT_PEER_DOESNT_ACCEPT +#define SSL_R_TLS_HEARTBEAT_PEER_DOESNT_ACCEPT 365 +#endif +#ifndef SSL_R_TLS_HEARTBEAT_PENDING +#define SSL_R_TLS_HEARTBEAT_PENDING 366 +#endif +#ifndef SSL_R_TLS_ILLEGAL_EXPORTER_LABEL +#define SSL_R_TLS_ILLEGAL_EXPORTER_LABEL 367 +#endif +#ifndef SSL_R_TLS_INVALID_ECPOINTFORMAT_LIST +#define SSL_R_TLS_INVALID_ECPOINTFORMAT_LIST 157 +#endif +#ifndef SSL_R_TLS_PEER_DID_NOT_RESPOND_WITH_CERTIFICATE_LIST +#define SSL_R_TLS_PEER_DID_NOT_RESPOND_WITH_CERTIFICATE_LIST 233 +#endif +#ifndef SSL_R_TLS_RSA_ENCRYPTED_VALUE_LENGTH_IS_WRONG +#define SSL_R_TLS_RSA_ENCRYPTED_VALUE_LENGTH_IS_WRONG 234 +#endif +#ifndef SSL_R_TRIED_TO_USE_UNSUPPORTED_CIPHER +#define SSL_R_TRIED_TO_USE_UNSUPPORTED_CIPHER 235 +#endif +#ifndef SSL_R_UNABLE_TO_DECODE_DH_CERTS +#define SSL_R_UNABLE_TO_DECODE_DH_CERTS 236 +#endif +#ifndef SSL_R_UNABLE_TO_DECODE_ECDH_CERTS +#define SSL_R_UNABLE_TO_DECODE_ECDH_CERTS 313 +#endif +#ifndef SSL_R_UNABLE_TO_EXTRACT_PUBLIC_KEY +#define SSL_R_UNABLE_TO_EXTRACT_PUBLIC_KEY 237 +#endif +#ifndef SSL_R_UNABLE_TO_FIND_DH_PARAMETERS +#define SSL_R_UNABLE_TO_FIND_DH_PARAMETERS 238 +#endif +#ifndef SSL_R_UNABLE_TO_FIND_ECDH_PARAMETERS +#define SSL_R_UNABLE_TO_FIND_ECDH_PARAMETERS 314 +#endif +#ifndef SSL_R_UNABLE_TO_FIND_PUBLIC_KEY_PARAMETERS +#define SSL_R_UNABLE_TO_FIND_PUBLIC_KEY_PARAMETERS 239 +#endif +#ifndef SSL_R_UNABLE_TO_FIND_SSL_METHOD +#define SSL_R_UNABLE_TO_FIND_SSL_METHOD 240 +#endif +#ifndef SSL_R_UNABLE_TO_LOAD_SSL2_MD5_ROUTINES +#define SSL_R_UNABLE_TO_LOAD_SSL2_MD5_ROUTINES 241 +#endif +#ifndef SSL_R_UNABLE_TO_LOAD_SSL3_MD5_ROUTINES +#define SSL_R_UNABLE_TO_LOAD_SSL3_MD5_ROUTINES 242 +#endif +#ifndef SSL_R_UNABLE_TO_LOAD_SSL3_SHA1_ROUTINES +#define SSL_R_UNABLE_TO_LOAD_SSL3_SHA1_ROUTINES 243 +#endif +#ifndef SSL_R_UNEXPECTED_MESSAGE +#define SSL_R_UNEXPECTED_MESSAGE 244 +#endif +#ifndef SSL_R_UNEXPECTED_RECORD +#define SSL_R_UNEXPECTED_RECORD 245 +#endif +#ifndef SSL_R_UNINITIALIZED +#define SSL_R_UNINITIALIZED 276 +#endif +#ifndef SSL_R_UNKNOWN_ALERT_TYPE +#define SSL_R_UNKNOWN_ALERT_TYPE 246 +#endif +#ifndef SSL_R_UNKNOWN_CERTIFICATE_TYPE +#define SSL_R_UNKNOWN_CERTIFICATE_TYPE 247 +#endif +#ifndef SSL_R_UNKNOWN_CIPHER_RETURNED +#define SSL_R_UNKNOWN_CIPHER_RETURNED 248 +#endif +#ifndef SSL_R_UNKNOWN_CIPHER_TYPE +#define SSL_R_UNKNOWN_CIPHER_TYPE 249 +#endif +#ifndef SSL_R_UNKNOWN_DIGEST +#define SSL_R_UNKNOWN_DIGEST 368 +#endif +#ifndef SSL_R_UNKNOWN_KEY_EXCHANGE_TYPE +#define SSL_R_UNKNOWN_KEY_EXCHANGE_TYPE 250 +#endif +#ifndef SSL_R_UNKNOWN_PKEY_TYPE +#define SSL_R_UNKNOWN_PKEY_TYPE 251 +#endif +#ifndef SSL_R_UNKNOWN_PROTOCOL +#define SSL_R_UNKNOWN_PROTOCOL 252 +#endif +#ifndef SSL_R_UNKNOWN_REMOTE_ERROR_TYPE +#define SSL_R_UNKNOWN_REMOTE_ERROR_TYPE 253 +#endif +#ifndef SSL_R_UNKNOWN_SSL_VERSION +#define SSL_R_UNKNOWN_SSL_VERSION 254 +#endif +#ifndef SSL_R_UNKNOWN_STATE +#define SSL_R_UNKNOWN_STATE 255 +#endif +#ifndef SSL_R_UNSAFE_LEGACY_RENEGOTIATION_DISABLED +#define SSL_R_UNSAFE_LEGACY_RENEGOTIATION_DISABLED 338 +#endif +#ifndef SSL_R_UNSUPPORTED_CIPHER +#define SSL_R_UNSUPPORTED_CIPHER 256 +#endif +#ifndef SSL_R_UNSUPPORTED_COMPRESSION_ALGORITHM +#define SSL_R_UNSUPPORTED_COMPRESSION_ALGORITHM 257 +#endif +#ifndef SSL_R_UNSUPPORTED_DIGEST_TYPE +#define SSL_R_UNSUPPORTED_DIGEST_TYPE 326 +#endif +#ifndef SSL_R_UNSUPPORTED_ELLIPTIC_CURVE +#define SSL_R_UNSUPPORTED_ELLIPTIC_CURVE 315 +#endif +#ifndef SSL_R_UNSUPPORTED_PROTOCOL +#define SSL_R_UNSUPPORTED_PROTOCOL 258 +#endif +#ifndef SSL_R_UNSUPPORTED_SSL_VERSION +#define SSL_R_UNSUPPORTED_SSL_VERSION 259 +#endif +#ifndef SSL_R_UNSUPPORTED_STATUS_TYPE +#define SSL_R_UNSUPPORTED_STATUS_TYPE 329 +#endif +#ifndef SSL_R_USE_SRTP_NOT_NEGOTIATED +#define SSL_R_USE_SRTP_NOT_NEGOTIATED 369 +#endif +#ifndef SSL_R_WRITE_BIO_NOT_SET +#define SSL_R_WRITE_BIO_NOT_SET 260 +#endif +#ifndef SSL_R_WRONG_CIPHER_RETURNED +#define SSL_R_WRONG_CIPHER_RETURNED 261 +#endif +#ifndef SSL_R_WRONG_MESSAGE_TYPE +#define SSL_R_WRONG_MESSAGE_TYPE 262 +#endif +#ifndef SSL_R_WRONG_NUMBER_OF_KEY_BITS +#define SSL_R_WRONG_NUMBER_OF_KEY_BITS 263 +#endif +#ifndef SSL_R_WRONG_SIGNATURE_LENGTH +#define SSL_R_WRONG_SIGNATURE_LENGTH 264 +#endif +#ifndef SSL_R_WRONG_SIGNATURE_SIZE +#define SSL_R_WRONG_SIGNATURE_SIZE 265 +#endif +#ifndef SSL_R_WRONG_SIGNATURE_TYPE +#define SSL_R_WRONG_SIGNATURE_TYPE 370 +#endif +#ifndef SSL_R_WRONG_SSL_VERSION +#define SSL_R_WRONG_SSL_VERSION 266 +#endif +#ifndef SSL_R_WRONG_VERSION_NUMBER +#define SSL_R_WRONG_VERSION_NUMBER 267 +#endif +#ifndef SSL_R_X509_LIB +#define SSL_R_X509_LIB 268 +#endif +#ifndef SSL_R_X509_VERIFICATION_SETUP_PROBLEMS +#define SSL_R_X509_VERIFICATION_SETUP_PROBLEMS 269 +#endif + +// the following defines were added in OpenSSL 1.0.2 + +#ifndef SSL_R_ECDH_REQUIRED_FOR_SUITEB_MODE +#define SSL_R_ECDH_REQUIRED_FOR_SUITEB_MODE 374 +#endif +#ifndef SSL_R_CERT_CB_ERROR +#define SSL_R_CERT_CB_ERROR 377 +#endif +#ifndef SSL_R_WRONG_CURVE +#define SSL_R_WRONG_CURVE 378 +#endif +#ifndef SSL_R_ILLEGAL_SUITEB_DIGEST +#define SSL_R_ILLEGAL_SUITEB_DIGEST 380 +#endif +#ifndef SSL_R_MISSING_ECDSA_SIGNING_CERT +#define SSL_R_MISSING_ECDSA_SIGNING_CERT 381 +#endif +#ifndef SSL_R_WRONG_CERTIFICATE_TYPE +#define SSL_R_WRONG_CERTIFICATE_TYPE 383 +#endif +#ifndef SSL_R_BAD_VALUE +#define SSL_R_BAD_VALUE 384 +#endif +#ifndef SSL_R_INVALID_NULL_CMD_NAME +#define SSL_R_INVALID_NULL_CMD_NAME 385 +#endif +#ifndef SSL_R_UNKNOWN_CMD_NAME +#define SSL_R_UNKNOWN_CMD_NAME 386 +#endif +#ifndef SSL_R_INVALID_SERVERINFO_DATA +#define SSL_R_INVALID_SERVERINFO_DATA 388 +#endif +#ifndef SSL_R_NO_PEM_EXTENSIONS +#define SSL_R_NO_PEM_EXTENSIONS 389 +#endif +#ifndef SSL_R_BAD_DATA +#define SSL_R_BAD_DATA 390 +#endif +#ifndef SSL_R_PEM_NAME_BAD_PREFIX +#define SSL_R_PEM_NAME_BAD_PREFIX 391 +#endif +#ifndef SSL_R_PEM_NAME_TOO_SHORT +#define SSL_R_PEM_NAME_TOO_SHORT 392 +#endif +#ifndef SSL_R_LENGTH_TOO_LONG +#define SSL_R_LENGTH_TOO_LONG 404 +#endif +#ifndef SSL_R_SHUTDOWN_WHILE_IN_INIT +#define SSL_R_SHUTDOWN_WHILE_IN_INIT 407 +#endif +#ifndef SSL_R_TOO_MANY_WARN_ALERTS +#define SSL_R_TOO_MANY_WARN_ALERTS 409 +#endif + +// the following defines were added in OpenSSL 1.1.0 + +#ifndef SSL_R_BAD_DH_VALUE +#define SSL_R_BAD_DH_VALUE 102 +#endif +#ifndef SSL_R_INCONSISTENT_EXTMS +#define SSL_R_INCONSISTENT_EXTMS 104 +#endif +#ifndef SSL_R_INVALID_CONFIGURATION_NAME +#define SSL_R_INVALID_CONFIGURATION_NAME 113 +#endif +#ifndef SSL_R_SSL_COMMAND_SECTION_EMPTY +#define SSL_R_SSL_COMMAND_SECTION_EMPTY 117 +#endif +#ifndef SSL_R_SSL_COMMAND_SECTION_NOT_FOUND +#define SSL_R_SSL_COMMAND_SECTION_NOT_FOUND 125 +#endif +#ifndef SSL_R_SSL_SECTION_EMPTY +#define SSL_R_SSL_SECTION_EMPTY 126 +#endif +#ifndef SSL_R_SSL_SECTION_NOT_FOUND +#define SSL_R_SSL_SECTION_NOT_FOUND 136 +#endif +#ifndef SSL_R_UNKNOWN_COMMAND +#define SSL_R_UNKNOWN_COMMAND 139 +#endif +#ifndef SSL_R_AT_LEAST_TLS_1_0_NEEDED_IN_FIPS_MODE +#define SSL_R_AT_LEAST_TLS_1_0_NEEDED_IN_FIPS_MODE 143 +#endif +#ifndef SSL_R_AT_LEAST_TLS_1_2_NEEDED_IN_SUITEB_MODE +#define SSL_R_AT_LEAST_TLS_1_2_NEEDED_IN_SUITEB_MODE 158 +#endif +#ifndef SSL_R_VERSION_TOO_HIGH +#define SSL_R_VERSION_TOO_HIGH 166 +#endif +#ifndef SSL_R_CONTEXT_NOT_DANE_ENABLED +#define SSL_R_CONTEXT_NOT_DANE_ENABLED 167 +#endif +#ifndef SSL_R_DANE_ALREADY_ENABLED +#define SSL_R_DANE_ALREADY_ENABLED 172 +#endif +#ifndef SSL_R_DANE_CANNOT_OVERRIDE_MTYPE_FULL +#define SSL_R_DANE_CANNOT_OVERRIDE_MTYPE_FULL 173 +#endif +#ifndef SSL_R_DANE_NOT_ENABLED +#define SSL_R_DANE_NOT_ENABLED 175 +#endif +#ifndef SSL_R_DANE_TLSA_BAD_CERTIFICATE +#define SSL_R_DANE_TLSA_BAD_CERTIFICATE 180 +#endif +#ifndef SSL_R_DANE_TLSA_BAD_CERTIFICATE_USAGE +#define SSL_R_DANE_TLSA_BAD_CERTIFICATE_USAGE 184 +#endif +#ifndef SSL_R_DANE_TLSA_BAD_DATA_LENGTH +#define SSL_R_DANE_TLSA_BAD_DATA_LENGTH 189 +#endif +#ifndef SSL_R_DANE_TLSA_BAD_DIGEST_LENGTH +#define SSL_R_DANE_TLSA_BAD_DIGEST_LENGTH 192 +#endif +#ifndef SSL_R_EXCEEDS_MAX_FRAGMENT_SIZE +#define SSL_R_EXCEEDS_MAX_FRAGMENT_SIZE 194 +#endif +#ifndef SSL_R_DANE_TLSA_BAD_MATCHING_TYPE +#define SSL_R_DANE_TLSA_BAD_MATCHING_TYPE 200 +#endif +#ifndef SSL_R_DANE_TLSA_BAD_PUBLIC_KEY +#define SSL_R_DANE_TLSA_BAD_PUBLIC_KEY 201 +#endif +#ifndef SSL_R_DANE_TLSA_BAD_SELECTOR +#define SSL_R_DANE_TLSA_BAD_SELECTOR 202 +#endif +#ifndef SSL_R_DANE_TLSA_NULL_DATA +#define SSL_R_DANE_TLSA_NULL_DATA 203 +#endif +#ifndef SSL_R_ERROR_SETTING_TLSA_BASE_DOMAIN +#define SSL_R_ERROR_SETTING_TLSA_BASE_DOMAIN 204 +#endif +#ifndef SSL_R_CUSTOM_EXT_HANDLER_ALREADY_INSTALLED +#define SSL_R_CUSTOM_EXT_HANDLER_ALREADY_INSTALLED 206 +#endif +#ifndef SSL_R_SCT_VERIFICATION_FAILED +#define SSL_R_SCT_VERIFICATION_FAILED 208 +#endif +#ifndef SSL_R_SSL_SESSION_VERSION_MISMATCH +#define SSL_R_SSL_SESSION_VERSION_MISMATCH 210 +#endif +#ifndef SSL_R_INVALID_CT_VALIDATION_TYPE +#define SSL_R_INVALID_CT_VALIDATION_TYPE 212 +#endif +#ifndef SSL_R_NO_VALID_SCTS +#define SSL_R_NO_VALID_SCTS 216 +#endif +#ifndef SSL_R_REQUIRED_COMPRESSION_ALGORITHM_MISSING +#define SSL_R_REQUIRED_COMPRESSION_ALGORITHM_MISSING 342 +#endif +#ifndef SSL_R_SSL_NEGATIVE_LENGTH +#define SSL_R_SSL_NEGATIVE_LENGTH 372 +#endif +#ifndef SSL_R_NO_SHARED_SIGNATURE_ALGORITHMS +#define SSL_R_NO_SHARED_SIGNATURE_ALGORITHMS 376 +#endif +#ifndef SSL_R_VERSION_TOO_LOW +#define SSL_R_VERSION_TOO_LOW 396 +#endif +#ifndef SSL_R_CA_KEY_TOO_SMALL +#define SSL_R_CA_KEY_TOO_SMALL 397 +#endif +#ifndef SSL_R_CA_MD_TOO_WEAK +#define SSL_R_CA_MD_TOO_WEAK 398 +#endif +#ifndef SSL_R_EE_KEY_TOO_SMALL +#define SSL_R_EE_KEY_TOO_SMALL 399 +#endif +#ifndef SSL_R_COOKIE_GEN_CALLBACK_FAILURE +#define SSL_R_COOKIE_GEN_CALLBACK_FAILURE 400 +#endif +#ifndef SSL_R_FRAGMENTED_CLIENT_HELLO +#define SSL_R_FRAGMENTED_CLIENT_HELLO 401 +#endif +#ifndef SSL_R_INVALID_SEQUENCE_NUMBER +#define SSL_R_INVALID_SEQUENCE_NUMBER 402 +#endif +#ifndef SSL_R_NO_VERIFY_COOKIE_CALLBACK +#define SSL_R_NO_VERIFY_COOKIE_CALLBACK 403 +#endif +#ifndef SSL_R_FAILED_TO_INIT_ASYNC +#define SSL_R_FAILED_TO_INIT_ASYNC 405 +#endif +#ifndef SSL_R_PIPELINE_FAILURE +#define SSL_R_PIPELINE_FAILURE 406 +#endif +#ifndef SSL_R_SSL_SESSION_ID_TOO_LONG +#define SSL_R_SSL_SESSION_ID_TOO_LONG 408 +#endif + +// the following defines were added in OpenSSL 1.1.1 + +#ifndef SSL_R_NO_SUITABLE_KEY_SHARE +#define SSL_R_NO_SUITABLE_KEY_SHARE 101 +#endif +#ifndef SSL_R_BAD_KEY_SHARE +#define SSL_R_BAD_KEY_SHARE 108 +#endif +#ifndef SSL_R_CANNOT_CHANGE_CIPHER +#define SSL_R_CANNOT_CHANGE_CIPHER 109 +#endif +#ifndef SSL_R_BAD_EXTENSION +#define SSL_R_BAD_EXTENSION 110 +#endif +#ifndef SSL_R_MISSING_SIGALGS_EXTENSION +#define SSL_R_MISSING_SIGALGS_EXTENSION 112 +#endif +#ifndef SSL_R_BAD_PSK_IDENTITY +#define SSL_R_BAD_PSK_IDENTITY 114 +#endif +#ifndef SSL_R_NO_SUITABLE_SIGNATURE_ALGORITHM +#define SSL_R_NO_SUITABLE_SIGNATURE_ALGORITHM 118 +#endif +#ifndef SSL_R_INVALID_KEY_UPDATE_TYPE +#define SSL_R_INVALID_KEY_UPDATE_TYPE 120 +#endif +#ifndef SSL_R_STILL_IN_INIT +#define SSL_R_STILL_IN_INIT 121 +#endif +#ifndef SSL_R_BAD_KEY_UPDATE +#define SSL_R_BAD_KEY_UPDATE 122 +#endif +#ifndef SSL_R_TOO_MANY_KEY_UPDATES +#define SSL_R_TOO_MANY_KEY_UPDATES 132 +#endif +#ifndef SSL_R_ILLEGAL_POINT_COMPRESSION +#define SSL_R_ILLEGAL_POINT_COMPRESSION 162 +#endif +#ifndef SSL_R_EXT_LENGTH_MISMATCH +#define SSL_R_EXT_LENGTH_MISMATCH 163 +#endif +#ifndef SSL_R_TOO_MUCH_EARLY_DATA +#define SSL_R_TOO_MUCH_EARLY_DATA 164 +#endif +#ifndef SSL_R_INVALID_MAX_EARLY_DATA +#define SSL_R_INVALID_MAX_EARLY_DATA 174 +#endif +#ifndef SSL_R_UNEXPECTED_END_OF_EARLY_DATA +#define SSL_R_UNEXPECTED_END_OF_EARLY_DATA 178 +#endif +#ifndef SSL_R_NOT_ON_RECORD_BOUNDARY +#define SSL_R_NOT_ON_RECORD_BOUNDARY 182 +#endif +#ifndef SSL_R_BAD_CIPHER +#define SSL_R_BAD_CIPHER 186 +#endif +#ifndef SSL_R_INVALID_ALERT +#define SSL_R_INVALID_ALERT 205 +#endif +#ifndef SSL_R_MISSING_SUPPORTED_GROUPS_EXTENSION +#define SSL_R_MISSING_SUPPORTED_GROUPS_EXTENSION 209 +#endif +#ifndef SSL_R_NO_CHANGE_FOLLOWING_HRR +#define SSL_R_NO_CHANGE_FOLLOWING_HRR 214 +#endif +#ifndef SSL_R_UNSOLICITED_EXTENSION +#define SSL_R_UNSOLICITED_EXTENSION 217 +#endif +#ifndef SSL_R_CIPHERSUITE_DIGEST_HAS_CHANGED +#define SSL_R_CIPHERSUITE_DIGEST_HAS_CHANGED 218 +#endif +#ifndef SSL_R_BAD_PSK +#define SSL_R_BAD_PSK 219 +#endif +#ifndef SSL_R_MISSING_SIGNING_CERT +#define SSL_R_MISSING_SIGNING_CERT 221 +#endif +#ifndef SSL_R_INCONSISTENT_EARLY_DATA_ALPN +#define SSL_R_INCONSISTENT_EARLY_DATA_ALPN 222 +#endif +#ifndef SSL_R_INCONSISTENT_EARLY_DATA_SNI +#define SSL_R_INCONSISTENT_EARLY_DATA_SNI 231 +#endif +#ifndef SSL_R_SSL3_EXT_INVALID_MAX_FRAGMENT_LENGTH +#define SSL_R_SSL3_EXT_INVALID_MAX_FRAGMENT_LENGTH 232 +#endif +#ifndef SSL_R_BAD_EARLY_DATA +#define SSL_R_BAD_EARLY_DATA 233 +#endif +#ifndef SSL_R_CALLBACK_FAILED +#define SSL_R_CALLBACK_FAILED 234 +#endif +#ifndef SSL_R_NO_APPLICATION_PROTOCOL +#define SSL_R_NO_APPLICATION_PROTOCOL 235 +#endif +#ifndef SSL_R_BAD_HANDSHAKE_STATE +#define SSL_R_BAD_HANDSHAKE_STATE 236 +#endif +#ifndef SSL_R_OVERFLOW_ERROR +#define SSL_R_OVERFLOW_ERROR 237 +#endif +#ifndef SSL_R_INVALID_CERTIFICATE_OR_ALG +#define SSL_R_INVALID_CERTIFICATE_OR_ALG 238 +#endif +#ifndef SSL_R_BAD_PACKET +#define SSL_R_BAD_PACKET 240 +#endif +#ifndef SSL_R_INSUFFICIENT_SECURITY +#define SSL_R_INSUFFICIENT_SECURITY 241 +#endif +#ifndef SSL_R_BINDER_DOES_NOT_VERIFY +#define SSL_R_BINDER_DOES_NOT_VERIFY 253 +#endif +#ifndef SSL_R_MISSING_FATAL +#define SSL_R_MISSING_FATAL 256 +#endif +#ifndef SSL_R_INVALID_CCS_MESSAGE +#define SSL_R_INVALID_CCS_MESSAGE 260 +#endif +#ifndef SSL_R_UNEXPECTED_CCS_MESSAGE +#define SSL_R_UNEXPECTED_CCS_MESSAGE 262 +#endif +#ifndef SSL_R_BAD_HRR_VERSION +#define SSL_R_BAD_HRR_VERSION 263 +#endif +#ifndef SSL_R_POST_HANDSHAKE_AUTH_ENCODING_ERR +#define SSL_R_POST_HANDSHAKE_AUTH_ENCODING_ERR 278 +#endif +#ifndef SSL_R_EXTENSION_NOT_RECEIVED +#define SSL_R_EXTENSION_NOT_RECEIVED 279 +#endif +#ifndef SSL_R_INVALID_CONTEXT +#define SSL_R_INVALID_CONTEXT 282 +#endif +#ifndef SSL_R_INVALID_CONFIG +#define SSL_R_INVALID_CONFIG 283 +#endif +#ifndef SSL_R_NOT_SERVER +#define SSL_R_NOT_SERVER 284 +#endif +#ifndef SSL_R_REQUEST_PENDING +#define SSL_R_REQUEST_PENDING 285 +#endif +#ifndef SSL_R_REQUEST_SENT +#define SSL_R_REQUEST_SENT 286 +#endif +#ifndef SSL_R_NO_COOKIE_CALLBACK_SET +#define SSL_R_NO_COOKIE_CALLBACK_SET 287 +#endif +#ifndef SSL_R_PRIVATE_KEY_MISMATCH +#define SSL_R_PRIVATE_KEY_MISMATCH 288 +#endif +#ifndef SSL_R_NOT_REPLACING_CERTIFICATE +#define SSL_R_NOT_REPLACING_CERTIFICATE 289 +#endif +#ifndef SSL_R_MISSING_PARAMETERS +#define SSL_R_MISSING_PARAMETERS 290 +#endif +#ifndef SSL_R_APPLICATION_DATA_AFTER_CLOSE_NOTIFY +#define SSL_R_APPLICATION_DATA_AFTER_CLOSE_NOTIFY 291 +#endif +#ifndef SSL_R_BAD_LEGACY_VERSION +#define SSL_R_BAD_LEGACY_VERSION 292 +#endif +#ifndef SSL_R_NO_SHARED_GROUPS +#define SSL_R_NO_SHARED_GROUPS 410 +#endif +#ifndef SSL_R_BAD_RECORD_TYPE +#define SSL_R_BAD_RECORD_TYPE 443 +#endif +#ifndef SSL_R_INVALID_SESSION_ID +#define SSL_R_INVALID_SESSION_ID 999 +#endif +#ifndef SSL_R_TLSV13_ALERT_MISSING_EXTENSION +#define SSL_R_TLSV13_ALERT_MISSING_EXTENSION 1109 +#endif +#ifndef SSL_R_TLSV13_ALERT_CERTIFICATE_REQUIRED +#define SSL_R_TLSV13_ALERT_CERTIFICATE_REQUIRED 1116 +#endif + +// the following defines were added in OpenSSL 3.0 + +#ifndef SSL_R_MIXED_HANDSHAKE_AND_NON_HANDSHAKE_DATA +#define SSL_R_MIXED_HANDSHAKE_AND_NON_HANDSHAKE_DATA 293 +#endif +#ifndef SSL_R_UNEXPECTED_EOF_WHILE_READING +#define SSL_R_UNEXPECTED_EOF_WHILE_READING 294 +#endif +#ifndef SSL_R_NO_SUITABLE_GROUPS +#define SSL_R_NO_SUITABLE_GROUPS 295 +#endif +#ifndef SSL_R_COPY_PARAMETERS_FAILED +#define SSL_R_COPY_PARAMETERS_FAILED 296 +#endif +#ifndef SSL_R_NO_SUITABLE_DIGEST_ALGORITHM +#define SSL_R_NO_SUITABLE_DIGEST_ALGORITHM 297 +#endif +#ifndef SSL_R_CANNOT_GET_GROUP_NAME +#define SSL_R_CANNOT_GET_GROUP_NAME 299 +#endif + +// X.509 certificate verification errors use condition codes > DCMTLS_EC_SSL_Offset. + +makeOFConditionConst( DCMTLS_EC_TLSAppDataInHandshake, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_APP_DATA_IN_HANDSHAKE, OF_error, "TLS error: app data in handshake" ); +makeOFConditionConst( DCMTLS_EC_TLSNoSuitableKeyShare, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_NO_SUITABLE_KEY_SHARE, OF_error, "TLS error: no suitable key share" ); +makeOFConditionConst( DCMTLS_EC_TLSBadDHValue, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_BAD_DH_VALUE, OF_error, "TLS error: bad dh value" ); +makeOFConditionConst( DCMTLS_EC_TLSBadChangeCipherSpec, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_BAD_CHANGE_CIPHER_SPEC, OF_error, "TLS error: bad change cipher spec" ); +makeOFConditionConst( DCMTLS_EC_TLSInconsistentExtms, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_INCONSISTENT_EXTMS, OF_error, "TLS error: inconsistent extms" ); +makeOFConditionConst( DCMTLS_EC_TLSBadHelloRequest, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_BAD_HELLO_REQUEST, OF_error, "TLS error: bad hello request" ); +makeOFConditionConst( DCMTLS_EC_TLSBadDataReturnedByCallback, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_BAD_DATA_RETURNED_BY_CALLBACK, OF_error, "TLS error: bad data returned by callback" ); +makeOFConditionConst( DCMTLS_EC_TLSBadDecompression, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_BAD_DECOMPRESSION, OF_error, "TLS error: bad decompression" ); +makeOFConditionConst( DCMTLS_EC_TLSBadKeyShare, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_BAD_KEY_SHARE, OF_error, "TLS error: bad key share" ); +makeOFConditionConst( DCMTLS_EC_TLSCannotChangeCipher, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_CANNOT_CHANGE_CIPHER, OF_error, "TLS error: cannot change cipher" ); +makeOFConditionConst( DCMTLS_EC_TLSBadExtension, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_BAD_EXTENSION, OF_error, "TLS error: bad extension" ); +makeOFConditionConst( DCMTLS_EC_TLSBadDigestLength, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_BAD_DIGEST_LENGTH, OF_error, "TLS error: bad digest length" ); +makeOFConditionConst( DCMTLS_EC_TLSMissingSigalgsExtension, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_MISSING_SIGALGS_EXTENSION, OF_error, "TLS error: missing sigalgs extension" ); +makeOFConditionConst( DCMTLS_EC_TLSInvalidConfigurationName, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_INVALID_CONFIGURATION_NAME, OF_error, "TLS error: invalid configuration name" ); +makeOFConditionConst( DCMTLS_EC_TLSBadPSKIdentity, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_BAD_PSK_IDENTITY, OF_error, "TLS error: bad psk identity" ); +makeOFConditionConst( DCMTLS_EC_TLSBadPacketLength, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_BAD_PACKET_LENGTH, OF_error, "TLS error: bad packet length" ); +makeOFConditionConst( DCMTLS_EC_TLSBadProtocolVersionNumber, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_BAD_PROTOCOL_VERSION_NUMBER, OF_error, "TLS error: bad protocol version number" ); +makeOFConditionConst( DCMTLS_EC_TLSSSLCommandSectionEmpty, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_SSL_COMMAND_SECTION_EMPTY, OF_error, "TLS error: ssl command section empty" ); +makeOFConditionConst( DCMTLS_EC_TLSNoSuitableSignatureAlgorithm, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_NO_SUITABLE_SIGNATURE_ALGORITHM, OF_error, "TLS error: no suitable signature algorithm" ); +makeOFConditionConst( DCMTLS_EC_TLSBadRSAEncrypt, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_BAD_RSA_ENCRYPT, OF_error, "TLS error: bad rsa encrypt" ); +makeOFConditionConst( DCMTLS_EC_TLSInvalidKeyUpdateType, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_INVALID_KEY_UPDATE_TYPE, OF_error, "TLS error: invalid key update type" ); +makeOFConditionConst( DCMTLS_EC_TLSStillInInit, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_STILL_IN_INIT, OF_error, "TLS error: still in init" ); +makeOFConditionConst( DCMTLS_EC_TLSBadKeyUpdate, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_BAD_KEY_UPDATE, OF_error, "TLS error: bad key update" ); +makeOFConditionConst( DCMTLS_EC_TLSBadSignature, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_BAD_SIGNATURE, OF_error, "TLS error: bad signature" ); +makeOFConditionConst( DCMTLS_EC_TLSBadSSLFiletype, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_BAD_SSL_FILETYPE, OF_error, "TLS error: bad ssl filetype" ); +makeOFConditionConst( DCMTLS_EC_TLSSSLCommandSectionNotFound, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_SSL_COMMAND_SECTION_NOT_FOUND, OF_error, "TLS error: ssl command section not found" ); +makeOFConditionConst( DCMTLS_EC_TLSSSLSectionEmpty, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_SSL_SECTION_EMPTY, OF_error, "TLS error: ssl section empty" ); +makeOFConditionConst( DCMTLS_EC_TLSBadWriteRetry, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_BAD_WRITE_RETRY, OF_error, "TLS error: bad write retry" ); +makeOFConditionConst( DCMTLS_EC_TLSBioNotSet, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_BIO_NOT_SET, OF_error, "TLS error: bio not set" ); +makeOFConditionConst( DCMTLS_EC_TLSBlockCipherPadIsWrong, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_BLOCK_CIPHER_PAD_IS_WRONG, OF_error, "TLS error: block cipher pad is wrong" ); +makeOFConditionConst( DCMTLS_EC_TLSBNLib, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_BN_LIB, OF_error, "TLS error: bn lib" ); +makeOFConditionConst( DCMTLS_EC_TLSCADNLengthMismatch, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_CA_DN_LENGTH_MISMATCH, OF_error, "TLS error: ca dn length mismatch" ); +makeOFConditionConst( DCMTLS_EC_TLSTooManyKeyUpdates, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_TOO_MANY_KEY_UPDATES, OF_error, "TLS error: too many key updates" ); +makeOFConditionConst( DCMTLS_EC_TLSCCSReceivedEarly, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_CCS_RECEIVED_EARLY, OF_error, "TLS error: ccs received early" ); +makeOFConditionConst( DCMTLS_EC_TLSCertificateVerifyFailed, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_CERTIFICATE_VERIFY_FAILED, OF_error, "TLS error: certificate verify failed" ); +makeOFConditionConst( DCMTLS_EC_TLSCertLengthMismatch, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_CERT_LENGTH_MISMATCH, OF_error, "TLS error: cert length mismatch" ); +makeOFConditionConst( DCMTLS_EC_TLSSSLSectionNotFound, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_SSL_SECTION_NOT_FOUND, OF_error, "TLS error: ssl section not found" ); +makeOFConditionConst( DCMTLS_EC_TLSCipherCodeWrongLength, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_CIPHER_CODE_WRONG_LENGTH, OF_error, "TLS error: cipher code wrong length" ); +makeOFConditionConst( DCMTLS_EC_TLSUnknownCommand, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_UNKNOWN_COMMAND, OF_error, "TLS error: unknown command" ); +makeOFConditionConst( DCMTLS_EC_TLSCompressedLengthTooLong, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_COMPRESSED_LENGTH_TOO_LONG, OF_error, "TLS error: compressed length too long" ); +makeOFConditionConst( DCMTLS_EC_TLSCompressionFailure, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_COMPRESSION_FAILURE, OF_error, "TLS error: compression failure" ); +makeOFConditionConst( DCMTLS_EC_TLSCompressionLibraryError, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_COMPRESSION_LIBRARY_ERROR, OF_error, "TLS error: compression library error" ); +makeOFConditionConst( DCMTLS_EC_TLSAtLeastTLS10NeededInFIPSMode, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_AT_LEAST_TLS_1_0_NEEDED_IN_FIPS_MODE, OF_error, "TLS error: at least TLS 1.0 needed in FIPS mode" ); +makeOFConditionConst( DCMTLS_EC_TLSConnectionTypeNotSet, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_CONNECTION_TYPE_NOT_SET, OF_error, "TLS error: connection type not set" ); +makeOFConditionConst( DCMTLS_EC_TLSDataBetweenCCSAndFinished, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_DATA_BETWEEN_CCS_AND_FINISHED, OF_error, "TLS error: data between ccs and finished" ); +makeOFConditionConst( DCMTLS_EC_TLSDataLengthTooLong, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_DATA_LENGTH_TOO_LONG, OF_error, "TLS error: data length too long" ); +makeOFConditionConst( DCMTLS_EC_TLSDecryptionFailed, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_DECRYPTION_FAILED, OF_error, "TLS error: decryption failed" ); +makeOFConditionConst( DCMTLS_EC_TLSDHPublicValueLengthIsWrong, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_DH_PUBLIC_VALUE_LENGTH_IS_WRONG, OF_error, "TLS error: dh public value length is wrong" ); +makeOFConditionConst( DCMTLS_EC_TLSDigestCheckFailed, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_DIGEST_CHECK_FAILED, OF_error, "TLS error: digest check failed" ); +makeOFConditionConst( DCMTLS_EC_TLSEncryptedLengthTooLong, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_ENCRYPTED_LENGTH_TOO_LONG, OF_error, "TLS error: encrypted length too long" ); +makeOFConditionConst( DCMTLS_EC_TLSErrorInReceivedCipherList, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_ERROR_IN_RECEIVED_CIPHER_LIST, OF_error, "TLS error: error in received cipher list" ); +makeOFConditionConst( DCMTLS_EC_TLSExcessiveMessageSize, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_EXCESSIVE_MESSAGE_SIZE, OF_error, "TLS error: excessive message size" ); +makeOFConditionConst( DCMTLS_EC_TLSExtraDataInMessage, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_EXTRA_DATA_IN_MESSAGE, OF_error, "TLS error: extra data in message" ); +makeOFConditionConst( DCMTLS_EC_TLSGotAFinBeforeACCS, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_GOT_A_FIN_BEFORE_A_CCS, OF_error, "TLS error: got a fin before a ccs" ); +makeOFConditionConst( DCMTLS_EC_TLSHTTPSProxyRequest, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_HTTPS_PROXY_REQUEST, OF_error, "TLS error: https proxy request" ); +makeOFConditionConst( DCMTLS_EC_TLSHTTPRequest, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_HTTP_REQUEST, OF_error, "TLS error: http request" ); +makeOFConditionConst( DCMTLS_EC_TLSTLSInvalidECPointformatList, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_TLS_INVALID_ECPOINTFORMAT_LIST, OF_error, "TLS error: tls invalid ecpointformat list" ); +makeOFConditionConst( DCMTLS_EC_TLSAtLeastTLS12NeededInSuiteBMode, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_AT_LEAST_TLS_1_2_NEEDED_IN_SUITEB_MODE, OF_error, "TLS error: at least (D)TLS 1.2 needed in Suite B mode" ); +makeOFConditionConst( DCMTLS_EC_TLSLengthMismatch, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_LENGTH_MISMATCH, OF_error, "TLS error: length mismatch" ); +makeOFConditionConst( DCMTLS_EC_TLSLengthTooShort, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_LENGTH_TOO_SHORT, OF_error, "TLS error: length too short" ); +makeOFConditionConst( DCMTLS_EC_TLSLibraryHasNoCiphers, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_LIBRARY_HAS_NO_CIPHERS, OF_error, "TLS error: library has no ciphers" ); +makeOFConditionConst( DCMTLS_EC_TLSIllegalPointCompression, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_ILLEGAL_POINT_COMPRESSION, OF_error, "TLS error: illegal point compression" ); +makeOFConditionConst( DCMTLS_EC_TLSExtLengthMismatch, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_EXT_LENGTH_MISMATCH, OF_error, "TLS error: ext length mismatch" ); +makeOFConditionConst( DCMTLS_EC_TLSTooMuchEarlyData, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_TOO_MUCH_EARLY_DATA, OF_error, "TLS error: too much early data" ); +makeOFConditionConst( DCMTLS_EC_TLSMissingDSASigningCert, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_MISSING_DSA_SIGNING_CERT, OF_error, "TLS error: missing dsa signing cert" ); +makeOFConditionConst( DCMTLS_EC_TLSVersionTooHigh, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_VERSION_TOO_HIGH, OF_error, "TLS error: version too high" ); +makeOFConditionConst( DCMTLS_EC_TLSContextNotDANEEnabled, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_CONTEXT_NOT_DANE_ENABLED, OF_error, "TLS error: context not dane enabled" ); +makeOFConditionConst( DCMTLS_EC_TLSMissingRSACertificate, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_MISSING_RSA_CERTIFICATE, OF_error, "TLS error: missing rsa certificate" ); +makeOFConditionConst( DCMTLS_EC_TLSMissingRSAEncryptingCert, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_MISSING_RSA_ENCRYPTING_CERT, OF_error, "TLS error: missing rsa encrypting cert" ); +makeOFConditionConst( DCMTLS_EC_TLSMissingRSASigningCert, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_MISSING_RSA_SIGNING_CERT, OF_error, "TLS error: missing rsa signing cert" ); +makeOFConditionConst( DCMTLS_EC_TLSMissingTmpDHKey, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_MISSING_TMP_DH_KEY, OF_error, "TLS error: missing tmp dh key" ); +makeOFConditionConst( DCMTLS_EC_TLSDANEAlreadyEnabled, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_DANE_ALREADY_ENABLED, OF_error, "TLS error: dane already enabled" ); +makeOFConditionConst( DCMTLS_EC_TLSDANECannotOverrideMtypeFull, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_DANE_CANNOT_OVERRIDE_MTYPE_FULL, OF_error, "TLS error: dane cannot override mtype full" ); +makeOFConditionConst( DCMTLS_EC_TLSInvalidMaxEarlyData, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_INVALID_MAX_EARLY_DATA, OF_error, "TLS error: invalid max early data" ); +makeOFConditionConst( DCMTLS_EC_TLSDANENotEnabled, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_DANE_NOT_ENABLED, OF_error, "TLS error: dane not enabled" ); +makeOFConditionConst( DCMTLS_EC_TLSNoCertificatesReturned, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_NO_CERTIFICATES_RETURNED, OF_error, "TLS error: no certificates returned" ); +makeOFConditionConst( DCMTLS_EC_TLSNoCertificateAssigned, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_NO_CERTIFICATE_ASSIGNED, OF_error, "TLS error: no certificate assigned" ); +makeOFConditionConst( DCMTLS_EC_TLSUnexpectedEndOfEarlyData, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_UNEXPECTED_END_OF_EARLY_DATA, OF_error, "TLS error: unexpected end of early data" ); +makeOFConditionConst( DCMTLS_EC_TLSNoCertificateSet, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_NO_CERTIFICATE_SET, OF_error, "TLS error: no certificate set" ); +makeOFConditionConst( DCMTLS_EC_TLSDANETLSABadCertificate, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_DANE_TLSA_BAD_CERTIFICATE, OF_error, "TLS error: dane tlsa bad certificate" ); +makeOFConditionConst( DCMTLS_EC_TLSNoCiphersAvailable, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_NO_CIPHERS_AVAILABLE, OF_error, "TLS error: no ciphers available" ); +makeOFConditionConst( DCMTLS_EC_TLSNotOnRecordBoundary, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_NOT_ON_RECORD_BOUNDARY, OF_error, "TLS error: not on record boundary" ); +makeOFConditionConst( DCMTLS_EC_TLSNoCiphersSpecified, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_NO_CIPHERS_SPECIFIED, OF_error, "TLS error: no ciphers specified" ); +makeOFConditionConst( DCMTLS_EC_TLSDANETLSABadCertificateUsage, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_DANE_TLSA_BAD_CERTIFICATE_USAGE, OF_error, "TLS error: dane tlsa bad certificate usage" ); +makeOFConditionConst( DCMTLS_EC_TLSNoCipherMatch, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_NO_CIPHER_MATCH, OF_error, "TLS error: no cipher match" ); +makeOFConditionConst( DCMTLS_EC_TLSBadCipher, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_BAD_CIPHER, OF_error, "TLS error: bad cipher" ); +makeOFConditionConst( DCMTLS_EC_TLSNoCompressionSpecified, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_NO_COMPRESSION_SPECIFIED, OF_error, "TLS error: no compression specified" ); +makeOFConditionConst( DCMTLS_EC_TLSNoMethodSpecified, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_NO_METHOD_SPECIFIED, OF_error, "TLS error: no method specified" ); +makeOFConditionConst( DCMTLS_EC_TLSDANETLSABadDataLength, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_DANE_TLSA_BAD_DATA_LENGTH, OF_error, "TLS error: dane tlsa bad data length" ); +makeOFConditionConst( DCMTLS_EC_TLSNoPrivateKeyAssigned, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_NO_PRIVATE_KEY_ASSIGNED, OF_error, "TLS error: no private key assigned" ); +makeOFConditionConst( DCMTLS_EC_TLSNoProtocolsAvailable, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_NO_PROTOCOLS_AVAILABLE, OF_error, "TLS error: no protocols available" ); +makeOFConditionConst( DCMTLS_EC_TLSDANETLSABadDigestLength, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_DANE_TLSA_BAD_DIGEST_LENGTH, OF_error, "TLS error: dane tlsa bad digest length" ); +makeOFConditionConst( DCMTLS_EC_TLSNoSharedCipher, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_NO_SHARED_CIPHER, OF_error, "TLS error: no shared cipher" ); +makeOFConditionConst( DCMTLS_EC_TLSExceedsMaxFragmentSize, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_EXCEEDS_MAX_FRAGMENT_SIZE, OF_error, "TLS error: exceeds max fragment size" ); +makeOFConditionConst( DCMTLS_EC_TLSNullSSLCtx, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_NULL_SSL_CTX, OF_error, "TLS error: null ssl ctx" ); +makeOFConditionConst( DCMTLS_EC_TLSNullSSLMethodPassed, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_NULL_SSL_METHOD_PASSED, OF_error, "TLS error: null ssl method passed" ); +makeOFConditionConst( DCMTLS_EC_TLSOldSessionCipherNotReturned, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_OLD_SESSION_CIPHER_NOT_RETURNED, OF_error, "TLS error: old session cipher not returned" ); +makeOFConditionConst( DCMTLS_EC_TLSPacketLengthTooLong, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_PACKET_LENGTH_TOO_LONG, OF_error, "TLS error: packet length too long" ); +makeOFConditionConst( DCMTLS_EC_TLSPeerDidNotReturnACertificate, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_PEER_DID_NOT_RETURN_A_CERTIFICATE, OF_error, "TLS error: peer did not return a certificate" ); +makeOFConditionConst( DCMTLS_EC_TLSDANETLSABadMatchingType, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_DANE_TLSA_BAD_MATCHING_TYPE, OF_error, "TLS error: dane tlsa bad matching type" ); +makeOFConditionConst( DCMTLS_EC_TLSDANETLSABadPublicKey, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_DANE_TLSA_BAD_PUBLIC_KEY, OF_error, "TLS error: dane tlsa bad public key" ); +makeOFConditionConst( DCMTLS_EC_TLSDANETLSABadSelector, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_DANE_TLSA_BAD_SELECTOR, OF_error, "TLS error: dane tlsa bad selector" ); +makeOFConditionConst( DCMTLS_EC_TLSDANETLSANullData, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_DANE_TLSA_NULL_DATA, OF_error, "TLS error: dane tlsa null data" ); +makeOFConditionConst( DCMTLS_EC_TLSErrorSettingTLSABaseDomain, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_ERROR_SETTING_TLSA_BASE_DOMAIN, OF_error, "TLS error: error setting tlsa base domain" ); +makeOFConditionConst( DCMTLS_EC_TLSInvalidAlert, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_INVALID_ALERT, OF_error, "TLS error: invalid alert" ); +makeOFConditionConst( DCMTLS_EC_TLSCustomExtHandlerAlreadyInstalled, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_CUSTOM_EXT_HANDLER_ALREADY_INSTALLED, OF_error, "TLS error: custom ext handler already installed" ); +makeOFConditionConst( DCMTLS_EC_TLSProtocolIsShutdown, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_PROTOCOL_IS_SHUTDOWN, OF_error, "TLS error: protocol is shutdown" ); +makeOFConditionConst( DCMTLS_EC_TLSSCTVerificationFailed, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_SCT_VERIFICATION_FAILED, OF_error, "TLS error: sct verification failed" ); +makeOFConditionConst( DCMTLS_EC_TLSMissingSupportedGroupsExtension, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_MISSING_SUPPORTED_GROUPS_EXTENSION, OF_error, "TLS error: missing supported groups extension" ); +makeOFConditionConst( DCMTLS_EC_TLSSSLSessionVersionMismatch, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_SSL_SESSION_VERSION_MISMATCH, OF_error, "TLS error: ssl session version mismatch" ); +makeOFConditionConst( DCMTLS_EC_TLSReadBioNotSet, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_READ_BIO_NOT_SET, OF_error, "TLS error: read bio not set" ); +makeOFConditionConst( DCMTLS_EC_TLSInvalidCTValidationType, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_INVALID_CT_VALIDATION_TYPE, OF_error, "TLS error: invalid ct validation type" ); +makeOFConditionConst( DCMTLS_EC_TLSRecordLengthMismatch, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_RECORD_LENGTH_MISMATCH, OF_error, "TLS error: record length mismatch" ); +makeOFConditionConst( DCMTLS_EC_TLSNoChangeFollowingHRR, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_NO_CHANGE_FOLLOWING_HRR, OF_error, "TLS error: no change following hrr" ); +makeOFConditionConst( DCMTLS_EC_TLSRequiredCipherMissing, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_REQUIRED_CIPHER_MISSING, OF_error, "TLS error: required cipher missing" ); +makeOFConditionConst( DCMTLS_EC_TLSNoValidSCTs, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_NO_VALID_SCTS, OF_error, "TLS error: no valid scts" ); +makeOFConditionConst( DCMTLS_EC_TLSUnsolicitedExtension, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_UNSOLICITED_EXTENSION, OF_error, "TLS error: unsolicited extension" ); +makeOFConditionConst( DCMTLS_EC_TLSCiphersuiteDigestHasChanged, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_CIPHERSUITE_DIGEST_HAS_CHANGED, OF_error, "TLS error: ciphersuite digest has changed" ); +makeOFConditionConst( DCMTLS_EC_TLSBadPSK, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_BAD_PSK, OF_error, "TLS error: bad psk" ); +makeOFConditionConst( DCMTLS_EC_TLSSignatureForNonSigningCertificate, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_SIGNATURE_FOR_NON_SIGNING_CERTIFICATE, OF_error, "TLS error: signature for non signing certificate" ); +makeOFConditionConst( DCMTLS_EC_TLSMissingSigningCert, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_MISSING_SIGNING_CERT, OF_error, "TLS error: missing signing cert" ); +makeOFConditionConst( DCMTLS_EC_TLSInconsistentEarlyDataAlpn, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_INCONSISTENT_EARLY_DATA_ALPN, OF_error, "TLS error: inconsistent early data alpn" ); +makeOFConditionConst( DCMTLS_EC_TLSPSKIdentityNotFound, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_PSK_IDENTITY_NOT_FOUND, OF_error, "TLS error: psk identity not found" ); +makeOFConditionConst( DCMTLS_EC_TLSPSKNoClientCb, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_PSK_NO_CLIENT_CB, OF_error, "TLS error: psk no client cb" ); +makeOFConditionConst( DCMTLS_EC_TLSPSKNoServerCb, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_PSK_NO_SERVER_CB, OF_error, "TLS error: psk no server cb" ); +makeOFConditionConst( DCMTLS_EC_TLSClienthelloTlsext, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_CLIENTHELLO_TLSEXT, OF_error, "TLS error: clienthello tlsext" ); +makeOFConditionConst( DCMTLS_EC_TLSParseTlsext, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_PARSE_TLSEXT, OF_error, "TLS error: parse tlsext" ); +makeOFConditionConst( DCMTLS_EC_TLSSSLCtxHasNoDefaultSSLVersion, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_SSL_CTX_HAS_NO_DEFAULT_SSL_VERSION, OF_error, "TLS error: ssl ctx has no default ssl version" ); +makeOFConditionConst( DCMTLS_EC_TLSSSLHandshakeFailure, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_SSL_HANDSHAKE_FAILURE, OF_error, "TLS error: ssl handshake failure" ); +makeOFConditionConst( DCMTLS_EC_TLSSSLLibraryHasNoCiphers, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_SSL_LIBRARY_HAS_NO_CIPHERS, OF_error, "TLS error: ssl library has no ciphers" ); +makeOFConditionConst( DCMTLS_EC_TLSInconsistentEarlyDataSNI, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_INCONSISTENT_EARLY_DATA_SNI, OF_error, "TLS error: inconsistent early data sni" ); +makeOFConditionConst( DCMTLS_EC_TLSSSL3ExtInvalidMaxFragmentLength, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_SSL3_EXT_INVALID_MAX_FRAGMENT_LENGTH, OF_error, "TLS error: ssl3 ext invalid max fragment length" ); +makeOFConditionConst( DCMTLS_EC_TLSBadEarlyData, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_BAD_EARLY_DATA, OF_error, "TLS error: bad early data" ); +makeOFConditionConst( DCMTLS_EC_TLSCallbackFailed, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_CALLBACK_FAILED, OF_error, "TLS error: callback failed" ); +makeOFConditionConst( DCMTLS_EC_TLSNoApplicationProtocol, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_NO_APPLICATION_PROTOCOL, OF_error, "TLS error: no application protocol" ); +makeOFConditionConst( DCMTLS_EC_TLSBadHandshakeState, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_BAD_HANDSHAKE_STATE, OF_error, "TLS error: bad handshake state" ); +makeOFConditionConst( DCMTLS_EC_TLSOverflowError, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_OVERFLOW_ERROR, OF_error, "TLS error: overflow error" ); +makeOFConditionConst( DCMTLS_EC_TLSInvalidCertificateOrAlg, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_INVALID_CERTIFICATE_OR_ALG, OF_error, "TLS error: invalid certificate or alg" ); +makeOFConditionConst( DCMTLS_EC_TLSUnableToFindPublicKeyParameters, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_UNABLE_TO_FIND_PUBLIC_KEY_PARAMETERS, OF_error, "TLS error: unable to find public key parameters" ); +makeOFConditionConst( DCMTLS_EC_TLSBadPacket, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_BAD_PACKET, OF_error, "TLS error: bad packet" ); +makeOFConditionConst( DCMTLS_EC_TLSInsufficientSecurity, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_INSUFFICIENT_SECURITY, OF_error, "TLS error: insufficient security" ); +makeOFConditionConst( DCMTLS_EC_TLSUnableToLoadSSL3MD5Routines, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_UNABLE_TO_LOAD_SSL3_MD5_ROUTINES, OF_error, "TLS error: unable to load ssl3 md5 routines" ); +makeOFConditionConst( DCMTLS_EC_TLSUnableToLoadSSL3SHA1Routines, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_UNABLE_TO_LOAD_SSL3_SHA1_ROUTINES, OF_error, "TLS error: unable to load ssl3 sha1 routines" ); +makeOFConditionConst( DCMTLS_EC_TLSUnexpectedMessage, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_UNEXPECTED_MESSAGE, OF_error, "TLS error: unexpected message" ); +makeOFConditionConst( DCMTLS_EC_TLSUnexpectedRecord, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_UNEXPECTED_RECORD, OF_error, "TLS error: unexpected record" ); +makeOFConditionConst( DCMTLS_EC_TLSUnknownAlertType, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_UNKNOWN_ALERT_TYPE, OF_error, "TLS error: unknown alert type" ); +makeOFConditionConst( DCMTLS_EC_TLSUnknownCertificateType, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_UNKNOWN_CERTIFICATE_TYPE, OF_error, "TLS error: unknown certificate type" ); +makeOFConditionConst( DCMTLS_EC_TLSUnknownCipherReturned, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_UNKNOWN_CIPHER_RETURNED, OF_error, "TLS error: unknown cipher returned" ); +makeOFConditionConst( DCMTLS_EC_TLSUnknownCipherType, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_UNKNOWN_CIPHER_TYPE, OF_error, "TLS error: unknown cipher type" ); +makeOFConditionConst( DCMTLS_EC_TLSUnknownKeyExchangeType, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_UNKNOWN_KEY_EXCHANGE_TYPE, OF_error, "TLS error: unknown key exchange type" ); +makeOFConditionConst( DCMTLS_EC_TLSUnknownPkeyType, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_UNKNOWN_PKEY_TYPE, OF_error, "TLS error: unknown pkey type" ); +makeOFConditionConst( DCMTLS_EC_TLSUnknownProtocol, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_UNKNOWN_PROTOCOL, OF_error, "TLS error: unknown protocol" ); +makeOFConditionConst( DCMTLS_EC_TLSBinderDoesNotVerify, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_BINDER_DOES_NOT_VERIFY, OF_error, "TLS error: binder does not verify" ); +makeOFConditionConst( DCMTLS_EC_TLSUnknownSSLVersion, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_UNKNOWN_SSL_VERSION, OF_error, "TLS error: unknown ssl version" ); +makeOFConditionConst( DCMTLS_EC_TLSUnknownState, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_UNKNOWN_STATE, OF_error, "TLS error: unknown state" ); +makeOFConditionConst( DCMTLS_EC_TLSMissingFatal, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_MISSING_FATAL, OF_error, "TLS error: missing fatal" ); +makeOFConditionConst( DCMTLS_EC_TLSUnsupportedCompressionAlgorithm, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_UNSUPPORTED_COMPRESSION_ALGORITHM, OF_error, "TLS error: unsupported compression algorithm" ); +makeOFConditionConst( DCMTLS_EC_TLSUnsupportedProtocol, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_UNSUPPORTED_PROTOCOL, OF_error, "TLS error: unsupported protocol" ); +makeOFConditionConst( DCMTLS_EC_TLSUnsupportedSSLVersion, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_UNSUPPORTED_SSL_VERSION, OF_error, "TLS error: unsupported ssl version" ); +makeOFConditionConst( DCMTLS_EC_TLSInvalidCCSMessage, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_INVALID_CCS_MESSAGE, OF_error, "TLS error: invalid ccs message" ); +makeOFConditionConst( DCMTLS_EC_TLSWrongCipherReturned, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_WRONG_CIPHER_RETURNED, OF_error, "TLS error: wrong cipher returned" ); +makeOFConditionConst( DCMTLS_EC_TLSUnexpectedCCSMessage, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_UNEXPECTED_CCS_MESSAGE, OF_error, "TLS error: unexpected ccs message" ); +makeOFConditionConst( DCMTLS_EC_TLSBadHrrVersion, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_BAD_HRR_VERSION, OF_error, "TLS error: bad hrr version" ); +makeOFConditionConst( DCMTLS_EC_TLSWrongSignatureLength, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_WRONG_SIGNATURE_LENGTH, OF_error, "TLS error: wrong signature length" ); +makeOFConditionConst( DCMTLS_EC_TLSWrongSignatureSize, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_WRONG_SIGNATURE_SIZE, OF_error, "TLS error: wrong signature size" ); +makeOFConditionConst( DCMTLS_EC_TLSWrongSSLVersion, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_WRONG_SSL_VERSION, OF_error, "TLS error: wrong ssl version" ); +makeOFConditionConst( DCMTLS_EC_TLSWrongVersionNumber, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_WRONG_VERSION_NUMBER, OF_error, "TLS error: wrong version number" ); +makeOFConditionConst( DCMTLS_EC_TLSX509Lib, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_X509_LIB, OF_error, "TLS error: x509 lib" ); +makeOFConditionConst( DCMTLS_EC_TLSX509VerificationSetupProblems, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_X509_VERIFICATION_SETUP_PROBLEMS, OF_error, "TLS error: x509 verification setup problems" ); +makeOFConditionConst( DCMTLS_EC_TLSPathTooLong, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_PATH_TOO_LONG, OF_error, "TLS error: path too long" ); +makeOFConditionConst( DCMTLS_EC_TLSBadLength, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_BAD_LENGTH, OF_error, "TLS error: bad length" ); +makeOFConditionConst( DCMTLS_EC_TLSAttemptToReuseSessionInDifferentContext, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_ATTEMPT_TO_REUSE_SESSION_IN_DIFFERENT_CONTEXT, OF_error, "TLS error: attempt to reuse session in different context" ); +makeOFConditionConst( DCMTLS_EC_TLSSSLSessionIDContextTooLong, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_SSL_SESSION_ID_CONTEXT_TOO_LONG, OF_error, "TLS error: ssl session id context too long" ); +makeOFConditionConst( DCMTLS_EC_TLSLibraryBug, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_LIBRARY_BUG, OF_error, "TLS error: library bug" ); +makeOFConditionConst( DCMTLS_EC_TLSServerhelloTlsext, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_SERVERHELLO_TLSEXT, OF_error, "TLS error: serverhello tlsext" ); +makeOFConditionConst( DCMTLS_EC_TLSUninitialized, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_UNINITIALIZED, OF_error, "TLS error: uninitialized" ); +makeOFConditionConst( DCMTLS_EC_TLSSessionIDContextUninitialized, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_SESSION_ID_CONTEXT_UNINITIALIZED, OF_error, "TLS error: session id context uninitialized" ); +makeOFConditionConst( DCMTLS_EC_TLSPostHandshakeAuthEncodingErr, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_POST_HANDSHAKE_AUTH_ENCODING_ERR, OF_error, "TLS error: post handshake auth encoding err" ); +makeOFConditionConst( DCMTLS_EC_TLSExtensionNotReceived, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_EXTENSION_NOT_RECEIVED, OF_error, "TLS error: extension not received" ); +makeOFConditionConst( DCMTLS_EC_TLSInvalidCommand, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_INVALID_COMMAND, OF_error, "TLS error: invalid command" ); +makeOFConditionConst( DCMTLS_EC_TLSDecryptionFailedOrBadRecordMac, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_DECRYPTION_FAILED_OR_BAD_RECORD_MAC, OF_error, "TLS error: decryption failed or bad record mac" ); +makeOFConditionConst( DCMTLS_EC_TLSInvalidContext, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_INVALID_CONTEXT, OF_error, "TLS error: invalid context" ); +makeOFConditionConst( DCMTLS_EC_TLSInvalidConfig, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_INVALID_CONFIG, OF_error, "TLS error: invalid config" ); +makeOFConditionConst( DCMTLS_EC_TLSNotServer, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_NOT_SERVER, OF_error, "TLS error: not server" ); +makeOFConditionConst( DCMTLS_EC_TLSRequestPending, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_REQUEST_PENDING, OF_error, "TLS error: request pending" ); +makeOFConditionConst( DCMTLS_EC_TLSRequestSent, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_REQUEST_SENT, OF_error, "TLS error: request sent" ); +makeOFConditionConst( DCMTLS_EC_TLSNoCookieCallbackSet, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_NO_COOKIE_CALLBACK_SET, OF_error, "TLS error: no cookie callback set" ); +makeOFConditionConst( DCMTLS_EC_TLSPrivateKeyMismatch, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_PRIVATE_KEY_MISMATCH, OF_error, "TLS error: private key mismatch" ); +makeOFConditionConst( DCMTLS_EC_TLSNotReplacingCertificate, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_NOT_REPLACING_CERTIFICATE, OF_error, "TLS error: not replacing certificate" ); +makeOFConditionConst( DCMTLS_EC_TLSMissingParameters, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_MISSING_PARAMETERS, OF_error, "TLS error: missing parameters" ); +makeOFConditionConst( DCMTLS_EC_TLSApplicationDataAfterCloseNotify, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_APPLICATION_DATA_AFTER_CLOSE_NOTIFY, OF_error, "TLS error: application data after close notify" ); +makeOFConditionConst( DCMTLS_EC_TLSBadLegacyVersion, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_BAD_LEGACY_VERSION, OF_error, "TLS error: bad legacy version" ); +makeOFConditionConst( DCMTLS_EC_TLSMixedHandshakeAndNonHandshakeData, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_MIXED_HANDSHAKE_AND_NON_HANDSHAKE_DATA, OF_error, "TLS error: mixed handshake and non handshake data" ); +makeOFConditionConst( DCMTLS_EC_TLSUnexpectedEofWhileReading, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_UNEXPECTED_EOF_WHILE_READING, OF_error, "TLS error: unexpected eof while reading" ); +makeOFConditionConst( DCMTLS_EC_TLSNoSuitableGroups, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_NO_SUITABLE_GROUPS, OF_error, "TLS error: no suitable groups" ); +makeOFConditionConst( DCMTLS_EC_TLSCopyParametersFailed, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_COPY_PARAMETERS_FAILED, OF_error, "TLS error: copy parameters failed" ); +makeOFConditionConst( DCMTLS_EC_TLSNoSuitableDigestAlgorithm, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_NO_SUITABLE_DIGEST_ALGORITHM, OF_error, "TLS error: no suitable digest algorithm" ); +makeOFConditionConst( DCMTLS_EC_TLSRecordTooSmall, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_RECORD_TOO_SMALL, OF_error, "TLS error: record too small" ); +makeOFConditionConst( DCMTLS_EC_TLSCannotGetGroupName, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_CANNOT_GET_GROUP_NAME, OF_error, "TLS error: cannot get group name" ); +makeOFConditionConst( DCMTLS_EC_TLSSSL3SessionIDTooLong, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_SSL3_SESSION_ID_TOO_LONG, OF_error, "TLS error: ssl3 session id too long" ); +makeOFConditionConst( DCMTLS_EC_TLSSSLSessionIDCallbackFailed, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_SSL_SESSION_ID_CALLBACK_FAILED, OF_error, "TLS error: ssl session id callback failed" ); +makeOFConditionConst( DCMTLS_EC_TLSSSLSessionIDConflict, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_SSL_SESSION_ID_CONFLICT, OF_error, "TLS error: ssl session id conflict" ); +makeOFConditionConst( DCMTLS_EC_TLSSSLSessionIDHasBadLength, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_SSL_SESSION_ID_HAS_BAD_LENGTH, OF_error, "TLS error: ssl session id has bad length" ); +makeOFConditionConst( DCMTLS_EC_TLSBadECCCert, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_BAD_ECC_CERT, OF_error, "TLS error: bad ecc cert" ); +makeOFConditionConst( DCMTLS_EC_TLSBadEcpoint, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_BAD_ECPOINT, OF_error, "TLS error: bad ecpoint" ); +makeOFConditionConst( DCMTLS_EC_TLSCompressionIDNotWithinPrivateRange, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_COMPRESSION_ID_NOT_WITHIN_PRIVATE_RANGE, OF_error, "TLS error: compression id not within private range" ); +makeOFConditionConst( DCMTLS_EC_TLSCookieMismatch, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_COOKIE_MISMATCH, OF_error, "TLS error: cookie mismatch" ); +makeOFConditionConst( DCMTLS_EC_TLSDuplicateCompressionId, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_DUPLICATE_COMPRESSION_ID, OF_error, "TLS error: duplicate compression id" ); +makeOFConditionConst( DCMTLS_EC_TLSMissingTmpECDHKey, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_MISSING_TMP_ECDH_KEY, OF_error, "TLS error: missing tmp ecdh key" ); +makeOFConditionConst( DCMTLS_EC_TLSReadTimeoutExpired, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_READ_TIMEOUT_EXPIRED, OF_error, "TLS error: read timeout expired" ); +makeOFConditionConst( DCMTLS_EC_TLSUnableToFindECDHParameters, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_UNABLE_TO_FIND_ECDH_PARAMETERS, OF_error, "TLS error: unable to find ecdh parameters" ); +makeOFConditionConst( DCMTLS_EC_TLSUnsupportedEllipticCurve, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_UNSUPPORTED_ELLIPTIC_CURVE, OF_error, "TLS error: unsupported elliptic curve" ); +makeOFConditionConst( DCMTLS_EC_TLSECCCertNotForSigning, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_ECC_CERT_NOT_FOR_SIGNING, OF_error, "TLS error: ecc cert not for signing" ); +makeOFConditionConst( DCMTLS_EC_TLSSSL3ExtInvalidServername, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_SSL3_EXT_INVALID_SERVERNAME, OF_error, "TLS error: ssl3 ext invalid servername" ); +makeOFConditionConst( DCMTLS_EC_TLSSSL3ExtInvalidServernameType, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_SSL3_EXT_INVALID_SERVERNAME_TYPE, OF_error, "TLS error: ssl3 ext invalid servername type" ); +makeOFConditionConst( DCMTLS_EC_TLSNoRequiredDigest, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_NO_REQUIRED_DIGEST, OF_error, "TLS error: no required digest" ); +makeOFConditionConst( DCMTLS_EC_TLSInvalidTicketKeysLength, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_INVALID_TICKET_KEYS_LENGTH, OF_error, "TLS error: invalid ticket keys length" ); +makeOFConditionConst( DCMTLS_EC_TLSInvalidStatusResponse, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_INVALID_STATUS_RESPONSE, OF_error, "TLS error: invalid status response" ); +makeOFConditionConst( DCMTLS_EC_TLSUnsupportedStatusType, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_UNSUPPORTED_STATUS_TYPE, OF_error, "TLS error: unsupported status type" ); +makeOFConditionConst( DCMTLS_EC_TLSNoGostCertificateSentByPeer, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_NO_GOST_CERTIFICATE_SENT_BY_PEER, OF_error, "TLS error: Peer haven't sent GOST certificate, required for selected ciphersuite" ); +makeOFConditionConst( DCMTLS_EC_TLSNoClientCertMethod, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_NO_CLIENT_CERT_METHOD, OF_error, "TLS error: no client cert method" ); +makeOFConditionConst( DCMTLS_EC_TLSBadHandshakeLength, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_BAD_HANDSHAKE_LENGTH, OF_error, "TLS error: bad handshake length" ); +makeOFConditionConst( DCMTLS_EC_TLSDTLSMessageTooBig, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_DTLS_MESSAGE_TOO_BIG, OF_error, "TLS error: dtls message too big" ); +makeOFConditionConst( DCMTLS_EC_TLSRenegotiateExtTooLong, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_RENEGOTIATE_EXT_TOO_LONG, OF_error, "TLS error: renegotiate ext too long" ); +makeOFConditionConst( DCMTLS_EC_TLSRenegotiationEncodingErr, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_RENEGOTIATION_ENCODING_ERR, OF_error, "TLS error: renegotiation encoding err" ); +makeOFConditionConst( DCMTLS_EC_TLSRenegotiationMismatch, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_RENEGOTIATION_MISMATCH, OF_error, "TLS error: renegotiation mismatch" ); +makeOFConditionConst( DCMTLS_EC_TLSUnsafeLegacyRenegotiationDisabled, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_UNSAFE_LEGACY_RENEGOTIATION_DISABLED, OF_error, "TLS error: unsafe legacy renegotiation disabled" ); +makeOFConditionConst( DCMTLS_EC_TLSNoRenegotiation, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_NO_RENEGOTIATION, OF_error, "TLS error: no renegotiation" ); +makeOFConditionConst( DCMTLS_EC_TLSInconsistentCompression, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_INCONSISTENT_COMPRESSION, OF_error, "TLS error: inconsistent compression" ); +makeOFConditionConst( DCMTLS_EC_TLSInvalidCompressionAlgorithm, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_INVALID_COMPRESSION_ALGORITHM, OF_error, "TLS error: invalid compression algorithm" ); +makeOFConditionConst( DCMTLS_EC_TLSRequiredCompressionAlgorithmMissing, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_REQUIRED_COMPRESSION_ALGORITHM_MISSING, OF_error, "TLS error: required compression algorithm missing" ); +makeOFConditionConst( DCMTLS_EC_TLSCompressionDisabled, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_COMPRESSION_DISABLED, OF_error, "TLS error: compression disabled" ); +makeOFConditionConst( DCMTLS_EC_TLSOldSessionCompressionAlgorithmNotReturned, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_OLD_SESSION_COMPRESSION_ALGORITHM_NOT_RETURNED,OF_error, "TLS error: old session compression algorithm not returned" ); +makeOFConditionConst( DCMTLS_EC_TLSSCSVReceivedWhenRenegotiating, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_SCSV_RECEIVED_WHEN_RENEGOTIATING, OF_error, "TLS error: scsv received when renegotiating" ); +makeOFConditionConst( DCMTLS_EC_TLSBadSRPALength, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_BAD_SRP_A_LENGTH, OF_error, "TLS error: bad srp a length" ); +makeOFConditionConst( DCMTLS_EC_TLSBadSrtpMkiValue, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_BAD_SRTP_MKI_VALUE, OF_error, "TLS error: bad srtp mki value" ); +makeOFConditionConst( DCMTLS_EC_TLSBadSrtpProtectionProfileList, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_BAD_SRTP_PROTECTION_PROFILE_LIST, OF_error, "TLS error: bad srtp protection profile list" ); +makeOFConditionConst( DCMTLS_EC_TLSEmptySrtpProtectionProfileList, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_EMPTY_SRTP_PROTECTION_PROFILE_LIST, OF_error, "TLS error: empty srtp protection profile list" ); +makeOFConditionConst( DCMTLS_EC_TLSInvalidSrpUsername, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_INVALID_SRP_USERNAME, OF_error, "TLS error: invalid srp username" ); +makeOFConditionConst( DCMTLS_EC_TLSMissingSrpParam, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_MISSING_SRP_PARAM, OF_error, "TLS error: can't find SRP server param" ); +makeOFConditionConst( DCMTLS_EC_TLSNoSrtpProfiles, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_NO_SRTP_PROFILES, OF_error, "TLS error: no srtp profiles" ); +makeOFConditionConst( DCMTLS_EC_TLSSignatureAlgorithmsError, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_SIGNATURE_ALGORITHMS_ERROR, OF_error, "TLS error: signature algorithms error" ); +makeOFConditionConst( DCMTLS_EC_TLSSrpACalc, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_SRP_A_CALC, OF_error, "TLS error: error with the srp params" ); +makeOFConditionConst( DCMTLS_EC_TLSSrtpCouldNotAllocateProfiles, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_SRTP_COULD_NOT_ALLOCATE_PROFILES, OF_error, "TLS error: srtp could not allocate profiles" ); +makeOFConditionConst( DCMTLS_EC_TLSSrtpProtectionProfileListTooLong, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_SRTP_PROTECTION_PROFILE_LIST_TOO_LONG, OF_error, "TLS error: srtp protection profile list too long" ); +makeOFConditionConst( DCMTLS_EC_TLSSrtpUnknownProtectionProfile, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_SRTP_UNKNOWN_PROTECTION_PROFILE, OF_error, "TLS error: srtp unknown protection profile" ); +makeOFConditionConst( DCMTLS_EC_TLSTLSIllegalExporterLabel, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_TLS_ILLEGAL_EXPORTER_LABEL, OF_error, "TLS error: tls illegal exporter label" ); +makeOFConditionConst( DCMTLS_EC_TLSUnknownDigest, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_UNKNOWN_DIGEST, OF_error, "TLS error: unknown digest" ); +makeOFConditionConst( DCMTLS_EC_TLSUseSrtpNotNegotiated, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_USE_SRTP_NOT_NEGOTIATED, OF_error, "TLS error: use srtp not negotiated" ); +makeOFConditionConst( DCMTLS_EC_TLSWrongSignatureType, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_WRONG_SIGNATURE_TYPE, OF_error, "TLS error: wrong signature type" ); +makeOFConditionConst( DCMTLS_EC_TLSBadSrpParameters, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_BAD_SRP_PARAMETERS, OF_error, "TLS error: bad srp parameters" ); +makeOFConditionConst( DCMTLS_EC_TLSSSLNegativeLength, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_SSL_NEGATIVE_LENGTH, OF_error, "TLS error: ssl negative length" ); +makeOFConditionConst( DCMTLS_EC_TLSInappropriateFallback, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_INAPPROPRIATE_FALLBACK, OF_error, "TLS error: inappropriate fallback" ); +makeOFConditionConst( DCMTLS_EC_TLSECDHRequiredForSuiteBMode, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_ECDH_REQUIRED_FOR_SUITEB_MODE, OF_error, "TLS error: ecdh required for suiteb mode" ); +makeOFConditionConst( DCMTLS_EC_TLSNoSharedSignatureAlgorithms, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_NO_SHARED_SIGNATURE_ALGORITHMS, OF_error, "TLS error: no shared signature algorithms" ); +makeOFConditionConst( DCMTLS_EC_TLSCertCbError, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_CERT_CB_ERROR, OF_error, "TLS error: cert cb error" ); +makeOFConditionConst( DCMTLS_EC_TLSWrongCurve, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_WRONG_CURVE, OF_error, "TLS error: wrong curve" ); +makeOFConditionConst( DCMTLS_EC_TLSIllegalSuiteBDigest, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_ILLEGAL_SUITEB_DIGEST, OF_error, "TLS error: illegal Suite B digest" ); +makeOFConditionConst( DCMTLS_EC_TLSMissingECDSASigningCert, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_MISSING_ECDSA_SIGNING_CERT, OF_error, "TLS error: missing ecdsa signing cert" ); +makeOFConditionConst( DCMTLS_EC_TLSWrongCertificateType, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_WRONG_CERTIFICATE_TYPE, OF_error, "TLS error: wrong certificate type" ); +makeOFConditionConst( DCMTLS_EC_TLSBadValue, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_BAD_VALUE, OF_error, "TLS error: bad value" ); +makeOFConditionConst( DCMTLS_EC_TLSInvalidNullCmdName, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_INVALID_NULL_CMD_NAME, OF_error, "TLS error: invalid null cmd name" ); +makeOFConditionConst( DCMTLS_EC_TLSUnknownCmdName, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_UNKNOWN_CMD_NAME, OF_error, "TLS error: unknown cmd name" ); +makeOFConditionConst( DCMTLS_EC_TLSInvalidServerinfoData, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_INVALID_SERVERINFO_DATA, OF_error, "TLS error: invalid serverinfo data" ); +makeOFConditionConst( DCMTLS_EC_TLSNoPEMExtensions, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_NO_PEM_EXTENSIONS, OF_error, "TLS error: no pem extensions" ); +makeOFConditionConst( DCMTLS_EC_TLSBadData, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_BAD_DATA, OF_error, "TLS error: bad data" ); +makeOFConditionConst( DCMTLS_EC_TLSPEMNameBadPrefix, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_PEM_NAME_BAD_PREFIX, OF_error, "TLS error: pem name bad prefix" ); +makeOFConditionConst( DCMTLS_EC_TLSPEMNameTooShort, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_PEM_NAME_TOO_SHORT, OF_error, "TLS error: pem name too short" ); +makeOFConditionConst( DCMTLS_EC_TLSDHKeyTooSmall, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_DH_KEY_TOO_SMALL, OF_error, "TLS error: dh key too small" ); +makeOFConditionConst( DCMTLS_EC_TLSVersionTooLow, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_VERSION_TOO_LOW, OF_error, "TLS error: version too low" ); +makeOFConditionConst( DCMTLS_EC_TLSCAKeyTooSmall, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_CA_KEY_TOO_SMALL, OF_error, "TLS error: ca key too small" ); +makeOFConditionConst( DCMTLS_EC_TLSCAMDTooWeak, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_CA_MD_TOO_WEAK, OF_error, "TLS error: ca md too weak" ); +makeOFConditionConst( DCMTLS_EC_TLSEeKeyTooSmall, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_EE_KEY_TOO_SMALL, OF_error, "TLS error: ee key too small" ); +makeOFConditionConst( DCMTLS_EC_TLSCookieGenCallbackFailure, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_COOKIE_GEN_CALLBACK_FAILURE, OF_error, "TLS error: cookie gen callback failure" ); +makeOFConditionConst( DCMTLS_EC_TLSFragmentedClientHello, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_FRAGMENTED_CLIENT_HELLO, OF_error, "TLS error: fragmented client hello" ); +makeOFConditionConst( DCMTLS_EC_TLSInvalidSequenceNumber, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_INVALID_SEQUENCE_NUMBER, OF_error, "TLS error: invalid sequence number" ); +makeOFConditionConst( DCMTLS_EC_TLSNoVerifyCookieCallback, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_NO_VERIFY_COOKIE_CALLBACK, OF_error, "TLS error: no verify cookie callback" ); +makeOFConditionConst( DCMTLS_EC_TLSLengthTooLong, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_LENGTH_TOO_LONG, OF_error, "TLS error: length too long" ); +makeOFConditionConst( DCMTLS_EC_TLSFailedToInitAsync, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_FAILED_TO_INIT_ASYNC, OF_error, "TLS error: failed to init async" ); +makeOFConditionConst( DCMTLS_EC_TLSPipelineFailure, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_PIPELINE_FAILURE, OF_error, "TLS error: pipeline failure" ); +makeOFConditionConst( DCMTLS_EC_TLSShutdownWhileInInit, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_SHUTDOWN_WHILE_IN_INIT, OF_error, "TLS error: shutdown while in init" ); +makeOFConditionConst( DCMTLS_EC_TLSSSLSessionIDTooLong, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_SSL_SESSION_ID_TOO_LONG, OF_error, "TLS error: ssl session id too long" ); +makeOFConditionConst( DCMTLS_EC_TLSTooManyWarnAlerts, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_TOO_MANY_WARN_ALERTS, OF_error, "TLS error: too many warn alerts" ); +makeOFConditionConst( DCMTLS_EC_TLSNoSharedGroups, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_NO_SHARED_GROUPS, OF_error, "TLS error: no shared groups" ); +makeOFConditionConst( DCMTLS_EC_TLSBadRecordType, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_BAD_RECORD_TYPE, OF_error, "TLS error: bad record type" ); +makeOFConditionConst( DCMTLS_EC_TLSInvalidSessionId, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_INVALID_SESSION_ID, OF_error, "TLS error: invalid session id" ); +makeOFConditionConst( DCMTLS_EC_TLSSSLv3AlertUnexpectedMessage, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_SSLV3_ALERT_UNEXPECTED_MESSAGE, OF_error, "TLS alert: unexpected message" ); +makeOFConditionConst( DCMTLS_EC_TLSSSLv3AlertBadRecordMac, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_SSLV3_ALERT_BAD_RECORD_MAC, OF_error, "TLS alert: bad record mac" ); +makeOFConditionConst( DCMTLS_EC_TLSTLSv1AlertDecryptionFailed, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_TLSV1_ALERT_DECRYPTION_FAILED, OF_error, "TLS alert: decryption failed" ); +makeOFConditionConst( DCMTLS_EC_TLSTLSv1AlertRecordOverflow, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_TLSV1_ALERT_RECORD_OVERFLOW, OF_error, "TLS alert: record overflow" ); +makeOFConditionConst( DCMTLS_EC_TLSSSLv3AlertDecompressionFailure, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_SSLV3_ALERT_DECOMPRESSION_FAILURE, OF_error, "TLS alert: decompression failure" ); +makeOFConditionConst( DCMTLS_EC_TLSSSLv3AlertHandshakeFailure, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_SSLV3_ALERT_HANDSHAKE_FAILURE, OF_error, "TLS alert: handshake failure" ); +makeOFConditionConst( DCMTLS_EC_TLSSSLv3AlertNoCertificate, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_SSLV3_ALERT_NO_CERTIFICATE, OF_error, "TLS alert: no certificate" ); +makeOFConditionConst( DCMTLS_EC_TLSSSLv3AlertBadCertificate, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_SSLV3_ALERT_BAD_CERTIFICATE, OF_error, "TLS alert: bad certificate" ); +makeOFConditionConst( DCMTLS_EC_TLSSSLv3AlertUnsupportedCertificate, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_SSLV3_ALERT_UNSUPPORTED_CERTIFICATE, OF_error, "TLS alert: unsupported certificate" ); +makeOFConditionConst( DCMTLS_EC_TLSSSLv3AlertCertificateRevoked, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_SSLV3_ALERT_CERTIFICATE_REVOKED, OF_error, "TLS alert: certificate revoked" ); +makeOFConditionConst( DCMTLS_EC_TLSSSLv3AlertCertificateExpired, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_SSLV3_ALERT_CERTIFICATE_EXPIRED, OF_error, "TLS alert: certificate expired" ); +makeOFConditionConst( DCMTLS_EC_TLSSSLv3AlertCertificateUnknown, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_SSLV3_ALERT_CERTIFICATE_UNKNOWN, OF_error, "TLS alert: certificate unknown" ); +makeOFConditionConst( DCMTLS_EC_TLSSSLv3AlertIllegalParameter, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_SSLV3_ALERT_ILLEGAL_PARAMETER, OF_error, "TLS alert: illegal parameter" ); +makeOFConditionConst( DCMTLS_EC_TLSTLSv1AlertUnknownCa, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_TLSV1_ALERT_UNKNOWN_CA, OF_error, "TLS alert: unknown ca," ); +makeOFConditionConst( DCMTLS_EC_TLSTLSv1AlertAccessDenied, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_TLSV1_ALERT_ACCESS_DENIED, OF_error, "TLS alert: access denied" ); +makeOFConditionConst( DCMTLS_EC_TLSTLSv1AlertDecodeError, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_TLSV1_ALERT_DECODE_ERROR, OF_error, "TLS alert: decode error," ); +makeOFConditionConst( DCMTLS_EC_TLSTLSv1AlertDecryptError, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_TLSV1_ALERT_DECRYPT_ERROR, OF_error, "TLS alert: decrypt error" ); +makeOFConditionConst( DCMTLS_EC_TLSTLSv1AlertExportRestriction, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_TLSV1_ALERT_EXPORT_RESTRICTION, OF_error, "TLS alert: export restriction" ); +makeOFConditionConst( DCMTLS_EC_TLSTLSv1AlertProtocolVersion, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_TLSV1_ALERT_PROTOCOL_VERSION, OF_error, "TLS alert: protocol version" ); +makeOFConditionConst( DCMTLS_EC_TLSTLSv1AlertInsufficientSecurity, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_TLSV1_ALERT_INSUFFICIENT_SECURITY, OF_error, "TLS alert: insufficient security" ); +makeOFConditionConst( DCMTLS_EC_TLSTLSv1AlertInternalError, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_TLSV1_ALERT_INTERNAL_ERROR, OF_error, "TLS alert: internal error" ); +makeOFConditionConst( DCMTLS_EC_TLSTLSv1AlertInappropriateFallback, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_TLSV1_ALERT_INAPPROPRIATE_FALLBACK, OF_error, "TLS alert: inappropriate fallback" ); +makeOFConditionConst( DCMTLS_EC_TLSTLSv1AlertUserCancelled, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_TLSV1_ALERT_USER_CANCELLED, OF_error, "TLS alert: user cancelled" ); +makeOFConditionConst( DCMTLS_EC_TLSTLSv1AlertNoRenegotiation, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_TLSV1_ALERT_NO_RENEGOTIATION, OF_error, "TLS alert: no renegotiation" ); +makeOFConditionConst( DCMTLS_EC_TLSTLSv13AlertMissingExtension, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_TLSV13_ALERT_MISSING_EXTENSION, OF_error, "TLS alert: missing extension" ); +makeOFConditionConst( DCMTLS_EC_TLSTLSv1UnsupportedExtension, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_TLSV1_UNSUPPORTED_EXTENSION, OF_error, "TLS error: unsupported extension" ); +makeOFConditionConst( DCMTLS_EC_TLSTLSv1CertificateUnobtainable, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_TLSV1_CERTIFICATE_UNOBTAINABLE, OF_error, "TLS error: certificate unobtainable" ); +makeOFConditionConst( DCMTLS_EC_TLSTLSv1UnrecognizedName, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_TLSV1_UNRECOGNIZED_NAME, OF_error, "TLS error: unrecognized name" ); +makeOFConditionConst( DCMTLS_EC_TLSTLSv1BadCertificateStatusResponse, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_TLSV1_BAD_CERTIFICATE_STATUS_RESPONSE, OF_error, "TLS error: bad certificate status response" ); +makeOFConditionConst( DCMTLS_EC_TLSTLSv1BadCertificateHashValue, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_TLSV1_BAD_CERTIFICATE_HASH_VALUE, OF_error, "TLS error: bad certificate hash value" ); +makeOFConditionConst( DCMTLS_EC_TLSTLSv13AlertCertificateRequired, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_TLSV13_ALERT_CERTIFICATE_REQUIRED, OF_error, "TLS alert: certificate required" ); diff -Nru dcmtk-3.6.6/dcmtls/libsrc/tlslayer.cc dcmtk-3.6.7/dcmtls/libsrc/tlslayer.cc --- dcmtk-3.6.6/dcmtls/libsrc/tlslayer.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmtls/libsrc/tlslayer.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1998-2019, OFFIS e.V. + * Copyright (C) 1998-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -23,12 +23,11 @@ #include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ #include "dcmtk/dcmtls/tlslayer.h" #include "dcmtk/dcmtls/tlsdefin.h" +#include "dcmtk/dcmtls/tlscond.h" +#include "dcmtk/ofstd/ofdiag.h" /* for DCMTK_DIAGNOSTIC macros */ #ifdef WITH_OPENSSL -#define INCLUDE_CSTDLIB -#include "dcmtk/ofstd/ofstdinc.h" - BEGIN_EXTERN_C #ifdef HAVE_WINDOWS_H #define WIN32_LEAN_AND_MEAN @@ -39,35 +38,49 @@ #include #include #include +#include END_EXTERN_C +#ifndef X509_V_ERR_UNSPECIFIED +#define X509_V_ERR_UNSPECIFIED 1 +#endif + #include "dcmtk/dcmtls/tlslayer.h" #include "dcmtk/dcmtls/tlstrans.h" #include "dcmtk/dcmnet/dicom.h" +#include "dcmtk/ofstd/ofrand.h" -#ifdef HAVE_SSL_CTX_GET0_PARAM +#ifdef HAVE_OPENSSL_PROTOTYPE_SSL_CTX_GET0_PARAM #define DCMTK_SSL_CTX_get0_param SSL_CTX_get0_param #else -#define DCMTK_SSL_CTX_get0_param(A) A->param; +#define DCMTK_SSL_CTX_get0_param(A) (A)->param; #endif -#if OPENSSL_VERSION_NUMBER < 0x10002000L || defined(LIBRESSL_VERSION_NUMBER) +#ifndef HAVE_OPENSSL_PROTOTYPE_X509_GET_SIGNATURE_NID #define X509_get_signature_nid(x509) OBJ_obj2nid((x509)->sig_alg->algorithm) #endif -#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER) +#ifndef HAVE_OPENSSL_PROTOTYPE_SSL_CTX_GET_CERT_STORE #define SSL_CTX_get_cert_store(ctx) (ctx)->cert_store +#endif + +#ifndef HAVE_OPENSSL_PROTOTYPE_EVP_PKEY_BASE_ID #define EVP_PKEY_base_id(key) EVP_PKEY_type((key)->type) +#endif + +#ifndef HAVE_OPENSSL_PROTOTYPE_DH_BITS #define DH_bits(dh) BN_num_bits((dh)->p) -#define SSL_CTX_get_ciphers(ctx) (ctx)->cipher_list +#endif + +#ifndef HAVE_OPENSSL_PROTOTYPE_X509_STORE_GET0_PARAM +#define X509_STORE_get0_param(A) (A)->param; #endif extern "C" int DcmTLSTransportLayer_certificateValidationCallback(int ok, X509_STORE_CTX *storeContext); OFLogger DCM_dcmtlsLogger = OFLog::getLogger("dcmtk.dcmtls"); - -/* This static function creates a hard-coded set of Diffie-Hellman parameters +/* This static sets a hard-coded set of Diffie-Hellman parameters * with 2048 bits key size that is used for ephemeral Diffie-Hellmane * (DHE_) ciphersuites unless the user replaces the parameter set * by calling DcmTLSTransportLayer::setTempDHParameters(). @@ -75,65 +88,45 @@ * does not require these parameters to be secret. It is, however, still * preferable to use a user-generated set of parameters. * - * Generated by calling "openssl dhparam -C -noout 2048". + * Generated by calling "openssl dhparam 2048". */ -static DH *get_dh2048() +OFBool DcmTLSTransportLayer::setBuiltInDHParameters() { - static unsigned char dh2048_p[] = { - 0xC8, 0x04, 0xF6, 0xBF, 0x4B, 0xA6, 0xBA, 0x24, 0xD8, 0x79, - 0xA9, 0x70, 0xFF, 0xA0, 0x6B, 0x9F, 0x9D, 0x56, 0x0F, 0x41, - 0x75, 0x70, 0x69, 0x17, 0xBC, 0x89, 0xB5, 0x38, 0xEE, 0x8A, - 0xA9, 0x2E, 0xFD, 0xC8, 0xD3, 0xBA, 0x43, 0x77, 0x51, 0x46, - 0xBF, 0x59, 0xE0, 0x57, 0xFA, 0x55, 0x6A, 0xC2, 0x4B, 0x63, - 0x24, 0xEE, 0x9E, 0x64, 0x96, 0xBE, 0x13, 0xF7, 0x0B, 0xEC, - 0x0E, 0xEA, 0xC8, 0x8B, 0x3A, 0x59, 0xB5, 0x28, 0xF6, 0x49, - 0x40, 0xC7, 0x89, 0x80, 0x39, 0x97, 0x66, 0x7A, 0xC5, 0x90, - 0xB7, 0x98, 0x3F, 0x11, 0x45, 0xEA, 0xA2, 0xF1, 0x77, 0x7B, - 0xBE, 0x3F, 0x5A, 0x5C, 0xD5, 0xA4, 0x5F, 0xBA, 0x96, 0x87, - 0x77, 0x2D, 0x23, 0xA0, 0x56, 0x5B, 0x14, 0x2D, 0xD6, 0x6C, - 0xF1, 0xCC, 0x0F, 0xD9, 0x7D, 0x42, 0x72, 0x9A, 0x8B, 0xBE, - 0x3E, 0xCB, 0xB4, 0xE3, 0xB9, 0xA8, 0xC2, 0x8F, 0xBA, 0xEB, - 0x12, 0xFE, 0x3E, 0x90, 0x4B, 0xDC, 0x8C, 0xA0, 0xD2, 0x26, - 0x1F, 0x26, 0x78, 0x6E, 0x89, 0x15, 0x59, 0xED, 0x8B, 0x7E, - 0x00, 0x5E, 0xFF, 0xDB, 0x55, 0x60, 0xE3, 0x52, 0x8A, 0x03, - 0x9C, 0xE1, 0x33, 0xE6, 0x9F, 0x17, 0x39, 0x42, 0xE7, 0x26, - 0xAE, 0x3D, 0xC0, 0x66, 0x9F, 0x3C, 0x97, 0xC6, 0x75, 0xAC, - 0x5B, 0xD1, 0xB2, 0x51, 0xCA, 0xB6, 0x4F, 0xFD, 0xAF, 0x41, - 0xF8, 0x8B, 0x5A, 0x8D, 0xC7, 0xCA, 0x3A, 0xB7, 0xE3, 0x00, - 0x7D, 0x20, 0xFA, 0xF1, 0xDE, 0xDA, 0x10, 0xBD, 0x85, 0x09, - 0xA0, 0xE1, 0x24, 0x18, 0x64, 0x38, 0xBA, 0x1C, 0x16, 0x15, - 0x71, 0xA6, 0xC2, 0x02, 0xBA, 0x27, 0xF4, 0xE3, 0x3F, 0xA2, - 0x2E, 0x89, 0xBA, 0xC9, 0xCD, 0x0B, 0x5A, 0x95, 0x26, 0x7D, - 0x10, 0xBE, 0xE3, 0x96, 0x99, 0x4A, 0x2F, 0xAB, 0x9B, 0xBD, - 0xD0, 0xB9, 0xDC, 0x43, 0xF9, 0xCB - }; - static unsigned char dh2048_g[] = { 0x02 }; - - DH *dh; - if ((dh=DH_new()) == NULL) return(NULL); - -#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER) - dh->p=BN_bin2bn(dh2048_p,sizeof(dh2048_p),NULL); - dh->g=BN_bin2bn(dh2048_g,sizeof(dh2048_g),NULL); - if ((dh->p == NULL) || (dh->g == NULL)) + static char dh2048_p[] = + "-----BEGIN DH PARAMETERS-----\n" + "MIIBCAKCAQEAzEaoIXpuyK2D+If94J2iSxYqi1Ot+HD7FKvszu7Bxlh8izm1nyzk\n" + "b0zUJfcXOaxnSsqmfGxLfPRm5+vD3aeD6mugrR1zZSemXUiq6CsONZZQ1MxStJvk\n" + "Ems+9qRrbj9tA+/b2dZvUCc1pZAQTkbf7+CcbZnh21jExmDhf5QFZye/y4Arvj+a\n" + "CZP/2Hd0veWUv2HzFRm52v0B69Y7I4BEWwGMDkvRREzc05fRAZiDftRLJGSkohLq\n" + "65jDLNz4ZgiCvNH5SnixzuUBlys+78XEfWYu6k0FclBEFq+9rVaqugodK/SN0BOA\n" + "pOEPHZJ77TwWvHEXA9ShsNjmBkqWK/tnKwIBAg==\n" + "-----END DH PARAMETERS-----\n"; + + if (transportLayerContext==NULL) return OFFalse; + BIO *bio = BIO_new_mem_buf(dh2048_p, sizeof(dh2048_p)); + if (bio) + { +#ifdef HAVE_OPENSSL_PROTOTYPE_SSL_CTX_SET0_TMP_DH_PKEY + EVP_PKEY *dhparams = PEM_read_bio_Parameters(bio,NULL); + BIO_free(bio); + if (dhparams) { - DH_free(dh); - return(NULL); + SSL_CTX_set0_tmp_dh_pkey(transportLayerContext, dhparams); // transfers ownership of "dhparams" to transportLayerContext + return OFTrue; } #else - // API change in OpenSSL 1.1.0: DH is now an opaque type - BIGNUM *dhp_bn = BN_bin2bn(dh2048_p, sizeof (dh2048_p), NULL); - BIGNUM *dhg_bn = BN_bin2bn(dh2048_g, sizeof (dh2048_g), NULL); - if (dhp_bn == NULL || dhg_bn == NULL || !DH_set0_pqg(dh, dhp_bn, NULL, dhg_bn)) + DH *dhparams = PEM_read_bio_DHparams(bio,NULL,NULL,NULL); + BIO_free(bio); + if (dhparams) { - DH_free(dh); - BN_free(dhp_bn); - BN_free(dhg_bn); - return NULL; + SSL_CTX_set_tmp_dh(transportLayerContext,dhparams); + DH_free(dhparams); /* Safe because of reference counts in OpenSSL */ + return OFTrue; } #endif + } - return dh; + return OFFalse; } int DcmTLSTransportLayer_certificateValidationCallback(int ok, X509_STORE_CTX * /* storeContext */) @@ -165,7 +158,7 @@ // The TLS Supported Elliptic Curves extension (RFC 4492) is only supported in OpenSSL 1.0.2 and newer. // When compiling with OpenSSL 1.0.1, we are not using computeEllipticCurveList(). -#if OPENSSL_VERSION_NUMBER >= 0x10002000L && !defined(LIBRESSL_VERSION_NUMBER) +#ifdef HAVE_OPENSSL_PROTOTYPE_SSL_CTX_SET1_CURVES /** determine the list of elliptic curves supported by the OpenSSL library * for use with the TLS elliptic curve extension. @@ -195,13 +188,15 @@ }; // create a SSL context object -#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER) +#ifndef HAVE_OPENSSL_PROTOTYPE_TLS_METHOD SSL_CTX *ctx = SSL_CTX_new(SSLv23_method()); if (ctx) SSL_CTX_set_options(ctx, SSL_OP_NO_SSLv2|SSL_OP_NO_SSLv3); #else SSL_CTX *ctx = SSL_CTX_new(TLS_method()); +#ifdef HAVE_OPENSSL_PROTOTYPE_SSL_CTX_SET_SECURITY_LEVEL if (ctx) SSL_CTX_set_security_level(ctx, 0); #endif +#endif if (ctx) { size_t numentries = sizeof(eclist) / sizeof(int); @@ -220,7 +215,7 @@ } } -#endif +#endif /* HAVE_OPENSSL_PROTOTYPE_SSL_CTX_SET1_CURVES */ DcmTLSTransportLayer::DcmTLSTransportLayer() @@ -232,6 +227,10 @@ { } +// Depending on the OpenSSL version used, SSL_CTX_set_tmp_ecdh() will +// cause this warning to be issued. In any case, this can safely be ignored. +#include DCMTK_DIAGNOSTIC_IGNORE_CONST_EXPRESSION_WARNING + DcmTLSTransportLayer::DcmTLSTransportLayer(T_ASC_NetworkRole networkRole, const char *randFile, OFBool initOpenSSL) : DcmTransportLayer() , transportLayerContext(NULL) @@ -242,7 +241,7 @@ if (initOpenSSL) initializeOpenSSL(); if (randFile) seedPRNG(randFile); -#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER) +#ifndef HAVE_OPENSSL_PROTOTYPE_TLS_METHOD // on versions of OpenSSL older than 1.1.0, we use the // SSLv23 methods and not the TLSv1 methods because the latter // only accept TLS 1.0 and prevent the negotiation of newer @@ -280,33 +279,41 @@ break; } +#ifdef HAVE_OPENSSL_PROTOTYPE_SSL_CTX_SET_SECURITY_LEVEL // starting with OpenSSL 1.1.0, we explicitly need to set the security level to 0 // if we want to support any of the NULL ciphersuites. Since we manage the list // of supported ciphersuites ourselves and prevent a mix of NULL and non-NULL // ciphersuites, this is safe. if (transportLayerContext) SSL_CTX_set_security_level(transportLayerContext, 0); - #endif +#endif +#endif /* HAVE_OPENSSL_PROTOTYPE_TLS_METHOD */ if (transportLayerContext == NULL) { - const char *result = ERR_reason_error_string(ERR_peek_error()); + const char *result = ERR_reason_error_string(ERR_get_error()); if (result == NULL) result = "unknown error in SSL_CTX_new()"; DCMTLS_ERROR("unable to create TLS transport layer: " << result); } else { // create default set of DH parameters - DH *dhparams = get_dh2048(); - if (dhparams) + if (!setBuiltInDHParameters()) + DCMTLS_ERROR("unable to create Diffie-Hellman parameters."); + + // set a random 32-bit number as TLS session ID + OFRandom rnd; + Uint32 session_id = rnd.getRND32(); + if (0 == SSL_CTX_set_session_id_context(transportLayerContext, OFreinterpret_cast(const unsigned char *, &session_id), sizeof(session_id))) { - SSL_CTX_set_tmp_dh(transportLayerContext,dhparams); - DH_free(dhparams); // safe because of reference counting + DCMTLS_ERROR("unable to set TLS session ID context."); } - else DCMTLS_ERROR("unable to create Diffie-Hellman parameters."); + + // disable session caching (and, thus, session re-use) + SSL_CTX_set_session_cache_mode(transportLayerContext, SSL_SESS_CACHE_OFF); // create Elliptic Curve DH parameters #ifndef OPENSSL_NO_ECDH -#if OPENSSL_VERSION_NUMBER < 0x10002000L || defined(LIBRESSL_VERSION_NUMBER) +#ifndef HAVE_OPENSSL_PROTOTYPE_SSL_CTX_SET_ECDH_AUTO // we create ECDH parameters for the NIST P-256 (secp256r1) curve // as recommended by BCP 195. EC_KEY *ecdh = EC_KEY_new_by_curve_name(NID_X9_62_prime256v1); @@ -323,13 +330,13 @@ { DCMTLS_ERROR("unable to create Elliptic-Curve Diffie-Hellman parameters."); } -#endif /* OPENSSL_VERSION_NUMBER < 0x10002000L */ +#endif /* HAVE_OPENSSL_PROTOTYPE_SSL_CTX_SET_ECDH_AUTO */ #endif /* OPENSSL_NO_ECDH */ // set default certificate verification strategy setCertificateVerification(DCV_requireCertificate); -#if OPENSSL_VERSION_NUMBER >= 0x10002000L && !defined(LIBRESSL_VERSION_NUMBER) +#if HAVE_OPENSSL_PROTOTYPE_SSL_CTX_SET1_SIGALGS // The TLS 1.2 Signature Algorithms extension is only supported in OpenSSL 1.0.2 and newer. if (networkRole != NET_ACCEPTOR) @@ -340,7 +347,7 @@ // support for SHA-384 and SHA-512. const int slist[] = {NID_sha256, EVP_PKEY_RSA, NID_sha384, EVP_PKEY_RSA, NID_sha512, EVP_PKEY_RSA, -#if OPENSSL_VERSION_NUMBER >= 0x10101000L +#ifdef HAVE_OPENSSL_PROTOTYPE_EVP_PKEY_RSA_PSS // Connections between a client and a server that both use OpenSSL 1.1.1 // will fail unless RSA-PSS is also offered as a signature algorithm. NID_sha256, EVP_PKEY_RSA_PSS, NID_sha384, EVP_PKEY_RSA_PSS, NID_sha512, EVP_PKEY_RSA_PSS, @@ -354,6 +361,9 @@ } } +#endif /* HAVE_OPENSSL_PROTOTYPE_SSL_CTX_SET1_SIGALGS */ + +#if HAVE_OPENSSL_PROTOTYPE_SSL_CTX_SET1_CURVES // The TLS Supported Elliptic Curves extension (RFC 4492) is only supported in OpenSSL 1.0.2 and newer. // BCP 195: Both clients and servers SHOULD include the "Supported Elliptic Curves" extension. @@ -369,7 +379,7 @@ DCMTLS_ERROR("unable to configure the TLS Supported Elliptic Curves extension."); } } -#endif /* OPENSSL_VERSION_NUMBER >= 0x10002000L */ +#endif /* HAVE_OPENSSL_PROTOTYPE_SSL_CTX_SET1_CURVES */ if (NET_REQUESTOR != networkRole) { @@ -383,10 +393,10 @@ DCMTLS_ERROR("unable to configure the TLS layer to select ciphersuites by server preference."); } } - } /* transportLayerContext != NULL */ } +// move constructor DcmTLSTransportLayer::DcmTLSTransportLayer(OFrvalue_ref(DcmTLSTransportLayer) rhs) : DcmTransportLayer(OFrvalue_ref_upcast(DcmTransportLayer, rhs)) , transportLayerContext(rhs.transportLayerContext) @@ -396,6 +406,7 @@ OFrvalue_access(rhs).transportLayerContext = NULL; } +// move assignment DcmTLSTransportLayer& DcmTLSTransportLayer::operator=(OFrvalue_ref(DcmTLSTransportLayer) rhs) { if (this != &rhs) @@ -434,11 +445,35 @@ OFBool DcmTLSTransportLayer::setTempDHParameters(const char *filename) { if ((filename==NULL)||(transportLayerContext==NULL)) return OFFalse; - DH *dh = NULL; BIO *bio = BIO_new_file(filename,"r"); if (bio) { - dh = PEM_read_bio_DHparams(bio,NULL,NULL,NULL); +#ifdef HAVE_OPENSSL_PROTOTYPE_SSL_CTX_SET0_TMP_DH_PKEY + EVP_PKEY *dh = PEM_read_bio_Parameters(bio,NULL); + BIO_free(bio); + if (dh) + { + // check BCP 195 recommendation: With a key exchange based on modular + // exponential (MODP) Diffie-Hellman groups ("DHE" cipher suites), + // DH key lengths of at least 2048 bits are RECOMMENDED. + if (EVP_PKEY_bits(dh) < 2048) + { + DCMTLS_WARN("Key length of Diffie-Hellman parameter file too short: RFC 7525 recommends at least 2048 bits, but the key in file '" + << filename << "' is only " << EVP_PKEY_bits(dh) << " bits."); + if (ciphersuites.getTLSProfile() == TSP_Profile_BCP195_Extended) + { + // Extended BCP 195 profile: Reject DH parameter set, because it has less than 2048 bits + // This will cause the default DH parameter set (which is large enough) to be used + EVP_PKEY_free(dh); + return OFFalse; + } + } + + SSL_CTX_set0_tmp_dh_pkey(transportLayerContext, dh); // transfers ownership of "dh" to transportLayerContext + return OFTrue; + } +#else + DH *dh = PEM_read_bio_DHparams(bio,NULL,NULL,NULL); BIO_free(bio); if (dh) { @@ -461,6 +496,7 @@ DH_free(dh); /* Safe because of reference counts in OpenSSL */ return OFTrue; } +#endif } return OFFalse; } @@ -511,7 +547,7 @@ return; } -DcmTransportLayerStatus DcmTLSTransportLayer::activateCipherSuites() +OFCondition DcmTLSTransportLayer::activateCipherSuites() { OFString cslist; ciphersuites.getListOfCipherSuitesForOpenSSL(cslist, (role != NET_REQUESTOR)); @@ -519,14 +555,12 @@ { if (!SSL_CTX_set_cipher_list(transportLayerContext, cslist.c_str())) { - const char *err = ERR_reason_error_string(ERR_peek_error()); - if (err) DCMTLS_ERROR("OpenSSL error: " << err); - return TCS_tlsError; + return convertOpenSSLError(ERR_get_error(), OFTrue); } SSL_CTX_set_options(transportLayerContext, ciphersuites.getTLSOptions()); -#if OPENSSL_VERSION_NUMBER >= 0x10101000L && !defined(LIBRESSL_VERSION_NUMBER) +#ifdef HAVE_OPENSSL_PROTOTYPE_SSL_CTX_SET_MAX_PROTO_VERSION // when compiling with OpenSSL 1.1.1 or newer, set the maximum supported // TLS protocol version to TLS 1.2 if required (i.e. for the historic // security profiles, which would otherwise show unexpected behaviour). @@ -535,23 +569,21 @@ SSL_CTX_set_max_proto_version(transportLayerContext, TLS1_2_VERSION); } #endif - } else return TCS_illegalCall; + } else return EC_IllegalCall; - return TCS_ok; + return EC_Normal; } -DcmTransportLayerStatus DcmTLSTransportLayer::setCipherSuites(const char *suites) +OFCondition DcmTLSTransportLayer::setCipherSuites(const char *suites) { if (transportLayerContext && suites) { if (!SSL_CTX_set_cipher_list(transportLayerContext, suites)) { - const char *err = ERR_reason_error_string(ERR_peek_error()); - if (err) DCMTLS_ERROR("OpenSSL error: " << err); - return TCS_tlsError; + return convertOpenSSLError(ERR_get_error(), OFTrue); } - } else return TCS_illegalCall; - return TCS_ok; + } else return EC_IllegalCall; + return EC_Normal; } DcmTLSTransportLayer::~DcmTLSTransportLayer() @@ -559,29 +591,29 @@ clear(); } -DcmTransportLayerStatus DcmTLSTransportLayer::setPrivateKeyFile(const char *fileName, DcmKeyFileFormat fileType) +OFCondition DcmTLSTransportLayer::setPrivateKeyFile(const char *fileName, DcmKeyFileFormat fileType) { if (transportLayerContext) { if (0 >= SSL_CTX_use_PrivateKey_file(transportLayerContext, fileName, lookupOpenSSLCertificateFormat(fileType))) { - const char *err = ERR_reason_error_string(ERR_peek_error()); - if (err) DCMTLS_ERROR("OpenSSL error: " << err); - return TCS_tlsError; + return convertOpenSSLError(ERR_get_error(), OFTrue); } - } else return TCS_illegalCall; - return TCS_ok; + } else return EC_IllegalCall; + return EC_Normal; } -DcmTransportLayerStatus DcmTLSTransportLayer::setCertificateFile(const char *fileName, DcmKeyFileFormat fileType) +OFCondition DcmTLSTransportLayer::setCertificateFile(const char *fileName, DcmKeyFileFormat fileType) { if (transportLayerContext) { + // we load the first certificate from the file and check the key length + // and hash key against RFC 7525 recommendations. int result = 0; X509 *certificate = loadCertificateFile(fileName, fileType); if (certificate) { - // TODO: Check if the certificate is RSA, and if so, if the public key is >= 2048 bits + // Check if the certificate is RSA, and if so, if the public key is >= 2048 bits int bits = getRSAKeySize(certificate); if ((bits > 0) && (bits < 2048)) { @@ -594,18 +626,29 @@ DCMTLS_WARN("Certificate hash key not SHA-256: RFC 7525 recommends the use of SHA-256 for RSA certificates, but certificate file '" << fileName << "' uses '" << hash << "'."); } - result = SSL_CTX_use_certificate(transportLayerContext, certificate); // copies certificate into context + + if (fileType == DCF_Filetype_PEM) + { + // This will load the file again, this time processing multiple certificates + // that might be present, establishing a full certificate chain. + // This function only works with PEM files. + result = SSL_CTX_use_certificate_chain_file(transportLayerContext, fileName); + } + else + { + // copy certificate into the SSL context + result = SSL_CTX_use_certificate(transportLayerContext, certificate); + } X509_free(certificate); + } else result = -1; if (result <= 0) { - const char *err = ERR_reason_error_string(ERR_peek_error()); - if (err) DCMTLS_ERROR("OpenSSL error: " << err); - return TCS_tlsError; + return convertOpenSSLError(ERR_get_error(), OFTrue); } - } else return TCS_illegalCall; - return TCS_ok; + } else return EC_IllegalCall; + return EC_Normal; } OFBool DcmTLSTransportLayer::checkPrivateKeyMatchesCertificate() @@ -617,55 +660,79 @@ return OFFalse; } -DcmTransportLayerStatus DcmTLSTransportLayer::addVerificationFlags(unsigned long flags) +OFCondition DcmTLSTransportLayer::addVerificationFlags(unsigned long flags) { X509_VERIFY_PARAM* const parameter = DCMTK_SSL_CTX_get0_param(transportLayerContext); - return parameter && X509_VERIFY_PARAM_set_flags(parameter,flags) ? TCS_ok : TCS_unspecifiedError; + return parameter && X509_VERIFY_PARAM_set_flags(parameter,flags) ? EC_Normal : DCMTLS_EC_FailedToSetVerificationMode; } -DcmTransportLayerStatus DcmTLSTransportLayer::addTrustedCertificateFile(const char *fileName, DcmKeyFileFormat fileType) +OFCondition DcmTLSTransportLayer::setCRLverification(DcmTLSCRLVerification crlmode) +{ + X509_VERIFY_PARAM* const parameter = DCMTK_SSL_CTX_get0_param(transportLayerContext); + if (parameter) + { + unsigned long flags = X509_VERIFY_PARAM_get_flags(parameter); + switch (crlmode) + { + case TCR_noCRL: + flags &= ~X509_V_FLAG_CRL_CHECK; + flags &= ~X509_V_FLAG_CRL_CHECK_ALL; + break; + case TCR_checkLeafCRL: + flags |= X509_V_FLAG_CRL_CHECK; + flags &= ~X509_V_FLAG_CRL_CHECK_ALL; + break; + case TCR_checkAllCRL: + flags |= X509_V_FLAG_CRL_CHECK; + flags |= X509_V_FLAG_CRL_CHECK_ALL; + break; + } + return X509_VERIFY_PARAM_set_flags(parameter,flags) ? EC_Normal : DCMTLS_EC_FailedToSetVerificationMode; + } + return EC_IllegalCall; +} + +OFCondition DcmTLSTransportLayer::addTrustedCertificateFile(const char *fileName, DcmKeyFileFormat fileType) { if (transportLayerContext) { X509_LOOKUP *x509_lookup = X509_STORE_add_lookup(SSL_CTX_get_cert_store(transportLayerContext), X509_LOOKUP_file()); if (x509_lookup == NULL) { - const char *err = ERR_reason_error_string(ERR_peek_error()); - if (err) DCMTLS_ERROR("OpenSSL error: " << err); - return TCS_tlsError; + return convertOpenSSLError(ERR_get_error(), OFTrue); } if (! X509_LOOKUP_load_file(x509_lookup, fileName, lookupOpenSSLCertificateFormat(fileType))) { - const char *err = ERR_reason_error_string(ERR_peek_error()); - if (err) DCMTLS_ERROR("OpenSSL error: " << err); - return TCS_tlsError; + return convertOpenSSLError(ERR_get_error(), OFTrue); } - } else return TCS_illegalCall; - return TCS_ok; + } else return EC_IllegalCall; + return EC_Normal; } -DcmTransportLayerStatus DcmTLSTransportLayer::addTrustedCertificateDir(const char *pathName, DcmKeyFileFormat fileType) +OFCondition DcmTLSTransportLayer::addCertificateRevocationList(const char *fileName, DcmKeyFileFormat fileType) +{ + // OpenSSL uses the same X509_LOOKUP_load_file() function for both certificates and CRLs + return addTrustedCertificateFile(fileName, fileType); +} + +OFCondition DcmTLSTransportLayer::addTrustedCertificateDir(const char *pathName, DcmKeyFileFormat fileType) { if (transportLayerContext) { X509_LOOKUP *x509_lookup = X509_STORE_add_lookup(SSL_CTX_get_cert_store(transportLayerContext), X509_LOOKUP_hash_dir()); if (x509_lookup == NULL) { - const char *err = ERR_reason_error_string(ERR_peek_error()); - if (err) DCMTLS_ERROR("OpenSSL error: " << err); - return TCS_tlsError; + return convertOpenSSLError(ERR_get_error(), OFTrue); } if (! X509_LOOKUP_add_dir(x509_lookup, pathName, lookupOpenSSLCertificateFormat(fileType))) { - const char *err = ERR_reason_error_string(ERR_peek_error()); - if (err) DCMTLS_ERROR("OpenSSL error: " << err); - return TCS_tlsError; + return convertOpenSSLError(ERR_get_error(), OFTrue); } - } else return TCS_illegalCall; - return TCS_ok; + } else return EC_IllegalCall; + return EC_Normal; } -DcmTransportLayerStatus DcmTLSTransportLayer::addTrustedClientCertificateFile(const char *fileName) +OFCondition DcmTLSTransportLayer::addTrustedClientCertificateFile(const char *fileName) { if (transportLayerContext) { @@ -682,8 +749,8 @@ } sk_X509_NAME_pop_free(newCaNames,X509_NAME_free); SSL_CTX_set_client_CA_list(transportLayerContext,caNames); - } else return TCS_illegalCall; - return TCS_ok; + } else return EC_IllegalCall; + return EC_Normal; } DcmTransportConnection *DcmTLSTransportLayer::createConnection(DcmNativeSocketType openSocket, OFBool useSecureLayer) @@ -721,7 +788,7 @@ #endif if (randFile) { -#ifdef HAVE_RAND_EGD +#ifdef HAVE_OPENSSL_PROTOTYPE_RAND_EGD if (RAND_egd(randFile) <= 0) #endif { @@ -823,7 +890,7 @@ } } -DcmTransportLayerStatus DcmTLSTransportLayer::setTLSProfile(DcmTLSSecurityProfile profile) +OFCondition DcmTLSTransportLayer::setTLSProfile(DcmTLSSecurityProfile profile) { return ciphersuites.setTLSProfile(profile); } @@ -833,7 +900,7 @@ ciphersuites.clearTLSProfile(); } -DcmTransportLayerStatus DcmTLSTransportLayer::addCipherSuite(const char *suite) +OFCondition DcmTLSTransportLayer::addCipherSuite(const char *suite) { return ciphersuites.addCipherSuite(suite); } @@ -926,6 +993,195 @@ return result; } +OFCondition DcmTLSTransportLayer::verifyClientCertificate(const char *fileName, DcmKeyFileFormat fileType) +{ + OFCondition result = EC_IllegalCall; + if (transportLayerContext && fileName) + { + X509_STORE *trustStore = SSL_CTX_get_cert_store(transportLayerContext); + if (trustStore) + { + + // for some reason, the SSL context and the X509_STORE within that + // context have different X509_VERIFY_PARAM parameter sets, in particular + // they have different verification flags. We copy the flags from the + // SSL context to the X509_STORE and restore the original value + // after certificate verification. + X509_VERIFY_PARAM *vparam_ssl = DCMTK_SSL_CTX_get0_param(transportLayerContext); + X509_VERIFY_PARAM *vparam_store = X509_STORE_get0_param(trustStore); + unsigned long ssl_vparam_flags = 0; + unsigned long store_vparam_flags = 0; + if (vparam_ssl) ssl_vparam_flags = X509_VERIFY_PARAM_get_flags(vparam_ssl); + if (vparam_store) + { + store_vparam_flags = X509_VERIFY_PARAM_get_flags(vparam_store); + X509_VERIFY_PARAM_set_flags(vparam_store, ssl_vparam_flags); + } + + X509_STORE_CTX *storeCtx = X509_STORE_CTX_new(); + if (storeCtx) + { + // we have a trust store and a context object for certificate verification. + // Now let's load the client certificate chain + X509 *clientCert = NULL; + STACK_OF(X509) *chain = sk_X509_new(NULL); + BIO *in=BIO_new_file(fileName, "rb"); + if (in) + { + if (fileType == DCF_Filetype_ASN1) + { + clientCert = d2i_X509_bio(in,NULL); + if (clientCert == NULL) + { + result = DCMTLS_EC_FailedToLoadCertificate(fileName); + DCMTLS_ERROR("Not a DER certificate file: '" << fileName << "'"); + } + } + else if (fileType == DCF_Filetype_PEM) + { + clientCert = PEM_read_bio_X509(in, NULL, NULL, NULL); + if (clientCert == NULL) + { + result = DCMTLS_EC_FailedToLoadCertificate(fileName); + DCMTLS_ERROR("Not a PEM certificate file: '" << fileName << "'"); + } + // in a PEM file, a certificate chain may follow after the client certificate. + X509 *chainCert = NULL; + while (NULL != (chainCert = PEM_read_bio_X509(in, NULL, NULL, NULL))) + { + sk_X509_push(chain, chainCert); + } + } + BIO_free(in); + } + else + { + result = DCMTLS_EC_FailedToLoadCertificate(fileName); + DCMTLS_ERROR("Cannot open certificate file '" << fileName << "'"); + } + if (clientCert) + { + if (X509_STORE_CTX_init(storeCtx, trustStore, clientCert, chain)) + { + if (X509_verify_cert(storeCtx)) + { + result = EC_Normal; + } + else + { + result = convertOpenSSLX509VerificationError(X509_STORE_CTX_get_error(storeCtx), OFTrue); + } + } + else + { + result = DCMTLS_EC_CertStoreCtxInitFailed; + DCMTLS_ERROR("certificate store context initialization failed"); + } + X509_free(clientCert); + } + + X509_STORE_CTX_free(storeCtx); + sk_X509_pop_free(chain, X509_free); + } + + // restore original value of X509 store flags + if (vparam_store) + { + X509_VERIFY_PARAM_set_flags(vparam_store, store_vparam_flags); + } + + } + } + return result; +} + +OFCondition DcmTLSTransportLayer::isRootCertificate(const char *fileName, DcmKeyFileFormat fileType) +{ + OFCondition result = EC_IllegalCall; + if (fileName) + { + X509_STORE *trustStore = X509_STORE_new(); + X509_STORE_CTX *storeCtx = X509_STORE_CTX_new(); + if (trustStore && storeCtx) + { + // we have a trust store and a context object for certificate verification. + // Now let's load the client certificate + X509 *clientCert = loadCertificateFile(fileName, fileType); + if (clientCert == NULL) + { + result = DCMTLS_EC_FailedToLoadCertificate(fileName); + DCMTLS_ERROR("Cannot read certificate file '" << fileName << "'"); + } + else + { + if (X509_STORE_add_cert(trustStore, clientCert)) + { + if (X509_STORE_CTX_init(storeCtx, trustStore, clientCert, NULL)) + { + if (X509_verify_cert(storeCtx)) result = EC_Normal; + else result = convertOpenSSLX509VerificationError(X509_STORE_CTX_get_error(storeCtx), OFFalse); + } else result = DCMTLS_EC_CertStoreCtxInitFailed; + } else result = DCMTLS_EC_FailedToLoadCertificate(fileName);; + } + X509_free(clientCert); + } + if (storeCtx) X509_STORE_CTX_free(storeCtx); + if (trustStore) X509_STORE_free(trustStore); + } + return result; +} + +OFCondition DcmTLSTransportLayer::convertOpenSSLError(unsigned long errorCode, OFBool logAsError) +{ + if (errorCode == 0) return EC_Normal; + + const char *err = ERR_reason_error_string(errorCode); + if (err == NULL) err = "OpenSSL error"; + + // we generate special error codes for SSL errors + if (ERR_LIB_SSL == ERR_GET_LIB(errorCode)) + { + + OFOStringStream os; + os << "TLS error: " << err; + + OFCondition cond; + OFSTRINGSTREAM_GETSTR( os, c ) + if (logAsError) DCMTLS_ERROR(c); + cond = makeOFCondition(OFM_dcmtls, DCMTLS_EC_SSL_Offset + ERR_GET_REASON(errorCode), OF_error, c); + OFSTRINGSTREAM_FREESTR( c ) + + return cond; + } + else + { + if (logAsError) DCMTLS_ERROR("OpenSSL error " << STD_NAMESPACE hex << STD_NAMESPACE setfill('0') << STD_NAMESPACE setw(8) << errorCode << ": " << err); + + // we return a generic OpenSSL error for all other OpenSSL sublibraries + return DCMTLS_EC_GenericOpenSSLError(errorCode); + } +} + +OFCondition DcmTLSTransportLayer::convertOpenSSLX509VerificationError(int errorCode, OFBool logAsError) +{ + if (errorCode == 0) return EC_Normal; + + // check if this is a known error code, map to "unspecified error" otherwise and print a warning + if (errorCode > DCMTLS_EC_X509Verify_Max) + { + DCMTLS_WARN("Unsupported OpenSSL X.509 verification error code " << errorCode << "; mapped to DCMTLS_EC_X509VerifyUnspecified."); + errorCode = X509_V_ERR_UNSPECIFIED; + } + + // retrieve error string + const char *err = X509_verify_cert_error_string(errorCode); + if (err == NULL) err = "unspecified error."; + + if (logAsError) DCMTLS_ERROR("certificate verification failed: " << err); + + return makeOFCondition(OFM_dcmtls, OFstatic_cast(Uint16, DCMTLS_EC_X509Verify_Offset + errorCode), OF_error, err); +} + void DcmTLSTransportLayer::initializeOpenSSL() { // the call to SSL_library_init was not needed in OpenSSL versions prior to 0.9.8, diff -Nru dcmtk-3.6.6/dcmtls/libsrc/tlsopt.cc dcmtk-3.6.7/dcmtls/libsrc/tlsopt.cc --- dcmtk-3.6.6/dcmtls/libsrc/tlsopt.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmtls/libsrc/tlsopt.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2017-2020, OFFIS e.V. + * Copyright (C) 2017-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -33,14 +33,14 @@ #endif // WITH_OPENSSL } -DcmTLSOptions::DcmTLSOptions(T_ASC_NetworkRole networkRole) #ifdef WITH_OPENSSL +DcmTLSOptions::DcmTLSOptions(T_ASC_NetworkRole networkRole) : opt_keyFileFormat( DCF_Filetype_PEM ) , opt_doAuthenticate( OFFalse ) , opt_privateKeyFile( OFnullptr ) , opt_certificateFile( OFnullptr ) , opt_passwd( OFnullptr ) -, opt_tlsProfile( TSP_Profile_BCP195 ) // default: BCP 195 profile +, opt_tlsProfile( TSP_Profile_BCP195_ND ) // default: BCP 195 ND profile , opt_readSeedFile( OFnullptr ) , opt_writeSeedFile( OFnullptr ) , opt_certVerification( DCV_requireCertificate ) @@ -48,6 +48,8 @@ , opt_secureConnection( OFFalse ) // default: no secure connection , opt_networkRole( networkRole ) , tLayer( OFnullptr ) +#else +DcmTLSOptions::DcmTLSOptions(T_ASC_NetworkRole /* networkRole */) #endif { } @@ -59,9 +61,9 @@ #endif } +#ifdef WITH_OPENSSL void DcmTLSOptions::addTLSCommandlineOptions(OFCommandLine& cmd) { -#ifdef WITH_OPENSSL DcmTLSCiphersuiteHandler csh; cmd.addGroup("transport layer security (TLS) options:"); @@ -87,9 +89,13 @@ "add certificate file to list of certificates"); cmd.addOption("--add-cert-dir", "+cd", 1, "[d]irectory: string", "add certificates in d to list of certificates"); + cmd.addOption("--add-crl-file", "+crl", 1, "[f]ilename: string", + "add certificate revocation list file\n(implies --enable-crl-vfy)"); + cmd.addOption("--enable-crl-vfy", "+crv", "enable leaf CRL verification"); + cmd.addOption("--enable-crl-all", "+cra", "enable full chain CRL verification"); cmd.addSubGroup("security profile:"); - cmd.addOption("--profile-bcp195", "+px", "BCP 195 TLS Profile (default)"); - cmd.addOption("--profile-bcp195-nd", "+py", "Non-downgrading BCP 195 TLS Profile"); + cmd.addOption("--profile-bcp195-nd", "+py", "Non-downgrading BCP 195 TLS Profile (default)"); + cmd.addOption("--profile-bcp195", "+px", "BCP 195 TLS Profile"); cmd.addOption("--profile-bcp195-ex", "+pz", "Extended BCP 195 TLS Profile"); if (csh.cipher3DESsupported()) { @@ -127,13 +133,16 @@ cmd.addOption("--verify-peer-cert", "-vc", "verify peer certificate if present"); } cmd.addOption("--ignore-peer-cert", "-ic", "don't verify peer certificate"); - -#endif // WITH_OPENSSL } +#else +void DcmTLSOptions::addTLSCommandlineOptions(OFCommandLine& /* cmd */) +{ +} +#endif // WITH_OPENSSL +#ifdef WITH_OPENSSL void DcmTLSOptions::parseArguments(OFConsoleApplication& app, OFCommandLine& cmd) { -#ifdef WITH_OPENSSL DcmTLSCiphersuiteHandler csh; const char *tlsopts = (opt_networkRole == NET_REQUESTOR ? @@ -275,23 +284,40 @@ app.checkDependence("--add-cert-file", tlsopts, opt_secureConnection); if (cmd.findOption("--add-cert-dir", 0, OFCommandLine::FOM_First)) app.checkDependence("--add-cert-dir", tlsopts, opt_secureConnection); + if (cmd.findOption("--add-crl-file", 0, OFCommandLine::FOM_First)) + app.checkDependence("--add-crl-file", tlsopts, opt_secureConnection); + + cmd.beginOptionBlock(); + if (cmd.findOption("--enable-crl-vfy", 0, OFCommandLine::FOM_First)) + app.checkDependence("--enable-crl-vfy", tlsopts, opt_secureConnection); + if (cmd.findOption("--enable-crl-all", 0, OFCommandLine::FOM_First)) + { + app.checkDependence("--enable-crl-all", tlsopts, opt_secureConnection); + app.checkConflict("--enable-crl-all", "--enable-crl-vfy", cmd.findOption("--enable-crl-vfy", 0, OFCommandLine::FOM_First)); + } + cmd.endOptionBlock(); + if (cmd.findOption("--cipher", 0, OFCommandLine::FOM_First)) { app.checkDependence("--cipher", tlsopts, opt_secureConnection); app.checkConflict("--cipher", "--profile-bcp195-ex", (opt_tlsProfile == TSP_Profile_BCP195_Extended)); } - -#endif } +#else +void DcmTLSOptions::parseArguments(OFConsoleApplication& /* app */, OFCommandLine& /* cmd */) +{ +} +#endif +#ifdef WITH_OPENSSL OFCondition DcmTLSOptions::createTransportLayer( T_ASC_Network *net, T_ASC_Parameters *params, OFConsoleApplication& app, OFCommandLine& cmd) { + DcmTLSCRLVerification crlmode = TCR_noCRL; -#ifdef WITH_OPENSSL if (opt_secureConnection) { delete tLayer; @@ -304,7 +330,7 @@ do { app.checkValue(cmd.getValue(current)); - if (TCS_ok != tLayer->addTrustedCertificateFile(current, opt_keyFileFormat)) + if (tLayer->addTrustedCertificateFile(current, opt_keyFileFormat).bad()) { DCMTLS_WARN("unable to load certificate file '" << current << "', ignoring"); } @@ -317,30 +343,56 @@ do { app.checkValue(cmd.getValue(current)); - if (TCS_ok != tLayer->addTrustedCertificateDir(current, opt_keyFileFormat)) + if (tLayer->addTrustedCertificateDir(current, opt_keyFileFormat).bad()) { DCMTLS_WARN("unable to load certificates from directory '" << current << "', ignoring"); } } while (cmd.findOption("--add-cert-dir", 0, OFCommandLine::FOM_Next)); } + if (cmd.findOption("--add-crl-file", 0, OFCommandLine::FOM_First)) + { + const char *current = NULL; + do + { + app.checkValue(cmd.getValue(current)); + if (tLayer->addCertificateRevocationList(current, opt_keyFileFormat).bad()) + { + DCMTLS_WARN("unable to load CRL file '" << current << "', ignoring"); + } + crlmode = TCR_checkLeafCRL; + } while (cmd.findOption("--add-crl-file", 0, OFCommandLine::FOM_Next)); + } + + // set CRL verification mode + if (cmd.findOption( "--enable-crl-vfy" )) crlmode = TCR_checkLeafCRL; + if (cmd.findOption( "--enable-crl-all" )) crlmode = TCR_checkAllCRL; + tLayer->setCRLverification(crlmode); + + OFCondition cond; if (opt_doAuthenticate) { if (opt_passwd) tLayer->setPrivateKeyPasswd(opt_passwd); else tLayer->setPrivateKeyPasswdFromConsole(); - if (TCS_ok != tLayer->setPrivateKeyFile(opt_privateKeyFile, opt_keyFileFormat)) - return DCMTLS_EC_FailedToLoadPrivateKey( opt_privateKeyFile ); - if (TCS_ok != tLayer->setCertificateFile(opt_certificateFile, opt_keyFileFormat)) - return DCMTLS_EC_FailedToLoadCertificate( opt_certificateFile ); + cond = tLayer->setPrivateKeyFile(opt_privateKeyFile, opt_keyFileFormat); + + // replace the low-level error message with an easier to understand one + if (cond.bad()) return DCMTLS_EC_FailedToLoadPrivateKey( opt_privateKeyFile ); + + cond = tLayer->setCertificateFile(opt_certificateFile, opt_keyFileFormat); + + // replace the low-level error message with an easier to understand one + if (cond.bad()) DCMTLS_EC_FailedToLoadCertificate( opt_certificateFile ); + if (! tLayer->checkPrivateKeyMatchesCertificate()) return DCMTLS_EC_MismatchedPrivateKeyAndCertificate( opt_privateKeyFile, opt_certificateFile ); } // set TLS profile - if (TCS_ok != tLayer->setTLSProfile(opt_tlsProfile)) - return DCMTLS_EC_FailedToSetCiphersuites; + cond = tLayer->setTLSProfile(opt_tlsProfile); + if (cond.bad()) return cond; // add additional ciphersuites if (cmd.findOption("--cipher", 0, OFCommandLine::FOM_First)) @@ -349,13 +401,13 @@ do { app.checkValue(cmd.getValue(current)); - if (TCS_ok != tLayer->addCipherSuite(current)) - return DCMTLS_EC_UnknownCiphersuite( current ); + cond = tLayer->addCipherSuite(current); + if (cond.bad()) return cond; } while (cmd.findOption("--cipher", 0, OFCommandLine::FOM_Next)); } - if (TCS_ok != tLayer->activateCipherSuites()) - return DCMTLS_EC_FailedToSetCiphersuites; + cond = tLayer->activateCipherSuites(); + if (cond.bad()) return cond; // Loading of DH parameters should happen after the call to setTLSProfile() // because otherwise we cannot check profile specific restrictions @@ -366,38 +418,55 @@ if (net) { - OFCondition cond = ASC_setTransportLayer(net, tLayer, 0); + cond = ASC_setTransportLayer(net, tLayer, 0); if (cond.bad()) return cond; } if (params) { - OFCondition cond2 = ASC_setTransportLayerType(params, opt_secureConnection); - if (cond2.bad()) return cond2; + cond = ASC_setTransportLayerType(params, opt_secureConnection); + if (cond.bad()) return cond; } } - -#endif // WITH_OPENSSL return EC_Normal; } +#else +OFCondition DcmTLSOptions::createTransportLayer( + T_ASC_Network * /* net */, + T_ASC_Parameters * /* params */, + OFConsoleApplication& /* app */, + OFCommandLine& /* cmd */) +{ + return EC_Normal; +} +#endif +#ifdef WITH_OPENSSL OFBool DcmTLSOptions::listOfCiphersRequested(OFCommandLine& cmd) { -#ifdef WITH_OPENSSL if (cmd.findOption("--list-ciphers")) return OFTrue; -#endif return OFFalse; } +#else +OFBool DcmTLSOptions::listOfCiphersRequested(OFCommandLine& /* cmd */) +{ + return OFFalse; +} +#endif +#ifdef WITH_OPENSSL void DcmTLSOptions::printSupportedCiphersuites(OFConsoleApplication& app, STD_NAMESPACE ostream& os) { -#ifdef WITH_OPENSSL DcmTLSCiphersuiteHandler csh; app.printHeader(OFTrue /*print host identifier*/); os << OFendl << "Supported TLS ciphersuites are:" << OFendl; csh.printSupportedCiphersuites(os); -#endif } +#else +void DcmTLSOptions::printSupportedCiphersuites(OFConsoleApplication& /* app */, STD_NAMESPACE ostream& /* os */) +{ +} +#endif OFBool DcmTLSOptions::secureConnectionRequested() const { @@ -427,8 +496,33 @@ if( ! tLayer->writeRandomSeed( opt_writeSeedFile ) ) return DCMTLS_EC_FailedToWriteRandomSeedFile( opt_writeSeedFile ); } - else return DCMTLS_EC_FailedToWriteRandomSeedFile; + else return DCMTLS_EC_FailedToWriteRandomSeedFile( opt_writeSeedFile ); } #endif return EC_Normal; } + +#ifdef WITH_OPENSSL +OFCondition DcmTLSOptions::verifyClientCertificate(const char *fileName) +{ + if (tLayer) return tLayer->verifyClientCertificate(fileName, opt_keyFileFormat); + return EC_IllegalCall; +} +#else +OFCondition DcmTLSOptions::verifyClientCertificate(const char * /* fileName */) +{ + return EC_IllegalCall; +} +#endif + +#ifdef WITH_OPENSSL +OFCondition DcmTLSOptions::isRootCertificate(const char *fileName) +{ + return DcmTLSTransportLayer::isRootCertificate(fileName, opt_keyFileFormat); +} +#else +OFCondition DcmTLSOptions::isRootCertificate(const char * /* fileName */) +{ + return EC_IllegalCall; +} +#endif diff -Nru dcmtk-3.6.6/dcmtls/libsrc/tlsscu.cc dcmtk-3.6.7/dcmtls/libsrc/tlsscu.cc --- dcmtk-3.6.6/dcmtls/libsrc/tlsscu.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmtls/libsrc/tlsscu.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2010-2019, OFFIS e.V. + * Copyright (C) 2010-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -25,6 +25,7 @@ #ifdef WITH_OPENSSL #include "dcmtk/dcmtls/tlsscu.h" #include "dcmtk/dcmnet/diutil.h" /* for dcmnet logger */ +#include "dcmtk/dcmtls/tlscond.h" /* for error constants */ BEGIN_EXTERN_C #include @@ -97,14 +98,14 @@ OFListIterator(OFString) certFile = m_trustedCertFiles.begin(); while (certFile != m_trustedCertFiles.end()) { - if (TCS_ok != m_tLayer->addTrustedCertificateFile( (*certFile).c_str(), m_certKeyFileFormat)) + if (m_tLayer->addTrustedCertificateFile( (*certFile).c_str(), m_certKeyFileFormat).bad()) DCMNET_WARN("Unable to load certificate file '" << *certFile << "', ignoring"); certFile++; } OFListIterator(OFString) certDir = m_trustedCertDirs.begin(); while (certDir != m_trustedCertDirs.end()) { - if (TCS_ok != m_tLayer->addTrustedCertificateDir( (*certDir).c_str(), m_certKeyFileFormat)) + if (m_tLayer->addTrustedCertificateDir( (*certDir).c_str(), m_certKeyFileFormat).bad()) DCMNET_WARN("Unable to load certificates from directory '" << *certDir<< "', ignoring"); } @@ -117,22 +118,22 @@ if (m_passwd) m_tLayer->setPrivateKeyPasswd(m_passwd); // Set file that contains the private key - if ( cond.good() && (TCS_ok != m_tLayer->setPrivateKeyFile(m_privateKeyFile.c_str(), m_privateKeyFileFormat)) ) + if (cond.good()) cond = m_tLayer->setPrivateKeyFile(m_privateKeyFile.c_str(), m_privateKeyFileFormat); + if (cond.bad()) { DCMTLS_ERROR("Unable to create TLS transport layer for SCP: Unable to load private TLS key from file " << m_privateKeyFile); - cond = EC_IllegalCall; // TODO: need to find better error code } // Set file that contains host certificate - if ( cond.good() && (TCS_ok != m_tLayer->setCertificateFile(m_certificateFile.c_str(), m_certKeyFileFormat)) ) + if (cond.good()) cond = m_tLayer->setCertificateFile(m_certificateFile.c_str(), m_certKeyFileFormat); + if (cond.bad()) { DCMTLS_ERROR("Unable to load SCP certificate from file " << m_certificateFile); - cond = EC_IllegalCall; // TODO: need to find better error code } // Set whether private key fits with certificate if (! m_tLayer->checkPrivateKeyMatchesCertificate() && cond.good()) { DCMTLS_ERROR("Private key from file " << m_privateKeyFile << " and certificate from file " << m_certificateFile << " do not match"); - cond = EC_IllegalCall; // TODO: need to find better error code + cond = DCMTLS_EC_MismatchedPrivateKeyAndCertificate( m_privateKeyFile.c_str(), m_certificateFile.c_str() ); } } @@ -249,20 +250,20 @@ m_doAuthenticate = OFFalse; } -DcmTransportLayerStatus DcmTLSSCU::addCipherSuite(const OFString& suite) +OFCondition DcmTLSSCU::addCipherSuite(const OFString& suite) { if (m_tLayer) return m_tLayer->addCipherSuite(suite.c_str()); - else return TCS_illegalCall; + else return EC_IllegalCall; } -DcmTransportLayerStatus DcmTLSSCU::setTLSProfile(DcmTLSSecurityProfile profile) +OFCondition DcmTLSSCU::setTLSProfile(DcmTLSSecurityProfile profile) { if (m_tLayer) { m_tLayer->setTLSProfile(profile); - return TCS_ok; - } else return TCS_illegalCall; + return EC_Normal; + } else return EC_IllegalCall; } void DcmTLSSCU::setReadSeedFile(const OFString& seedFile) diff -Nru dcmtk-3.6.6/dcmtls/libsrc/tlstrans.cc dcmtk-3.6.7/dcmtls/libsrc/tlstrans.cc --- dcmtk-3.6.6/dcmtls/libsrc/tlstrans.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmtls/libsrc/tlstrans.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1998-2018, OFFIS e.V. + * Copyright (C) 1998-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -29,13 +29,6 @@ #include #endif -#define INCLUDE_CSTDLIB -#define INCLUDE_CSTDIO -#define INCLUDE_CSTRING -#define INCLUDE_CERRNO -#define INCLUDE_CSIGNAL -#define INCLUDE_CTIME -#include "dcmtk/ofstd/ofstdinc.h" BEGIN_EXTERN_C #ifdef HAVE_SYS_TIME_H @@ -60,12 +53,74 @@ #include "dcmtk/dcmtls/tlslayer.h" #include "dcmtk/dcmnet/dcompat.h" /* to make sure we have a select prototype */ #include "dcmtk/dcmnet/diutil.h" +#include "dcmtk/dcmtls/tlscond.h" + +static OFCondition convertSSLError(int sslError) +{ + unsigned long e; + switch (sslError) + { + case SSL_ERROR_NONE: + return EC_Normal; + break; + case SSL_ERROR_SYSCALL: + // there may or may not be an error code in the error queue. + // If there is an error, report it; otherwise report a generic OpenSSL I/O error. + e = ERR_get_error(); + if (e == 0) + return DCMTLS_EC_OpenSSLIOError; + else return DcmTLSTransportLayer::convertOpenSSLError(e, OFFalse); + break; + case SSL_ERROR_SSL: + return DcmTLSTransportLayer::convertOpenSSLError(ERR_get_error(), OFFalse); + break; + case SSL_ERROR_WANT_READ: + return DCMTLS_EC_TLSReadOperationDidNotComplete; + break; + case SSL_ERROR_WANT_WRITE: + return DCMTLS_EC_TLSWriteOperationDidNotComplete; + break; + case SSL_ERROR_WANT_X509_LOOKUP: + return DCMTLS_EC_TLSX509LookupOperationDidNotComplete; + break; + case SSL_ERROR_ZERO_RETURN: + return DCMTLS_EC_TLSConnectionClosedByPeer; + break; + case SSL_ERROR_WANT_CONNECT: + return DCMTLS_EC_TLSConnectOperationDidNotComplete; + break; + case SSL_ERROR_WANT_ACCEPT: + return DCMTLS_EC_TLSAcceptOperationDidNotComplete; + break; + +#ifdef HAVE_OPENSSL_PROTOTYPE_SSL_ERROR_WANT_ASYNC + // SSL_ERROR_WANT_ASYNC is defined starting with OpenSSL 1.1.0 + case SSL_ERROR_WANT_ASYNC: + return DCMTLS_EC_TLSAsyncOperationDidNotComplete; + break; +#endif + +#ifdef HAVE_OPENSSL_PROTOTYPE_SSL_ERROR_WANT_ASYNC_JOB + // SSL_ERROR_WANT_ASYNC_JOB is defined starting with OpenSSL 1.1.0 + case SSL_ERROR_WANT_ASYNC_JOB: + return DCMTLS_EC_TLSAsyncJobCouldNotBeStarted; + break; +#endif + +#if HAVE_OPENSSL_PROTOTYPE_SSL_ERROR_WANT_CLIENT_HELLO_CB + // SSL_ERROR_WANT_CLIENT_HELLO_CB is defined starting with OpenSSL 1.1.1 + case SSL_ERROR_WANT_CLIENT_HELLO_CB: + return DCMTLS_EC_TLSClientHelloCallbackNeeded; + break; +#endif + } + return DCMTLS_EC_OtherSSLError; +} DcmTLSConnection::DcmTLSConnection(DcmNativeSocketType openSocket, SSL *newTLSConnection) : DcmTransportConnection(openSocket) , tlsConnection(newTLSConnection) -, lastError(0) { } @@ -74,116 +129,39 @@ close(); } -DcmTransportLayerStatus DcmTLSConnection::serverSideHandshake() +OFCondition DcmTLSConnection::serverSideHandshake() { - if (tlsConnection == NULL) return TCS_noConnection; - DcmTransportLayerStatus result = TCS_ok; - lastError = 0; - switch (SSL_get_error(tlsConnection, SSL_accept(tlsConnection))) - { - case SSL_ERROR_NONE: - /* success */ - logTLSConnection(); - break; - case SSL_ERROR_SYSCALL: - case SSL_ERROR_SSL: - lastError = ERR_peek_error(); - result = TCS_tlsError; - break; - default: - // case SSL_ERROR_WANT_READ: - // case SSL_ERROR_WANT_WRITE: - // case SSL_ERROR_WANT_X509_LOOKUP: - // case SSL_ERROR_WANT_CONNECT: - // case SSL_ERROR_ZERO_RETURN: - result = TCS_tlsError; - break; - } + if (tlsConnection == NULL) return DCMTLS_EC_NoTLSTransportConnectionPresent; + int result = SSL_get_error(tlsConnection, SSL_accept(tlsConnection)); // if the certificate verification has failed, the certificate is already // unavailable at this point. We know that something has gone wrong, but // OpenSSL does not tell us who tried to connect. + if (result == SSL_ERROR_NONE) logTLSConnection(); - return result; + return convertSSLError(result); } -DcmTransportLayerStatus DcmTLSConnection::clientSideHandshake() +OFCondition DcmTLSConnection::clientSideHandshake() { DCMTLS_TRACE("Starting TLS client handshake"); - if (tlsConnection == NULL) return TCS_noConnection; - lastError = 0; - DcmTransportLayerStatus result = TCS_ok; - switch (SSL_get_error(tlsConnection, SSL_connect(tlsConnection))) - { - case SSL_ERROR_NONE: - logTLSConnection(); - /* success */ - break; - case SSL_ERROR_SYSCALL: - case SSL_ERROR_SSL: - lastError = ERR_peek_error(); - result = TCS_tlsError; - break; - default: - // case SSL_ERROR_WANT_READ: - // case SSL_ERROR_WANT_WRITE: - // case SSL_ERROR_WANT_X509_LOOKUP: - // case SSL_ERROR_WANT_CONNECT: - // case SSL_ERROR_ZERO_RETURN: - result = TCS_tlsError; - break; - } - return result; + if (tlsConnection == NULL) return DCMTLS_EC_NoTLSTransportConnectionPresent; + int result = SSL_get_error(tlsConnection, SSL_connect(tlsConnection)); + if (result == SSL_ERROR_NONE) logTLSConnection(); + + return convertSSLError(result); } -DcmTransportLayerStatus DcmTLSConnection::renegotiate(const char *newSuite) +OFCondition DcmTLSConnection::renegotiate(const char *newSuite) { - if (tlsConnection == NULL) return TCS_noConnection; - if (newSuite == NULL) return TCS_illegalCall; - DcmTransportLayerStatus result = TCS_ok; - - switch (SSL_get_error(tlsConnection, SSL_set_cipher_list(tlsConnection, newSuite))) - { - case SSL_ERROR_NONE: - /* success */ - break; - case SSL_ERROR_SYSCALL: - case SSL_ERROR_SSL: - lastError = ERR_peek_error(); - result = TCS_tlsError; - break; - default: - // case SSL_ERROR_WANT_READ: - // case SSL_ERROR_WANT_WRITE: - // case SSL_ERROR_WANT_X509_LOOKUP: - // case SSL_ERROR_WANT_CONNECT: - // case SSL_ERROR_ZERO_RETURN: - result = TCS_tlsError; - break; - } - if (result != TCS_ok) return result; + if (tlsConnection == NULL) return DCMTLS_EC_NoTLSTransportConnectionPresent; + if (newSuite == NULL) return EC_IllegalCall; - switch (SSL_get_error(tlsConnection, SSL_renegotiate(tlsConnection))) - { - case SSL_ERROR_NONE: - /* success */ - break; - case SSL_ERROR_SYSCALL: - case SSL_ERROR_SSL: - lastError = ERR_peek_error(); - result = TCS_tlsError; - break; - default: - // case SSL_ERROR_WANT_READ: - // case SSL_ERROR_WANT_WRITE: - // case SSL_ERROR_WANT_X509_LOOKUP: - // case SSL_ERROR_WANT_CONNECT: - // case SSL_ERROR_ZERO_RETURN: - result = TCS_tlsError; - break; - } + int result = SSL_get_error(tlsConnection, SSL_set_cipher_list(tlsConnection, newSuite)); + if (result != SSL_ERROR_NONE) return convertSSLError(result); - return result; + result = SSL_get_error(tlsConnection, SSL_renegotiate(tlsConnection)); + return convertSSLError(result); } ssize_t DcmTLSConnection::read(void *buf, size_t nbyte) @@ -208,15 +186,21 @@ SSL_free(tlsConnection); tlsConnection = NULL; } - if (getSocket()!=-1) + closeTransportConnection(); +} + +void DcmTLSConnection::closeTransportConnection() +{ + if (getSocket() != -1) { #ifdef HAVE_WINSOCK_H - (void) shutdown(getSocket(), 1 /* SD_SEND */); + (void) shutdown(getSocket(), 1 /* SD_SEND */); (void) closesocket(getSocket()); #else (void) ::close(getSocket()); #endif - setSocket(-1); + /* forget about this socket (now closed) */ + setSocket(OFstatic_cast(DcmNativeSocketType, (-1))); } } @@ -337,34 +321,6 @@ return str; } -const char *DcmTLSConnection::errorString(DcmTransportLayerStatus code) -{ - switch (code) - { - case TCS_ok: - return "no error"; - /* break; */ - case TCS_noConnection: - return "no secure connection in place"; - /* break; */ - case TCS_tlsError: - if (lastError) - { - const char *result = ERR_reason_error_string(lastError); - if (result) return result; - } - return "unspecified TLS error"; - /* break; */ - case TCS_illegalCall: - return "illegal call"; - /* break; */ - case TCS_unspecifiedError: - return "unspecified error"; - /* break; */ - } - return "unknown error code"; -} - void DcmTLSConnection::logTLSConnection() { OFString s; diff -Nru dcmtk-3.6.6/dcmtls/tests/CMakeLists.txt dcmtk-3.6.7/dcmtls/tests/CMakeLists.txt --- dcmtk-3.6.6/dcmtls/tests/CMakeLists.txt 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmtls/tests/CMakeLists.txt 2022-04-28 13:47:25.000000000 +0000 @@ -1,5 +1,5 @@ # declare executables -DCMTK_ADD_EXECUTABLE(dcmtls_tests tests tscuscptls) +DCMTK_ADD_EXECUTABLE(dcmtls_tests tests.cc tscuscptls.cc) # make sure executables are linked to the corresponding libraries DCMTK_TARGET_LINK_MODULES(dcmtls_tests dcmnet dcmtls) diff -Nru dcmtk-3.6.6/dcmtls/tests/tscuscptls.cc dcmtk-3.6.7/dcmtls/tests/tscuscptls.cc --- dcmtk-3.6.6/dcmtls/tests/tscuscptls.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmtls/tests/tscuscptls.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2019-2020, OFFIS e.V. + * Copyright (C) 2019-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -17,25 +17,31 @@ * * Purpose: TLS test for classes DcmSCP and DcmSCPPool * - * Note: This test will fail after 2029-02-25 due to certificate expiry. + * Note: This test will fail after 2029-02-25 due to certificate expiry. * The keys embedded in this file should be replaced then (see below). * */ #include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ -#define INCLUDE_CMATH -#include "dcmtk/ofstd/ofstdinc.h" #include "dcmtk/ofstd/oftest.h" #include "dcmtk/ofstd/oftimer.h" +#include "dcmtk/ofstd/ofrand.h" #include "dcmtk/oflog/consap.h" #include "dcmtk/dcmnet/scp.h" #include "dcmtk/dcmnet/scu.h" #include "dcmtk/dcmnet/scppool.h" #include "dcmtk/dcmnet/dcmlayer.h" #include "dcmtk/dcmtls/tlsscu.h" +#include #ifdef WITH_THREADS +#ifdef WITH_OPENSSL + +#define BAILOUT(msg) do { \ + OFCHECK_FAIL(msg); \ + return; \ +} while (0) /** Method that ensures that the current thread is actually sleeping for the * defined number of seconds (at least). @@ -72,7 +78,8 @@ DcmSCP(), m_listen_result(EC_NotYetImplemented), // value indicating "not set" m_set_stop_after_assoc(OFFalse), - m_set_stop_after_timeout(OFFalse) + m_set_stop_after_timeout(OFFalse), + m_is_running(OFFalse) { } @@ -83,6 +90,7 @@ m_listen_result = EC_NotYetImplemented; m_set_stop_after_assoc = OFFalse; m_set_stop_after_timeout = OFFalse; + m_is_running = OFFalse; } /** Overwrite method from DcmSCP in order to test feature to stop after current @@ -109,12 +117,16 @@ OFBool m_set_stop_after_assoc; /// If set, the SCP should stop after TCP timeout occurred in non-blocking mode OFBool m_set_stop_after_timeout; + /// indicates whether the thread is currently running + volatile OFBool m_is_running; /** Method called by OFThread to start SCP operation. Starts listen() loop of DcmSCP. */ virtual void run() { + m_is_running = OFTrue; m_listen_result = listen(); + m_is_running = OFFalse; } }; @@ -123,18 +135,27 @@ struct TestPool : DcmSCPPool<>, OFThread { - OFCondition result; + OFCondition m_listen_result; + volatile OFBool m_is_running; + + TestPool() + : DcmSCPPool<>() + , OFThread() + , m_listen_result(EC_NotYetImplemented) + , m_is_running(OFFalse) + { } + protected: void run() { - result = listen(); + m_is_running = OFTrue; + m_listen_result = listen(); + m_is_running = OFFalse; } }; // -------------- End of class TestPool ------------------------- -#ifdef WITH_OPENSSL - struct TestTLSSCU : DcmTLSSCU, OFThread { OFCondition result; @@ -289,20 +310,20 @@ initLogs(); /// Init scp tls layer - DcmTransportLayerStatus result; + OFCondition result; DcmTLSTransportLayer scpTlsLayer(NET_ACCEPTOR, NULL, OFTrue); scpTlsLayer.setPrivateKeyPasswd(PRIVATE_KEY_PWD); result = scpTlsLayer.setPrivateKeyFile(PRIVATE_KEY_FILENAME, DCF_Filetype_PEM); - OFCHECK(result == TCS_ok); + OFCHECK(result.good()); result = scpTlsLayer.setCertificateFile(PUBLIC_SELFSIGNED_CERT_FILENAME, DCF_Filetype_PEM); - OFCHECK(result == TCS_ok); + OFCHECK(result.good()); OFCHECK(scpTlsLayer.checkPrivateKeyMatchesCertificate()); scpTlsLayer.setCertificateVerification(DCV_ignoreCertificate); /// Init and run Scp server with tls + OFRandom rnd; TestSCP scp; DcmSCPConfig& config = scp.getConfig(); - config.setPort(11112); config.setAETitle("ACCEPTOR"); config.setACSETimeout(30); config.setConnectionTimeout(1); @@ -315,10 +336,24 @@ OFCHECK(config.addPresentationContext(UID_VerificationSOPClass, xfers, ASC_SC_ROLE_SCP).good()); config.setTransportLayer(&scpTlsLayer); - scp.start(); // Ensure server is up and listening - force_sleep(1); + int i = 0; + Uint16 port_number = 0; + OFMutex memory_barrier; + do + { + // generate a random port number between 61440 (0xF000) and 65535 + port_number = 0xF000 + (rnd.getRND16() & 0xFFF); + config.setPort(port_number); + scp.start(); + force_sleep(2); // wait 2 seconds for the SCP process to start + memory_barrier.lock(); + memory_barrier.unlock(); + } + while ((i++ < 5) && (! scp.m_is_running)); // try up to 5 port numbers before giving up + + if (! scp.m_is_running) BAILOUT("Start of the SCP thread failed: " << scp.m_listen_result.text()); // Configure SCU and run it against SCP DcmTLSSCU scu; @@ -329,7 +364,7 @@ scu.setPeerAETitle("ACCEPTOR"); scu.setAETitle("REQUESTOR"); scu.setPeerHostName("localhost"); - scu.setPeerPort(11112); + scu.setPeerPort(port_number); scu.enableAuthentication(PRIVATE_KEY_FILENAME, PUBLIC_SELFSIGNED_CERT_FILENAME, PRIVATE_KEY_PWD, DCF_Filetype_PEM, DCF_Filetype_PEM); scu.setPeerCertVerification(DCV_ignoreCertificate); @@ -357,20 +392,20 @@ initLogs(); /// Init scp tls layer - DcmTransportLayerStatus result; + OFCondition result; DcmTLSTransportLayer scpTlsLayer(NET_ACCEPTOR, NULL, OFTrue); scpTlsLayer.setPrivateKeyPasswd(PRIVATE_KEY_PWD); result = scpTlsLayer.setPrivateKeyFile(PRIVATE_KEY_FILENAME, DCF_Filetype_PEM); - OFCHECK(result == TCS_ok); + OFCHECK(result.good()); result = scpTlsLayer.setCertificateFile(PUBLIC_SELFSIGNED_CERT_FILENAME, DCF_Filetype_PEM); - OFCHECK(result == TCS_ok); + OFCHECK(result.good()); OFCHECK(scpTlsLayer.checkPrivateKeyMatchesCertificate()); scpTlsLayer.setCertificateVerification(DCV_ignoreCertificate); /// Init and run Scp server with tls + OFRandom rnd; TestPool pool; DcmSCPConfig& config = pool.getConfig(); - config.setPort(11112); config.setAETitle("ACCEPTOR"); config.setACSETimeout(30); config.setConnectionTimeout(1); @@ -383,10 +418,23 @@ OFCHECK(config.addPresentationContext(UID_VerificationSOPClass, xfers, ASC_SC_ROLE_DEFAULT).good()); config.setTransportLayer(&scpTlsLayer); pool.setMaxThreads(20); - pool.start(); // Ensure server is up and listening - force_sleep(1); + int i = 0; + Uint16 port_number = 0; + OFMutex memory_barrier; + do + { + // generate a random port number between 61440 (0xF000) and 65535 + port_number = 0xF000 + (rnd.getRND16() & 0xFFF); + config.setPort(port_number); + pool.start(); + force_sleep(2); // wait 2 seconds for the SCP process to start + memory_barrier.lock(); + memory_barrier.unlock(); + } + while ((i++ < 5) && (! pool.m_is_running)); // try up to 5 port numbers before giving up + if (! pool.m_is_running) BAILOUT("Start of the SCP thread ppol failed: " << pool.m_listen_result.text()); OFVector scus(20); OFVector scuTlsLayers; @@ -400,7 +448,7 @@ (*it1)->setPeerAETitle("ACCEPTOR"); (*it1)->setAETitle("REQUESTOR"); (*it1)->setPeerHostName("localhost"); - (*it1)->setPeerPort(11112); + (*it1)->setPeerPort(port_number); (*it1)->enableAuthentication(PRIVATE_KEY_FILENAME, PUBLIC_SELFSIGNED_CERT_FILENAME, PRIVATE_KEY_PWD, DCF_Filetype_PEM, DCF_Filetype_PEM); (*it1)->setPeerCertVerification(DCV_ignoreCertificate); diff -Nru dcmtk-3.6.6/dcmtract/libsrc/CMakeLists.txt dcmtk-3.6.7/dcmtract/libsrc/CMakeLists.txt --- dcmtk-3.6.6/dcmtract/libsrc/CMakeLists.txt 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmtract/libsrc/CMakeLists.txt 2022-04-28 13:47:25.000000000 +0000 @@ -1,4 +1,12 @@ # create library from source files -DCMTK_ADD_LIBRARY(dcmtract trctypes trctrackset trctrack trcmeasurement trcstatistic trcmodtractresults trctractographyresults) +DCMTK_ADD_LIBRARY(dcmtract + trctypes.cc + trctrackset.cc + trctrack.cc + trcmeasurement.cc + trcstatistic.cc + trcmodtractresults.cc + trctractographyresults.cc +) DCMTK_TARGET_LINK_MODULES(dcmtract dcmiod dcmdata ofstd oflog) diff -Nru dcmtk-3.6.6/dcmwlm/apps/CMakeLists.txt dcmtk-3.6.7/dcmwlm/apps/CMakeLists.txt --- dcmtk-3.6.6/dcmwlm/apps/CMakeLists.txt 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmwlm/apps/CMakeLists.txt 2022-04-28 13:47:25.000000000 +0000 @@ -2,7 +2,7 @@ include_directories("${dcmtls_SOURCE_DIR}/include") # declare executables -DCMTK_ADD_EXECUTABLE(wlmscpfs wlmscpfs wlcefs) +DCMTK_ADD_EXECUTABLE(wlmscpfs wlmscpfs.cc wlcefs.cc) # make sure executables are linked to the corresponding libraries DCMTK_TARGET_LINK_MODULES(wlmscpfs dcmwlm dcmnet dcmtls dcmdata oflog ofstd) diff -Nru dcmtk-3.6.6/dcmwlm/apps/Makefile.dep dcmtk-3.6.7/dcmwlm/apps/Makefile.dep --- dcmtk-3.6.6/dcmwlm/apps/Makefile.dep 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmwlm/apps/Makefile.dep 2022-04-28 13:47:25.000000000 +0000 @@ -1,9 +1,9 @@ wlcefs.o: wlcefs.cc ../../config/include/dcmtk/config/osconfig.h \ ../../dcmnet/include/dcmtk/dcmnet/dicom.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../dcmnet/include/dcmtk/dcmnet/cond.h \ ../../ofstd/include/dcmtk/ofstd/ofconsol.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ @@ -15,7 +15,6 @@ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../../dcmnet/include/dcmtk/dcmnet/dndefine.h \ ../../dcmnet/include/dcmtk/dcmnet/dcompat.h \ - ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \ ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \ ../../oflog/include/dcmtk/oflog/oflog.h \ ../../oflog/include/dcmtk/oflog/logger.h \ @@ -87,10 +86,10 @@ ../../dcmdata/include/dcmtk/dcmdata/dcostrma.h wlcefs.h wlmscpfs.o: wlmscpfs.cc ../../config/include/dcmtk/config/osconfig.h \ ../../dcmnet/include/dcmtk/dcmnet/dicom.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../dcmnet/include/dcmtk/dcmnet/cond.h \ ../../ofstd/include/dcmtk/ofstd/ofconsol.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ @@ -102,7 +101,6 @@ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../../dcmnet/include/dcmtk/dcmnet/dndefine.h \ ../../dcmnet/include/dcmtk/dcmnet/dcompat.h \ - ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \ ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \ ../../oflog/include/dcmtk/oflog/oflog.h \ ../../oflog/include/dcmtk/oflog/logger.h \ diff -Nru dcmtk-3.6.6/dcmwlm/docs/wlmscpfs.man dcmtk-3.6.7/dcmwlm/docs/wlmscpfs.man --- dcmtk-3.6.6/dcmwlm/docs/wlmscpfs.man 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmwlm/docs/wlmscpfs.man 2022-04-28 13:47:25.000000000 +0000 @@ -263,7 +263,7 @@ This should work as a default for most applications that would like to use request files and want to ensure unique file names. If it is desired to change this naming scheme, the option \e --request-file-format can be used. It -permits to specify the file naming pattern used by \e --request-file-path. +permits one to specify the file naming pattern used by \e --request-file-path. For flexibility, the following placeholders can be used in the pattern provided for \e --request-file-format: @@ -513,6 +513,6 @@ \section wlmscpfs_copyright COPYRIGHT -Copyright (C) 1996-2020 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany. +Copyright (C) 1996-2022 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany. */ diff -Nru dcmtk-3.6.6/dcmwlm/include/dcmtk/dcmwlm/wlds.h dcmtk-3.6.7/dcmwlm/include/dcmtk/dcmwlm/wlds.h --- dcmtk-3.6.6/dcmwlm/include/dcmtk/dcmwlm/wlds.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmwlm/include/dcmtk/dcmwlm/wlds.h 2022-04-28 13:47:25.000000000 +0000 @@ -452,9 +452,13 @@ virtual void SetDatabaseType( WlmDatabaseType /*value*/ ) {} /** Set value in a member variable in a derived class. - * @param int The value to set. + * @param value The value to set. */ - virtual void SetSerialNumber( const int /*value*/ ) {} +#ifdef DOXYGEN + virtual void SetSerialNumber( const int value ) { } +#else + virtual void SetSerialNumber( const int /* value */ ) { } +#endif /** Set value in a member variable in a derived class. * @param int The value to set. diff -Nru dcmtk-3.6.6/dcmwlm/include/dcmtk/dcmwlm/wlfsim.h dcmtk-3.6.7/dcmwlm/include/dcmtk/dcmwlm/wlfsim.h --- dcmtk-3.6.6/dcmwlm/include/dcmtk/dcmwlm/wlfsim.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmwlm/include/dcmtk/dcmwlm/wlfsim.h 2022-04-28 13:47:25.000000000 +0000 @@ -151,7 +151,7 @@ * @param normalize Normalize each attribute value before the check. Defaults to OFTrue, which * means the value will be normalized as appropriate for the given VR, e.g. ignoring spaces * used as padding. - * @param normalizeWildCards. Whether to interpret a query only consisting of wild cards as + * @param normalizeWildCards Whether to interpret a query only consisting of wild cards as * an universal match. Defaults to OFTrue, which means wild cards will be normalized if an * attribute's VR supports it and it is allowed for the attribute (as defined by the matchingKeys * argument). Set to OFFalse to force strict interpretation instead. @@ -192,7 +192,7 @@ */ OFCondition ConnectToFileSystem( const OFString& dfPathv ); - /** Disconnects from the worklist file system database.. + /** Disconnects from the worklist file system database. * @return Indicates if the connection was disconnected successfully. */ OFCondition DisconnectFromFileSystem(); diff -Nru dcmtk-3.6.6/dcmwlm/include/dcmtk/dcmwlm/wlmactmg.h dcmtk-3.6.7/dcmwlm/include/dcmtk/dcmwlm/wlmactmg.h --- dcmtk-3.6.6/dcmwlm/include/dcmtk/dcmwlm/wlmactmg.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmwlm/include/dcmtk/dcmwlm/wlmactmg.h 2022-04-28 13:47:25.000000000 +0000 @@ -193,7 +193,7 @@ * @param opt_blockModev Specifies the blocking mode for DIMSE operations * @param opt_dimse_timeoutv Specifies the timeout for DIMSE operations * @param opt_acse_timeoutv Specifies the timeout for ACSE operations - * @param opt_forkedChildv Indicates, whether this process was "forked" from a parent process, default: false + * @param opt_forkedChild Indicates, whether this process was "forked" from a parent process, default: false * @param argcv Number of commandline arguments given * @param argvv Complete command line */ diff -Nru dcmtk-3.6.6/dcmwlm/libsrc/CMakeLists.txt dcmtk-3.6.7/dcmwlm/libsrc/CMakeLists.txt --- dcmtk-3.6.6/dcmwlm/libsrc/CMakeLists.txt 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmwlm/libsrc/CMakeLists.txt 2022-04-28 13:47:25.000000000 +0000 @@ -1,4 +1,9 @@ # create library from source files -DCMTK_ADD_LIBRARY(dcmwlm wlds wldsfs wlfsim wlmactmg) +DCMTK_ADD_LIBRARY(dcmwlm + wlds.cc + wldsfs.cc + wlfsim.cc + wlmactmg.cc +) DCMTK_TARGET_LINK_MODULES(dcmwlm ofstd dcmdata dcmnet) diff -Nru dcmtk-3.6.6/dcmwlm/libsrc/Makefile.dep dcmtk-3.6.7/dcmwlm/libsrc/Makefile.dep --- dcmtk-3.6.6/dcmwlm/libsrc/Makefile.dep 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmwlm/libsrc/Makefile.dep 2022-04-28 13:47:25.000000000 +0000 @@ -1,9 +1,9 @@ wlds.o: wlds.cc ../../config/include/dcmtk/config/osconfig.h \ ../../dcmnet/include/dcmtk/dcmnet/dicom.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../dcmnet/include/dcmtk/dcmnet/cond.h \ ../../ofstd/include/dcmtk/ofstd/ofconsol.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ @@ -15,7 +15,6 @@ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../../dcmnet/include/dcmtk/dcmnet/dndefine.h \ ../../dcmnet/include/dcmtk/dcmnet/dcompat.h \ - ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \ ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \ ../../oflog/include/dcmtk/oflog/oflog.h \ ../../oflog/include/dcmtk/oflog/logger.h \ @@ -115,7 +114,6 @@ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../../dcmnet/include/dcmtk/dcmnet/dndefine.h \ ../../dcmnet/include/dcmtk/dcmnet/dcompat.h \ - ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \ ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \ ../../oflog/include/dcmtk/oflog/oflog.h \ ../../oflog/include/dcmtk/oflog/logger.h \ @@ -170,10 +168,10 @@ wlfsim.o: wlfsim.cc ../../config/include/dcmtk/config/osconfig.h \ ../../dcmnet/include/dcmtk/dcmnet/diutil.h \ ../../dcmnet/include/dcmtk/dcmnet/dicom.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../dcmnet/include/dcmtk/dcmnet/cond.h \ ../../ofstd/include/dcmtk/ofstd/ofconsol.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ @@ -185,7 +183,6 @@ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../../dcmnet/include/dcmtk/dcmnet/dndefine.h \ ../../dcmnet/include/dcmtk/dcmnet/dcompat.h \ - ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \ ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \ ../../oflog/include/dcmtk/oflog/oflog.h \ ../../oflog/include/dcmtk/oflog/logger.h \ @@ -318,7 +315,6 @@ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../../dcmnet/include/dcmtk/dcmnet/dndefine.h \ ../../dcmnet/include/dcmtk/dcmnet/dcompat.h \ - ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \ ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \ ../../oflog/include/dcmtk/oflog/oflog.h \ ../../oflog/include/dcmtk/oflog/logger.h \ diff -Nru dcmtk-3.6.6/dcmwlm/libsrc/wldsfs.cc dcmtk-3.6.7/dcmwlm/libsrc/wldsfs.cc --- dcmtk-3.6.6/dcmwlm/libsrc/wldsfs.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmwlm/libsrc/wldsfs.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1996-2019, OFFIS e.V. + * Copyright (C) 1996-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -498,7 +498,7 @@ // value into an unsigned integer and set it correspondingly in the element variable) if( tag == DCM_PregnancyStatus ) { - Uint16 uintValue = atoi( value ); + Uint16 uintValue = OFstatic_cast(Uint16, atoi( value )); cond = element->putUint16( uintValue ); } else diff -Nru dcmtk-3.6.6/dcmwlm/libsrc/wlmactmg.cc dcmtk-3.6.7/dcmwlm/libsrc/wlmactmg.cc --- dcmtk-3.6.6/dcmwlm/libsrc/wlmactmg.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmwlm/libsrc/wlmactmg.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1996-2019, OFFIS e.V. + * Copyright (C) 1996-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -43,6 +43,9 @@ #include "dcmtk/dcmdata/dcdicent.h" // needed by MSVC5 with STL #include "dcmtk/oflog/internal/env.h" #include "dcmtk/dcmwlm/wlmactmg.h" +#include "dcmtk/ofstd/ofstdinc.h" +#include + // ---------------------------------------------------------------------------- @@ -857,7 +860,7 @@ if( opt_sleepAfterFind > 0 ) { DCMWLM_INFO("Sleeping (after find): " << opt_sleepAfterFind << " secs"); - OFStandard::sleep( (unsigned int)opt_sleepAfterFind ); + OFStandard::forceSleep( (unsigned int)opt_sleepAfterFind ); } // return result @@ -1131,7 +1134,7 @@ if (opt_sleepBeforeFindReq > 0) { DCMWLM_INFO("SLEEPING (before evaluating find request): " << opt_sleepBeforeFindReq << " secs"); - OFStandard::sleep((unsigned int)opt_sleepBeforeFindReq); + OFStandard::forceSleep((unsigned int)opt_sleepBeforeFindReq); } // Determine the records that match the search mask. After this call, the @@ -1148,7 +1151,7 @@ if( opt_sleepDuringFind > 0 ) { DCMWLM_INFO("SLEEPING (during find): " << opt_sleepDuringFind << " secs"); - OFStandard::sleep((unsigned int)opt_sleepDuringFind); + OFStandard::forceSleep((unsigned int)opt_sleepDuringFind); } // If we encountered a C-CANCEL-RQ and if we have pending @@ -1174,7 +1177,7 @@ } // Set response status - response->DimseStatus = dbstatus; + response->DimseStatus = OFstatic_cast(DIC_US, dbstatus); // Delete status detail information if there is some if( *statusDetail != NULL ) diff -Nru dcmtk-3.6.6/dcmwlm/tests/CMakeLists.txt dcmtk-3.6.7/dcmwlm/tests/CMakeLists.txt --- dcmtk-3.6.6/dcmwlm/tests/CMakeLists.txt 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmwlm/tests/CMakeLists.txt 2022-04-28 13:47:25.000000000 +0000 @@ -1,5 +1,5 @@ # declare executables -DCMTK_ADD_EXECUTABLE(wltest wltest) +DCMTK_ADD_EXECUTABLE(wltest wltest.cc) # make sure executables are linked to the corresponding libraries DCMTK_TARGET_LINK_MODULES(wltest dcmwlm dcmnet dcmtls dcmdata oflog ofstd) diff -Nru dcmtk-3.6.6/dcmwlm/tests/Makefile.dep dcmtk-3.6.7/dcmwlm/tests/Makefile.dep --- dcmtk-3.6.6/dcmwlm/tests/Makefile.dep 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmwlm/tests/Makefile.dep 2022-04-28 13:47:25.000000000 +0000 @@ -1,9 +1,9 @@ wltest.o: wltest.cc ../../config/include/dcmtk/config/osconfig.h \ - ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../dcmnet/include/dcmtk/dcmnet/dicom.h \ ../../dcmnet/include/dcmtk/dcmnet/cond.h \ ../../ofstd/include/dcmtk/ofstd/ofconsol.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ @@ -15,7 +15,6 @@ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../../dcmnet/include/dcmtk/dcmnet/dndefine.h \ ../../dcmnet/include/dcmtk/dcmnet/dcompat.h \ - ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \ ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \ ../../oflog/include/dcmtk/oflog/oflog.h \ ../../oflog/include/dcmtk/oflog/logger.h \ diff -Nru dcmtk-3.6.6/dcmwlm/tests/wltest.cc dcmtk-3.6.7/dcmwlm/tests/wltest.cc --- dcmtk-3.6.6/dcmwlm/tests/wltest.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/dcmwlm/tests/wltest.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1996-2017, OFFIS e.V. + * Copyright (C) 1996-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -21,11 +21,6 @@ #include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ -#define INCLUDE_CSTDLIB -#define INCLUDE_CSTRING -#define INCLUDE_CSTDARG -#define INCLUDE_UNISTD -#include "dcmtk/ofstd/ofstdinc.h" #include "dcmtk/dcmnet/dicom.h" #include "dcmtk/dcmnet/dul.h" diff -Nru dcmtk-3.6.6/debian/changelog dcmtk-3.6.7/debian/changelog --- dcmtk-3.6.6/debian/changelog 2022-04-10 17:15:51.000000000 +0000 +++ dcmtk-3.6.7/debian/changelog 2023-09-19 16:59:30.000000000 +0000 @@ -1,10 +1,111 @@ -dcmtk (3.6.6-5~20.04.sav0) focal; urgency=medium +dcmtk (3.6.7-9~20.04.sav0) focal; urgency=medium * Backport to Focal - * d/rules: Use C++14 standard as this build is not with GCC 11 + * debian/rules: Fix jquery.js link path (dcmtk-doc -> dcmtk) + - Change C++17 -> C++14 standard for build (using GCC < 11) * debian/control: Set debhelper-compat (= 12) BD - -- Rob Savoury Sun, 10 Apr 2022 10:15:51 -0700 + -- Rob Savoury Tue, 19 Sep 2023 09:59:30 -0700 + +dcmtk (3.6.7-9) unstable; urgency=medium + + * Team upload. + * Fix postrm + Closes: #1038776 + + -- Andreas Tille Thu, 22 Jun 2023 09:53:48 +0200 + +dcmtk (3.6.7-8) unstable; urgency=medium + + * d/patches: Fix CVE-2022-43272. Closes: #1027165 + * d/control: Bump Std-Vers to 4.6.2 no changes needed + + -- Mathieu Malaterre Wed, 04 Jan 2023 11:15:13 +0100 + +dcmtk (3.6.7-7) unstable; urgency=medium + + [ Andreas Tille ] + * Team upload. + * Prevent bashism in run-unit-test + * Enable running run-unit-test from any directory + * Add maintscript to remove outdated conffiles + Closes: #990134 + * On purge remove /var/lib/dcmtk/db/STORESCP if exists + Closes: #990135 + + [ Mathieu Malaterre ] + * d/control: Add missing dependency on libjs-jquery. Closes: #989108 + + -- Andreas Tille Tue, 06 Dec 2022 11:52:52 +0100 + +dcmtk (3.6.7-6) unstable; urgency=medium + + [ Mathieu Malaterre ] + * Team upload. + * d/control: libdcmtk4 is not present in o-o-stable + * d/postrm: Fix possible-bashism-in-maintainer-script + * d/patches: CVE-2022-2119 CVE-2022-2120. Closes: #1017743 + + [ Mohammed Bilal ] + * Add autopkgtests + * Bump Standards-Version to 4.6.1 (no changes needed) + + -- Mathieu Malaterre Mon, 22 Aug 2022 17:02:26 +0200 + +dcmtk (3.6.7-5) unstable; urgency=medium + + [ Gregory C. Sharp ] + * Change CMAKE_INSTALL_DATADIC to CMAKE_INSTALL_DATADIR in an attempt + to fix dictionary load failure + + -- Andreas Tille Fri, 17 Jun 2022 21:41:44 +0200 + +dcmtk (3.6.7-4) unstable; urgency=medium + + * Team upload. + * Fix install dir of dictionaries + Closes: #1012417 + + -- Andreas Tille Tue, 07 Jun 2022 09:05:06 +0200 + +dcmtk (3.6.7-3) unstable; urgency=medium + + * Source-only upload + * Breaks+Replaces: libdcmtk16 + + -- Andreas Tille Mon, 06 Jun 2022 19:39:49 +0200 + +dcmtk (3.6.7-2) unstable; urgency=medium + + * Team upload. + * Upstream has bumped SONAME thus rename binary package for shared + library + Closes: #1010536 + + -- Andreas Tille Wed, 04 May 2022 09:08:00 +0200 + +dcmtk (3.6.7-1) unstable; urgency=medium + + * Team upload. + * New upstream version + Closes: #1010474 + * Point watch file to Github + * Drop useless get-orig-source target (routine-update) + * Remove trailing whitespace in debian/changelog (routine-update) + * Remove trailing whitespace in debian/rules (routine-update) + * Drop debian/gbp.conf + * Install pkgconfig file + * Review d/copyright + * Drop unneeded lintian-override + + -- Andreas Tille Tue, 03 May 2022 10:28:02 +0200 + +dcmtk (3.6.6-6) UNRELEASED; urgency=medium + + * d/dcmtk.postrm: Added check to remove dcmtk user (Closes: #987972) + * d/dcmtk.postinst: Change dcmtk user shell to nologin + + -- Lance Lin Wed, 13 Apr 2022 19:36:57 +0700 dcmtk (3.6.6-5) unstable; urgency=medium @@ -117,9 +218,9 @@ [ Gert Wollny ] * New upstream version 3.6.4 - * d/p: Update patches for new release and remove old patches - * d/control: Update lib package name - * d/rules: Change dict install directory to new lib name + * d/p: Update patches for new release and remove old patches + * d/control: Update lib package name + * d/rules: Change dict install directory to new lib name * d/dcmtk.postinst: Disable running chown recursively * d/copyright: Add new libcmr files with non-OFFICE copyright @@ -788,4 +889,3 @@ * Added newline in dcmwlm/wlistdb/OFFIS to prevent lintian "zero-bye" warning -- Juergen Salk Sat, 30 Oct 2004 11:02:48 +0200 - diff -Nru dcmtk-3.6.6/debian/control dcmtk-3.6.7/debian/control --- dcmtk-3.6.6/debian/control 2022-04-10 17:15:51.000000000 +0000 +++ dcmtk-3.6.7/debian/control 2023-09-19 16:04:02.000000000 +0000 @@ -1,6 +1,7 @@ Source: dcmtk Maintainer: Debian Med Packaging Team -Uploaders: Gert Wollny , Mathieu Malaterre +Uploaders: Gert Wollny , + Mathieu Malaterre Section: science Priority: optional Build-Depends: cmake, @@ -14,16 +15,19 @@ libwrap0-dev, libxml2-dev, zlib1g-dev -Build-Depends-Indep: doxygen, graphviz -Standards-Version: 4.6.0 +Build-Depends-Indep: doxygen, + graphviz +Standards-Version: 4.6.2 Vcs-Browser: https://salsa.debian.org/med-team/dcmtk Vcs-Git: https://salsa.debian.org/med-team/dcmtk.git -Homepage: http://dicom.offis.de/dcmtk +Homepage: https://dicom.offis.de/dcmtk Rules-Requires-Root: no Package: dcmtk Architecture: any -Depends: adduser, ${misc:Depends}, ${shlibs:Depends} +Depends: adduser, + ${misc:Depends}, + ${shlibs:Depends} Description: OFFIS DICOM toolkit command line utilities DCMTK includes a collection of libraries and applications for examining, constructing and converting DICOM image files, handling offline media, @@ -34,12 +38,14 @@ . Note: This version was compiled with libssl support. -Package: libdcmtk16 +Package: libdcmtk17 Architecture: any Section: libs -Depends: ${misc:Depends}, ${shlibs:Depends} -Conflicts: libdcmtk3, libdcmtk4 -Replaces: libdcmtk3, libdcmtk4 +Depends: ${misc:Depends}, + ${shlibs:Depends} +Breaks: libdcmtk16 (= 3.6.7-1) +Replaces: libdcmtk16 (= 3.6.7-1) +Multi-Arch: same Description: OFFIS DICOM toolkit runtime libraries DCMTK includes a collection of libraries and applications for examining, constructing and converting DICOM image files, handling offline media, @@ -54,7 +60,7 @@ Package: libdcmtk-dev Architecture: any Section: libdevel -Depends: libdcmtk16 (= ${binary:Version}), +Depends: libdcmtk17 (= ${binary:Version}), libpng-dev, libssl-dev, libtiff-dev, @@ -62,10 +68,7 @@ libxml2-dev, ${misc:Depends} Suggests: dcmtk-doc -Breaks: libinsighttoolkit4-dev (<< 4.9.0) -Conflicts: libdcmtk2-dev, libdcmtk4-dev -Provides: libdcmtk2-dev -Replaces: libdcmtk2-dev, libdcmtk4-dev +Provides: libdcmtk17-dev Description: OFFIS DICOM toolkit development libraries and headers DCMTK includes a collection of libraries and applications for examining, constructing and converting DICOM image files, handling offline media, @@ -81,8 +84,10 @@ Package: dcmtk-doc Architecture: all Section: doc -Depends: ${misc:Depends} -Suggests: dcmtk, libdcmtk-dev +Depends: ${misc:Depends}, libjs-jquery +Suggests: dcmtk, + libdcmtk-dev +Multi-Arch: foreign Description: OFFIS DICOM toolkit documentation DCMTK includes a collection of libraries and applications for examining, constructing and converting DICOM image files, handling offline media, diff -Nru dcmtk-3.6.6/debian/copyright dcmtk-3.6.7/debian/copyright --- dcmtk-3.6.6/debian/copyright 2021-11-23 07:13:29.000000000 +0000 +++ dcmtk-3.6.7/debian/copyright 2023-06-22 07:53:48.000000000 +0000 @@ -69,7 +69,7 @@ include the three paragraphs of this copyright notice. Files: dcmnet/include/dcmtk/dcmnet/dul.h - dcmnet/libsrc/dulstruc.h + dcmnet/include/dcmtk/dcmnet/dulstruc.h dcmnet/libsrc/dul.cc dcmnet/libsrc/dulconst.cc dcmnet/libsrc/dulpriv.h @@ -77,10 +77,11 @@ dcmnet/libsrc/dulfsm.h dcmnet/libsrc/dulfsm.cc dcmnet/libsrc/dulparse.cc -Copyright: 1993, RSNA and Washington University +Copyright: 1993, 1994 RSNA and Washington University + 1994-2021, OFFIS e.V. License: RSNA The software and supporting documentation for the Radiological - Society of North America (RSNA) 1993 Digital Imaging and + Society of North America (RSNA) 1993, 1994 Digital Imaging and Communications in Medicine (DICOM) Demonstration were developed at the Electronic Radiology Laboratory @@ -384,33 +385,30 @@ Files: dcmrt/* Copyright: 2008-2012, OFFIS e.V. and ICSMED AG, Oldenburg, Germany - 2013-2017, J. Riesmeier, Oldenburg, Germany + 2013-2021, J. Riesmeier, Oldenburg, Germany License: BSD-3-clause-Riesmeier Files: dcmsr/include/dcmtk/dcmsr/dsrdncsr.h dcmsr/include/dcmtk/dcmsr/dsrsaecc.h dcmsr/libsrc/dsrdncsr.cc dcmsr/libsrc/dsrsaecc.cc - dcmsr/include/dcmtk/dcmsr/cmr/tid1409m.h dcmsr/include/dcmtk/dcmsr/cmr/tid1419m.h dcmsr/include/dcmtk/dcmsr/cmr/tid1501.h dcmsr/include/dcmtk/dcmsr/cmr/tid15def.h dcmsr/include/dcmtk/dcmsr/cmr/tid300.h - dcmsr/include/dcmtk/dcmsr/cmr/dsrdnflt.h - dcmsr/include/dcmtk/dcmsr/cmr/dsritcsr.h - dcmsr/include/dcmtk/dcmsr/cmr/dsrprdcc.h + dcmsr/include/dcmtk/dcmsr/dsrdnflt.h + dcmsr/include/dcmtk/dcmsr/dsritcsr.h + dcmsr/include/dcmtk/dcmsr/dsrprdcc.h dcmsr/include/dcmtk/dcmsr/dsrpficc.h dcmsr/libsrc/dsrpficc.cc dcmsr/libsrc/dsrplicc.cc - dcmsr/libcmr/tid1409m.cc dcmsr/libcmr/tid1419m.cc dcmsr/libcmr/tid1501.cc dcmsr/libcmr/tid15def.cc - dcmsr/libcmr/tid300cc.cc - dcmsr/libcmr/dsrdnflt.cc - dcmsr/libcmr/dsritcsr.cc - dcmsr/libcmr/dsrprdcc.cc -Copyright: 2016-2017, J. Riesmeier, Oldenburg, Germany + dcmsr/libsrc/dsrdnflt.cc + dcmsr/libsrc/dsritcsr.cc + dcmsr/libsrc/dsrprdcc.cc +Copyright: 2016-2021, J. Riesmeier, Oldenburg, Germany License: OFFISeV Files: dcmect/include/dcmtk/dcmect/def.h diff -Nru dcmtk-3.6.6/debian/dcmtk.maintscript dcmtk-3.6.7/debian/dcmtk.maintscript --- dcmtk-3.6.6/debian/dcmtk.maintscript 1970-01-01 00:00:00.000000000 +0000 +++ dcmtk-3.6.7/debian/dcmtk.maintscript 2023-06-22 07:53:48.000000000 +0000 @@ -0,0 +1,4 @@ +rm_conffile /etc/init.d/storescp +rm_conffile /etc/init.d/dcmqrscp +rm_conffile /etc/default/storescp +rm_conffile /etc/default/dcmqrscp diff -Nru dcmtk-3.6.6/debian/dcmtk.postinst dcmtk-3.6.7/debian/dcmtk.postinst --- dcmtk-3.6.6/debian/dcmtk.postinst 2020-11-04 08:21:33.000000000 +0000 +++ dcmtk-3.6.7/debian/dcmtk.postinst 2023-06-22 07:53:48.000000000 +0000 @@ -11,7 +11,7 @@ fi echo "Adding \`dcmtk' user to system ..." adduser --quiet --system --ingroup dcmtk --home /var/lib/dcmtk/db \ - --shell /bin/sh --disabled-password dcmtk || true + --shell /usr/sbin/nologin dcmtk || true fi # work around possible adduser bug, see #119366 diff -Nru dcmtk-3.6.6/debian/dcmtk.postrm dcmtk-3.6.7/debian/dcmtk.postrm --- dcmtk-3.6.6/debian/dcmtk.postrm 2020-11-04 08:21:33.000000000 +0000 +++ dcmtk-3.6.7/debian/dcmtk.postrm 2023-06-22 07:53:48.000000000 +0000 @@ -13,6 +13,16 @@ if [ -e /etc/init.d/imagectn.dpkg-old ]; then rm -f /etc/init.d/imagectn.dpkg-old fi + + if [ -d /var/lib/dcmtk/db/STORESCP ]; then + rm -rf /var/lib/dcmtk/db/STORESCP + fi +fi + +# Remove dcmtk user/group if they exist on cleanup +if id -u "dcmtk" > /dev/null 2>&1; then + echo "Removing \`dcmtk' user and group from the system..." + userdel dcmtk fi #DEBHELPER# diff -Nru dcmtk-3.6.6/debian/gbp.conf dcmtk-3.6.7/debian/gbp.conf --- dcmtk-3.6.6/debian/gbp.conf 2020-11-04 08:21:33.000000000 +0000 +++ dcmtk-3.6.7/debian/gbp.conf 1970-01-01 00:00:00.000000000 +0000 @@ -1,3 +0,0 @@ -[DEFAULT] -pristine-tar = True - diff -Nru dcmtk-3.6.6/debian/libdcmtk16.install dcmtk-3.6.7/debian/libdcmtk16.install --- dcmtk-3.6.6/debian/libdcmtk16.install 2021-04-26 06:27:24.000000000 +0000 +++ dcmtk-3.6.7/debian/libdcmtk16.install 1970-01-01 00:00:00.000000000 +0000 @@ -1,2 +0,0 @@ -usr/lib/*/*.so.* -usr/share/libdcmtk16/*.dic diff -Nru dcmtk-3.6.6/debian/libdcmtk16.lintian-overrides dcmtk-3.6.7/debian/libdcmtk16.lintian-overrides --- dcmtk-3.6.6/debian/libdcmtk16.lintian-overrides 2021-04-26 06:27:24.000000000 +0000 +++ dcmtk-3.6.7/debian/libdcmtk16.lintian-overrides 1970-01-01 00:00:00.000000000 +0000 @@ -1,6 +0,0 @@ -# There is more than one library in one package bundles which makes perfectly -# sense in this application but does not enable naming the library package apropriately -libdcmtk16: package-name-doesnt-match-sonames -libdcmtk16: embedded-library -libdcmtk16: no-symbols-control-file -libdcmtk16: lacks-unversioned-link-to-shared-library diff -Nru dcmtk-3.6.6/debian/libdcmtk17.install dcmtk-3.6.7/debian/libdcmtk17.install --- dcmtk-3.6.6/debian/libdcmtk17.install 1970-01-01 00:00:00.000000000 +0000 +++ dcmtk-3.6.7/debian/libdcmtk17.install 2023-06-22 07:53:48.000000000 +0000 @@ -0,0 +1,2 @@ +usr/lib/*/*.so.* +usr/share/libdcmtk17/*.dic diff -Nru dcmtk-3.6.6/debian/libdcmtk17.lintian-overrides dcmtk-3.6.7/debian/libdcmtk17.lintian-overrides --- dcmtk-3.6.6/debian/libdcmtk17.lintian-overrides 1970-01-01 00:00:00.000000000 +0000 +++ dcmtk-3.6.7/debian/libdcmtk17.lintian-overrides 2023-06-22 07:53:48.000000000 +0000 @@ -0,0 +1,5 @@ +# There is more than one library in one package bundles which makes perfectly +# sense in this application but does not enable naming the library package apropriately +libdcmtk17: package-name-doesnt-match-sonames +libdcmtk17: embedded-library +libdcmtk17: no-symbols-control-file diff -Nru dcmtk-3.6.6/debian/libdcmtk-dev.install dcmtk-3.6.7/debian/libdcmtk-dev.install --- dcmtk-3.6.6/debian/libdcmtk-dev.install 2021-11-23 07:13:29.000000000 +0000 +++ dcmtk-3.6.7/debian/libdcmtk-dev.install 2023-06-22 07:53:48.000000000 +0000 @@ -1,3 +1,4 @@ usr/include/dcmtk/* usr/lib/*/*.so usr/lib/*/cmake/ +usr/lib/*/pkgconfig \ No newline at end of file diff -Nru dcmtk-3.6.6/debian/NEWS dcmtk-3.6.7/debian/NEWS --- dcmtk-3.6.6/debian/NEWS 2021-04-26 06:27:24.000000000 +0000 +++ dcmtk-3.6.7/debian/NEWS 2023-06-22 07:53:48.000000000 +0000 @@ -1,10 +1,12 @@ -dcmtk (3.6.1~20150924-1) UNRELEASED: urgency=medium +dcmtk (3.6.1~20150924-1) unstable; urgency=medium With this new snapshot upstream removed the wwwapps tools and perl scripts that were developed for the CAR 1996 modality showcase, and that are largely unused and unsupported. -dcmtk (3.6.1~20150629-2) UNRELEASED; urgency=medium + -- Gert Wollny Tue, 01 Dec 2015 02:46:03 +0100 + +dcmtk (3.6.1~20150629-2) unstable; urgency=medium Version 3.6.1 has compatible change of the index.dat format that is not backward compatible, and the current dcmtk is trashing the memory (one diff -Nru dcmtk-3.6.6/debian/patches/03_datadic_install.patch dcmtk-3.6.7/debian/patches/03_datadic_install.patch --- dcmtk-3.6.6/debian/patches/03_datadic_install.patch 2021-11-05 07:52:38.000000000 +0000 +++ dcmtk-3.6.7/debian/patches/03_datadic_install.patch 2023-06-22 07:53:48.000000000 +0000 @@ -2,44 +2,50 @@ Bug-Debian: https://bugs.debian.org/709123 Forwarded: no Author: Mathieu Malaterre -Index: dcmtk/CMake/GenerateDCMTKConfigure.cmake -=================================================================== ---- dcmtk.orig/CMake/GenerateDCMTKConfigure.cmake -+++ dcmtk/CMake/GenerateDCMTKConfigure.cmake -@@ -114,15 +114,7 @@ endif() - #endif() +--- a/CMake/GenerateDCMTKConfigure.cmake ++++ b/CMake/GenerateDCMTKConfigure.cmake +@@ -118,23 +118,8 @@ endif() # Configure file -- + -# Windows being windows, it lies about its processor type to 32 bit binaries -set(SYSTEM_PROCESSOR "$ENV{PROCESSOR_ARCHITEW6432}") -if(NOT SYSTEM_PROCESSOR) -- set(SYSTEM_PROCESSOR "${CMAKE_SYSTEM_PROCESSOR}") +- if(WIN32 AND NOT CYGWIN) +- if(CMAKE_GENERATOR_PLATFORM) +- set(SYSTEM_PROCESSOR "${CMAKE_GENERATOR_PLATFORM}") +- elseif(CMAKE_SIZEOF_VOID_P EQUAL 8) +- set(SYSTEM_PROCESSOR "x64") +- elseif(CMAKE_SIZEOF_VOID_P EQUAL 4) +- set(SYSTEM_PROCESSOR "Win32") +- endif() +- else() +- set(SYSTEM_PROCESSOR "${CMAKE_SYSTEM_PROCESSOR}") +- endif() -endif() --# CMake doesn't provide a configure-style system type string + # CMake doesn't provide a configure-style system type string -set(CANONICAL_HOST_TYPE "${SYSTEM_PROCESSOR}-${CMAKE_SYSTEM_NAME}") --DCMTK_UNSET(SYSTEM_PROCESSOR) +set(CANONICAL_HOST_TYPE "Debian") + DCMTK_UNSET(SYSTEM_PROCESSOR) # Configure dictionary path and install prefix - if(WIN32 AND NOT CYGWIN) -@@ -134,10 +126,10 @@ if(WIN32 AND NOT CYGWIN) +@@ -147,10 +132,10 @@ if(WIN32 AND NOT CYGWIN) set(ENVIRONMENT_PATH_SEPARATOR ";") # Set dictionary path to the data dir inside install main dir (prefix) - if(DCMTK_ENABLE_EXTERNAL_DICTIONARY) + if(DCMTK_DEFAULT_DICT STREQUAL "external") - set(DCM_DICT_DEFAULT_PATH "${DCMTK_PREFIX}\\\\${CMAKE_INSTALL_DATADIR}\\\\dcmtk\\\\dicom.dic") -+ set(DCM_DICT_DEFAULT_PATH "${DCMTK_PREFIX}\\\\${CMAKE_INSTALL_DATADIC}\\\\dicom.dic") ++ set(DCM_DICT_DEFAULT_PATH "${DCMTK_PREFIX}\\\\${CMAKE_INSTALL_DATADIR}\\\\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}\\\\${CMAKE_INSTALL_DATADIR}\\\\dcmtk\\\\private.dic") -+ set(DCM_DICT_DEFAULT_PATH "${DCM_DICT_DEFAULT_PATH};${DCMTK_PREFIX}\\\\${CMAKE_INSTALL_DATADIC}\\\\private.dic") ++ set(DCM_DICT_DEFAULT_PATH "${DCM_DICT_DEFAULT_PATH};${DCMTK_PREFIX}\\\\${CMAKE_INSTALL_DATADIR}\\\\private.dic") endif() # Again, for Windows strip all / from path and replace it with \\. string(REGEX REPLACE "/" "\\\\\\\\" DCM_DICT_DEFAULT_PATH "${DCM_DICT_DEFAULT_PATH}") -@@ -155,10 +147,10 @@ else() +@@ -168,10 +153,10 @@ else() set(ENVIRONMENT_PATH_SEPARATOR ":") # Set dictionary path to the data dir inside install main dir (prefix). - if(DCMTK_ENABLE_EXTERNAL_DICTIONARY) + if(DCMTK_DEFAULT_DICT STREQUAL "external") - set(DCM_DICT_DEFAULT_PATH "${DCMTK_PREFIX}/${CMAKE_INSTALL_DATADIR}/dcmtk/dicom.dic") + set(DCM_DICT_DEFAULT_PATH "${DCMTK_PREFIX}/${CMAKE_INSTALL_DATADIC}/dicom.dic") # If private dictionary should be utilized, add it to default dictionary path. @@ -49,10 +55,8 @@ endif() else() set(DCM_DICT_DEFAULT_PATH "") -Index: dcmtk/dcmdata/data/CMakeLists.txt -=================================================================== ---- dcmtk.orig/dcmdata/data/CMakeLists.txt -+++ dcmtk/dcmdata/data/CMakeLists.txt +--- a/dcmdata/data/CMakeLists.txt ++++ b/dcmdata/data/CMakeLists.txt @@ -1,5 +1,8 @@ # declare installation files -install(FILES dicom.dic acrnema.dic private.dic diconde.dic dcm2xml.dtd dumppat.txt SC.dump VLP.dump DESTINATION "${CMAKE_INSTALL_DATADIR}/dcmtk" COMPONENT data) diff -Nru dcmtk-3.6.6/debian/patches/c34f4e46e672ad21accf04da0dc085e43be6f5e1.patch dcmtk-3.6.7/debian/patches/c34f4e46e672ad21accf04da0dc085e43be6f5e1.patch --- dcmtk-3.6.6/debian/patches/c34f4e46e672ad21accf04da0dc085e43be6f5e1.patch 1970-01-01 00:00:00.000000000 +0000 +++ dcmtk-3.6.7/debian/patches/c34f4e46e672ad21accf04da0dc085e43be6f5e1.patch 2023-06-22 07:53:48.000000000 +0000 @@ -0,0 +1,55 @@ +From c34f4e46e672ad21accf04da0dc085e43be6f5e1 Mon Sep 17 00:00:00 2001 +From: Marco Eichelberg +Date: Thu, 9 Jun 2022 10:03:38 +0200 +Subject: [PATCH] Fixed memory leak in single process mode. + +Fixed a memory leak in dcmqrscp's single process mode. + +Thanks to for the bug report and test data. +--- + dcmqrdb/libsrc/dcmqrsrv.cc | 24 ++++++++++-------------- + 1 file changed, 10 insertions(+), 14 deletions(-) + +diff --git a/dcmqrdb/libsrc/dcmqrsrv.cc b/dcmqrdb/libsrc/dcmqrsrv.cc +index 157e6c022..f5f9df661 100644 +--- a/dcmqrdb/libsrc/dcmqrsrv.cc ++++ b/dcmqrdb/libsrc/dcmqrsrv.cc +@@ -1,6 +1,6 @@ + /* + * +- * Copyright (C) 1993-2021, OFFIS e.V. ++ * Copyright (C) 1993-2022, OFFIS e.V. + * All rights reserved. See COPYRIGHT file for details. + * + * This software and supporting documentation were developed by +@@ -1126,21 +1126,17 @@ OFCondition DcmQueryRetrieveSCP::waitForAssociation(T_ASC_Network * theNet) + #endif + } + +- // cleanup code ++ // clean-up association + OFCondition oldcond = cond; /* store condition flag for later use */ +- if (!options_.singleProcess_ && (cond != ASC_SHUTDOWNAPPLICATION)) ++ cond = ASC_dropAssociation(assoc); ++ if (cond.bad()) + { +- /* the child will handle the association, we can drop it */ +- cond = ASC_dropAssociation(assoc); +- if (cond.bad()) +- { +- DCMQRDB_ERROR("Cannot Drop Association: " << DimseCondition::dump(temp_str, cond)); +- } +- cond = ASC_destroyAssociation(&assoc); +- if (cond.bad()) +- { +- DCMQRDB_ERROR("Cannot Destroy Association: " << DimseCondition::dump(temp_str, cond)); +- } ++ DCMQRDB_ERROR("Cannot Drop Association: " << DimseCondition::dump(temp_str, cond)); ++ } ++ cond = ASC_destroyAssociation(&assoc); ++ if (cond.bad()) ++ { ++ DCMQRDB_ERROR("Cannot Destroy Association: " << DimseCondition::dump(temp_str, cond)); + } + + if (oldcond == ASC_SHUTDOWNAPPLICATION) cond = oldcond; /* abort flag is reported to top-level wait loop */ diff -Nru dcmtk-3.6.6/debian/patches/f06a867513524664a1b03dfcf812d8b60fdd02cc.patch dcmtk-3.6.7/debian/patches/f06a867513524664a1b03dfcf812d8b60fdd02cc.patch --- dcmtk-3.6.6/debian/patches/f06a867513524664a1b03dfcf812d8b60fdd02cc.patch 1970-01-01 00:00:00.000000000 +0000 +++ dcmtk-3.6.7/debian/patches/f06a867513524664a1b03dfcf812d8b60fdd02cc.patch 2023-06-22 07:53:48.000000000 +0000 @@ -0,0 +1,252 @@ +From f06a867513524664a1b03dfcf812d8b60fdd02cc Mon Sep 17 00:00:00 2001 +From: Marco Eichelberg +Date: Fri, 6 May 2022 17:30:02 +0200 +Subject: [PATCH] Fixed path traversal vulnerability. + +Thanks to Sharon Brizinov >sharon.b@claroty.com> and Noam Moshe from +Claroty Research for the bug report and sample files. + +This closes DCMTK issue #1021. +--- + dcmnet/apps/movescu.cc | 3 ++- + dcmnet/apps/storescp.cc | 8 +++++-- + dcmnet/libsrc/dstorscp.cc | 5 ++++- + dcmnet/libsrc/scu.cc | 1 + + ofstd/include/dcmtk/ofstd/ofstd.h | 18 +++++++++++++++- + ofstd/libsrc/offname.cc | 19 ++++++++++------- + ofstd/libsrc/ofstd.cc | 35 ++++++++++++++++++++++++++++++- + 7 files changed, 76 insertions(+), 13 deletions(-) + +diff --git a/dcmnet/apps/movescu.cc b/dcmnet/apps/movescu.cc +index 40f41674c..7e444d46b 100644 +--- a/dcmnet/apps/movescu.cc ++++ b/dcmnet/apps/movescu.cc +@@ -1,6 +1,6 @@ + /* + * +- * Copyright (C) 1994-2021, OFFIS e.V. ++ * Copyright (C) 1994-2022, OFFIS e.V. + * All rights reserved. See COPYRIGHT file for details. + * + * This software and supporting documentation were developed by +@@ -1425,6 +1425,7 @@ static OFCondition storeSCP( + sprintf(imageFileName, "%s.%s", + dcmSOPClassUIDToModality(req->AffectedSOPClassUID), + req->AffectedSOPInstanceUID); ++ OFStandard::sanitizeFilename(imageFileName); + } + + OFString temp_str; +diff --git a/dcmnet/apps/storescp.cc b/dcmnet/apps/storescp.cc +index ee53f2887..68b7b4e97 100644 +--- a/dcmnet/apps/storescp.cc ++++ b/dcmnet/apps/storescp.cc +@@ -1853,12 +1853,14 @@ storeSCPCallback( + if (!subdirectoryName.empty()) + subdirectoryName += '_'; + subdirectoryName += currentStudyInstanceUID; ++ OFStandard::sanitizeFilename(subdirectoryName); + break; + case ESM_PatientName: + // pattern: "[Patient's Name]_[YYYYMMDD]_[HHMMSSMMM]" + subdirectoryName = currentPatientName; + subdirectoryName += '_'; + subdirectoryName += timestamp; ++ OFStandard::sanitizeFilename(subdirectoryName); + break; + case ESM_None: + break; +@@ -2065,9 +2067,11 @@ static OFCondition storeSCP( + } + else + { +- // don't create new UID, use the study instance UID as found in object ++ // Use the SOP instance UID as found in the C-STORE request message as part of the filename ++ OFString uid = req->AffectedSOPInstanceUID; ++ OFStandard::sanitizeFilename(uid); + sprintf(imageFileName, "%s%c%s.%s%s", opt_outputDirectory.c_str(), PATH_SEPARATOR, dcmSOPClassUIDToModality(req->AffectedSOPClassUID, "UNKNOWN"), +- req->AffectedSOPInstanceUID, opt_fileNameExtension.c_str()); ++ uid.c_str(), opt_fileNameExtension.c_str()); + } + } + +diff --git a/dcmnet/libsrc/dstorscp.cc b/dcmnet/libsrc/dstorscp.cc +index e491ae5ea..1811846a2 100644 +--- a/dcmnet/libsrc/dstorscp.cc ++++ b/dcmnet/libsrc/dstorscp.cc +@@ -1,6 +1,6 @@ + /* + * +- * Copyright (C) 2013-2021, OFFIS e.V. ++ * Copyright (C) 2013-2022, OFFIS e.V. + * All rights reserved. See COPYRIGHT file for details. + * + * This software and supporting documentation were developed by +@@ -425,6 +425,7 @@ OFCondition DcmStorageSCP::generateDirAndFilename(OFString &filename, + generatedFileName = tmpString; + OFSTRINGSTREAM_FREESTR(tmpString); + // combine the generated file name with the directory name ++ OFStandard::sanitizeFilename(generatedFileName); + OFStandard::combineDirAndFilename(filename, directoryName, generatedFileName); + } + break; +@@ -441,6 +442,7 @@ OFCondition DcmStorageSCP::generateDirAndFilename(OFString &filename, + generatedFileName = tmpString; + OFSTRINGSTREAM_FREESTR(tmpString); + // combine the generated file name with the directory name ++ OFStandard::sanitizeFilename(generatedFileName); + OFStandard::combineDirAndFilename(filename, directoryName, generatedFileName); + break; + } +@@ -469,6 +471,7 @@ OFCondition DcmStorageSCP::generateDirAndFilename(OFString &filename, + generatedFileName = tmpString; + OFSTRINGSTREAM_FREESTR(tmpString); + // combine the generated file name ++ OFStandard::sanitizeFilename(generatedFileName); + OFStandard::combineDirAndFilename(filename, directoryName, generatedFileName); + } else + status = EC_CouldNotGenerateFilename; +diff --git a/dcmnet/libsrc/scu.cc b/dcmnet/libsrc/scu.cc +index 34b252553..1cc9c3a46 100644 +--- a/dcmnet/libsrc/scu.cc ++++ b/dcmnet/libsrc/scu.cc +@@ -1418,6 +1418,7 @@ OFString DcmSCU::createStorageFilename(DcmDataset* dataset) + OFString name = dcmSOPClassUIDToModality(sopClassUID.c_str(), "UNKNOWN"); + name += "."; + name += sopInstanceUID; ++ OFStandard::sanitizeFilename(name); + OFString returnStr; + OFStandard::combineDirAndFilename(returnStr, m_storageDir, name, OFTrue); + return returnStr; +diff --git a/ofstd/include/dcmtk/ofstd/ofstd.h b/ofstd/include/dcmtk/ofstd/ofstd.h +index 1548e26d0..56054ccb0 100644 +--- a/ofstd/include/dcmtk/ofstd/ofstd.h ++++ b/ofstd/include/dcmtk/ofstd/ofstd.h +@@ -1,6 +1,6 @@ + /* + * +- * Copyright (C) 2000-2021, OFFIS e.V. ++ * Copyright (C) 2000-2022, OFFIS e.V. + * All rights reserved. See COPYRIGHT file for details. + * + * This software and supporting documentation were developed by +@@ -1165,6 +1165,22 @@ class DCMTK_OFSTD_EXPORT OFStandard + */ + static void forceSleep(Uint32 seconds); + ++ /** sanitize a filename (NOT a path name!) by replacing all path ++ * separators with underscores. This avoids possible path traversal ++ * vulnerabilities if malformed data read from file or received over ++ * a network is used as part of a filename. ++ * @param fname filename to be sanitized ++ */ ++ static void sanitizeFilename(OFString& fname); ++ ++ /** sanitize a filename (NOT a path name!) by replacing all path ++ * separators with underscores. This avoids possible path traversal ++ * vulnerabilities if malformed data read from file or received over ++ * a network is used as part of a filename. ++ * @param fname filename to be sanitized ++ */ ++ static void sanitizeFilename(char *fname); ++ + private: + + /** private implementation of strlcpy. Called when strlcpy +diff --git a/ofstd/libsrc/offname.cc b/ofstd/libsrc/offname.cc +index 832376189..a56a7e1b5 100644 +--- a/ofstd/libsrc/offname.cc ++++ b/ofstd/libsrc/offname.cc +@@ -1,6 +1,6 @@ + /* + * +- * Copyright (C) 1997-2021, OFFIS e.V. ++ * Copyright (C) 1997-2022, OFFIS e.V. + * All rights reserved. See COPYRIGHT file for details. + * + * This software and supporting documentation were developed by +@@ -73,18 +73,23 @@ OFBool OFFilenameCreator::makeFilename(unsigned int &seed, const char *dir, cons + { + // create filename + filename.clear(); +- if (dir) +- { +- filename = dir; +- filename += PATH_SEPARATOR; +- } +- if (prefix) filename += prefix; ++ if (prefix) filename = prefix; + addLongToString(creation_time, filename); + // on some systems OFrand_r may produce only 16-bit random numbers. + // To be on the safe side, we use two random numbers for the upper and the lower 16 bits. + addLongToString((((OFrand_r(seed) & 0xFFFF) << 16) | (OFrand_r(seed) & 0xFFFF)), filename); + if (postfix) filename += postfix; + ++ OFStandard::sanitizeFilename(filename); ++ ++ if (dir) ++ { ++ OFString dirname = dir; ++ dirname += PATH_SEPARATOR; ++ dirname += filename; ++ filename = dirname; ++ } ++ + // check if filename exists + stat_result = stat(filename.c_str(), &stat_buf); + if (stat_result == 0) +diff --git a/ofstd/libsrc/ofstd.cc b/ofstd/libsrc/ofstd.cc +index ae1466a9f..33ecd7954 100644 +--- a/ofstd/libsrc/ofstd.cc ++++ b/ofstd/libsrc/ofstd.cc +@@ -1,6 +1,6 @@ + /* + * +- * Copyright (C) 2001-2021, OFFIS e.V. ++ * Copyright (C) 2001-2022, OFFIS e.V. + * All rights reserved. See COPYRIGHT file for details. + * + * This software and supporting documentation were developed by +@@ -3245,6 +3245,39 @@ void OFStandard::forceSleep(Uint32 seconds) + } + } + ++ ++void OFStandard::sanitizeFilename(OFString& fname) ++{ ++ size_t len = fname.length(); ++ for (size_t i=0; i> checksums + +echo "Running Tests" + +echo "Test 1" + +dcm2json CT_small.dcm dcm2json.json + +echo "Test 2" + +dcm2xml CT_small.dcm dcm2xml.xml + +echo "Test 3" + +dcmconv --convert-to-latin1 CT_small.dcm dcmconv.out + +echo "Test 4" + +dcmcrle CT_small.dcm dcmcrle.out + +echo "Test 5" + +dcmdrle dcmcrle.out dcmdrle.out + +echo "Test 6" + +dcmdump CT_small.dcm > dcmdump.out + +echo "Test 7" + +dump2dcm dcmdump.out dump2dcm.dcm + +echo "Test 8" + +dcmftest CT_small.dcm + +echo "Test 9" + +dcmodify -e "(0008,0031)" CT_small.dcm + +echo "Test 10" + +dcm2pnm +Rtd CT_small.dcm dcm2pnm.png + +echo "Test 11" + +dcmscale +Sxf 2.0 CT_small.dcm dcmscale.out + +echo "Test 12" + +dcmcjpls CT_small.dcm dcmcjpls.out + +echo "Test 13" + +dcmdjpls dcmcjpls.out dcmdjpls.out + +echo "Test 14" + +dcml2pnm CT_small.dcm dcml2pnm.png + +echo "Test 15" + +cat <> crv.txt + 256.451947 1.000000 + 477.689863 128.822080 + 128.822080 477.689863 + 35.310137 128.822080 + 256.451947 1.000000 +EOT + +dcmmkcrv CT_small.dcm crv.txt dcmmkcrv.out + +echo "Test 16" + +dcmmklut dcmmklut.out + +echo "Test 17" + +dcmp2pgm CT_small.dcm dcmp2pgm.out + +echo "Test 18" +dcmpsmk CT_small.dcm dcmpsmk.out + +echo "Test 19" +mkdir dcmqridx + +dcmqridx dcmqridx/ CT_small.dcm + +echo "Test 20" +dcmsign -q CT_small.dcm + +if [ -f dcmqridx/index.dat ] && \ + [ -f dcmpsmk.out ] && \ + [ -f dcmmklut.out ] && \ + [ -f dcm2json.json ] && \ + [ -f dcm2xml.xml ] && \ + [ -f dcmconv.out ] && \ + [ -f dcmcrle.out ] && \ + [ -f dcmdrle.out ] && \ + [ -f dcmdump.out ] && \ + [ -f dump2dcm.dcm ] && \ + [ -f dcm2pnm.png ] && \ + [ -f dcmscale.out ] && \ + [ -f dcmcjpls.out ] && \ + [ -f dcmdjpls.out ] && \ + [ -f dcml2pnm.png ] && \ + [ -f dcmmkcrv.out ] && \ + [ -f dcmp2pgm.out ] && \ + md5sum --check checksums; then + + echo "PASS" + +else + echo "FAIL" + +fi + diff -Nru dcmtk-3.6.6/debian/watch dcmtk-3.6.7/debian/watch --- dcmtk-3.6.6/debian/watch 2021-12-08 08:55:44.000000000 +0000 +++ dcmtk-3.6.7/debian/watch 2023-06-22 07:53:48.000000000 +0000 @@ -1,2 +1,4 @@ version=4 -ftp://dicom.offis.de/pub/dicom/offis/software/dcmtk/current/dcmtk-(.*)\.tar\.gz + +opts="filenamemangle=s%(?:.*?)?v?(\d[\d.]*)\.tar\.gz%@PACKAGE@-$1.tar.gz%" \ + https://github.com/DCMTK/dcmtk/tags (?:.*?/)?DCMTK-(\d[\d.]*)\.tar\.gz diff -Nru dcmtk-3.6.6/docs/ANNOUNCE.366 dcmtk-3.6.7/docs/ANNOUNCE.366 --- dcmtk-3.6.6/docs/ANNOUNCE.366 1970-01-01 00:00:00.000000000 +0000 +++ dcmtk-3.6.7/docs/ANNOUNCE.366 2022-04-28 13:47:25.000000000 +0000 @@ -0,0 +1,120 @@ +ANNOUNCEMENT + +Version 3.6.6 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.5: + +- DCMTK 3.6.6 builds correctly on older and up-to-date versions of GNU gcc + (4.2.1 to 10.2.0) Clang (3.4.2 to 11.0.0), Apple Clang 11.0.0, + Microsoft Visual Studio (2008 to 2019) 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 + - Solaris on x86 + - Windows (including MinGW and Cygwin) on x86_64 and x86 + + For a complete list of tested systems and compilers, see the INSTALL file. + +- Updated data dictionary, SOP classes, well-known frame of references, + transfer syntaxes, code definitions and supported context group classes for + DICOM standard release 2020e. + +- Added new DCMTK module dcmect, which facilitates creation, loading, (partly) + modification and storing Enhanced CT objects: + + - Also included is a general Concatenation API that allows for creating and + re-assembling Concatenations from given DICOM datasets. Right now, only + uncompressed ("unencapsulated") pixel data is supported. + + - The existing Segmentation API (dcmseg) as well as the new Enhanced CT API + (dcmect) both support writing and reading Concatenations via dedicated + methods. + + - Thanks to GE Aviation for sponsoring this feature. + +- Major revision of JSON export tool (dcm2json), which should now be fully + standard compliant. + +- Major revision of the dcmsign module, which now supports Elliptic Curve + (ECDSA) signatures, the DICOM SR RSA Digital Signature Profile, and CRLs in + hashed certificate directories. During signature verification the chain of + trust for the signer certificates are now fully checked and there is limited + support for the creation and verification of trusted timestamps. + +- Added support for the Rendition Selection Document IOD, which has been + introduced with Supplement 202 (Real-Time Video), to the dcmsr module. + +- Added support for the new Waveform Storage SOP Classes that have been + introduced with Supplement 217 (Neurophysiology Waveforms) to the DICOMDIR + generation code and to the dcmsr module. + +- Added support for the new 2nd generation RT Storage SOP Classes that have + been introduced with Supplement 175, 176 and 199, as well as for the new + Encapsulated OBJ and MTL Storage SOP Classes (Supplement 208) to the + DICOMDIR generation code. + +- Added TLS support to the DcmSCP and DcmSCPPool classes and to the dcmrecv + command line tool. + +- Updated and completely revised DIMSE Status Code definitions. Now, the + definitions and also the log output are consistent with the current edition + of the DICOM standard. + +- Significant performance enhancements for code that gets an item from or + inserts an item into a sequence with a large number of items. + +- DCMTK now successfully compiles when UNICODE/_UNICODE is defined on Windows. + +- When compiling on Windows, new CMake options can now be used to control the + Win32 build model (multi-threaded or multi-threaded DLL). + +- Fixed various issues that occurred after the official 3.6.5 release. + See CHANGES file for details. + +Many people have contributed to this new release of DCMTK, appearing here in +alphabetical order. Thank you very much for your support! + + Michel Amat (GitHub user "amatm") + Bartosz Bialoskorski + Jesper Bojesen + Marcel Claus + Jake Cobb + Martin Czarnowski + Matthias Gierlings + Niklas Johansson (GitHub user "Raphexion") + Andreas Keizers + Peter Klotz + Damien Lerat + Mathieu Malaterre + Robert Mulcahey + Maria Nedyak + Steve Pieper + Sergey Razuvaev + Markus Sabin + Maria Samoylova + Adrian Schmidt-Foehre + Waldo Valenzuela + + DCMTK forum users "CStarkey", "JustSomeGuy", "Shaeto", and "ruben.cruz" + GitHub user "iboB" + +Members of the DCMTK Team who have worked on this release are: + + Pedro Arizpe Gomez + Marco Eichelberg + Michael Onken + Joerg Riesmeier + Jan Schlamelcher + +The DCMTK software can be downloaded via: + + https://dicom.offis.de/dcmtk or https://www.dcmtk.org/ + +OFFIS e.V., Oldenburg, Germany, 2021-01-14 diff -Nru dcmtk-3.6.6/docs/CHANGES.367 dcmtk-3.6.7/docs/CHANGES.367 --- dcmtk-3.6.6/docs/CHANGES.367 1970-01-01 00:00:00.000000000 +0000 +++ dcmtk-3.6.7/docs/CHANGES.367 2022-04-28 13:47:25.000000000 +0000 @@ -0,0 +1,3597 @@ + +Release 3.6.7 (Public Minor Release - 2022-04-22) + +**** Changes from 2022.04.22 (onken) + +- Created CHANGES.367 for DCMTK release 3.6.7: + CHANGES.367 contains the Git commit history since DCMTK release 3.6.6. + Added: docs/CHANGES.367 + +- Updated man pages for DCMTK release 3.6.7. + Affects: doxygen/manpages/man1/cda2dcm.1 + 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/dcmicmp.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/stl2dcm.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.7. + Affects: CMake/dcmtkPrepare.cmake + VERSION + +- Updated copyright date. + Affects: COPYRIGHT + dcmdata/docs/cda2dcm.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/pdf2dcm.man + dcmdata/docs/stl2dcm.man + dcmdata/docs/xml2dcm.man + dcmimage/docs/dcm2pnm.man + dcmimage/docs/dcmicmp.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/dcmrecv.man + dcmnet/docs/dcmsend.man + dcmnet/docs/echoscu.man + dcmnet/docs/findscu.man + dcmnet/docs/getscu.man + dcmnet/docs/movescu.man + dcmnet/docs/storescp.man + dcmnet/docs/storescu.man + dcmnet/docs/termscu.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 + +- Fix adaptations missing in RC2. + Affects: ANNOUNCE + CMake/dcmtkPrepare.cmake + INSTALL + config/configure + config/configure.in + +**** Changes from 2022.04.14 (onken) + +- Fixed test by removing retired attribute: + Fixed test that compares stored with actual dump that failed because an + attribute name changed due to retirment. The attribute has been removed + from the test (and thus the dump). + Reformatted dump string in test for better readability. + Affects: dcmect/tests/t_huge_concat.cc + +**** Changes from 2022.04.13 (onken) + +- Remove debugging output introduced in last commit. + Affects: dcmseg/tests/tbigdim.cc + +- Speed up dcmseg_bigdim and only run with std::map: + The dcmseg_bigdim test exercises creation of a segmentation with + 1.000.000 frames and 65535 segments. Therefore it takes a lot of time + to run. + The current functional group implementation uses the OFMap class that + internally is still based on an OFList, making it extermely slow for + random access. Therefore, this test is only run if the STL map + implementation is being used (HAVE_STL_MAP is being defined) which + speeds up the test tremendously. + Also some segmentation checking has been disabled via API to further + speed up test execution. + Affects: dcmseg/tests/tbigdim.cc + +**** Changes from 2022.04.12 (riesmeier) + +- Updated Context Group classes for DICOM 2022b: + Updated automatically generated Context Group classes for the 2022b edition + of the DICOM standard. All supported classes were updated, even though there + were no changes to most of them. + Affects: dcmsr/include/dcmtk/dcmsr/cmr/cid100.h + dcmsr/include/dcmtk/dcmsr/cmr/cid10013.h + dcmsr/include/dcmtk/dcmsr/cmr/cid10033.h + dcmsr/include/dcmtk/dcmsr/cmr/cid11.h + dcmsr/include/dcmtk/dcmsr/cmr/cid244.h + dcmsr/include/dcmtk/dcmsr/cmr/cid247.h + dcmsr/include/dcmtk/dcmsr/cmr/cid29.h + dcmsr/include/dcmtk/dcmsr/cmr/cid4020.h + dcmsr/include/dcmtk/dcmsr/cmr/cid4021.h + dcmsr/include/dcmtk/dcmsr/cmr/cid4031.h + dcmsr/include/dcmtk/dcmsr/cmr/cid42.h + dcmsr/include/dcmtk/dcmsr/cmr/cid6147.h + dcmsr/include/dcmtk/dcmsr/cmr/cid7021.h + dcmsr/include/dcmtk/dcmsr/cmr/cid7181.h + dcmsr/include/dcmtk/dcmsr/cmr/cid7445.h + dcmsr/include/dcmtk/dcmsr/cmr/cid7452.h + dcmsr/include/dcmtk/dcmsr/cmr/cid7453.h + dcmsr/include/dcmtk/dcmsr/cmr/cid7464.h + dcmsr/include/dcmtk/dcmsr/cmr/cid7469.h + dcmsr/libcmr/cid100.cc + dcmsr/libcmr/cid10013.cc + dcmsr/libcmr/cid10033.cc + dcmsr/libcmr/cid11.cc + dcmsr/libcmr/cid244.cc + dcmsr/libcmr/cid247.cc + dcmsr/libcmr/cid29.cc + dcmsr/libcmr/cid4020.cc + dcmsr/libcmr/cid4021.cc + dcmsr/libcmr/cid4031.cc + dcmsr/libcmr/cid42.cc + dcmsr/libcmr/cid6147.cc + dcmsr/libcmr/cid7021.cc + dcmsr/libcmr/cid7181.cc + dcmsr/libcmr/cid7445.cc + dcmsr/libcmr/cid7452.cc + dcmsr/libcmr/cid7453.cc + dcmsr/libcmr/cid7464.cc + dcmsr/libcmr/cid7469.cc + +- Updated code definitions for DICOM 2022b: + Updated automatically generated code definitions for coding scheme "DCM". + For the coding schemes "NCIt" and "UMLS", 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 2022b: + Updated data dictionary for the latest edition of the DICOM standard, which + has been released only recently. + Affects: dcmdata/data/dicom.dic + dcmdata/include/dcmtk/dcmdata/dcdeftag.h + dcmdata/libsrc/dcdictbi.cc + +**** Changes from 2022.04.06 (riesmeier) + +- Updated copyright date. + Affects: COPYRIGHT + +- Replaced http:// by https:// in documentation. + Affects: README + +**** Changes from 2022.03.30 (riesmeier) + +- Fixed typo in comment. + Affects: dcmdata/libsrc/dcfilefo.cc + +**** Changes from 2022.03.30 (eichelberg) + +- Fixed possible NULL pointer dereference: + Fixed a possible NULL pointer dereference that could occur when reading an + invalid DICOM file from stdin. Loading a file from the file system + and receiving data over a network connection were not affected by this bug. + Thanks to Sharon Brizinov and Noam Moshe from Claroty Research for the + bug report and sample file. + Affects: dcmdata/libsrc/dcfilefo.cc + dcmdata/libsrc/dcitem.cc + +**** Changes from 2022.03.25 (riesmeier) + +- Fixed wrong VR in JSON example (see CP-2139). + Affects: dcmdata/docs/dcm2json.man + +**** Changes from 2022.03.24 (riesmeier) + +- Made log output in this module more consistent. + Affects: dcmjpls/apps/dcmcjpls.cc + dcmjpls/apps/dcmdjpls.cc + dcmjpls/libsrc/djcodecd.cc + dcmjpls/libsrc/djcodece.cc + +- Fixed incorrect warning in JPEG-LS decoder: + Fixed incorrect warning on value of Planar Configuration (0028,0006) + when decompressing a JPEG-LS compressed DICOM image. With CP-1843 it + was clarified that Planar Configuration should always be "0". + Thanks to Mathieu Malaterre for the + original report and suggested fix. + Affects: dcmjpls/libsrc/djcodecd.cc + +**** Changes from 2022.03.23 (riesmeier) + +- Don't add Derivation Description to Icon Images: + When compressing a DICOM image with an embedded icon image with the JPEG + true lossless encoder, which is dcmcjpeg's default compression option, a + Derivation Description (0008,2111) was added to the Icon Image Sequence + (0088,0200), even though it should only be added to the top-level dataset. + This issue has been fixed now. + Thanks to Mathieu Malaterre for the + original report. + Affects: dcmjpeg/libsrc/djcodece.cc + +**** Changes from 2022.03.22 (riesmeier) + +- Minor fixes to documentation: + Minor fixes to the documentation after recent commits. + Affects: config/docs/macros.txt + dcmdata/docs/img2dcm.man + +**** Changes from 2022.03.22 (eichelberg) + +- Fixed typo. + Affects: dcmjpeg/libijg12/jerror12.h + dcmjpeg/libijg16/jerror16.h + dcmjpeg/libijg8/jerror8.h + +**** Changes from 2022.03.18 (riesmeier) + +- Fixed documentation of default options: + Fixed documentation of command line options that are enabled by default. + Thanks to GitHub user "malaterre" for the original report and suggested fix. + Affects: dcmdata/apps/img2dcm.cc + dcmdata/docs/img2dcm.man + +**** Changes from 2022.03.16 (riesmeier) + +- Replaced use of deprecated DIMSE Status Codes: + Now, the DCMTK compiles without the deprecated DIMSE Status Code defines. + User code should do the same since the deprecated defines (see "dimse.h") + will be removed in a future release. + Affects: dcmpstat/libsrc/dvpspll.cc + dcmpstat/libsrc/dvpsprt.cc + dcmpstat/libsrc/dvpsspl.cc + dcmqrdb/libsrc/dcmqrcbm.cc + dcmqrdb/libsrc/dcmqrdbi.cc + +- Fixed some outdated DIMSE Status strings: + Updated the mapping of some DIMSE Status Codes to strings in the + DU_xxxStatusString() methods to reflect the changes introduced with + commit 5422b14947. This also avoids the use of deprecated defines. + Affects: dcmnet/libsrc/diutil.cc + +**** Changes from 2022.03.15 (riesmeier) + +- Various minor fixes to "macros.txt": + Fixed various minor issues in the text file, e.g. line breaks after 80 + characters and two spaces after the period. + Affects: config/docs/macros.txt + +**** Changes from 2022.03.15 (eichelberg) + +- Removed overly strict check in the JPEG decoder: + Removed a check for the validity of the Huffman table in the JPEG + decoder that triggers certain valid JPEG images as being invalid. + This closes DCMTK issue #1018. + Thanks to Mathieu Malaterre for the bug report and suggested fix. + Affects: config/docs/macros.txt + dcmjpeg/libijg12/jdhuff.c + dcmjpeg/libijg16/jdhuff.c + dcmjpeg/libijg8/jdhuff.c + +**** Changes from 2022.03.15 (riesmeier) + +- Fixed "delimiter characters" for VR UC: + Fixed wrong definition of "delimiter characters" for the Value + Representation (VR) "Unlimited Characters" (UC). Now, the backslash + is treated as a delimiter (see DICOM PS3.5). + Also changed handling of getDelimiterChars() in dcmdata's VR classes. + Thanks to Par Lidberg for the original report + and suggested fix. + Affects: dcmdata/include/dcmtk/dcmdata/dcvrlo.h + dcmdata/include/dcmtk/dcmdata/dcvrpn.h + dcmdata/include/dcmtk/dcmdata/dcvrsh.h + dcmdata/libsrc/dcchrstr.cc + dcmdata/libsrc/dcvr.cc + dcmdata/libsrc/dcvrlo.cc + dcmdata/libsrc/dcvrpn.cc + dcmdata/libsrc/dcvrsh.cc + +**** Changes from 2022.03.14 (riesmeier) + +- Removed misplaced comment character "//". + Affects: dcmseg/libsrc/segutils.cc + +- Specified "non-signficant characters" for VR UC: + The backslash and the space character are now specified as not significant + for the Value Representation "Unlimited Characters" (UC), since this is how + this VR is defined in DICOM PS3.5. With this change, a UC value consisting + of spaces and/or backslashes only is considered an empty value. + Affects: dcmdata/libsrc/dcvruc.cc + +- Added check on missing Unique Key (strict mode): + Report a more appropriate error, both to the logger and as a DIMSE Status + Code (A900 instead of C000), if the Unique Key is missing for the higher + level(s) of a C-FIND request. + This check is only performed in "strict mode", i.e. when dcmqrscp is called + with option --check-find (-XF). + Thanks to Abdallah Maouche for the report and + suggested fix. See also PR #53 at https://github.com/DCMTK/dcmtk/pull/53. + Affects: dcmqrdb/libsrc/dcmqrdbi.cc + +**** Changes from 2022.03.14 (onken) + +- Fix for bug introduced in 1fd08a: + Fixed bug leading to doubled first frame in Per Frame Functional Group + Sequence. Also fixed related test case. + Affects: dcmfg/libsrc/concatenationloader.cc + dcmfg/tests/t_concatenation_loader.cc + +- Removed debug output. + Affects: dcmiod/libsrc/iodutil.cc + +- Fixed another issue with binary seg concatenations: + Related to commit 95335b now all bytes shifted to the right are casted + to unsigned before. Also a superfluous byte copying has been removed that + also lead to problems when using binary segmentatios of unusual dimensions. + Also made some minor improvements. + Affects: dcmfg/libsrc/concatenationloader.cc + dcmiod/libsrc/iodutil.cc + dcmseg/libsrc/segdoc.cc + dcmseg/libsrc/segutils.cc + +**** Changes from 2022.03.07 (onken) + +- Check return value for error. + Affects: dcmdata/apps/mdfdsman.cc + +**** Changes from 2022.03.04 (onken) + +- Forbid insertion of encapsulated Pixel Data: + dcmodify's options -mf and -if can be used to insert the content of a + file into an element's value. This also works for uncompressed data in + the Pixel Data element. + If a user tried to replace or insert encapsulated pixel data, the new + value was not inserted at all, however, dcmodify reported success. + Now, the insertion/modification of values for encapsulated Pixel Data is + rejected by dcmodify and a related error is reported to the user. + Also, trying to insert value directly from the command line into the + encapsulated Pixel Data element (via -m / -i options) now produces a + better error message. + Thanks to forum user "upnorth173" for the report. + Affects: dcmdata/apps/mdfdsman.cc + dcmdata/apps/mdfdsman.h + +- Reformatted source code. + Affects: dcmdata/apps/mdfdsman.cc + +**** Changes from 2022.03.04 (goldhammer) + +- Improved detection of additional depencencies for statically linking: + Improved detection of additional library depencencies for statically + linking the third-party libraries used in the DCMTK. The problem is caused by + third party libraries having depencencies themselves. For example libxml2 + requires zlib among others. This gets even more complicated when on one + operating system for example libtiff is compiled with libdeflate an on + another system it is not. This means on one system there are linker errors + when libdeflate is not included and on another system there are errors when + it is included. + The best solution would possibly be to just compile all third-party libraries + ourself and use these versions for statically linking. In the meantime this + solution can somewhat handle these differences. + Affects: CMake/dcmtkPrepare.cmake + +- Added flag DCMTK_USE_OWN_FINDOPENJPEG_MODULE: + The DCMTK has its own FindOpenJPEG.cmake module. Sometimes it can be useful + to use this module instead of the one provided by the operating system. The + default is still to use the one provided by the operating system. + Affects: CMake/3rdparty.cmake + +- Fixed a warning in the FindOpenJPEG module: + The problem was OPENJPEG is not OpenJPEG and if you look for _FOUND + it could have caused issues. + Affects: CMake/FindOpenJPEG.cmake + +**** Changes from 2022.03.04 (eichelberg) + +- Fixed warning caused by previous commit. + Affects: dcmfg/libsrc/concatenationcreator.cc + +**** Changes from 2022.03.03 (onken) + +- Fix some binary segmentation concatenations: + When producing binary concatenations of segmentations objects using + a configuration where the number of bytes per concatenation instance is + not dividable by 8 (i.e. where in such an instance numFrames * rows * + cols % 8 != 0), not all bits (pixels) have been copied correctly from + the source image into the concatenation instance. + The problem has been fixed by adapting number of frames in the + concatenation instance so that numFrames * rows * cols % 8 = 0. If the + user configures numFrames (per instance) manually, the value is adapted + automatically as well (and an information is printed to the logger). + Also, when loading 1 bit / pixel segmentation concatenations, there was + a bug with clearing certain bits due to the fact that bit-shifting a + number to the right does not automatically introduce 0 but instead + introduceds 0 or 1 based on the signedness of the number's variable. + Affects: dcmfg/include/dcmtk/dcmfg/concatenationcreator.h + dcmfg/libsrc/concatenationcreator.cc + dcmiod/libsrc/iodutil.cc + +**** Changes from 2022.03.03 (eichelberg) + +- Fixed gcc -Wextrea warning caused by previous commit: + Fixed warning issued by gcc -Wextra caused by previous commit. + Affects: ofstd/include/dcmtk/ofstd/diag/ignrattr.def + +**** Changes from 2022.03.02 (eichelberg) + +- Suppress warnings about attribute redeclaration: + Suppress warnings about attribute redeclaration of inline methods, + which were issued when compiling DCMTK with Clang on Windows in + a DLL build. + Added: ofstd/include/dcmtk/ofstd/diag/ignrattr.def + Affects: dcmdata/include/dcmtk/dcmdata/dctagkey.h + ofstd/include/dcmtk/ofstd/ofdiag.h + +**** Changes from 2022.03.01 (eichelberg) + +- Fixed various Doxygen warnings: + Fixed various Doxygen warnings about missing parameters, return values etc. + Thanks to Marcel Baumann + for the contribution. + Affects: dcmdata/include/dcmtk/dcmdata/dcchrstr.h + dcmdata/include/dcmtk/dcmdata/dcdicdir.h + dcmdata/include/dcmtk/dcmdata/dcdicent.h + dcmdata/include/dcmtk/dcmdata/dcdict.h + dcmdata/include/dcmtk/dcmdata/dcelem.h + dcmdata/include/dcmtk/dcmdata/dcfcache.h + dcmdata/include/dcmtk/dcmdata/dchashdi.h + dcmdata/include/dcmtk/dcmdata/dcistrmf.h + dcmdata/include/dcmtk/dcmdata/dcjson.h + dcmdata/include/dcmtk/dcmdata/dclist.h + dcmdata/include/dcmtk/dcmdata/dcobject.h + dcmdata/include/dcmtk/dcmdata/dcpcache.h + dcmdata/include/dcmtk/dcmdata/dcpixel.h + dcmdata/include/dcmtk/dcmdata/dcstack.h + dcmdata/include/dcmtk/dcmdata/dctagkey.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/dcvrpobw.h + dcmdata/include/dcmtk/dcmdata/dcvrtm.h + dcmdata/include/dcmtk/dcmdata/dcvrur.h + dcmdata/include/dcmtk/dcmdata/libi2d/i2dbmps.h + dcmimage/include/dcmtk/dcmimage/dihsvpxt.h + dcmimage/include/dcmtk/dcmimage/diqthash.h + dcmimage/include/dcmtk/dcmimage/diybrpxt.h + dcmimage/include/dcmtk/dcmimage/diyf2pxt.h + dcmimage/include/dcmtk/dcmimage/diyp2pxt.h + dcmjpeg/include/dcmtk/dcmjpeg/djcodece.h + dcmjpeg/include/dcmtk/dcmjpeg/djcparam.h + dcmjpeg/include/dcmtk/dcmjpeg/djencbas.h + dcmjpeg/include/dcmtk/dcmjpeg/djencext.h + dcmjpeg/include/dcmtk/dcmjpeg/djenclol.h + dcmjpeg/include/dcmtk/dcmjpeg/djencpro.h + dcmjpeg/include/dcmtk/dcmjpeg/djencsps.h + dcmjpeg/include/dcmtk/dcmjpeg/djencsv1.h + dcmnet/docs/cptscp.dox + dcmnet/include/dcmtk/dcmnet/cond.h + dcmnet/include/dcmtk/dcmnet/dcasccff.h + dcmnet/include/dcmtk/dcmnet/dcasccfg.h + dcmnet/include/dcmtk/dcmnet/dccfenmp.h + dcmnet/include/dcmtk/dcmnet/dfindscu.h + dcmpstat/include/dcmtk/dcmpstat/dviface.h + dcmpstat/include/dcmtk/dcmpstat/dvpsfs.h + dcmpstat/include/dcmtk/dcmpstat/dvpsga.h + dcmpstat/include/dcmtk/dcmpstat/dvpsgr.h + dcmpstat/include/dcmtk/dcmpstat/dvpsgrl.h + dcmpstat/include/dcmtk/dcmpstat/dvpsibl.h + dcmpstat/include/dcmtk/dcmpstat/dvpsmsg.h + dcmpstat/include/dcmtk/dcmpstat/dvpsovl.h + dcmpstat/include/dcmtk/dcmpstat/dvpspr.h + dcmpstat/include/dcmtk/dcmpstat/dvpsrs.h + dcmpstat/include/dcmtk/dcmpstat/dvpssp.h + dcmpstat/include/dcmtk/dcmpstat/dvpsvl.h + dcmpstat/include/dcmtk/dcmpstat/dvsighdl.h + dcmqrdb/include/dcmtk/dcmqrdb/dcmqrcbs.h + dcmqrdb/include/dcmtk/dcmqrdb/dcmqrdbi.h + dcmqrdb/include/dcmtk/dcmqrdb/dcmqridx.h + dcmqrdb/include/dcmtk/dcmqrdb/dcmqrptb.h + dcmsign/include/dcmtk/dcmsign/sicertvf.h + dcmsign/include/dcmtk/dcmsign/sipkey.h + dcmsign/include/dcmtk/dcmsign/sisprof.h + dcmtls/include/dcmtk/dcmtls/tlsciphr.h + dcmtls/include/dcmtk/dcmtls/tlslayer.h + dcmtls/include/dcmtk/dcmtls/tlsopt.h + dcmwlm/include/dcmtk/dcmwlm/wlds.h + dcmwlm/include/dcmtk/dcmwlm/wlfsim.h + dcmwlm/include/dcmtk/dcmwlm/wlmactmg.h + oflog/include/dcmtk/oflog/helpers/strhelp.h + oflog/include/dcmtk/oflog/spi/filter.h + ofstd/include/dcmtk/ofstd/oflimits.h + ofstd/include/dcmtk/ofstd/ofstd.h + ofstd/include/dcmtk/ofstd/oftest.h + ofstd/include/dcmtk/ofstd/ofvriant.h + +**** Changes from 2022.02.21 (riesmeier) + +- Fixed typos and revised line breaks. + Affects: dcmtls/docs/certstor.dox + +**** Changes from 2022.02.18 (riesmeier) + +- Do not create new document in readXML(): + Do not create a new document in readXML(), but change the document type. + This also avoids confusing messages to the logger. + Affects: dcmsr/libsrc/dsrdoc.cc + +- Made XML elements "date" and "time" optional: + The XML elements "instance/creation/date" and "instance/creation/time" + are optional according to the XML Schema. Therefore, the readXML() method + should not require them to be present if the surrounding XML element is + present. + Affects: dcmsr/libsrc/dsrdoc.cc + +- Do not set instance creator UID automatically: + Do not set instance creator UID automatically to identify instances that + have been created by this toolkit. + Affects: dcmsr/libsrc/dsrdoc.cc + +**** Changes from 2022.02.11 (riesmeier) + +- Extended comment on Type of Modality attribute. + Affects: dcmdata/libsrc/dcddirif.cc + +**** Changes from 2022.02.10 (riesmeier) + +- Added check on empty Unique Keys in "strict mode": + Report an error if a Unique Key value is empty for C-FIND (higher levels) or + C-MOVE (all levels down to the Q/R level) request. See DICOM PS3.4 Section + C.2.2.1.1, C.4.1.2.1 and C.4.2.2.1 for details. + This check is only performed in "strict mode", i.e. when dcmqrscp is called + with option --check-find (-XF) or --check-move (-XM), respectively. + This closes DCMTK Bug #1015. + Thanks to Abdallah Maouche for the report and + suggested fix. + Affects: dcmqrdb/libsrc/dcmqrdbi.cc + +**** Changes from 2022.02.09 (riesmeier) + +- Updated Doxygen configuration files: + Updated Doxgen configuration files to version 1.8.17 of this tool. + The update has been performed by calling "doxygen -u ". + Affects: doxygen/htmldocs.cfg + doxygen/manpages.cfg + +- Made use of DCM_PixelItemTag where appropriate. + Affects: dcmdata/tests/tsequen.cc + +**** Changes from 2022.02.08 (riesmeier) + +- Added missing well-known frame of reference: + Also removed Unicode characters from UID name of the Microscopy Bulk Simple + Annotations Storage SOP Class. + Affects: dcmdata/include/dcmtk/dcmdata/dcuid.h + dcmdata/libsrc/dcuid.cc + +- Introduced plural form where appropriate: + Use plural form for Ophthalmic Photography Image SOP classes since there + is one for 8-bit and one for 16-bit images, i.e. there are two of them. + Also fixed other minor documentation issues. + Affects: dcmdata/apps/img2dcm.cc + dcmdata/docs/img2dcm.man + +- Fixed spelling of attribute name in log message. + Affects: dcmdata/libi2d/i2dplnsc.cc + dcmdata/libi2d/i2dplop.cc + dcmdata/libi2d/i2dplvlp.cc + +- Removed email addresses and trailing spaces. + Affects: CREDITS + +**** Changes from 2022.02.08 (eichelberg) + +- Updated credits to include Segmed, Inc. + Affects: CREDITS + +**** Changes from 2022.01.26 (riesmeier) + +- Updated code definitions for DICOM 2022a: + Updated automatically generated code definitions for coding scheme "DCM". + For the coding schemes "NCIt" and "UMLS", 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 2022a: + Updated data dictionary for the latest edition of the DICOM standard, which + has been released only recently. + Since one of the DICOM attributes was "retired", the name of the associated + DcmTagKey constant also changed. This required minor changes to the source + code of the dcmrt module (automatically generated source files). + Affects: dcmdata/data/dicom.dic + dcmdata/include/dcmtk/dcmdata/dcdeftag.h + dcmdata/libsrc/dcdictbi.cc + dcmrt/libsrc/drtionpl.cc + dcmrt/libsrc/drtplan.cc + +**** Changes from 2022.01.11 (onken) + +- Fixed build warnings. + Affects: dcmfg/libsrc/fgbase.cc + dcmseg/libsrc/segdoc.cc + dcmseg/tests/tbigdim.cc + +**** Changes from 2022.01.09 (riesmeier) + +- Removed extra space. + Affects: CMake/3rdparty.cmake + +- Fixed typo. + Affects: dcmseg/include/dcmtk/dcmseg/segtypes.h + +**** Changes from 2022.01.08 (eichelberg) + +- Fixed further build error. + Affects: dcmseg/libsrc/segtypes.cc + +**** Changes from 2022.01.07 (onken) + +- Fixed build errors on some systems: + Fixed build errors on some systems introduced in commit 345223. + Affects: dcmseg/include/dcmtk/dcmseg/segdoc.h + dcmseg/libsrc/segdoc.cc + dcmseg/tests/tbigdim.cc + +**** Changes from 2022.01.06 (onken) + +- Allow up to 2^31-1 frames in segmentations: + At several occassions dcmseg and underlying modules limited the number + of frames, e.g. by (partly) restricting this value to 16 bit. + Now in theory 2^31-1 frames are possible, though the size for + non-concatenation instances is still limited to around 4 GB imposed by + the Pixel Data element's length field for uncompressed pixel data. + Added method on segmentations and underlying Multi-frame Dimension + module that prevents running dimension checking (especially Dimension + Index Pointer attributes) which can slow down writing a lot if many + frames are written. + Also made some simplifications and added documentation. + Added: dcmseg/tests/tbigdim.cc + Affects: dcmfg/libsrc/fginterface.cc + dcmiod/include/dcmtk/dcmiod/modmultiframedimension.h + dcmiod/libsrc/iodutil.cc + dcmiod/libsrc/modmultiframedimension.cc + dcmseg/include/dcmtk/dcmseg/segdoc.h + dcmseg/include/dcmtk/dcmseg/segment.h + dcmseg/include/dcmtk/dcmseg/segtypes.h + dcmseg/libsrc/segdoc.cc + dcmseg/libsrc/segment.cc + dcmseg/libsrc/segtypes.cc + dcmseg/tests/CMakeLists.txt + dcmseg/tests/Makefile.dep + dcmseg/tests/Makefile.in + dcmseg/tests/tests.cc + +**** Changes from 2022.01.05 (eichelberg) + +- Replaced C_CHAR_UNSIGNED test by a compile-only one: + Replaced the test for the signedness of the char type, which so far + needed to execute a test program with TRY_RUN, with test code that only + needs to compile, but not run, which makes things easier in a cross-compilation + setting. + Thanks to Helmut Grohne for the suggestion and patch. + This closes Github pull request #44. + Affects: CMake/GenerateDCMTKConfigure.cmake + INSTALL + Removed: CMake/dcmtkTestCharSignedness.cc + +- Added CMake option DCMTK_PORTABLE_LINUX_BINARIES: + Added CMake option DCMTK_PORTABLE_LINUX_BINARIES that is intended to help + with the generation of binary executables that run on different distributions. + When this option is enabled, only static versions of the third party libraries + are detected and used, and the linker is run with the options -static-libgcc + -static-libstdc++, which cause a static version of libgcc and libstdc++ to be + used. Note that glibc is still dynamically loaded, because a statically linked + glibc actually causes portability issues due to glibc components loaded from + shared objects at runtime. + The new option does not yet handle the link dependencies of the external + libraries (such as libxml2 requiring zlib) properly. In order to handle these, + one would have to identify the dependencies using pkg-config and then search + for static versions of all dependencies, possibly recursively. + Affects: CMake/3rdparty.cmake + CMake/dcmtkPrepare.cmake + +**** Changes from 2022.01.04 (eichelberg) + +- Fixed issue with defragmentTCP() in non-blocking mode on Windows, where the + WSAEWOULDBLOCK return code was not properly handled in the past. + Thanks to DCMTK forum user "wrenashe". + This closes DCMTK issue #1006. + Affects: dcmnet/libsrc/dulfsm.cc + +**** Changes from 2021.12.28 (eichelberg) + +- Fixed indentation. + Affects: dcmjpls/libsrc/djcodecd.cc + +- Updated warning message. + Affects: dcmjpls/libsrc/djcodecd.cc + +**** Changes from 2021.12.22 (eichelberg) + +- Corrected handling of character set for HG images: + The dcmpsprt tool reads an image (and optionally a presentation state) + and prepares a print job that is stored as a set of SP and HG files, + which can be spooled to a print server using dcmprscu. The HG image + contained some patient attributes (such as the PatientName) of the + original image, but did not proporly copy SpecificCharacterSet. + Thanks to Daniel Calvo for the bug report and fix. + Affects: dcmpstat/libsrc/dcmpstat.cc + dcmpstat/libsrc/dviface.cc + +**** Changes from 2021.12.14 (eichelberg) + +- Initialize buffer to zero. + Affects: dcmqrdb/libsrc/dcmqrtis.cc + +- Removed dead code to avoid warning. + Affects: dcmnet/libsrc/dimse.cc + +**** Changes from 2021.12.11 (eichelberg) + +- Fixed undefined behavior in handling A-ASSOCIATE-RJ: + Function ASC_getRejectParameters() did not properly validate the parameters of + an incoming A-ASSOCIATE-RJ packet, causing undefined behavior in the case + of invalid data. Proper validation has now been added. + Thanks to Matthias Gierlings + of the MITSicherheit.NRW project for the bug report. + Affects: dcmnet/libsrc/assoc.cc + +**** Changes from 2021.12.06 (riesmeier) + +- Updated code definitions for DICOM 2021e: + Updated automatically generated code definitions for coding scheme "DCM". + For the coding schemes "NCIt" and "UMLS", 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 + +**** Changes from 2021.12.03 (onken) + +- Fixed bug when adding more than 65535 frames. + Affects: dcmiod/libsrc/iodutil.cc + +**** Changes from 2021.12.02 (eichelberg) + +- Added logger output for OpenSSL initialization: + Added logger output for the case that the dcmsign module is unable + to load the legacy provider (introduced in OpenSSL 3.0.0) during + initialization. In this case certain hash key algorithms, including + RIPEMD160, are unavailable. + Affects: dcmsign/libsrc/dcsignat.cc + +**** Changes from 2021.11.26 (riesmeier) + +- Fixed Media Storage SOP Class UID in DICOMDIR: + Fixed wrong value for Media Storage SOP Class UID (0002,0002) that was + added to the File Meta Information Header of a DICOMDIR file. Instead + of 1.2.840.10008.1.3.10 (Media Storage Directory Storage SOP Class) the + private DCMTK-specific SOP Class UID 1.2.276.0.7230010.3.1.0.1 was used. + This was a result of a change of the default parameter of the method + DcmFileFormat::validateMetaInfo() introduced with commit d31f92867e. + Thanks to Gilles Mevel for the report and + suggested fix. + Affects: dcmdata/libsrc/dcdicdir.cc + +**** Changes from 2021.11.25 (riesmeier) + +- Updated data dictionary for DICOM 2021e: + Updated data dictionary for the latest edition of the DICOM standard, + which has been released only recently. + Affects: dcmdata/data/dicom.dic + dcmdata/include/dcmtk/dcmdata/dcdeftag.h + dcmdata/libsrc/dcdictbi.cc + +- Added missing spaces (removed by previous commit). + Affects: dcmfg/libsrc/concatenationloader.cc + dcmfg/tests/t_concatenation_loader.cc + +**** Changes from 2021.11.25 (onken) + +- Remove some typos in the codebase: + * Concatentation -> Concatenation + * intialized -> initialized + * "permits to" -> "permits one to" + * "allow to" -> "allow one to" + * "allows to" -> "allows one to" + * truely -> truly + * additonal -> additional + Thanks to GitHub user "malaterre" for the report and suggested fix. + Affects: dcmfg/libsrc/concatenationcreator.cc + dcmfg/libsrc/concatenationloader.cc + dcmfg/tests/t_concatenation_loader.cc + dcmjpeg/docs/dcmcjpeg.man + dcmpstat/apps/dcmpsmk.cc + dcmpstat/docs/dcmp2pgm.man + dcmpstat/docs/dcmprscp.man + dcmpstat/docs/dcmpsmk.man + dcmwlm/docs/wlmscpfs.man + +**** Changes from 2021.11.25 (eichelberg) + +- Fixed CMake OpenSSL feature tests: + On some platforms, the OpenSSL test cases need to be linked against the + pthread library, because otherwise linker errors lead to incorrect test + results, e.g. for the macro HAVE_OPENSSL_X509_ALGOR_GET0_CONST_PARAM. + The OpenSSL feature tests are now executed after the THREAD_LIBS variable + has been defined, and take into account its content. + Affects: CMake/GenerateDCMTKConfigure.cmake + CMake/dcmtkPrepare.cmake + +**** Changes from 2021.11.22 (riesmeier) + +- Replaced OFListIterator by OFListConstIterator: + Replaced type of iterator variable to OFListConstIterator to avoid + compiler errors reported by gcc when compiling DICOMscope with STL + and C++14 support enabled. + Thanks to GitHub user "malaterre" for the report and suggested fix. + Affects: dcmsr/include/dcmtk/dcmsr/dsrtlist.h + +**** Changes from 2021.11.20 (eichelberg) + +- Improvements to pkg-config support. + Affects: CMakeLists.txt + Renamed: dcmtk.pc.in + -> CMake/dcmtk.pc.in + +**** Changes from 2021.11.17 (riesmeier) + +- Changed order of OpenSSL libraries (Autoconf): + Changed order of additional libraries for OpenSSL 1.0.1. + Affects: config/configure.in + +**** Changes from 2021.11.16 (riesmeier) + +- Fixed comment on Autoconf define HAVE_CXX. + Affects: config/configure + config/include/dcmtk/config/osconfig.h.in + config/stdcxx.m4 + +- Fixed issue with findAndGetUint16Array() for OB: + Fixed issue with findAndGetUint16Array() when accessing pixel data that + is stored with a VR of "OB" (Other Byte). In this case, this method + returned an incorrect value for the optional "count" parameter. Of + course, the method findAndGetUint8Array() should be used for "OB" data, + but the returned number of elements in the array should be correct in + any case. + Now, all findAndGetXXXArray() methods again use the data element length + for determining the value of the "count" parameter, which requires no + handling of special cases. + Thanks to forum user "st80rules" for the report. + Affects: dcmdata/libsrc/dcitem.cc + +- Enhanced Autoconf build system for OpenSSL checks: + Enhanced GNU Autoconf build system (aka configure) for the recently + changed CMake approach to check support for certain OpenSSL features. + Also revised, i.e. simplified and harmonized, the use of the M4 macros + AH_TEMPLATE and AC_DEFINE. + Affects: config/aclocal.m4 + config/configure + config/configure.in + config/include/dcmtk/config/osconfig.h.in + +**** Changes from 2021.11.16 (goldhammer) + +- Fixed confusing value of Host Type on Windows: + When compiling 32-bit binaries on Windows, the Host type was still shown as + "AMD64". This was confusing and misleading. Now 32-bit binaries should show + "Win32", whereas 64-bit binaries should show "x64". + This closes DCMTK issue #940. + Affects: CMake/GenerateDCMTKConfigure.cmake + +**** Changes from 2021.11.16 (eichelberg) + +- Documented cross-compiling support: + Documented the support for cross-compiling DCMTK using the CMake toolchain. + Thanks to Claus Stovgaard for the implementation! + Affects: INSTALL + +- Fixed previous commit: + One symbol was not renamed consistently in the previous commit, + this is now fixed. + Affects: dcmtls/libsrc/tlsciphr.cc + +**** Changes from 2021.11.15 (eichelberg) + +- Renamed OpenSSL related feature test symbols: + Renamed all OpenSSL related feature test preprocessor symbols to + include the term OPENSSL to make it clear that these features + are related to the OpenSSL library. + Affects: CMake/GenerateDCMTKConfigure.cmake + CMake/osconfig.h.in + dcmsign/include/dcmtk/dcmsign/simdmac.h + dcmsign/libsrc/dcsignat.cc + dcmsign/libsrc/sicert.cc + dcmsign/libsrc/siprivat.cc + dcmsign/libsrc/sitstamp.cc + dcmtls/libsrc/tlsciphr.cc + dcmtls/libsrc/tlslayer.cc + dcmtls/libsrc/tlstrans.cc + +**** Changes from 2021.11.12 (eichelberg) + +- Fixed memory leak in DcmElement::getPartialValue(): + Fixed a memory leak in DcmElement::getPartialValue() that occured when the + input stream created for reading the partial element from the DICOM file + had status "bad" after creation, e.g. because the DICOM file had been removed. + Thanks to DCMTK forum user Shaeto for the bug report. + This closes DCMTK issue #1010. + Affects: dcmdata/libsrc/dcelem.cc + +**** Changes from 2021.11.11 (riesmeier) + +- Added support for two new Storage SOP Classes: + Added definition of new Storage SOP Class UIDs introduced with Supplement + 160 (Second Generation Radiotherapy - Patient Setup and Delivery Instruction). + This commit also adds support for the various networking tools and to the + DICOMDIR generation code. + This closes DCMTK Conformance #1009. + Affects: dcmdata/include/dcmtk/dcmdata/dcuid.h + dcmdata/libsrc/dcddirif.cc + dcmdata/libsrc/dcuid.cc + dcmnet/docs/movescu.man + dcmnet/docs/storescp.man + dcmnet/etc/storescp.cfg + dcmnet/etc/storescu.cfg + dcmqrdb/docs/dcmqrscp.man + dcmqrdb/etc/dcmqrprf.cfg + +**** Changes from 2021.11.09 (riesmeier) + +- Removed useless typecasts from inline method: + Removed useless typecasts reported by gcc with -Wuseless-cast. There are + numerous other warnings like this in the DCMTK that are reported when the + additional warning option is set, but these two could leak into user code + since they are used in an inline method. + Thanks to GitHub user "malaterre" for the report and suggested fix. + Affects: dcmimgle/include/dcmtk/dcmimgle/diovpln.h + +**** Changes from 2021.11.05 (onken) + +- Print warning for old cmake dictionary options: + Thanks to GitHub user "malaterre" for the report and patch. + Affects: CMake/GenerateDCMTKConfigure.cmake + +**** Changes from 2021.10.30 (eichelberg) + +- Enable C-GET for write protected storage areas: + dcmqrscp now accepts storage presentation contexts for "read-only" storage + areas if SCP/SCU role negotiation is in place and the client has requested + the SCP role for the SOP class. This enables the use of C-GET on such + storage areas. + This closes DCMTK issue #967. + Affects: dcmqrdb/libsrc/dcmqrsrv.cc + +**** Changes from 2021.10.25 (eichelberg) + +- Removed duplicate test. + Affects: CMake/GenerateDCMTKConfigure.cmake + +**** Changes from 2021.10.20 (eichelberg) + +- Added two additional configure tests needed on OpenBSD: + Added two additional configure tests needed for LibreSSL on OpenBSD 7, + and renamed the macros defined by the configure tests to simplify + the porting of these tests to the autoconf toolchain. + Affects: CMake/GenerateDCMTKConfigure.cmake + CMake/osconfig.h.in + dcmsign/libsrc/dcsignat.cc + dcmsign/libsrc/sicert.cc + dcmsign/libsrc/siprivat.cc + dcmsign/libsrc/sitstamp.cc + dcmtls/libsrc/tlsciphr.cc + dcmtls/libsrc/tlslayer.cc + dcmtls/libsrc/tlstrans.cc + +**** Changes from 2021.10.19 (eichelberg) + +- Introduced configure tests for OpenSSL features: + Introduced a set of new configure tests for the various functions, header + files and macros that have changed between different OpenSSL versions and + require special handling in DCMTK. This replaces the conditional + compilation based on the values of OPENSSL_VERSION_NUMBER and + LIBRESSL_VERSION_NUMBER, which was difficult to maintain as OpenSSL + and LibreSSL change over time. + Affects: CMake/GenerateDCMTKConfigure.cmake + CMake/osconfig.h.in + dcmsign/include/dcmtk/dcmsign/simdmac.h + dcmsign/libsrc/dcsignat.cc + dcmsign/libsrc/sicert.cc + dcmsign/libsrc/siprivat.cc + dcmsign/libsrc/sitstamp.cc + dcmtls/libsrc/tlsciphr.cc + dcmtls/libsrc/tlslayer.cc + dcmtls/libsrc/tlstrans.cc + +**** Changes from 2021.10.18 (riesmeier) + +- Output more build options with --version: + Now, more details on how the DCMTK has been built are printed when + calling one of the DCMTK command line tools with --version option, + e.g. "Build options: debug threads lfs extern-dict dcmdictpath". + Affects: ofstd/libsrc/ofconapp.cc + +**** Changes from 2021.10.14 (riesmeier) + +- Fixed typo in comment. + Affects: dcmrt/include/dcmtk/dcmrt/drmdose.h + dcmrt/include/dcmtk/dcmrt/drmimage.h + dcmrt/include/dcmtk/dcmrt/drmplan.h + dcmrt/include/dcmtk/dcmrt/drmstrct.h + +**** Changes from 2021.10.11 (riesmeier) + +- Fixed further inconsistencies. + Affects: dcmnet/include/dcmtk/dcmnet/helpers.h + dcmnet/libsrc/helpers.cc + +**** Changes from 2021.10.11 (onken) + +- Fixed documentation. + Affects: dcmnet/include/dcmtk/dcmnet/helpers.h + +**** Changes from 2021.10.11 (eichelberg) + +- Fixed incorrect constructor call: + Fixed a call where NULL was passed to an OFString constructor, which + causes problems when DCMTK is compiled with STL enabled. + Affects: dcmpstat/libsrc/dvpsfs.cc + +**** Changes from 2021.10.09 (onken) + +- Fixed bug introduced in a9697d: + Fixed bug introduced in a9697d due to merging two methods which do + different things. Added some API documentation for clarification. + Affects: dcmnet/include/dcmtk/dcmnet/assoc.h + dcmnet/include/dcmtk/dcmnet/helpers.h + dcmnet/libsrc/assoc.cc + dcmnet/libsrc/dulfsm.cc + dcmnet/libsrc/dulparse.cc + dcmnet/libsrc/helpers.cc + +**** Changes from 2021.10.08 (schlamelcher) + +- Removed some dead code (CMake): + Removed some code that was intended as a fall-back mechanism to implement new + CMake versions policy setting behavior (used in the cmake_minimum_required + command). Turns out there is no way to implement this using the cmake_policy + command, as the command only supports setting the minimum policy version in + those older CMake versions (i.e. NOT the maximum policy version), effectively + having no effect for the intended purpose. + Affects: CMakeLists.txt + +**** Changes from 2021.10.02 (onken) + +- Fixed poss. NULL pointer dereference/double free: + Thanks to Jinsheng Ba for the report and some patches. + Added: dcmnet/include/dcmtk/dcmnet/helpers.h + dcmnet/libsrc/helpers.cc + Affects: dcmnet/libsrc/CMakeLists.txt + dcmnet/libsrc/Makefile.in + dcmnet/libsrc/assoc.cc + dcmnet/libsrc/dcuserid.cc + dcmnet/libsrc/dul.cc + dcmnet/libsrc/dulconst.cc + dcmnet/libsrc/dulextra.cc + dcmnet/libsrc/dulfsm.cc + dcmnet/libsrc/dulparse.cc + dcmnet/libsrc/dulpres.cc + Renamed: dcmnet/libsrc/dulstruc.h + -> dcmnet/include/dcmtk/dcmnet/dulstruc.h + +**** Changes from 2021.10.01 (eichelberg) + +- Check whether DICOM dataset contains extended chars: + dcm2json now checks whether extended characters are present in a DICOM + dataset that has no SpecificCharacterSet attribute or has the attribute + value set to 'ISO_IR 6'. + This fixes DCMTK issue #1004. + Thanks to Mathieu Malaterre for the bug report. + Affects: dcmdata/apps/dcm2json.cc + +**** Changes from 2021.09.30 (riesmeier) + +- Removed trailing Unicode character in manpage: + Also removed trailing Unicode character U+200B from UID value in manpage. + Affects: dcmnet/docs/movescu.man + dcmnet/docs/storescp.man + dcmqrdb/docs/dcmqrscp.man + +- Converted non-ASCII characters to ASCII: + Thanks to GitHub user "malaterre" for the report and suggested fix. + Affects: dcmect/libsrc/enhanced_ct.cc + dcmfg/libsrc/concatenationloader.cc + dcmiod/include/dcmtk/dcmiod/modsopcommon.h + dcmseg/include/dcmtk/dcmseg/segment.h + dcmtls/include/dcmtk/dcmtls/tlsciphr.h + +- Removed trailing Unicode character from UID value: + Removed trailing Unicode character U+200B from UID value. + Thanks to GitHub user "malaterre" for the report. + Affects: dcmdata/include/dcmtk/dcmdata/dcuid.h + +- Replaced German umlaut by its transliteration: + Replaced German umlaut in code meaning by its transliteration. + Thanks to GitHub user "malaterre" for the report. + Affects: dcmsr/include/dcmtk/dcmsr/codes/dcm.h + +**** Changes from 2021.09.29 (eichelberg) + +- Fixed bug in SiCertificate::getCertCurveName(): + Fixed bug in SiCertificate::getCertCurveName() introduced with + commit #af74de3c7 that affected dcmsign when compiled with STL enabled. + Affects: dcmsign/libsrc/sicert.cc + +**** Changes from 2021.09.28 (eichelberg) + +- Removed definition of NEED_DARRAY macro: + Removed definition of NEED_DARRAY macro and conditional compilation based + on this macro, as this may lead to conflicting declarations of jpeg_memory_mgr + depending on whether or not the macro is defined when used code includes + the corresponding dcmjpeg header files. + This closes DCMTK issue #815. + Affects: dcmjpeg/libijg12/jmemmgr.c + dcmjpeg/libijg12/jpeglib12.h + dcmjpeg/libijg16/jmemmgr.c + dcmjpeg/libijg16/jpeglib16.h + dcmjpeg/libijg8/jmemmgr.c + dcmjpeg/libijg8/jpeglib8.h + +- Fixed warnings when compiling with OpenSSL 3.0: + Fixed warnings about the use of deprecated functions when compiling + with OpenSSL 3.0. + Affects: dcmpstat/libsrc/dvsighdl.cc + dcmsign/include/dcmtk/dcmsign/sicert.h + dcmsign/libsrc/dcsighlp.cc + dcmsign/libsrc/sicert.cc + dcmsign/libsrc/sitstamp.cc + +**** Changes from 2021.09.27 (riesmeier) + +- Check for space character in File-set ID: + According to DICOM PS3.10 Section 8.5, a space character is not allowed + to be included in a File-set ID. Therefore, the checkFilesetID() has + been enhanced in this regard and now reports an error if needed. + This closes DCMTK Bug #986. + Affects: dcmdata/libsrc/dcddirif.cc + +**** Changes from 2021.09.24 (riesmeier) + +- Fixed issue with unknown UID name: + Fixed issue with unknown UID name that cannot be mapped by putString() + to the associated UID value, e.g. '=SecondaryCaptureImage" where the + name suffix "Storage" is missing. Now, dump2dcm will exit with an error + in such a case. + Affects: dcmdata/include/dcmtk/dcmdata/dcerror.h + dcmdata/include/dcmtk/dcmdata/dcvrui.h + dcmdata/libsrc/dcerror.cc + dcmdata/libsrc/dcvrui.cc + +**** Changes from 2021.09.15 (onken) + +- Fixed possible NULL pointer dereference: + Thanks to Jinsheng Ba for the report and patch. + Affects: dcmnet/libsrc/diutil.cc + +**** Changes from 2021.09.14 (riesmeier) + +- Replaced old-style cast by OFstatic_cast(): + Replaced old-style cast by OFstatic_cast() to avoid warning message + reported by gcc with extra warning flags (-Wold-style-cast). + Affects: ofstd/libsrc/ofstd.cc + +**** Changes from 2021.09.13 (riesmeier) + +- Updated Context Group classes for DICOM 2021d: + Updated automatically generated Context Group classes for the 2021d edition + of the DICOM standard. All supported classes were updated, even though there + were no changes to most of them. + Affects: dcmsr/include/dcmtk/dcmsr/cmr/cid100.h + dcmsr/include/dcmtk/dcmsr/cmr/cid10013.h + dcmsr/include/dcmtk/dcmsr/cmr/cid10033.h + dcmsr/include/dcmtk/dcmsr/cmr/cid11.h + dcmsr/include/dcmtk/dcmsr/cmr/cid244.h + dcmsr/include/dcmtk/dcmsr/cmr/cid247.h + dcmsr/include/dcmtk/dcmsr/cmr/cid29.h + dcmsr/include/dcmtk/dcmsr/cmr/cid4020.h + dcmsr/include/dcmtk/dcmsr/cmr/cid4021.h + dcmsr/include/dcmtk/dcmsr/cmr/cid4031.h + dcmsr/include/dcmtk/dcmsr/cmr/cid42.h + dcmsr/include/dcmtk/dcmsr/cmr/cid6147.h + dcmsr/include/dcmtk/dcmsr/cmr/cid7021.h + dcmsr/include/dcmtk/dcmsr/cmr/cid7181.h + dcmsr/include/dcmtk/dcmsr/cmr/cid7445.h + dcmsr/include/dcmtk/dcmsr/cmr/cid7452.h + dcmsr/include/dcmtk/dcmsr/cmr/cid7453.h + dcmsr/include/dcmtk/dcmsr/cmr/cid7464.h + dcmsr/include/dcmtk/dcmsr/cmr/cid7469.h + dcmsr/libcmr/cid100.cc + dcmsr/libcmr/cid10013.cc + dcmsr/libcmr/cid10033.cc + dcmsr/libcmr/cid11.cc + dcmsr/libcmr/cid244.cc + dcmsr/libcmr/cid247.cc + dcmsr/libcmr/cid29.cc + dcmsr/libcmr/cid4020.cc + dcmsr/libcmr/cid4021.cc + dcmsr/libcmr/cid4031.cc + dcmsr/libcmr/cid42.cc + dcmsr/libcmr/cid6147.cc + dcmsr/libcmr/cid7021.cc + dcmsr/libcmr/cid7181.cc + dcmsr/libcmr/cid7445.cc + dcmsr/libcmr/cid7452.cc + dcmsr/libcmr/cid7453.cc + dcmsr/libcmr/cid7464.cc + dcmsr/libcmr/cid7469.cc + +- Updated code definitions for DICOM 2021d: + Updated automatically generated code definitions for coding scheme "DCM". + For the coding schemes "NCIt" and "UMLS", there were no changes. + Affects: dcmsr/include/dcmtk/dcmsr/codes/dcm.h + +- Updated data dictionary for DICOM 2021d: + Updated data dictionary for the latest edition of the DICOM standard, + which has been released only recently. + Affects: dcmdata/data/dicom.dic + dcmdata/include/dcmtk/dcmdata/dcdeftag.h + dcmdata/libsrc/dcdictbi.cc + +**** Changes from 2021.09.07 (eichelberg) + +- Fixed Posix feature flags for Android build. + Affects: CMake/dcmtkPrepare.cmake + +- Removed const qualifier in static function: + Removed const qualifier in static function, required for gcc 4.8.5 + on CentOS 7 (PPC). + Affects: dcmdata/libsrc/xml2dcm.cc + +**** Changes from 2021.09.01 (onken) + +- Harmonize dictionary options: + There are now two variables in CMake to control the default dictionary + chosen on DCMTK startup: DCMTK_DEFAULT_DICT and DCMTK_USE_DCMDICTPATH. + DCMTK_DEFAULTDICT has three settings: + - external: Will load dictionary on DCMTK startup from pre-defined + default path. + - builtin: Will compile and load built-in dictionary into DCMTK. + - none: Will not load any pre-configured dictionary at all. + On top, DCMTK can load one or more dictionaries from evaulating + the environment variable DCMDICTPATH at runtime. This behaviour is + controlled by the CMake setting DCMTK_USE_DCMDICTPATH. If it is turned + on, DCMTK will evaluate DCMDICTPATH, otherwise it doesn't. + More details can befound in dcmdata/docs/datadict.txt. + Also, an error message is printed if external default dictionary is + enabled but cannot be loaded (e.g. since file does not exist at + default path). In the past this has been silently ignored for the + default dictionary, only errors while loading dictionaries defined by + DCMDICTPATH environment variables have been reported. + Affects: CMake/DCMTKConfig.cmake.in + CMake/DCMTKConfig.old_cmake.in + CMake/GenerateDCMTKConfigure.cmake + CMake/dcmtkPrepare.cmake + CMake/osconfig.h.in + INSTALL + config/configure + config/configure.in + config/docs/macros.txt + config/include/dcmtk/config/osconfig.h.in + dcmdata/docs/datadict.txt + dcmdata/include/dcmtk/dcmdata/dcdict.h + dcmdata/libsrc/dcdict.cc + dcmdata/libsrc/dcdictbi.cc + dcmdata/libsrc/mkdictbi.cc + +**** Changes from 2021.08.31 (eichelberg) + +- Fixed minor warning issued by gcc 10.2.1. + Affects: dcmnet/libsrc/dulconst.cc + +**** Changes from 2021.08.30 (eichelberg) + +- Send Illumination and RefAL only when non-empty: + When sending a print request, only include Illumination and + Reflected Ambient Light in a Basic Film Session or Basic Film Box + N-CREATE-RQ when the attributes are non-empty. + Affects: dcmpstat/libsrc/dvpsfs.cc + dcmpstat/libsrc/dvpssp.cc + +**** Changes from 2021.08.27 (eichelberg) + +- Fixed compilation on Solaris after previous commit. + Affects: config/math.cc + +**** Changes from 2021.08.26 (eichelberg) + +- Enable compilation of DCMTK on DragonFly BSD: + Compilation of DCMTK on DragonFly BSD 6.0 is now supported. + Affects: CMake/3rdparty.cmake + CMake/GenerateDCMTKConfigure.cmake + CMake/dcmtkPrepare.cmake + CMake/osconfig.h.in + config/tests/arith.cc + +**** Changes from 2021.08.25 (eichelberg) + +- Made file extensions explicit for CMake CMP0115: + Converted the CMake files to explicit source file extensions, + as needed for CMake policy CMP0115, introduced with CMake 3.20, + which is not set to OLD anymore. + Thanks to Github user Kurt Sansom (kayarre) for the pull request. + This closes Github pull request #31. + Affects: CMakeLists.txt + dcmdata/apps/CMakeLists.txt + dcmdata/libi2d/CMakeLists.txt + dcmdata/libsrc/CMakeLists.txt + dcmdata/tests/CMakeLists.txt + dcmect/libsrc/CMakeLists.txt + dcmect/tests/CMakeLists.txt + dcmfg/libsrc/CMakeLists.txt + dcmfg/tests/CMakeLists.txt + dcmimage/apps/CMakeLists.txt + dcmimage/libsrc/CMakeLists.txt + dcmimgle/apps/CMakeLists.txt + dcmimgle/libsrc/CMakeLists.txt + dcmiod/libsrc/CMakeLists.txt + dcmiod/tests/CMakeLists.txt + dcmjpeg/apps/CMakeLists.txt + dcmjpeg/libijg12/CMakeLists.txt + dcmjpeg/libijg16/CMakeLists.txt + dcmjpeg/libijg8/CMakeLists.txt + dcmjpeg/libsrc/CMakeLists.txt + dcmjpls/apps/CMakeLists.txt + dcmjpls/libcharls/CMakeLists.txt + dcmjpls/libsrc/CMakeLists.txt + dcmnet/apps/CMakeLists.txt + dcmnet/libsrc/CMakeLists.txt + dcmnet/tests/CMakeLists.txt + dcmpmap/libsrc/CMakeLists.txt + dcmpstat/apps/CMakeLists.txt + dcmpstat/libsrc/CMakeLists.txt + dcmpstat/tests/CMakeLists.txt + dcmqrdb/apps/CMakeLists.txt + dcmqrdb/libsrc/CMakeLists.txt + dcmrt/apps/CMakeLists.txt + dcmrt/libsrc/CMakeLists.txt + dcmrt/tests/CMakeLists.txt + dcmseg/libsrc/CMakeLists.txt + dcmseg/tests/CMakeLists.txt + dcmsign/apps/CMakeLists.txt + dcmsign/libsrc/CMakeLists.txt + dcmsr/apps/CMakeLists.txt + dcmsr/libcmr/CMakeLists.txt + dcmsr/libsrc/CMakeLists.txt + dcmsr/tests/CMakeLists.txt + dcmtls/libsrc/CMakeLists.txt + dcmtls/tests/CMakeLists.txt + dcmtract/libsrc/CMakeLists.txt + dcmwlm/apps/CMakeLists.txt + dcmwlm/libsrc/CMakeLists.txt + dcmwlm/tests/CMakeLists.txt + oflog/libsrc/CMakeLists.txt + ofstd/libsrc/CMakeLists.txt + ofstd/tests/CMakeLists.txt + +**** Changes from 2021.08.24 (riesmeier) + +- Enhanced API documentation of putAndInsertXXX(): + Enhanced API documentation of the methods putAndInsertString() and + putAndInsertOFStringArray() by referring to the string format expected by + the putString()/putOFStringArray() method of the corresponding VR class. + Thanks to GitHub user "malaterre" for the original report. + Affects: dcmdata/include/dcmtk/dcmdata/dcitem.h + +**** Changes from 2021.08.22 (riesmeier) + +- Minor fixes to syntax usage and formatting. + Affects: dcmdata/apps/img2dcm.cc + dcmdata/docs/img2dcm.man + +**** Changes from 2021.08.22 (eichelberg) + +- Fixed bug in class Image2Dcm: + Fixed bug in Image2Dcm::readAndInsertPixelDataNextFrame that could cause + a std::logic_error exception to be thrown due to an incorrect string + declaration. + Affects: dcmdata/libi2d/i2d.cc + +**** Changes from 2021.08.21 (eichelberg) + +- Fixed minor warnings. + Affects: dcmdata/apps/img2dcm.cc + dcmdata/include/dcmtk/dcmdata/libi2d/i2d.h + dcmdata/libi2d/i2d.cc + +**** Changes from 2021.08.20 (eichelberg) + +- Added multiframe support to img2dcm: + img2dcm now supports the creation of multiframe images for output formats + supporting multiple frames, such as the Multiframe Secondary Capture SOP + classes or Opthalmic Photography. Furthermore, the handling of character + sets that may be specified in a template file, study/series file, or + on the command line has been revised. + Affects: dcmdata/apps/img2dcm.cc + dcmdata/docs/img2dcm.man + dcmdata/include/dcmtk/dcmdata/libi2d/i2d.h + dcmdata/include/dcmtk/dcmdata/libi2d/i2dbmps.h + dcmdata/include/dcmtk/dcmdata/libi2d/i2doutpl.h + dcmdata/include/dcmtk/dcmdata/libi2d/i2dplnsc.h + dcmdata/include/dcmtk/dcmdata/libi2d/i2dplop.h + dcmdata/include/dcmtk/dcmdata/libi2d/i2dplsc.h + dcmdata/include/dcmtk/dcmdata/libi2d/i2dplvlp.h + dcmdata/libi2d/i2d.cc + dcmdata/libi2d/i2djpgs.cc + dcmdata/libi2d/i2dplnsc.cc + dcmdata/libi2d/i2dplop.cc + dcmdata/libi2d/i2dplsc.cc + dcmdata/libi2d/i2dplvlp.cc + +- Updated XML templates for img2dcm: + Revised the Ophthalmic Photography XML templates for img2dcm. + These now contain a SpecificCharacterSet element matching the + XML encoding of the template file. + Added: dcmdata/data/OP_template_latin_1.xml + Renamed: dcmdata/data/OP_template.xml + -> dcmdata/data/OP_template_utf_8.xml + +- Added error code EC_SOPClassMismatch. + Affects: dcmdata/include/dcmtk/dcmdata/dcerror.h + dcmdata/libsrc/dcerror.cc + +- Convert monochrome BMP images to MONOCHROME2: + Class I2DBmpSource now recognizes monochrome BMP files and converts these + to MONOCHROME2 instead of RGB. + Affects: dcmdata/libi2d/i2dbmps.cc + +**** Changes from 2021.08.16 (eichelberg) + +- Send SpecificCharacterSet in BFS N-CREATE-RQ: + Send the SpecificCharacterSet attribute, when populated, as part of the + Basic Film Session N-CREATE-RQ message when spooling a print job from + Stored Print. + Affects: dcmpstat/libsrc/dvpssp.cc + +**** Changes from 2021.08.02 (riesmeier) + +- Added support for directory record "ANNOTATION": + Added support for new directory record type "ANNOTATION" introduced with + Supplement 222 (Microscopy Bulk Simple Annotations Storage SOP Class). + This closes DCMTK Conformance #1001. + Affects: dcmdata/include/dcmtk/dcmdata/dcddirif.h + dcmdata/include/dcmtk/dcmdata/dcdirrec.h + dcmdata/libsrc/dcddirif.cc + dcmdata/libsrc/dcdirrec.cc + +- Added support for new Storage SOP Class: + Added definition of new Storage SOP Class UID introduced with Supplement + 222 (Microscopy Bulk Simple Annotations Storage SOP Class). This commit + also adds support for the various networking tools. + This partly closes DCMTK Conformance #1001. + Affects: dcmdata/include/dcmtk/dcmdata/dcuid.h + dcmdata/libsrc/dcuid.cc + dcmnet/docs/movescu.man + dcmnet/docs/storescp.man + dcmnet/etc/storescp.cfg + dcmnet/etc/storescu.cfg + dcmqrdb/docs/dcmqrscp.man + dcmqrdb/etc/dcmqrprf.cfg + +- Updated code definitions for DICOM 2021c: + Updated automatically generated code definitions for coding scheme "DCM" + and "NCIt". For the coding scheme "UMLS", 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 2021c: + Updated data dictionary for the latest edition of the DICOM standard, which + has been released only recently. + Affects: dcmdata/data/dicom.dic + dcmdata/include/dcmtk/dcmdata/dcdeftag.h + dcmdata/libsrc/dcdictbi.cc + +**** Changes from 2021.08.02 (onken) + +- Added comment. + Affects: dcmect/tests/t_roundtrip.cc + +- Try fix dcmect_tests for Big Endian platform: + Thanks to forum user alciregi for the report. + Affects: dcmect/tests/t_roundtrip.cc + +**** Changes from 2021.07.25 (eichelberg) + +- Fixed minor warnings. + Affects: dcmdata/apps/img2dcm.cc + +- Fixed double inclusion of libxml2. + Affects: dcmdata/apps/CMakeLists.txt + dcmdata/tests/CMakeLists.txt + +**** Changes from 2021.07.23 (riesmeier) + +- Added missing newline at end of file. + Affects: dcmdata/include/dcmtk/dcmdata/xml2dcm.h + +**** Changes from 2021.07.23 (eichelberg) + +- Added explicit include for : + Explicitly include . This apparently solves a compile error due to + errno being undefined on certain platforms/configurations. + Thanks to Waldo Valenzuela for the report. + Affects: ofstd/libsrc/ofchrenc.cc + +- Fixed compilation with shared libraries. + Affects: dcmdata/include/dcmtk/dcmdata/xml2dcm.h + dcmdata/libsrc/CMakeLists.txt + +**** Changes from 2021.07.22 (riesmeier) + +- Fixed order of libraries to be linked: + Since dcmdata now depends on libxml2, the link order has to be changed. + Affects: dcmdata/apps/Makefile.in + +**** Changes from 2021.07.22 (eichelberg) + +- Fixed previous commit. + Affects: dcmdata/libi2d/i2djpgs.cc + +- Fixed test for maximum supported file size: + Fixed test for the maximum supported size of the imported JPEG file. + Thanks to Mathieu Malaterre for the bug report. + Affects: dcmdata/libi2d/i2djpgs.cc + +- Fixed Makefiles. + Affects: dcmdata/libsrc/CMakeLists.txt + +- Fixed Makefiles. + Affects: dcmdata/libi2d/CMakeLists.txt + dcmdata/libsrc/CMakeLists.txt + +- Added missing linefeed. + Affects: dcmdata/docs/img2dcm.man + +- Added support for XML import and OP output: + Added support for reading template files in XML format, and for the creation + of Ophthalmic Photograpy Image SOP instances. + Added: dcmdata/data/OP_template.xml + dcmdata/include/dcmtk/dcmdata/libi2d/i2dplop.h + dcmdata/libi2d/i2doutpl.cc + dcmdata/libi2d/i2dplop.cc + Affects: dcmdata/apps/CMakeLists.txt + dcmdata/apps/Makefile.in + dcmdata/apps/img2dcm.cc + dcmdata/docs/img2dcm.man + dcmdata/include/dcmtk/dcmdata/libi2d/i2d.h + dcmdata/include/dcmtk/dcmdata/libi2d/i2doutpl.h + dcmdata/libi2d/CMakeLists.txt + dcmdata/libi2d/Makefile.in + dcmdata/libi2d/i2d.cc + dcmdata/libi2d/i2dplnsc.cc + dcmdata/libi2d/i2dplsc.cc + dcmdata/libi2d/i2dplvlp.cc + dcmdata/tests/CMakeLists.txt + dcmdata/tests/Makefile.in + +- Added support for XML comment tags. + Affects: dcmdata/libsrc/xml2dcm.cc + +- Moved xml2dcm functionality into a class: + The functionality of the xml2dcm tool has now been wrapped into a helper class + named DcmXMLParseHelper that exposes DcmXMLParseHelper::readXmlFile() as a + public method that can be used in other tools as well to read DICOM files + and datasets in the XML format produced by dcm2xml. + Added: dcmdata/include/dcmtk/dcmdata/xml2dcm.h + dcmdata/libsrc/xml2dcm.cc + Affects: dcmdata/apps/xml2dcm.cc + dcmdata/include/dcmtk/dcmdata/dcerror.h + dcmdata/libsrc/CMakeLists.txt + dcmdata/libsrc/Makefile.in + dcmdata/libsrc/dcerror.cc + +- Support "-" as special output filename: + dcm2xml now supports "-" as special filename for the XML output file. + If this filename is given, the XML file is written to stdout. + Affects: dcmdata/apps/dcm2xml.cc + +**** Changes from 2021.07.21 (onken) + +- Removed unused function and applied formatting. + Affects: dcmdata/include/dcmtk/dcmdata/libi2d/i2djpgs.h + dcmdata/libi2d/i2djpgs.cc + +- Fix appn/comment combination of img2dcm options: + Fixed bug showing up if combination of img2dcm options --keep-appn and + -rc options is used (recently introduced in fbde44). + Affects: dcmdata/libi2d/i2djpgs.cc + +**** Changes from 2021.07.21 (riesmeier) + +- Removed empty line (added by previous commit). + Affects: dcmdata/docs/img2dcm.man + +**** Changes from 2021.07.21 (onken) + +- Updated copyright date and docs. + Affects: dcmdata/apps/img2dcm.cc + dcmdata/docs/img2dcm.man + dcmdata/include/dcmtk/dcmdata/libi2d/i2djpgs.h + +- Enforce wlmscpfs' sleeping options: + Make sure that wlmscpfs actually sleeps for the full amount of seconds + specified by the related command line options + (--sleep-[before|after|during). + Affects: dcmnet/tests/tscuscp.cc + dcmwlm/libsrc/wlmactmg.cc + ofstd/include/dcmtk/ofstd/ofstd.h + ofstd/libsrc/ofstd.cc + +**** Changes from 2021.07.19 (riesmeier) + +- Added support for CP-2084: + Added support for CP-2084 (Allow CONTAINER HAS OBS CONTEXT children of + CONTAINERS) to all "SR IOD Relationship Content Constraint Checker" + classes that are affected. + This closes DCMTK Conformance #998. + Affects: dcmsr/libsrc/dsracqcc.cc + dcmsr/libsrc/dsrbascc.cc + dcmsr/libsrc/dsrc3dcc.cc + dcmsr/libsrc/dsrchecc.cc + dcmsr/libsrc/dsrcolcc.cc + dcmsr/libsrc/dsrcomcc.cc + dcmsr/libsrc/dsrenhcc.cc + dcmsr/libsrc/dsrimpcc.cc + dcmsr/libsrc/dsrkeycc.cc + dcmsr/libsrc/dsrmaccc.cc + dcmsr/libsrc/dsrmamcc.cc + dcmsr/libsrc/dsrpficc.cc + dcmsr/libsrc/dsrplicc.cc + dcmsr/libsrc/dsrprdcc.cc + dcmsr/libsrc/dsrprocc.cc + dcmsr/libsrc/dsrrrdcc.cc + dcmsr/libsrc/dsrrsdcc.cc + dcmsr/libsrc/dsrsaecc.cc + dcmsr/libsrc/dsrspecc.cc + dcmsr/libsrc/dsrxrdcc.cc + +**** Changes from 2021.07.08 (riesmeier) + +- Output helpful warning messages to logger: + Output helpful warning messages to the logger when processing invalid + references to SOP Instances in IMAGE or WAVEFORM content items, e.g. + when reading an SR document from file. + Affects: dcmsr/include/dcmtk/dcmsr/dsrcomvl.h + dcmsr/include/dcmtk/dcmsr/dsrimgvl.h + dcmsr/include/dcmtk/dcmsr/dsrwavvl.h + dcmsr/libsrc/dsrcomvl.cc + dcmsr/libsrc/dsrimgvl.cc + dcmsr/libsrc/dsrwavvl.cc + +**** Changes from 2021.07.07 (riesmeier) + +- Added support for CP-1789 and CP-1998: + Added support for CP-1789 (Allow categorical observations without + measurements for ROIs in TID 1500) and CP-1998 (Relax unnecessary TID 1500 + requirements to simplify for some AI/ML use cases) to the "dcmsr/cmr" + implementation. Both Correction Proposals (CP) relax requirements for the + presence of content items or included templates in TID 1500 "Measurement + Report". + Also added a new regression test for a "minimal TID 1500 report". + This closes DCMTK Conformance #852 and #948. + Affects: dcmsr/include/dcmtk/dcmsr/cmr/tid1411.h + dcmsr/include/dcmtk/dcmsr/cmr/tid1419m.h + dcmsr/include/dcmtk/dcmsr/cmr/tid1500.h + dcmsr/include/dcmtk/dcmsr/cmr/tid1501.h + dcmsr/include/dcmtk/dcmsr/cmr/tid1600.h + dcmsr/libcmr/tid1411.cc + dcmsr/libcmr/tid1500.cc + dcmsr/libcmr/tid1501.cc + dcmsr/libcmr/tid1600.cc + dcmsr/tests/tests.cc + dcmsr/tests/tsrcmr.cc + +- Removed check on CMAKE_BACKWARDS_COMPATIBILITY: + Removed deprecated check on CMAKE_BACKWARDS_COMPATIBILITY. + Affects: CMake/dcmtkPrepare.cmake + +**** Changes from 2021.07.06 (eichelberg) + +- Fixed issue that caused duplicate calls to the DicomImage constructor to fail + when a compressed image is loadad and the result of + DcmDataset::getCurrentXfer() is passed as the second parameter. + This closes DCMTK issue #984. + Thanks to Daniel Grieger for the bug report. + Affects: dcmdata/include/dcmtk/dcmdata/dcpixel.h + dcmimgle/libsrc/didocu.cc + +- Documented MSVC versions not supported anymore. + Affects: INSTALL + +**** Changes from 2021.07.05 (schlamelcher) + +- Various enhancements for DCMTK's CMake exports: + Removed the need for exploiting the old CMake policy CMP0103 behavior. + Removed DCMTK_BUILD_CMKDIR, which was just an alias for CMAKE_BINARY_DIR. + Added the DCMTK:: namespace for all exported targets. + Added include directory target properties for all exported targets. + Added config interface target for adding the include directory for the + generated osconfig.h etc. by linking it. + Added DCMTK interface target for linking all DCMTK libraries as DCMTK::DCMTK. + Thanks to Alex Reinking for all the helpful + suggestions. + Affects: CMake/GenerateCMakeExports.cmake + CMake/dcmtkAfterModules.cmake + CMake/dcmtkMacros.cmake + CMake/dcmtkPrepare.cmake + CMakeLists.txt + ofstd/libsrc/CMakeLists.txt + +**** Changes from 2021.07.02 (schlamelcher) + +- Changed minimum required CMake version to 3.0.0: + As a first step for removing various workarounds for CMake functionality that + is not available in versions prior 3.0.0, the minimum version was changed to + test whether that is supported on all our target platforms and compilers. + Affects: CMakeLists.txt + +**** Changes from 2021.06.21 (schlamelcher) + +- Fixed some warnings in dcmiod. + Affects: dcmiod/include/dcmtk/dcmiod/iodimage.h + +**** Changes from 2021.06.21 (eichelberg) + +- Fixed minor warnings. + Affects: ofstd/include/dcmtk/ofstd/ofsockad.h + ofstd/libsrc/ofsockad.cc + ofstd/libsrc/ofstd.cc + +- Fixed minor warnings. + Added: ofstd/include/dcmtk/ofstd/diag/unreachb.def + Affects: oflog/include/dcmtk/oflog/thread/impl/syncwin.h + ofstd/include/dcmtk/ofstd/ofdiag.h + +**** Changes from 2021.06.15 (eichelberg) + +- Removed dead code that caused warnings on MSVC. + Affects: dcmimgle/libsrc/dimoimg.cc + +- Fixed minor warnings. + Affects: oflog/include/dcmtk/oflog/syslogap.h + oflog/include/dcmtk/oflog/thread/impl/syncwin.h + oflog/libsrc/syslogap.cc + +**** Changes from 2021.06.11 (eichelberg) + +- Fixed minor warnings. + Affects: dcmqrdb/libsrc/dcmqrdbi.cc + dcmtls/libsrc/tlsopt.cc + ofstd/include/dcmtk/ofstd/ofstd.h + ofstd/include/dcmtk/ofstd/ofvriant.h + +**** Changes from 2021.06.10 (eichelberg) + +- Fixed minor warnings. + Affects: CMake/dcmtkPrepare.cmake + dcmdata/include/dcmtk/dcmdata/dctagkey.h + dcmnet/include/dcmtk/dcmnet/scp.h + dcmseg/libsrc/segutils.cc + dcmtls/libsrc/tlsopt.cc + ofstd/libsrc/ofchrenc.cc + +**** Changes from 2021.06.09 (riesmeier) + +- Modified overlay rendering for multi-frame images: + Modified rendering of overlay planes for multi-frame images by implementing + support for CP-1974 (Overlay usage with Multi-frame Image unclear). Also + checked other aspects of this Correction Proposal and tested rendering of + single and multi-frame overlays for both single and multi-frame images. + Output useful messages to the logger (warning and trace) where approriate. + This closes DCMTK Conformance #949. + Affects: dcmimgle/include/dcmtk/dcmimgle/diovpln.h + dcmimgle/libsrc/diovpln.cc + +**** Changes from 2021.06.09 (eichelberg) + +- Fixed minor warnings. + Added: ofstd/include/dcmtk/ofstd/diag/stralias.def + ofstd/include/dcmtk/ofstd/diag/vsdeclpd.def + ofstd/include/dcmtk/ofstd/diag/vsobjdes.def + Affects: CMake/dcmtkPrepare.cmake + dcmdata/libsrc/vrscan.cc + dcmimage/libsrc/dipipng.cc + dcmjpeg/libsrc/dipijpeg.cc + dcmjpeg/libsrc/djdijg12.cc + dcmjpeg/libsrc/djdijg16.cc + dcmjpeg/libsrc/djdijg8.cc + dcmjpeg/libsrc/djeijg12.cc + dcmjpeg/libsrc/djeijg16.cc + dcmjpeg/libsrc/djeijg8.cc + dcmnet/libsrc/dccfrsmp.cc + oflog/include/dcmtk/oflog/helpers/strhelp.h + ofstd/include/dcmtk/ofstd/diag/pessmove.def + ofstd/include/dcmtk/ofstd/ofdiag.h + ofstd/libsrc/ofstd.cc + +**** Changes from 2021.06.08 (eichelberg) + +- Fixed minor warnings. + Affects: dcmfg/libsrc/fgfact.cc + dcmqrdb/libsrc/dcmqrdbi.cc + dcmtls/libsrc/tlslayer.cc + oflog/libsrc/hierlock.cc + ofstd/libsrc/ofchrenc.cc + +- Fixed minor warnings. + Added: ofstd/include/dcmtk/ofstd/diag/pessmove.def + Affects: dcmdata/libi2d/i2dbmps.cc + dcmjpls/libcharls/lokuptbl.h + dcmnet/libsrc/dccfenmp.cc + ofstd/include/dcmtk/ofstd/diag/memacces.def + ofstd/include/dcmtk/ofstd/diag/slfassov.def + ofstd/include/dcmtk/ofstd/ofdiag.h + ofstd/tests/tmem.cc + +**** Changes from 2021.06.07 (eichelberg) + +- Fixed minor warnings. + Added: ofstd/include/dcmtk/ofstd/diag/memacces.def + Affects: dcmdata/libsrc/dcvrdt.cc + dcmimgle/libsrc/didislut.cc + dcmimgle/libsrc/diovpln.cc + dcmjpeg/libijg12/jmemmgr.c + dcmjpeg/libijg16/jmemmgr.c + dcmnet/libsrc/dcmtrans.cc + dcmnet/libsrc/dimstore.cc + dcmpstat/libsrc/dvpscf.cc + dcmpstat/libsrc/dvpsmsg.cc + dcmqrdb/libsrc/dcmqrcbf.cc + dcmqrdb/libsrc/dcmqrptb.cc + dcmtls/libsrc/tlslayer.cc + ofstd/include/dcmtk/ofstd/ofdiag.h + ofstd/libsrc/ofxml.cc + +**** Changes from 2021.06.06 (eichelberg) + +- Fixed minor warnings. + Added: ofstd/include/dcmtk/ofstd/diag/asincond.def + ofstd/include/dcmtk/ofstd/diag/constexp.def + ofstd/include/dcmtk/ofstd/diag/slfassov.def + Affects: dcmimage/libsrc/diqtctab.cc + dcmimgle/include/dcmtk/dcmimgle/diinpxt.h + dcmimgle/include/dcmtk/dcmimgle/dimoipxt.h + dcmimgle/include/dcmtk/dcmimgle/dimoopxt.h + dcmjpeg/libijg8/jmemmgr.c + dcmjpeg/libsrc/djcodece.cc + dcmjpls/libcharls/scan.h + dcmnet/apps/findscu.cc + dcmnet/apps/getscu.cc + dcmnet/apps/movescu.cc + dcmnet/libsrc/dimse.cc + dcmnet/libsrc/dimstore.cc + dcmnet/tests/tdimse.cc + dcmpstat/apps/dcmprscu.cc + dcmpstat/libsrc/dvpssvl.cc + dcmpstat/libsrc/dvpstat.cc + dcmqrdb/libsrc/dcmqrcbm.cc + dcmseg/libsrc/segdoc.cc + oflog/libsrc/globinit.cc + ofstd/include/dcmtk/ofstd/ofdiag.h + ofstd/tests/tfilsys.cc + ofstd/tests/toffile.cc + ofstd/tests/ttuple.cc + +- Fixed minor warnings. + Affects: dcmdata/libsrc/dcddirif.cc + dcmfg/libsrc/stackinterface.cc + dcmimage/libsrc/dicoimg.cc + dcmimage/libsrc/diqtctab.cc + dcmimgle/libsrc/dcmimage.cc + dcmimgle/libsrc/diimage.cc + dcmimgle/libsrc/diluptab.cc + dcmimgle/libsrc/dimoimg.cc + dcmimgle/libsrc/diovlay.cc + dcmiod/libsrc/modmultiframedimension.cc + dcmjpls/libsrc/djcodece.cc + dcmnet/apps/echoscu.cc + dcmnet/apps/movescu.cc + dcmnet/apps/storescu.cc + dcmnet/libsrc/assoc.cc + dcmnet/libsrc/dcmtrans.cc + dcmnet/libsrc/dimcmd.cc + dcmnet/libsrc/dul.cc + dcmnet/libsrc/dulfsm.cc + dcmnet/libsrc/dulparse.cc + dcmpstat/apps/dcmmklut.cc + dcmpstat/apps/dcmpssnd.cc + dcmpstat/libsrc/dvpstat.cc + dcmqrdb/apps/dcmqrscp.cc + dcmqrdb/libsrc/dcmqrcbm.cc + dcmqrdb/libsrc/dcmqrdbi.cc + dcmqrdb/libsrc/dcmqrtis.cc + dcmrt/apps/drtdump.cc + dcmrt/libsrc/drmdose.cc + dcmsign/libsrc/dcsighlp.cc + dcmtls/libsrc/tlstrans.cc + dcmwlm/libsrc/wldsfs.cc + dcmwlm/libsrc/wlmactmg.cc + +**** Changes from 2021.06.05 (eichelberg) + +- Fixed minor warnings. + Affects: dcmdata/apps/xml2dcm.cc + dcmdata/libsrc/dcostrms.cc + dcmfg/libsrc/concatenationcreator.cc + dcmfg/libsrc/fgctacquisitiontype.cc + dcmfg/libsrc/fgctadditionalxraysource.cc + dcmfg/libsrc/fgctposition.cc + dcmfg/libsrc/fgcttabledynamics.cc + dcmfg/libsrc/fgctxraydetails.cc + dcmiod/include/dcmtk/dcmiod/iodimage.h + dcmiod/libsrc/iodmacro.cc + dcmjpeg/libijg12/jccoefct.c + dcmjpeg/libijg12/jccolor.c + dcmjpeg/libijg12/jcdctmgr.c + dcmjpeg/libijg12/jcdiffct.c + dcmjpeg/libijg12/jclhuff.c + dcmjpeg/libijg12/jcmarker.c + dcmjpeg/libijg12/jcphuff.c + dcmjpeg/libijg12/jcpred.c + dcmjpeg/libijg12/jcsample.c + dcmjpeg/libijg12/jcscale.c + dcmjpeg/libijg12/jcshuff.c + dcmjpeg/libijg12/jctrans.c + dcmjpeg/libijg12/jdatasrc.c + dcmjpeg/libijg12/jdcoefct.c + dcmjpeg/libijg12/jdcolor.c + dcmjpeg/libijg12/jddiffct.c + dcmjpeg/libijg12/jdmerge.c + dcmjpeg/libijg12/jdpostct.c + dcmjpeg/libijg12/jdpred.c + dcmjpeg/libijg12/jdsample.c + dcmjpeg/libijg12/jdscale.c + dcmjpeg/libijg12/jmemnobs.c + dcmjpeg/libijg12/jquant1.c + dcmjpeg/libijg12/jquant2.c + dcmjpeg/libijg16/jccoefct.c + dcmjpeg/libijg16/jccolor.c + dcmjpeg/libijg16/jcdctmgr.c + dcmjpeg/libijg16/jcdiffct.c + dcmjpeg/libijg16/jclhuff.c + dcmjpeg/libijg16/jcmarker.c + dcmjpeg/libijg16/jcphuff.c + dcmjpeg/libijg16/jcpred.c + dcmjpeg/libijg16/jcsample.c + dcmjpeg/libijg16/jcscale.c + dcmjpeg/libijg16/jcshuff.c + dcmjpeg/libijg16/jctrans.c + dcmjpeg/libijg16/jdatasrc.c + dcmjpeg/libijg16/jdcoefct.c + dcmjpeg/libijg16/jdcolor.c + dcmjpeg/libijg16/jddiffct.c + dcmjpeg/libijg16/jdmerge.c + dcmjpeg/libijg16/jdpostct.c + dcmjpeg/libijg16/jdpred.c + dcmjpeg/libijg16/jdsample.c + dcmjpeg/libijg16/jdscale.c + dcmjpeg/libijg16/jmemnobs.c + dcmjpeg/libijg16/jquant1.c + dcmjpeg/libijg16/jquant2.c + dcmjpeg/libijg8/jccoefct.c + dcmjpeg/libijg8/jccolor.c + dcmjpeg/libijg8/jcdctmgr.c + dcmjpeg/libijg8/jcdiffct.c + dcmjpeg/libijg8/jclhuff.c + dcmjpeg/libijg8/jcmarker.c + dcmjpeg/libijg8/jcphuff.c + dcmjpeg/libijg8/jcpred.c + dcmjpeg/libijg8/jcsample.c + dcmjpeg/libijg8/jcscale.c + dcmjpeg/libijg8/jcshuff.c + dcmjpeg/libijg8/jctrans.c + dcmjpeg/libijg8/jdatasrc.c + dcmjpeg/libijg8/jdcoefct.c + dcmjpeg/libijg8/jdcolor.c + dcmjpeg/libijg8/jddiffct.c + dcmjpeg/libijg8/jdmerge.c + dcmjpeg/libijg8/jdpostct.c + dcmjpeg/libijg8/jdpred.c + dcmjpeg/libijg8/jdsample.c + dcmjpeg/libijg8/jdscale.c + dcmjpeg/libijg8/jmemnobs.c + dcmjpeg/libijg8/jquant1.c + dcmjpeg/libijg8/jquant2.c + dcmnet/apps/storescp.cc + dcmqrdb/libsrc/dcmqrtis.cc + dcmseg/libsrc/segdoc.cc + dcmsr/libsrc/dsrxmld.cc + oflog/include/dcmtk/oflog/thread/impl/syncwin.h + ofstd/include/dcmtk/ofstd/offile.h + ofstd/libsrc/ofchrenc.cc + ofstd/libsrc/ofcmdln.cc + ofstd/libsrc/ofxml.cc + ofstd/tests/tfilsys.cc + +**** Changes from 2021.05.31 (eichelberg) + +- Fixed minor warnings. + Affects: dcmnet/tests/tdimse.cc + oflog/libsrc/snprintf.cc + ofstd/include/dcmtk/ofstd/ofassert.h + +**** Changes from 2021.05.30 (eichelberg) + +- Fixed minor warnings. + Affects: dcmdata/include/dcmtk/dcmdata/dcencdoc.h + dcmdata/libsrc/dcdict.cc + +**** Changes from 2021.05.29 (eichelberg) + +- Fixed minor warnings. + Affects: dcmdata/libsrc/vrscanl.c + dcmtls/tests/tscuscptls.cc + oflog/libsrc/lockfile.cc + +**** Changes from 2021.05.28 (schlamelcher) + +- Added a workaround for preventing MSVC warning D9025. + Affects: CMake/dcmtkPrepare.cmake + +**** Changes from 2021.05.28 (eichelberg) + +- Set TLS session ID and disable session caching: + The dcmtls module now explicitly sets a 32-bit random number as TLS session ID + and disables TLS session caching in OpenSSL. This fixes an interoperability issue + that occurs when a client requests TLS session reuse during the negotiation + of a second TLS network connection. One implementation known to + show this behaviour is DVTk, the DICOM Validation Toolkit. + Thanks to DCMTK forum user amal.jesudas for the report. + Affects: dcmtls/libsrc/tlslayer.cc + +**** Changes from 2021.05.27 (schlamelcher) + +- Fixed a stupid mistake in the previous commit. + Affects: CMake/dcmtkPrepare.cmake + +- Enabled various compiler warnings by default: + Our CMake configuration now enables '/W4' on Visual Studio and '-Wall' on + compilers that understand it by default. + Affects: CMake/dcmtkPrepare.cmake + +**** Changes from 2021.05.23 (eichelberg) + +- Accept forward slash as path separator on Windows: + On Windows, all routines in DCMTK that handle path names now properly + handle paths that use the forward slash or a mix of forward slash and + backslash characters as path separators. + Affects: dcmdata/libsrc/dcddirif.cc + dcmpstat/libsrc/dviface.cc + ofstd/libsrc/ofstd.cc + ofstd/tests/tofstd.cc + +**** Changes from 2021.05.19 (riesmeier) + +- Added "Enhanced X-Ray Radiation Dose SR" to list: + Added the Enhanced X-Ray Radiation Dose SR IOD / SOP Class, which was + introduced only recently with Supplement 214, to the list of known (but + not yet supported) document types. Full support for this IOD / SOP Class + will follow in a future commit. + This closes DCMTK Conformance #977. + Affects: dcmsr/data/dsr2xml.xsd + dcmsr/include/dcmtk/dcmsr/dsrtypes.h + dcmsr/libsrc/dsrtypes.cc + +- Added support for new Storage SOP Class: + Added definition of new Storage SOP Class UID introduced with Supplement + 214 (Enhanced X-Ray Radiation Dose SR (including Cone-beam CT)). + Also extended the various network tools and the DICOMDIR generation code + accordingly. + This partly closes DCMTK Conformance #977. + Affects: dcmdata/include/dcmtk/dcmdata/dcuid.h + dcmdata/libsrc/dcddirif.cc + dcmdata/libsrc/dcuid.cc + 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 + +**** Changes from 2021.05.14 (onken) + +- Fixed HL7HierarchicDesignatorMacro: + Thanks to Igor Kostyukov for the report + and fix. + Affects: dcmiod/libsrc/iodmacro.cc + +**** Changes from 2021.05.06 (schlamelcher) + +- Fixed typo in previous commit. + Affects: ofstd/libsrc/offilsys.cc + +- Introduced path separator conversion for OFpath: + The OFpath constructors now also have the second 'fmt' argument as they should + (based on how std::filesystem::path is specified) and perform automatic path + separator conversion as required. + This closes DCMTK issue #989. + Affects: ofstd/include/dcmtk/ofstd/offilsys.h + ofstd/libsrc/offilsys.cc + ofstd/tests/tfilsys.cc + +**** Changes from 2021.05.04 (onken) + +- Fix for Big Endian systems. Removed retired tag. + Affects: dcmect/tests/t_roundtrip.cc + dcmseg/tests/troundtrip.cc + +**** Changes from 2021.05.02 (eichelberg) + +- Fixed previous commit. + Affects: ofstd/libsrc/ofstd.cc + +- Accept forward slash as path separator on Windows: + OFStandard::getDirNameFromPath now silently also accepts the forward slash + character as a path separator when running on Windows, since Windows correctly + processes such paths. + Affects: ofstd/libsrc/ofstd.cc + +**** Changes from 2021.05.01 (eichelberg) + +- Switch stdin to binary mode on Windows: + Switch stdin to binary mode on Windows when reading a DICOM file from stdin. + This closes DCMTK issue #987. + Affects: dcmdata/libsrc/dcistrms.cc + +**** Changes from 2021.04.27 (riesmeier) + +- Check whether call of saveFile() was successful. + Affects: dcmsr/tests/mkreport.cc + +**** Changes from 2021.04.26 (riesmeier) + +- Added new test case for Contour Data: + Added new test case that shows how to add Contour Data to an RT + Structure Set instance. + Also made sure that the current data dictionary is loaded when the + dcmrt tests are run. + Added: dcmrt/tests/tcontour.cc + Affects: dcmrt/tests/CMakeLists.txt + dcmrt/tests/Makefile.in + dcmrt/tests/tests.cc + +**** Changes from 2021.04.25 (eichelberg) + +- Use random port number for dcmtls unit tests: + The dcmtls unit tests dcmtls_scp_tls and dcmtls_scp_pool_tls now select a + random port number between 61440 and 65535 for the tests instead of using + a hard-coded port 11112, which caused the tests to fail when this port was + already occupied. Up to 5 random ports are now tried before the tests + give up and fail. + Affects: dcmtls/tests/tscuscptls.cc + +**** Changes from 2021.04.24 (schlamelcher) + +- Introduced OFdeprecated and OFdeprecated_msg: + Introduced two new macros for marking functions as deprecated, with and + without an optional custom message. + The underlying compiler features should in theory also work on various kinds + of type and variable definitions, however, this was not tested and is also not + reflected in the introduced configuration tests. Therefore, the documentation + describes this feature only in relation with functions for now, which may be + extended as required after more testing. + This closes DCMTK issue #887. + Added: ofstd/include/dcmtk/ofstd/ofdeprec.h + Affects: CMake/GenerateDCMTKConfigure.cmake + CMake/osconfig.h.in + +**** Changes from 2021.04.24 (eichelberg) + +- Changed default TLS profile to BCP 195 ND: + Changed the default security profile in module dcmtls from the BCP 195 TLS + profile to the Non-downgrading BCP 195 TLS Profile, since the BCP 195 TLS + profile is not compliant anymore to BCP 195 as amended by RFC 8996 in + March 2021. TLS protocol versions 1.0 and 1.1 are now explicitly forbidden + in BCP 195. + This closes DCMTK issue #973. + Affects: dcmnet/docs/dcmrecv.man + dcmnet/docs/echoscu.man + dcmnet/docs/findscu.man + dcmnet/docs/storescp.man + dcmnet/docs/storescu.man + dcmtls/docs/certstor.dox + dcmtls/libsrc/tlsopt.cc + +**** Changes from 2021.04.22 (eichelberg) + +- Fixed storescu return code issues: + In some situations sturescu returned zero despite the association having + failed. Furthermore, changed the return code returned upon unsuccessful + store from 255 to 10 since 255 is reserved on some systems. + Affects: dcmnet/apps/storescu.cc + +- Fixed possible race condition of ofthread test. + Affects: ofstd/tests/tthread.cc + +**** Changes from 2021.04.18 (eichelberg) + +- Added checks to dcmtls test cases: + The dcmtls tests dcmtls_scp_tls and dcmtls_scp_pool_tls now check whether the + SCP thread has successfully opened the socket before continuing by starting + the SCUs. + Affects: dcmtls/tests/tscuscptls.cc + +**** Changes from 2021.04.17 (eichelberg) + +- Added additional check to dcmtls_scp_tls test. + Affects: dcmtls/tests/tscuscptls.cc + +- Added debug output to ofstd_thread semaphore test. + Affects: ofstd/tests/tthread.cc + +**** Changes from 2021.04.16 (eichelberg) + +- Fixed minor bug in ofthread unit test. + Affects: ofstd/tests/tthread.cc + +**** Changes from 2021.04.15 (eichelberg) + +- Attempt to make the ofthread unit test more robust: + The ofthread unit tests seems to fail occasionally depending on + platform and CPU load. This modification should make the test + a bit more robust. + Affects: ofstd/tests/tthread.cc + +**** Changes from 2021.04.12 (riesmeier) + +- Ignore missing binary value in meta header: + Don't treat missing binary value in file meta information, such as a + "hidden" value for File Meta Information Version (0002,0001), as an + error. This special handling makes sure that the default output of + dcm2xml does not result in an error when processing the output with + xml2dcm. + Affects: dcmdata/apps/xml2dcm.cc + +**** Changes from 2021.04.09 (riesmeier) + +- Fixed issue caused by changed attribute name. + Affects: dcmect/tests/t_roundtrip.cc + +- Added support for CID 247: + Added support for Context Group CID 247 (Laterality Left-Right Only). + As always, the source and header files were generated automatically. + Added: dcmsr/include/dcmtk/dcmsr/cmr/cid247.h + dcmsr/libcmr/cid247.cc + Affects: dcmsr/libcmr/CMakeLists.txt + dcmsr/libcmr/Makefile.in + +- Updated code definitions for DICOM 2021b: + Updated automatically generated code definitions for coding scheme "DCM" + and "UMLS". For the coding scheme "NCIt", 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 2021b: + Updated data dictionary for the latest edition of the DICOM standard, which + has been released only recently. + Since the DICOM attribute Estimated Dose Saving (0018,9324) has been retired, + the name of the associated DcmTagKey constant also changed. This required + minor changes to the source code of the dcmfg module. + Affects: dcmdata/data/dicom.dic + dcmdata/include/dcmtk/dcmdata/dcdeftag.h + dcmdata/libsrc/dcdictbi.cc + dcmfg/include/dcmtk/dcmfg/fgctexposure.h + dcmfg/libsrc/fgctexposure.cc + +**** Changes from 2021.04.07 (riesmeier) + +- Added typical error handling options to xml2dcm: + Added typical error handling options to xml2dcm, i.e. as known from + other tools such as dump2dcm. + Please note that xml2dcm is now a bit pickier about invalid input + documents but these violations can be ignored using the new option + --ignore-errors. + This closes DCMTK Feature #933. + Affects: dcmdata/apps/xml2dcm.cc + dcmdata/docs/xml2dcm.man + +**** Changes from 2021.04.07 (eichelberg) + +- Added default in switch statement. + Affects: dcmjpeg/libsrc/djcodece.cc + +**** Changes from 2021.04.06 (eichelberg) + +- Set CMake CMP0115 introduced with CMake 3.20 to OLD. + Affects: CMakeLists.txt + +**** Changes from 2021.04.05 (eichelberg) + +- Special handling of preprocessor warnings for MSVC: + MSVC does not support the #warning preprocessor directive. + On this platform we now use #pragma message() instead. + Affects: dcmdata/libsrc/dcencdoc.cc + dcmnet/libsrc/dcmtrans.cc + dcmnet/libsrc/dul.cc + dcmnet/libsrc/dulfsm.cc + +**** Changes from 2021.04.04 (eichelberg) + +- Added error messages for unsupported include macros: + Print an error message in case some user code still uses the now unsupported + include macros. A clear error message is better than follow-up errors due to + "suddenly" missing includes. + Affects: ofstd/include/dcmtk/ofstd/ofstdinc.h + +- Fixed warnings on Solaris with SunPro compiler. + Affects: dcmpmap/libsrc/dpmparametricmapbase.cc + dcmpmap/libsrc/dpmparametricmapiod.cc + +- Fixed comments. + Affects: ofstd/include/dcmtk/ofstd/ofstd.h + +**** Changes from 2021.03.31 (eichelberg) + +- Replaced DCMTK_DIAGNOSTIC_MIN_GCC_VERSION macro: + Replaced invocations of the DCMTK_DIAGNOSTIC_MIN_GCC_VERSION() macro by less + readable but portable code. This fixes some warnings reported by gcc -Wextra. + Affects: ofstd/include/dcmtk/ofstd/diag/cnvrsn.def + ofstd/include/dcmtk/ofstd/diag/overflow.def + ofstd/include/dcmtk/ofstd/diag/pop.def + ofstd/include/dcmtk/ofstd/diag/push.def + ofstd/include/dcmtk/ofstd/diag/shadow.def + ofstd/include/dcmtk/ofstd/diag/signcmp.def + +**** Changes from 2021.03.29 (riesmeier) + +- Fixed wrong class name in file header. + Affects: dcmimage/include/dcmtk/dcmimage/diquant.h + +**** Changes from 2021.03.29 (schlamelcher) + +- Documented DCMTK_TLS_LIBRARY_POSTFIX in INSTALL. + Affects: INSTALL + +**** Changes from 2021.03.26 (eichelberg) + +- Include when compiling in C++11 mode. + Affects: ofstd/include/dcmtk/ofstd/oftypes.h + +**** Changes from 2021.03.25 (schlamelcher) + +- Introduced CMake variable DCMTK_TLS_LIBRARY_POSTFIX: + Introduced a new advanced CMake cache variable DCMTK_TLS_LIBRARY_POSTFIX that + allows adding a custom postfix to all file names of all libraries that change + their ABI when linking against OpenSSL. + Please note that this suffix is not enabled by default and must be set to an + appropriate string in addition to enabling DCMTK_WITH_OPENSSL if you plan to + mix TLS enabled with non TLS enabled DCMTK builds. + This closes DCMTK issue #879. + Affects: CMake/dcmtkPrepare.cmake + dcmnet/libsrc/CMakeLists.txt + dcmpstat/libsrc/CMakeLists.txt + dcmsign/libsrc/CMakeLists.txt + dcmtls/libsrc/CMakeLists.txt + +**** Changes from 2021.03.25 (eichelberg) + +- Define __STDC_FORMAT_MACROS in oftypes.h. + Affects: ofstd/include/dcmtk/ofstd/oftypes.h + +**** Changes from 2021.03.25 (onken) + +- Fixed building for Apple M1: + Thanks to github user "Staars" for the report and patch. + Affects: config/tests/arith.cc + +**** Changes from 2021.03.24 (eichelberg) + +- Check if policy CMP0103 exists before setting it. + Affects: CMake/GenerateCMakeExports.cmake + +- Fixed issue in CMake scripts: + Fixed issue with configuring the private modules caused by previous commit. + Affects: CMake/GenerateCMakeExports.cmake + +**** Changes from 2021.03.23 (eichelberg) + +- Fixed configure warnings reported by CMake 3.19. + Affects: CMake/3rdparty.cmake + CMake/GenerateCMakeExports.cmake + CMake/GenerateDCMTKConfigure.cmake + Renamed: CMake/FindCharset.cmake + -> CMake/FindLIBCHARSET.cmake + CMake/FindSndfile.cmake + -> CMake/FindSNDFILE.cmake + CMake/FindWrap.cmake + -> CMake/FindWRAP.cmake + +- Fixed warnings about possible null ptr dereference. + Affects: dcmseg/tests/troundtrip.cc + +**** Changes from 2021.03.22 (eichelberg) + +- Fixed TOC-TOU race in storescp directory creation: + When storescp was run with the options --sort-on-study-uid --fork, + there was a race condition that could cause subdirectory creation + (and thus the receive process) to fail. This is fixed now. + Thanks to Github user gsmethells for the bug report and pull request. + This closes Github pull request #28. + Affects: dcmnet/apps/storescp.cc + +- Removed "using namespace std" statements: + Removed most of the "using namespace std" statements in DCMTK implementation + files, since these are in general undesirable. This will probably break + builds on a few platforms (such as VS 2008) that will be fixed with a + follow-up commit. + Affects: dcmimage/libsrc/diqtfs.cc + dcmimage/libsrc/diqtpbox.cc + dcmjpeg/libsrc/dipijpeg.cc + dcmjpeg/libsrc/djdijg12.cc + dcmjpeg/libsrc/djdijg16.cc + dcmjpeg/libsrc/djdijg8.cc + dcmjpeg/libsrc/djeijg12.cc + dcmjpeg/libsrc/djeijg16.cc + dcmjpeg/libsrc/djeijg8.cc + dcmnet/apps/storescu.cc + dcmnet/libsrc/dstorscp.cc + dcmnet/libsrc/dstorscu.cc + dcmnet/libsrc/dulfsm.cc + dcmqrdb/libsrc/dcmqrdbi.cc + dcmqrdb/libsrc/dcmqrptb.cc + dcmqrdb/libsrc/dcmqrtis.cc + dcmwlm/libsrc/wlmactmg.cc + ofstd/libsrc/ofdate.cc + ofstd/libsrc/ofdatime.cc + ofstd/libsrc/offname.cc + ofstd/libsrc/ofrand.cc + ofstd/libsrc/oftempf.cc + ofstd/libsrc/oftime.cc + ofstd/libsrc/ofxml.cc + +**** Changes from 2021.03.19 (riesmeier) + +- Fixed issue with findAndGetUint16Array and VR=AT: + Fixed issue with wrong number of 16-bit values being returned for Attribute + Tag (AT) values in the "count" parameter of the findAndGetUint16Array() + method. The return value was half as large as expected. + Also added a new regression test for this purpose. + Thanks to Jason LAMBERT for the report. + Added: dcmdata/tests/titem.cc + Affects: dcmdata/libsrc/dcitem.cc + dcmdata/tests/CMakeLists.txt + dcmdata/tests/Makefile.in + dcmdata/tests/tests.cc + +**** Changes from 2021.03.17 (riesmeier) + +- Minor changes to documentation. + Affects: dcmnet/docs/dcmsend.man + ofstd/libsrc/ofxml.cc + +**** Changes from 2021.03.15 (eichelberg) + +- Don't mask error code of association negotiation failure: + So far DCMTK always returned DUL_REQUESTASSOCIATIONFAILED when an attempt to + open a network connection by a client failed, independent of the reason. + This masked for example the specific error codes issued by the TLS module + which explain the reason for a TLS handshake failure. Changed the network + module to directly return this lower-level error code. + Affects: dcmnet/libsrc/dul.cc + +**** Changes from 2021.03.14 (eichelberg) + +- Added includes needed on Solaris. + Affects: dcmjpls/libcharls/util.h + ofstd/include/dcmtk/ofstd/ofbmanip.h + +- Fixed LFS and vsnprintf on Windows and Solaris: + Reverted some of the modifications in GenerateDCMTKConfigure.cmake that were + introduced with commit #744a94610. This fixes OFStandard::vsnprintf and + LFS support on Windows and Solaris. + Affects: CMake/GenerateDCMTKConfigure.cmake + +**** Changes from 2021.03.13 (eichelberg) + +- Defined cmake_minimum_required() as interval: + CMake allows the minimum CMake version required to be defined + as an interval (oldest version supported to newest version of + which the policies are known to work). This change silences warnings + in recent CMake versions about CMake support < 2.8.12 being deprecated. + Affects: CMakeLists.txt + +**** Changes from 2021.03.11 (riesmeier) + +- Fixed issue when compiling without MT support. + Affects: oflog/include/dcmtk/oflog/thread/syncpub.h + +**** Changes from 2021.03.11 (eichelberg) + +- Added include needed by VS2008. + Affects: dcmnet/include/dcmtk/dcmnet/dcompat.h + +- Minor changes needed on Solaris. + Affects: ofstd/libsrc/ofstd.cc + ofstd/libsrc/ofxml.cc + +- Added DCMTK_OFSTD_EXPORT to class OFFile. + Affects: ofstd/include/dcmtk/ofstd/offile.h + +**** Changes from 2021.03.10 (eichelberg) + +- Moved inline methods to implementation file: + Moved OFFile::popen() and OFFile::fclose(), which were formerly inline, + to implementation file. This somewhat simplifies a hack needed on Solaris. + Affects: ofstd/include/dcmtk/ofstd/offile.h + ofstd/libsrc/offile.cc + +- Added includes needed by VS2008. + Affects: dcmimage/libsrc/diqtfs.cc + dcmnet/apps/storescu.cc + dcmnet/libsrc/dstorscp.cc + dcmnet/libsrc/dstorscu.cc + dcmnet/libsrc/dulfsm.cc + dcmqrdb/libsrc/dcmqrdbi.cc + dcmqrdb/libsrc/dcmqrptb.cc + dcmqrdb/libsrc/dcmqrtis.cc + dcmwlm/libsrc/wlmactmg.cc + ofstd/libsrc/ofdate.cc + ofstd/libsrc/ofdatime.cc + ofstd/libsrc/offname.cc + ofstd/libsrc/ofrand.cc + ofstd/libsrc/oftempf.cc + ofstd/libsrc/oftime.cc + +- Modifications for LibreSSL on OpenBSD. + Affects: dcmtls/libsrc/tlstrans.cc + +**** Changes from 2021.03.09 (eichelberg) + +- Fix for compilation of dcmtls on Solaris. + Affects: dcmtls/libsrc/tlslayer.cc + +- Fixed warning reported by Visual Studio. + Affects: ofstd/tests/toffile.cc + +- Added include missing on Windows. + Affects: dcmnet/apps/storescp.cc + +- Fixed compilation without OpenSSL. + Affects: dcmtls/libsrc/tlscond.cc + +**** Changes from 2021.03.08 (onken) + +- Updated dependencies. + Affects: dcmiod/libsrc/Makefile.dep + dcmnet/apps/Makefile.dep + dcmnet/libsrc/Makefile.dep + dcmpstat/apps/Makefile.dep + dcmpstat/libsrc/Makefile.dep + dcmpstat/tests/Makefile.dep + dcmsr/apps/Makefile.dep + dcmsr/libsrc/Makefile.dep + dcmsr/tests/Makefile.dep + dcmtls/libsrc/Makefile.dep + +- Replaced bzero() with memset(). + Affects: CMake/GenerateDCMTKConfigure.cmake + CMake/osconfig.h.in + config/configure + config/configure.in + config/include/dcmtk/config/osconfig.h.in + dcmdata/apps/Makefile.dep + dcmdata/include/dcmtk/dcmdata/dcelem.h + dcmdata/include/dcmtk/dcmdata/dcpixel.h + dcmdata/include/dcmtk/dcmdata/dcvrobow.h + dcmdata/include/dcmtk/dcmdata/dcvrod.h + dcmdata/include/dcmtk/dcmdata/dcvrof.h + dcmdata/include/dcmtk/dcmdata/dcvrol.h + dcmdata/include/dcmtk/dcmdata/dcvrov.h + dcmdata/include/dcmtk/dcmdata/dcvrpobw.h + dcmdata/libsrc/Makefile.dep + dcmdata/libsrc/dcelem.cc + dcmdata/libsrc/dcitem.cc + dcmdata/libsrc/dcmetinf.cc + dcmfg/libsrc/Makefile.dep + dcmimgle/apps/Makefile.dep + dcmimgle/libsrc/Makefile.dep + dcmiod/libsrc/Makefile.dep + dcmiod/tests/Makefile.dep + dcmnet/apps/Makefile.dep + dcmnet/apps/storescu.cc + dcmnet/include/dcmtk/dcmnet/dcompat.h + dcmnet/libsrc/Makefile.dep + dcmnet/libsrc/assoc.cc + dcmnet/libsrc/dcompat.cc + dcmnet/libsrc/dfindscu.cc + dcmnet/libsrc/dimcancl.cc + dcmnet/libsrc/dimcmd.cc + dcmnet/libsrc/dimecho.cc + dcmnet/libsrc/dimfind.cc + dcmnet/libsrc/dimget.cc + dcmnet/libsrc/dimmove.cc + dcmnet/libsrc/dimstore.cc + dcmnet/libsrc/scp.cc + dcmnet/libsrc/scu.cc + 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 + dcmqrdb/libsrc/dcmqrcbg.cc + dcmqrdb/libsrc/dcmqrcbm.cc + dcmqrdb/libsrc/dcmqrdbi.cc + dcmqrdb/libsrc/dcmqrtis.cc + dcmsign/libsrc/Makefile.dep + dcmsr/tests/Makefile.dep + dcmtls/libsrc/Makefile.dep + dcmwlm/apps/Makefile.dep + dcmwlm/libsrc/Makefile.dep + dcmwlm/tests/Makefile.dep + ofstd/include/dcmtk/ofstd/ofbmanip.h + ofstd/include/dcmtk/ofstd/ofdefine.h + ofstd/include/dcmtk/ofstd/ofsockad.h + ofstd/libsrc/Makefile.dep + ofstd/libsrc/ofstd.cc + +**** Changes from 2021.03.08 (eichelberg) + +- Added missing include. + Affects: ofstd/include/dcmtk/ofstd/ofcond.h + +- Fixed minor inconsistencies. + Affects: dcmnet/apps/echoscu.cc + dcmnet/docs/echoscu.man + dcmtls/libsrc/tlsopt.cc + +**** Changes from 2021.03.08 (riesmeier) + +- Always begin condition text with a capital letter. + Affects: dcmtls/libsrc/tlscond.cc + +- Removed empty line from "verbatim" environment. + Affects: dcmnet/docs/echoscu.man + +**** Changes from 2021.03.08 (eichelberg) + +- Revised error handling in module dcmtls: + Revised the error handling in the TLS module. Replaced the + DcmTransportLayerStatus enumeration by proper OFCondition error codes + throughout the toolkit and defined condition constants for errors + occuring in OpenSSL. Individual condition constants are now defined for + the most important OpenSSL errors (related to TLS and certificate + verification), and a general condition code is used to represent errors + reported by other OpenSSL submodules. + The revised code has been tested with OpenSSL 1.0.1, 1.0.2, 1.1.0, + 1.1.1 and 3.0.0 alpha 12. + Affects: dcmnet/apps/echoscu.cc + dcmnet/include/dcmtk/dcmnet/dcmlayer.h + dcmnet/include/dcmtk/dcmnet/dcmtrans.h + dcmnet/libsrc/dcmtrans.cc + dcmnet/libsrc/dul.cc + dcmnet/libsrc/dulfsm.cc + dcmpstat/apps/dcmprscp.cc + dcmpstat/apps/dcmprscu.cc + dcmpstat/apps/dcmpsrcv.cc + dcmpstat/apps/dcmpssnd.cc + dcmtls/docs/dcmtls.dox + dcmtls/include/dcmtk/dcmtls/tlsciphr.h + dcmtls/include/dcmtk/dcmtls/tlscond.h + dcmtls/include/dcmtk/dcmtls/tlslayer.h + dcmtls/include/dcmtk/dcmtls/tlsopt.h + dcmtls/include/dcmtk/dcmtls/tlsscu.h + dcmtls/include/dcmtk/dcmtls/tlstrans.h + dcmtls/libsrc/tlsciphr.cc + dcmtls/libsrc/tlscond.cc + dcmtls/libsrc/tlslayer.cc + dcmtls/libsrc/tlsopt.cc + dcmtls/libsrc/tlsscu.cc + dcmtls/libsrc/tlstrans.cc + dcmtls/tests/tscuscptls.cc + +- Added functions for offline certificate verification: + Added function DcmTLSTransportLayer::verifyClientCertificate() that allows + to check if a given client certificate file would be accepted during the TLS + handshake given the current TLS settings. Also added function + DcmTLSTransportLayer::isRootCertificate() that allows to check if a + certificate file contains a self-signed root certificate. + Added command line options --verify-cert and --is-root-cert to echoscu + that make these new functions accessible on the command line. + Affects: dcmnet/apps/echoscu.cc + dcmnet/docs/echoscu.man + dcmtls/include/dcmtk/dcmtls/tlslayer.h + dcmtls/include/dcmtk/dcmtls/tlsopt.h + dcmtls/libsrc/tlslayer.cc + dcmtls/libsrc/tlsopt.cc + +- Added support for intermediate CAs and CRLs: + Added new command line options --add-crl-file, --enable-crl-vfy and + --enable-crl-all that permit applications to check the peer certificate + chain during TLS handshakes. Furthermore added support for intermediate + CA certificates and improved documentation. + This closes DCMTK issue #952. + Added: dcmtls/docs/certstor.dox + Affects: dcmnet/docs/dcmrecv.man + dcmnet/docs/echoscu.man + dcmnet/docs/findscu.man + dcmnet/docs/storescp.man + dcmnet/docs/storescu.man + dcmtls/docs/CMakeLists.txt + dcmtls/docs/Makefile.in + dcmtls/docs/dcmtls.dox + dcmtls/include/dcmtk/dcmtls/tlsciphr.h + dcmtls/include/dcmtk/dcmtls/tlslayer.h + dcmtls/libsrc/tlslayer.cc + dcmtls/libsrc/tlsopt.cc + Removed: dcmtls/docs/certstor.txt + +**** Changes from 2021.03.07 (eichelberg) + +- Fixed compilation of arith.cc with DCMTK_ENABLE_CXX11=ON. + Affects: config/math.cc + +- Fixed includes for VS 2008. + Affects: ofstd/include/dcmtk/ofstd/oftypes.h + +- Added includes needed on NetBSD. + Affects: ofstd/libsrc/offile.cc + ofstd/libsrc/offname.cc + ofstd/libsrc/ofthread.cc + +**** Changes from 2021.03.06 (eichelberg) + +- Added missing include. + Affects: config/math.cc + +- Added includes needed on Solaris. + Affects: dcmnet/libsrc/assoc.cc + dcmnet/libsrc/dfindscu.cc + dcmnet/libsrc/dimcancl.cc + dcmnet/libsrc/dimcmd.cc + dcmnet/libsrc/dimecho.cc + dcmnet/libsrc/dimfind.cc + dcmnet/libsrc/dimget.cc + dcmnet/libsrc/dimmove.cc + dcmnet/libsrc/dimstore.cc + dcmnet/libsrc/scu.cc + +- Added include needed on BSD. + Affects: ofstd/include/dcmtk/ofstd/offile.h + +- Fixed include of . + Affects: ofstd/include/dcmtk/ofstd/oftypes.h + +- Fixed minor warnings reported by Visual Studio. + Affects: dcmdata/libi2d/i2djpgs.cc + dcmdata/libsrc/dcelem.cc + dcmdata/libsrc/dcistrmf.cc + dcmdata/libsrc/dcistrms.cc + dcmdata/tests/dctmacro.h + ofstd/include/dcmtk/ofstd/offile.h + ofstd/tests/toffile.cc + +**** Changes from 2021.03.05 (riesmeier) + +- Updated latest tested CMake version: + Updated information on latest CMake version that has been tested to "3.19.6". + Affects: CMake/dcmtkPrepare.cmake + +**** Changes from 2021.03.05 (eichelberg) + +- Fixed commit e8161b1e4. + Affects: dcmjpeg/libijg12/jdmarker.c + dcmjpeg/libijg16/jdmarker.c + dcmjpeg/libijg8/jdmarker.c + +**** Changes from 2021.03.05 (riesmeier) + +- Added support for Patient's Size and Weight: + Added support for the optional attributes Patient's Size and Patient's + Weight from the Patient Study Module. These new attributes are written + to and read from DICOM dataset as well as to/from the dcmsr-specific + XML document format (see "dsr2xml.xsd"). There are also set and get + methods. However, they are neither printed to the console (see dsrdump) + nor rendered for the (X)HTML output (see dsr2html). + Also added new test case in order to check whether the get and set + methods work as expected. + Affects: dcmsr/data/dsr2xml.xsd + dcmsr/include/dcmtk/dcmsr/dsrdoc.h + dcmsr/libsrc/dsrdoc.cc + dcmsr/tests/tests.cc + dcmsr/tests/tsrdoc.cc + +**** Changes from 2021.03.05 (eichelberg) + +- Fixed incorrect handling of malformed JPEG bitstream: + Fixed incorrect handling of malformed JPEG bitstreams in color images + where the start of scan markers are inconsistent. + This closes DCMTK issue #970. + Thanks to Christian Wetzel for the bug report. + Affects: dcmjpeg/libijg12/jdmarker.c + dcmjpeg/libijg16/jdmarker.c + dcmjpeg/libijg8/jdmarker.c + +**** Changes from 2021.03.04 (riesmeier) + +- Added support for CP-2023: + Added support for CP-2032 (Clarify missing numeric measurement value in SR). + Now, the Numeric Value Qualifier Code Sequence (0040,A301) is conditional + ("Required if Measured Value Sequence (0040,A300) is empty"). + Also added new test cases for this purpose and for testing the alternative + representations. + This closes DCMTK Conformance #961. + Affects: dcmsr/include/dcmtk/dcmsr/cmr/srnumvl.h + dcmsr/include/dcmtk/dcmsr/cmr/srnumvlu.h + dcmsr/include/dcmtk/dcmsr/dsrnumvl.h + dcmsr/libsrc/dsrnumvl.cc + dcmsr/tests/tests.cc + dcmsr/tests/tsrnumvl.cc + +**** Changes from 2021.03.04 (onken) + +- Try fixing C includes for old compilers. + Affects: ofstd/include/dcmtk/ofstd/oftypes.h + +**** Changes from 2021.02.26 (onken) + +- Try to fix build for 744a94 on some platforms. + Affects: ofstd/libsrc/offilsys.cc + ofstd/libsrc/ofxml.cc + +**** Changes from 2021.02.25 (riesmeier) + +- Removed outdated configure options (Autoconf): + Removed configure options that are no longer available. + Affects: INSTALL + +- Removed empty line. + Affects: dcmjpls/docs/dcmcjpls.man + +- Fixed comment on lossy JPEG vs. lossy JPEG-LS: + Thanks to GitHub user "malaterre" for the patch. + Affects: dcmjpls/docs/dcmcjpls.man + +**** Changes from 2021.02.25 (onken) + +- Removed USE_STD_CXX_INLUDES: + Removed macro USE_STD_CXX_INCLUDES which allowed (if turned off) to + include old C headers instead of using their respective counterpart coming + with C++ (e.g. use time.h and string.h instead of and + ). + Using only the C++ version has been the hardcoded behaviour for CMake builds + anyway (for automake it has been configurable up to now). + All related build configuration tests and related code header guards/includes + for the C-style headers have been removed. + Affects: CMake/GenerateDCMTKConfigure.cmake + CMake/osconfig.h.in + INSTALL + config/aclocal.m4 + config/configure + config/configure.in + config/include/dcmtk/config/osconfig.h.in + config/math.cc + config/tests/arith.cc + dcmdata/apps/Makefile.dep + dcmdata/apps/dcm2pdf.cc + dcmdata/apps/dcmconv.cc + dcmdata/apps/dcmcrle.cc + dcmdata/apps/dcmdrle.cc + dcmdata/apps/dcmdump.cc + dcmdata/apps/dcmftest.cc + dcmdata/apps/dump2dcm.cc + dcmdata/apps/mdfdsman.cc + dcmdata/apps/xml2dcm.cc + dcmdata/include/dcmtk/dcmdata/dcdicent.h + dcmdata/include/dcmtk/dcmdata/dclist.h + dcmdata/include/dcmtk/dcmdata/dcostrmf.h + dcmdata/include/dcmtk/dcmdata/dcostrms.h + dcmdata/include/dcmtk/dcmdata/dcrleenc.h + dcmdata/include/dcmtk/dcmdata/dctypes.h + dcmdata/include/dcmtk/dcmdata/dcuid.h + dcmdata/libsrc/Makefile.dep + dcmdata/libsrc/cmdlnarg.cc + dcmdata/libsrc/dcbytstr.cc + dcmdata/libsrc/dcdatset.cc + dcmdata/libsrc/dcddirif.cc + dcmdata/libsrc/dcdicdir.cc + dcmdata/libsrc/dcdicent.cc + dcmdata/libsrc/dcdict.cc + dcmdata/libsrc/dcdirrec.cc + dcmdata/libsrc/dcelem.cc + dcmdata/libsrc/dcfilefo.cc + dcmdata/libsrc/dchashdi.cc + dcmdata/libsrc/dcistrmf.cc + dcmdata/libsrc/dcistrms.cc + dcmdata/libsrc/dcitem.cc + dcmdata/libsrc/dcjson.cc + dcmdata/libsrc/dcmetinf.cc + dcmdata/libsrc/dcobject.cc + dcmdata/libsrc/dcostrmf.cc + dcmdata/libsrc/dcostrms.cc + dcmdata/libsrc/dcpath.cc + dcmdata/libsrc/dcpixseq.cc + dcmdata/libsrc/dcpxitem.cc + dcmdata/libsrc/dcrlecce.cc + dcmdata/libsrc/dcsequen.cc + dcmdata/libsrc/dcstack.cc + dcmdata/libsrc/dctag.cc + dcmdata/libsrc/dctagkey.cc + dcmdata/libsrc/dcuid.cc + dcmdata/libsrc/dcvr.cc + dcmdata/libsrc/dcvrat.cc + dcmdata/libsrc/dcvrcs.cc + dcmdata/libsrc/dcvrda.cc + dcmdata/libsrc/dcvrdt.cc + dcmdata/libsrc/dcvrfd.cc + dcmdata/libsrc/dcvrfl.cc + dcmdata/libsrc/dcvris.cc + dcmdata/libsrc/dcvrobow.cc + dcmdata/libsrc/dcvrsl.cc + dcmdata/libsrc/dcvrss.cc + dcmdata/libsrc/dcvrsv.cc + dcmdata/libsrc/dcvrtm.cc + dcmdata/libsrc/dcvrui.cc + dcmdata/libsrc/dcvrul.cc + dcmdata/libsrc/dcvrulup.cc + dcmdata/libsrc/dcvrus.cc + dcmdata/libsrc/dcvruv.cc + dcmdata/libsrc/dcxfer.cc + dcmdata/tests/Makefile.dep + dcmdata/tests/tpread.cc + dcmect/libsrc/Makefile.dep + dcmect/tests/Makefile.dep + dcmfg/include/dcmtk/dcmfg/fgctexposure.h + dcmfg/libsrc/Makefile.dep + dcmfg/tests/Makefile.dep + dcmimage/apps/Makefile.dep + dcmimage/apps/dcm2pnm.cc + dcmimage/apps/dcmquant.cc + dcmimage/apps/dcmscale.cc + dcmimage/include/dcmtk/dcmimage/dcmicmph.h + dcmimage/include/dcmtk/dcmimage/dicoopx.h + dcmimage/include/dcmtk/dcmimage/diqtpbox.h + dcmimage/include/dcmtk/dcmimage/diqtstab.h + dcmimage/libsrc/Makefile.dep + dcmimage/libsrc/dcmicmph.cc + dcmimage/libsrc/dicoimg.cc + dcmimage/libsrc/diqtctab.cc + dcmimage/libsrc/diqtfs.cc + dcmimage/libsrc/diqtpbox.cc + dcmimgle/apps/Makefile.dep + dcmimgle/apps/dcod2lum.cc + dcmimgle/apps/dconvlum.cc + dcmimgle/include/dcmtk/dcmimgle/dicrvfit.h + dcmimgle/include/dcmtk/dcmimgle/didocu.h + dcmimgle/include/dcmtk/dcmimgle/digsdfn.h + dcmimgle/include/dcmtk/dcmimgle/diimage.h + dcmimgle/include/dcmtk/dcmimgle/dimoopxt.h + dcmimgle/include/dcmtk/dcmimgle/diovpln.h + dcmimgle/include/dcmtk/dcmimgle/diplugin.h + dcmimgle/include/dcmtk/dcmimgle/displint.h + dcmimgle/libsrc/Makefile.dep + dcmimgle/libsrc/dcmimage.cc + dcmimgle/libsrc/diciefn.cc + dcmimgle/libsrc/dicielut.cc + dcmimgle/libsrc/didispfn.cc + dcmimgle/libsrc/digsdfn.cc + dcmimgle/libsrc/digsdlut.cc + dcmimgle/libsrc/diimage.cc + dcmimgle/libsrc/dimoimg.cc + dcmimgle/libsrc/diutils.cc + dcmiod/include/dcmtk/dcmiod/cielabutil.h + dcmiod/include/dcmtk/dcmiod/iodrules.h + dcmiod/libsrc/Makefile.dep + dcmiod/libsrc/cielabutil.cc + dcmiod/tests/Makefile.dep + dcmjpeg/apps/Makefile.dep + dcmjpeg/apps/dcmcjpeg.cc + dcmjpeg/apps/dcmdjpeg.cc + dcmjpeg/libsrc/dipijpeg.cc + dcmjpeg/libsrc/djcodece.cc + dcmjpeg/libsrc/djdijg12.cc + dcmjpeg/libsrc/djdijg16.cc + dcmjpeg/libsrc/djdijg8.cc + dcmjpeg/libsrc/djeijg12.cc + dcmjpeg/libsrc/djeijg16.cc + dcmjpeg/libsrc/djeijg8.cc + dcmjpeg/libsrc/djutils.cc + dcmjpls/apps/Makefile.dep + dcmjpls/apps/dcmcjpls.cc + dcmjpls/apps/dcmdjpls.cc + dcmjpls/libcharls/Makefile.dep + dcmjpls/libcharls/config.h + dcmjpls/libcharls/encodstr.h + dcmjpls/libcharls/streams.h + dcmjpls/libcharls/util.h + dcmjpls/libsrc/djcodece.cc + dcmnet/apps/Makefile.dep + dcmnet/apps/echoscu.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/dicom.h + dcmnet/libsrc/Makefile.dep + dcmnet/libsrc/assoc.cc + dcmnet/libsrc/cond.cc + dcmnet/libsrc/dcasccff.cc + dcmnet/libsrc/dccfuidh.cc + dcmnet/libsrc/dcmtrans.cc + dcmnet/libsrc/dcompat.cc + dcmnet/libsrc/dfindscu.cc + dcmnet/libsrc/dimcancl.cc + dcmnet/libsrc/dimcmd.cc + dcmnet/libsrc/dimdump.cc + dcmnet/libsrc/dimecho.cc + dcmnet/libsrc/dimfind.cc + dcmnet/libsrc/dimget.cc + dcmnet/libsrc/dimmove.cc + dcmnet/libsrc/dimse.cc + dcmnet/libsrc/dimstore.cc + dcmnet/libsrc/diutil.cc + dcmnet/libsrc/dul.cc + dcmnet/libsrc/dulconst.cc + dcmnet/libsrc/dulextra.cc + dcmnet/libsrc/dulfsm.cc + dcmnet/libsrc/dulparse.cc + dcmnet/libsrc/dulpres.cc + dcmnet/tests/Makefile.dep + dcmnet/tests/tscuscp.cc + dcmnet/tests/tscusession.cc + dcmpstat/apps/Makefile.dep + dcmpstat/apps/dcmmklut.cc + dcmpstat/apps/dcmprscu.cc + dcmpstat/apps/dcmpschk.cc + dcmpstat/apps/dcmpsmk.cc + dcmpstat/apps/dcmpsprt.cc + dcmpstat/include/dcmtk/dcmpstat/dvpstxl.h + dcmpstat/include/dcmtk/dcmpstat/dvpstyp.h + dcmpstat/libsrc/Makefile.dep + dcmpstat/libsrc/dcmpstat.cc + dcmpstat/libsrc/dviface.cc + dcmpstat/libsrc/dvpscf.cc + dcmpstat/libsrc/dvpsda.cc + dcmpstat/libsrc/dvpsfs.cc + dcmpstat/libsrc/dvpsgl.cc + dcmpstat/libsrc/dvpshlp.cc + dcmpstat/libsrc/dvpsri.cc + dcmpstat/libsrc/dvpssp.cc + dcmpstat/libsrc/dvpstat.cc + dcmpstat/libsrc/dvpstx.cc + dcmpstat/libsrc/dvpsvw.cc + dcmpstat/tests/Makefile.dep + dcmpstat/tests/msgserv.cc + dcmqrdb/apps/Makefile.dep + dcmqrdb/apps/dcmqridx.cc + dcmqrdb/apps/dcmqrscp.cc + dcmqrdb/apps/dcmqrti.cc + dcmqrdb/include/dcmtk/dcmqrdb/dcmqrcnf.h + dcmqrdb/include/dcmtk/dcmqrdb/dcmqrdba.h + dcmqrdb/include/dcmtk/dcmqrdb/dcmqrptb.h + dcmqrdb/libsrc/Makefile.dep + dcmqrdb/libsrc/dcmqrcnf.cc + dcmqrdb/libsrc/dcmqrdbi.cc + dcmqrdb/libsrc/dcmqrdbs.cc + dcmqrdb/libsrc/dcmqropt.cc + dcmrt/include/dcmtk/dcmrt/drtimage.h + dcmrt/libsrc/drtajcs.cc + dcmrt/libsrc/drttypes.cc + dcmseg/libsrc/Makefile.dep + dcmseg/tests/Makefile.dep + dcmsign/apps/Makefile.dep + dcmsign/apps/dcmsign.cc + dcmsign/include/dcmtk/dcmsign/dcsignat.h + dcmsign/include/dcmtk/dcmsign/simaccon.h + dcmsign/libsrc/Makefile.dep + dcmsign/libsrc/simdmac.cc + dcmsign/libsrc/siprivat.cc + dcmsr/apps/Makefile.dep + dcmsr/include/dcmtk/dcmsr/dsrxmlc.h + dcmsr/libcmr/Makefile.dep + dcmsr/libsrc/Makefile.dep + dcmsr/libsrc/dsrimgfr.cc + dcmsr/libsrc/dsrimgse.cc + dcmsr/libsrc/dsrtcosp.cc + dcmsr/libsrc/dsrtcoto.cc + dcmsr/libsrc/dsrtypes.cc + dcmsr/libsrc/dsrwavch.cc + dcmsr/libsrc/dsrxmld.cc + dcmsr/tests/Makefile.dep + dcmtls/libsrc/Makefile.dep + dcmtls/libsrc/tlslayer.cc + dcmtls/libsrc/tlstrans.cc + dcmtls/tests/tscuscptls.cc + dcmwlm/apps/Makefile.dep + dcmwlm/libsrc/Makefile.dep + dcmwlm/tests/Makefile.dep + dcmwlm/tests/wltest.cc + oflog/include/dcmtk/oflog/config.h + ofstd/include/dcmtk/ofstd/ofassert.h + ofstd/include/dcmtk/ofstd/ofbmanip.h + ofstd/include/dcmtk/ofstd/ofcmdln.h + ofstd/include/dcmtk/ofstd/ofcond.h + ofstd/include/dcmtk/ofstd/ofconfig.h + ofstd/include/dcmtk/ofstd/ofconsol.h + ofstd/include/dcmtk/ofstd/ofdefine.h + ofstd/include/dcmtk/ofstd/oferror.h + ofstd/include/dcmtk/ofstd/offile.h + ofstd/include/dcmtk/ofstd/oflimits.h + ofstd/include/dcmtk/ofstd/oflist.h + ofstd/include/dcmtk/ofstd/ofset.h + ofstd/include/dcmtk/ofstd/ofstack.h + ofstd/include/dcmtk/ofstd/ofstd.h + ofstd/include/dcmtk/ofstd/ofstdinc.h + ofstd/include/dcmtk/ofstd/ofstream.h + ofstd/include/dcmtk/ofstd/ofstring.h + ofstd/include/dcmtk/ofstd/oftime.h + ofstd/include/dcmtk/ofstd/oftypes.h + ofstd/include/dcmtk/ofstd/ofvector.h + ofstd/include/dcmtk/ofstd/ofxml.h + ofstd/libsrc/Makefile.dep + ofstd/libsrc/ofchrenc.cc + ofstd/libsrc/ofconapp.cc + ofstd/libsrc/ofconfig.cc + ofstd/libsrc/ofconsol.cc + ofstd/libsrc/ofdate.cc + ofstd/libsrc/ofdatime.cc + ofstd/libsrc/oferror.cc + ofstd/libsrc/offilsys.cc + ofstd/libsrc/offname.cc + ofstd/libsrc/ofrand.cc + ofstd/libsrc/ofstd.cc + ofstd/libsrc/ofstring.cc + ofstd/libsrc/oftempf.cc + ofstd/libsrc/ofthread.cc + ofstd/libsrc/oftime.cc + ofstd/libsrc/ofuuid.cc + ofstd/libsrc/ofxml.cc + ofstd/tests/Makefile.dep + ofstd/tests/tatof.cc + ofstd/tests/toffile.cc + ofstd/tests/tuuid.cc + +**** Changes from 2021.02.23 (riesmeier) + +- No need to convert ASCII or UTF-8 characters: + There is no need to convert ASCII or UTF-8 characters when using option + --extract-xml-single since the encoding of the XML output file is UTF-8. + Affects: dcmnet/libsrc/dfindscu.cc + +**** Changes from 2021.02.17 (onken) + +- Fixed extra padding created for some segmentations: + The problem showed up if the number of pixels per frame is not divisable by 8 + and the the number of pixels per object (i.e. all frames) is. In that + case, one byte extra padding is added at the end, which (if Pixel Data + length is odd then), leads to another extra byte since element length + must always be even in DICOM. + Affects: dcmseg/libsrc/segdoc.cc + +**** Changes from 2021.02.17 (schlamelcher) + +- Introduced a CMake option for static linking: + Introduced DCMTK_LINK_STATIC as an option for controlling how DCMTK's tools + and libraries are linked, affecting linker options and third party libraries. + These changes originate from our (so far not publicly available) release build + scripts. I noticed the way this is implemented is not that elegant while + creating this commit, but this way has the advantage that it has been verified + to work by the last couple of DCMTK releases. Most notably, the feature + removes flags from the CMake variables for dynamic linking to produce + statically linked binaries. We should better find a way to tell CMake it + should use the respective CMake variables for static linking instead in the + first place. + For now, the main goal of this commit is to make this feature publicly + available while keeping the build scripts consistent with it. Enhancing the + way the feature is implemented should (and hopefully will) come later. + Affects: CMake/3rdparty.cmake + CMake/dcmtkPrepare.cmake + +**** Changes from 2021.02.10 (riesmeier) + +- Fixed typo and corrected line breaks in manpage. + Affects: dcmdata/docs/dcm2json.man + +**** Changes from 2021.02.09 (riesmeier) + +- Added support for two new Storage SOP Classes: + Added definition of two new Storage SOP Class UIDs introduced with + Supplement 212 (XA Protocol Storage). Also extended the various network + tools accordingly. + This closes DCMTK Conformance #962. + Affects: dcmdata/include/dcmtk/dcmdata/dcuid.h + dcmdata/libsrc/dcuid.cc + dcmnet/docs/movescu.man + dcmnet/docs/storescp.man + dcmnet/etc/storescp.cfg + dcmnet/etc/storescu.cfg + dcmqrdb/docs/dcmqrscp.man + dcmqrdb/etc/dcmqrprf.cfg + +- Increased number of digits printed for FL values: + Increased the number of digits printed for FL element values to + FLT_DECIMAL_DIG (9) instead of 8. Also fixed comment for FD values. + The dcmsr module now works in the same manner as dcmdata (see recent + commit 1c8cca4bf). + Affects: dcmsr/libsrc/dsrsc3gr.cc + dcmsr/libsrc/dsrscogr.cc + dcmsr/libsrc/dsrtcoto.cc + +**** Changes from 2021.02.05 (eichelberg) + +- Adjusted the number of digits printed for FL and FD: + Adjusted the number of digits printed for FL elements to FLT_DECIMAL_DIG + (9) instead of 8, to make sure that the printed values can be converted + back to FL without loss. Fixed comment for FD, where the values was + already correct. + Thanks to Mathieu Malaterre for pointing + out the issue. + Affects: dcmdata/libsrc/dcvrfd.cc + dcmdata/libsrc/dcvrfl.cc + +- Expanded dcm2json manpage: + Added section to dcm2json manpage that explains in which cases dcm2json + will convert DS, IS, SV and UV values to JSON strings. + Thanks to Mathieu Malaterre for the suggestion. + Affects: dcmdata/docs/dcm2json.man + +- Added missing comma to dcm2json --write-meta: + When dcm2json was called with the --write-meta option, a comma was missing + between the metaheader attributes and the dataset attributes in + dcm2json 3.6.6. This is fixed now. + Thanks to forum user Shaeto for the bug report and suggested fix. + Affects: dcmdata/libsrc/dcfilefo.cc + +**** Changes from 2021.02.03 (riesmeier) + +- Updated Context Group classes for DICOM 2021a: + Updated automatically generated Context Group classes for the 2021a edition + of the DICOM standard. All supported classes were updated, even though there + were no changes to most of them. + Affects: dcmsr/include/dcmtk/dcmsr/cmr/cid100.h + dcmsr/include/dcmtk/dcmsr/cmr/cid10013.h + dcmsr/include/dcmtk/dcmsr/cmr/cid10033.h + dcmsr/include/dcmtk/dcmsr/cmr/cid11.h + dcmsr/include/dcmtk/dcmsr/cmr/cid244.h + dcmsr/include/dcmtk/dcmsr/cmr/cid29.h + dcmsr/include/dcmtk/dcmsr/cmr/cid4020.h + dcmsr/include/dcmtk/dcmsr/cmr/cid4021.h + dcmsr/include/dcmtk/dcmsr/cmr/cid4031.h + dcmsr/include/dcmtk/dcmsr/cmr/cid42.h + dcmsr/include/dcmtk/dcmsr/cmr/cid6147.h + dcmsr/include/dcmtk/dcmsr/cmr/cid7021.h + dcmsr/include/dcmtk/dcmsr/cmr/cid7181.h + dcmsr/include/dcmtk/dcmsr/cmr/cid7445.h + dcmsr/include/dcmtk/dcmsr/cmr/cid7452.h + dcmsr/include/dcmtk/dcmsr/cmr/cid7453.h + dcmsr/include/dcmtk/dcmsr/cmr/cid7464.h + dcmsr/include/dcmtk/dcmsr/cmr/cid7469.h + dcmsr/libcmr/cid100.cc + dcmsr/libcmr/cid10013.cc + dcmsr/libcmr/cid10033.cc + dcmsr/libcmr/cid11.cc + dcmsr/libcmr/cid244.cc + dcmsr/libcmr/cid29.cc + dcmsr/libcmr/cid4020.cc + dcmsr/libcmr/cid4021.cc + dcmsr/libcmr/cid4031.cc + dcmsr/libcmr/cid42.cc + dcmsr/libcmr/cid6147.cc + dcmsr/libcmr/cid7021.cc + dcmsr/libcmr/cid7181.cc + dcmsr/libcmr/cid7445.cc + dcmsr/libcmr/cid7452.cc + dcmsr/libcmr/cid7453.cc + dcmsr/libcmr/cid7464.cc + dcmsr/libcmr/cid7469.cc + +- Updated code definitions for DICOM 2021a: + Updated automatically generated code definitions for coding scheme "DCM". + For the coding scheme "NCIt" and "UMLS", 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 + +**** Changes from 2021.02.01 (riesmeier) + +- Updated data dictionary for DICOM 2021a: + 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 of the dcmrt module (automatically generated source files). + Affects: dcmdata/data/dicom.dic + dcmdata/include/dcmtk/dcmdata/dcdeftag.h + dcmdata/libsrc/dcdictbi.cc + dcmrt/libsrc/drtcs.cc + +**** Changes from 2021.01.29 (eichelberg) + +- Added hints for a better detection of OpenJPEG: + Added hints for a better detection of OpenJPEG, which uses somewhat + non-standard paths, using find_package(). + Affects: CMake/3rdparty.cmake + +- New function ASC_closeTransportConnection(): + Added new function ASC_closeTransportConnection() that allows a process + to directly close the underlying transport connection of a DICOM network + association. This is needed in the parent process of applications + that fork() for each incoming network connection and do not use the fork + mechanism built into dcmnet. + Affects: dcmnet/include/dcmtk/dcmnet/assoc.h + dcmnet/include/dcmtk/dcmnet/dcmtrans.h + dcmnet/include/dcmtk/dcmnet/dul.h + dcmnet/libsrc/assoc.cc + dcmnet/libsrc/dcmtrans.cc + dcmnet/libsrc/dul.cc + dcmtls/include/dcmtk/dcmtls/tlstrans.h + dcmtls/libsrc/tlstrans.cc + +- Fixed minor warnings related to type conversions. + Affects: dcmsign/libsrc/dcsignat.cc + dcmsign/libsrc/sipkey.cc + +**** Changes from 2021.01.28 (riesmeier) + +- Rebuilt Makefile dependencies. + Affects: dcmpstat/libsrc/Makefile.dep + dcmsign/apps/Makefile.dep + dcmsign/libsrc/Makefile.dep + +- Removed unused variable (reported by gcc). + Affects: dcmtls/libsrc/tlslayer.cc + +**** Changes from 2021.01.28 (eichelberg) + +- Restored compatibility with OpenSSL 1.0.1: + Minor code modifications that restore compatibility with older OpenSSL + versions, in particular 1.0.1 and newer. + Affects: dcmsign/include/dcmtk/dcmsign/simdmac.h + dcmsign/libsrc/simdmac.cc + dcmtls/libsrc/tlslayer.cc + +- Updated code handling Diffie-Hellman parameters: + Updated the code for handling Diffie-Hellman parameters to avoid + the use of functions that are deprecated in OpenSSL 3.0. + Affects: dcmtls/include/dcmtk/dcmtls/tlslayer.h + dcmtls/libsrc/tlslayer.cc + +- Adapted dcmpstat to commit d588139e2. + Affects: dcmpstat/libsrc/dvsighdl.cc + +- Migrated dcmsign to OpenSSL high-level APIs: + Migrated the dcmsign module from the historic low-level OpenSSL APIs + such as RSA_sign() and RIPEMD160_Init(), which will be deprecated in + OpenSSL 3.0.0, to the high-level APIs introduced with OpenSSL 1.1.0 such + as EVP_PKEY_sign() and EVP_DigestInit_ex() that use the same functions + for all public key algorithms and message authentication codes. + Added: dcmsign/libsrc/simdmac.cc + dcmsign/libsrc/sipkey.cc + Affects: dcmsign/apps/dcmsign.cc + dcmsign/include/dcmtk/dcmsign/dcsignat.h + dcmsign/libsrc/CMakeLists.txt + dcmsign/libsrc/Makefile.in + dcmsign/libsrc/dcsignat.cc + dcmsign/libsrc/sicert.cc + dcmsign/libsrc/siprivat.cc + dcmsign/libsrc/sitstamp.cc + Removed: dcmsign/include/dcmtk/dcmsign/sidsa.h + dcmsign/include/dcmtk/dcmsign/siecdsa.h + dcmsign/include/dcmtk/dcmsign/simd5.h + dcmsign/include/dcmtk/dcmsign/siripemd.h + dcmsign/include/dcmtk/dcmsign/sisha256.h + dcmsign/include/dcmtk/dcmsign/sisha384.h + dcmsign/include/dcmtk/dcmsign/sisha512.h + dcmsign/libsrc/sidsa.cc + dcmsign/libsrc/siecdsa.cc + dcmsign/libsrc/simd5.cc + dcmsign/libsrc/siripemd.cc + dcmsign/libsrc/sirsa.cc + dcmsign/libsrc/sisha1.cc + dcmsign/libsrc/sisha256.cc + dcmsign/libsrc/sisha384.cc + dcmsign/libsrc/sisha512.cc + Renamed: dcmsign/include/dcmtk/dcmsign/sisha1.h + -> dcmsign/include/dcmtk/dcmsign/simdmac.h + dcmsign/include/dcmtk/dcmsign/sirsa.h + -> dcmsign/include/dcmtk/dcmsign/sipkey.h + +- Fixed parentheses. + Affects: dcmpstat/apps/dcmpsprt.cc + +- Fixed minor warnings reported by gcc -Wextra. + Affects: dcmpstat/apps/dcmpsprt.cc + +**** Changes from 2021.01.28 (riesmeier) + +- Made API documentation more consistent. + Affects: ofstd/include/dcmtk/ofstd/offile.h + +**** Changes from 2021.01.27 (riesmeier) + +- Removed unused variable (reported by gcc). + Affects: dcmpstat/apps/dcmpsprt.cc + +- Added missing "unistd" header include: + This system header file is at least needed when compiling with STL + support enabled, otherwise dup() and dup2() and reported as being + undeclared. + Affects: ofstd/libsrc/ofconsol.cc + +- Removed unused variable (reported by gcc). + Affects: dcmdata/libsrc/dcfilefo.cc + +- Fixed wrong indentation. + Affects: dcmdata/libsrc/cmdlnarg.cc + +- Added missing object files to Makefile. + Affects: dcmdata/libsrc/Makefile.in + +- Fixed typo and added space characters. + Affects: config/docs/macros.txt + +**** Changes from 2021.01.27 (eichelberg) + +- Improved performance of DcmStdinStream: + DcmStdinStream now acts as a buffered stream that reads from stdin in 32kByte + blocks and passes each block to the DICOM parser, instead of first buffering + the complete stdin stream in main memory. Furthermore, the stream now reads + block-wise and not character-wise, which improves the performance of the + implementation by one order of magnitude. Also cleaned up code by moving the + stdin/stdout stream code into separate files. + Added: dcmdata/include/dcmtk/dcmdata/dcistrms.h + dcmdata/include/dcmtk/dcmdata/dcostrms.h + dcmdata/libsrc/dcistrms.cc + dcmdata/libsrc/dcostrms.cc + Affects: dcmdata/include/dcmtk/dcmdata/dcistrmf.h + dcmdata/include/dcmtk/dcmdata/dcostrmf.h + dcmdata/libsrc/CMakeLists.txt + dcmdata/libsrc/dcdatset.cc + dcmdata/libsrc/dcfilefo.cc + dcmdata/libsrc/dcistrmf.cc + dcmdata/libsrc/dcostrmf.cc + +- Fixed stdin/stdout DICOM file I/O on Win32: + The support for reading DICOM files or datasets from stdin and + writing DICOM files or datasets to stdout now also works on Windows, + where the streams are by default in text mode and must be switched + to binary. + Affects: dcmdata/libsrc/dcistrmf.cc + dcmdata/libsrc/dcostrmf.cc + +- Do not redirect stderr to stdout on Windows anymore: + Moved functionality to merge and unmerge the stdout and stderr output streams + to class OFConsole to make it publicly available. By default, DCMTK does not + redirect the stderr anymore on Windows since this interferes with the ability to + write DICOM files to stdout. The old behaviour can be restored by compiling with + DCMTK_MERGE_STDERR_TO_STDOUT. Otherwise, users can redirect stderr on the + command line by specifying "2>&1", just like on Posix systems. + Affects: config/docs/macros.txt + dcmdata/libsrc/cmdlnarg.cc + ofstd/include/dcmtk/ofstd/ofconsol.h + ofstd/libsrc/ofconsol.cc + +- Added support for stdin/stdout DICOM file I/O: + Added support for reading DICOM files or datasets from stdin and + writing DICOM files or datasets to stdout. Following Unix conventions, + this behaviour is triggered by using '-' as the filename. + This feature was sponsored by Segmed Inc., https://www.segmed.ai/ + Thanks to Jasper den Otter and + W. Adam Koszek . + Affects: dcmdata/apps/mdfconen.cc + dcmdata/apps/mdfdsman.cc + dcmdata/include/dcmtk/dcmdata/dcistrmf.h + dcmdata/include/dcmtk/dcmdata/dcostrmf.h + dcmdata/libsrc/dcdatset.cc + dcmdata/libsrc/dcfilefo.cc + dcmdata/libsrc/dcistrmf.cc + dcmdata/libsrc/dcostrmf.cc + ofstd/include/dcmtk/ofstd/offile.h + +**** Changes from 2021.01.27 (riesmeier) + +- Added support for another Value Type (CP-2053): + Added support for another Value Type introduced with CP-2053 (Mammography + CAD SR Value Types): the relationship "IMAGE has acq context UIDREF" is now + also allowed for the Mammography CAD SR IOD, as needed for TID 4020 (CAD + Image Library Entry). + This closes DCMTK Conformance #960. + Affects: dcmsr/libsrc/dsrmamcc.cc + +**** Changes from 2021.01.25 (riesmeier) + +- Also updated GNU Autoconf files: + Also updated GNU Autoconf files for DCMTK 3.6.6+. + Affects: config/configure + config/configure.in + +**** Changes from 2021.01.25 (onken) + +- Updated version information for 3.6.6+ development: + Updated version information marking the start of DCMTK development post minor + release 3.6.6. + Moved official ANNOUNCE file of the DCMTK release 3.6.6 to the "docs" + subfolder and replaced the main ANNOUNCE file with a "dummy". + Added: docs/ANNOUNCE.366 + Affects: ANNOUNCE + CMake/dcmtkPrepare.cmake + VERSION diff -Nru dcmtk-3.6.6/doxygen/htmldocs.cfg dcmtk-3.6.7/doxygen/htmldocs.cfg --- dcmtk-3.6.6/doxygen/htmldocs.cfg 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/doxygen/htmldocs.cfg 2022-04-28 13:47:25.000000000 +0000 @@ -1,4 +1,4 @@ -# Doxyfile 1.8.8 +# Doxyfile 1.8.17 # This file describes the settings to be used by the documentation system # doxygen (www.doxygen.org) for a project. @@ -17,11 +17,11 @@ # Project related configuration options #--------------------------------------------------------------------------- -# This tag specifies the encoding used for all characters in the config file -# that follow. The default is UTF-8 which is also the encoding used for all text -# before the first occurrence of this tag. Doxygen uses libiconv (or the iconv -# built into libc) for the transcoding. See http://www.gnu.org/software/libiconv -# for the list of possible encodings. +# This tag specifies the encoding used for all characters in the configuration +# file that follow. The default is UTF-8 which is also the encoding used for all +# text before the first occurrence of this tag. Doxygen uses libiconv (or the +# iconv built into libc) for the transcoding. See +# https://www.gnu.org/software/libiconv/ for the list of possible encodings. # The default value is: UTF-8. DOXYFILE_ENCODING = ISO-8859-1 @@ -46,10 +46,10 @@ PROJECT_BRIEF = "OFFIS DICOM Toolkit" -# With the PROJECT_LOGO tag one can specify an logo or icon that is included in -# the documentation. The maximum height of the logo should not exceed 55 pixels -# and the maximum width should not exceed 200 pixels. Doxygen will copy the logo -# to the output directory. +# With the PROJECT_LOGO tag one can specify a logo or an icon that is included +# in the documentation. The maximum height of the logo should not exceed 55 +# pixels and the maximum width should not exceed 200 pixels. Doxygen will copy +# the logo to the output directory. PROJECT_LOGO = @@ -60,7 +60,7 @@ OUTPUT_DIRECTORY = -# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create 4096 sub- +# If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub- # directories (in 2 levels) under the output directory of each output format and # will distribute the generated files over these directories. Enabling this # option can be useful when feeding doxygen a huge amount of source files, where @@ -93,14 +93,22 @@ OUTPUT_LANGUAGE = English -# If the BRIEF_MEMBER_DESC tag is set to YES doxygen will include brief member +# The OUTPUT_TEXT_DIRECTION tag is used to specify the direction in which all +# documentation generated by doxygen is written. Doxygen will use this +# information to generate all generated output in the proper direction. +# Possible values are: None, LTR, RTL and Context. +# The default value is: None. + +OUTPUT_TEXT_DIRECTION = None + +# If the BRIEF_MEMBER_DESC tag is set to YES, doxygen will include brief member # descriptions after the members that are listed in the file and class # documentation (similar to Javadoc). Set to NO to disable this. # The default value is: YES. BRIEF_MEMBER_DESC = YES -# If the REPEAT_BRIEF tag is set to YES doxygen will prepend the brief +# If the REPEAT_BRIEF tag is set to YES, doxygen will prepend the brief # description of a member or function before the detailed description # # Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the @@ -135,7 +143,7 @@ INLINE_INHERITED_MEMB = NO -# If the FULL_PATH_NAMES tag is set to YES doxygen will prepend the full path +# If the FULL_PATH_NAMES tag is set to YES, doxygen will prepend the full path # before files name in the file list and in the header files. If set to NO the # shortest path that makes the file name unique will be used # The default value is: YES. @@ -179,6 +187,16 @@ JAVADOC_AUTOBRIEF = YES +# If the JAVADOC_BANNER tag is set to YES then doxygen will interpret a line +# such as +# /*************** +# as being the beginning of a Javadoc-style comment "banner". If set to NO, the +# Javadoc-style will behave just like regular comments and it will not be +# interpreted by doxygen. +# The default value is: NO. + +JAVADOC_BANNER = NO + # If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first # line (until the first dot) of a Qt-style comment as the brief description. If # set to NO, the Qt-style will behave just like regular Qt-style comments (thus @@ -205,9 +223,9 @@ INHERIT_DOCS = NO -# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce a -# new page for each member. If set to NO, the documentation of a member will be -# part of the file/class/namespace that contains it. +# If the SEPARATE_MEMBER_PAGES tag is set to YES then doxygen will produce a new +# page for each member. If set to NO, the documentation of a member will be part +# of the file/class/namespace that contains it. # The default value is: NO. SEPARATE_MEMBER_PAGES = NO @@ -226,7 +244,12 @@ # will allow you to put the command \sideeffect (or @sideeffect) in the # documentation, which will result in a user-defined paragraph with heading # "Side Effects:". You can put \n's in the value part of an alias to insert -# newlines. +# newlines (in the resulting output). You can put ^^ in the value part of an +# alias to insert a newline as if a physical newline was in the original file. +# When you need a literal { or } or , in the value part of an alias you have to +# escape them by means of a backslash (\), this can lead to conflicts with the +# commands \{ and \} for these it is advised to use the version @{ and @} or use +# a double escape (\\{ and \\}) ALIASES = @@ -264,19 +287,28 @@ OPTIMIZE_OUTPUT_VHDL = NO +# Set the OPTIMIZE_OUTPUT_SLICE tag to YES if your project consists of Slice +# sources only. Doxygen will then generate output that is more tailored for that +# language. For instance, namespaces will be presented as modules, types will be +# separated into more groups, etc. +# The default value is: NO. + +OPTIMIZE_OUTPUT_SLICE = NO + # Doxygen selects the parser to use depending on the extension of the files it # parses. With this tag you can assign which parser to use for a given # extension. Doxygen has a built-in mapping, but you can override or extend it # using this tag. The format is ext=language, where ext is a file extension, and -# language is one of the parsers supported by doxygen: IDL, Java, Javascript, -# C#, C, C++, D, PHP, Objective-C, Python, Fortran (fixed format Fortran: -# FortranFixed, free formatted Fortran: FortranFree, unknown formatted Fortran: -# Fortran. In the later case the parser tries to guess whether the code is fixed -# or free formatted code, this is the default for Fortran type files), VHDL. For -# instance to make doxygen treat .inc files as Fortran files (default is PHP), -# and .f files as C (default is Fortran), use: inc=Fortran f=C. +# language is one of the parsers supported by doxygen: IDL, Java, JavaScript, +# Csharp (C#), C, C++, D, PHP, md (Markdown), Objective-C, Python, Slice, +# Fortran (fixed format Fortran: FortranFixed, free formatted Fortran: +# FortranFree, unknown formatted Fortran: Fortran. In the later case the parser +# tries to guess whether the code is fixed or free formatted code, this is the +# default for Fortran type files), VHDL, tcl. For instance to make doxygen treat +# .inc files as Fortran files (default is PHP), and .f files as C (default is +# Fortran), use: inc=Fortran f=C. # -# Note For files without extension you can use no_extension as a placeholder. +# Note: For files without extension you can use no_extension as a placeholder. # # Note that for custom extensions you also need to set FILE_PATTERNS otherwise # the files are not read by doxygen. @@ -285,7 +317,7 @@ # If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments # according to the Markdown format, which allows for more readable -# documentation. See http://daringfireball.net/projects/markdown/ for details. +# documentation. See https://daringfireball.net/projects/markdown/ for details. # The output of markdown processing is further processed by doxygen, so you can # mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in # case of backward compatibilities issues. @@ -293,10 +325,19 @@ MARKDOWN_SUPPORT = YES +# When the TOC_INCLUDE_HEADINGS tag is set to a non-zero value, all headings up +# to that level are automatically included in the table of contents, even if +# they do not have an id attribute. +# Note: This feature currently applies only to Markdown headings. +# Minimum value: 0, maximum value: 99, default value: 5. +# This tag requires that the tag MARKDOWN_SUPPORT is set to YES. + +TOC_INCLUDE_HEADINGS = 5 + # When enabled doxygen tries to link words that correspond to documented # classes, or namespaces to their corresponding documentation. Such a link can -# be prevented in individual cases by by putting a % sign in front of the word -# or globally by setting AUTOLINK_SUPPORT to NO. +# be prevented in individual cases by putting a % sign in front of the word or +# globally by setting AUTOLINK_SUPPORT to NO. # The default value is: YES. AUTOLINK_SUPPORT = YES @@ -318,7 +359,7 @@ CPP_CLI_SUPPORT = NO # Set the SIP_SUPPORT tag to YES if your project consists of sip (see: -# http://www.riverbankcomputing.co.uk/software/sip/intro) sources only. Doxygen +# https://www.riverbankcomputing.com/software/sip/intro) sources only. Doxygen # will parse them like normal C++ but will assume all classes use public instead # of private inheritance when no explicit protection keyword is present. # The default value is: NO. @@ -336,13 +377,20 @@ IDL_PROPERTY_SUPPORT = YES # If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC -# tag is set to YES, then doxygen will reuse the documentation of the first +# tag is set to YES then doxygen will reuse the documentation of the first # member in the group (if any) for the other members of the group. By default # all members of a group must be documented explicitly. # The default value is: NO. DISTRIBUTE_GROUP_DOC = NO +# If one adds a struct or class to a group and this option is enabled, then also +# any nested class or struct is added to the same group. By default this option +# is disabled and one has to add nested compounds explicitly via \ingroup. +# The default value is: NO. + +GROUP_NESTED_COMPOUNDS = NO + # Set the SUBGROUPING tag to YES to allow class member groups of the same type # (for instance a group of public functions) to be put as a subgroup of that # type (e.g. under the Public Functions section). Set it to NO to prevent @@ -401,7 +449,7 @@ # Build related configuration options #--------------------------------------------------------------------------- -# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in +# If the EXTRACT_ALL tag is set to YES, doxygen will assume all entities in # documentation are documented, even if no documentation was available. Private # class members and static file members will be hidden unless the # EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES. @@ -411,35 +459,41 @@ EXTRACT_ALL = NO -# If the EXTRACT_PRIVATE tag is set to YES all private members of a class will +# If the EXTRACT_PRIVATE tag is set to YES, all private members of a class will # be included in the documentation. # The default value is: NO. EXTRACT_PRIVATE = YES -# If the EXTRACT_PACKAGE tag is set to YES all members with package or internal +# If the EXTRACT_PRIV_VIRTUAL tag is set to YES, documented private virtual +# methods of a class will be included in the documentation. +# The default value is: NO. + +EXTRACT_PRIV_VIRTUAL = NO + +# If the EXTRACT_PACKAGE tag is set to YES, all members with package or internal # scope will be included in the documentation. # The default value is: NO. EXTRACT_PACKAGE = NO -# If the EXTRACT_STATIC tag is set to YES all static members of a file will be +# If the EXTRACT_STATIC tag is set to YES, all static members of a file will be # included in the documentation. # The default value is: NO. EXTRACT_STATIC = YES -# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) defined -# locally in source files will be included in the documentation. If set to NO +# If the EXTRACT_LOCAL_CLASSES tag is set to YES, classes (and structs) defined +# locally in source files will be included in the documentation. If set to NO, # only classes defined in header files are included. Does not have any effect # for Java sources. # The default value is: YES. EXTRACT_LOCAL_CLASSES = YES -# This flag is only useful for Objective-C code. When set to YES local methods, +# This flag is only useful for Objective-C code. If set to YES, local methods, # which are defined in the implementation section but not in the interface are -# included in the documentation. If set to NO only methods in the interface are +# included in the documentation. If set to NO, only methods in the interface are # included. # The default value is: NO. @@ -464,21 +518,21 @@ # If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all # undocumented classes that are normally visible in the class hierarchy. If set -# to NO these classes will be included in the various overviews. This option has -# no effect if EXTRACT_ALL is enabled. +# to NO, these classes will be included in the various overviews. This option +# has no effect if EXTRACT_ALL is enabled. # The default value is: NO. HIDE_UNDOC_CLASSES = NO # If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend -# (class|struct|union) declarations. If set to NO these declarations will be -# included in the documentation. +# declarations. If set to NO, these declarations will be included in the +# documentation. # The default value is: NO. HIDE_FRIEND_COMPOUNDS = NO # If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any -# documentation blocks found inside the body of a function. If set to NO these +# documentation blocks found inside the body of a function. If set to NO, these # blocks will be appended to the function's detailed documentation block. # The default value is: NO. @@ -492,21 +546,28 @@ INTERNAL_DOCS = NO # If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file -# names in lower-case letters. If set to YES upper-case letters are also +# names in lower-case letters. If set to YES, upper-case letters are also # allowed. This is useful if you have classes or files whose names only differ # in case and if your file system supports case sensitive file names. Windows -# and Mac users are advised to set this option to NO. +# (including Cygwin) ands Mac users are advised to set this option to NO. # The default value is: system dependent. CASE_SENSE_NAMES = YES # If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with -# their full class and namespace scopes in the documentation. If set to YES the +# their full class and namespace scopes in the documentation. If set to YES, the # scope will be hidden. # The default value is: NO. HIDE_SCOPE_NAMES = NO +# If the HIDE_COMPOUND_REFERENCE tag is set to NO (default) then doxygen will +# append additional text to a page's title, such as Class Reference. If set to +# YES the compound reference will be hidden. +# The default value is: NO. + +HIDE_COMPOUND_REFERENCE= NO + # If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of # the files that are included by a file in the documentation of that file. # The default value is: YES. @@ -534,14 +595,14 @@ # If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the # (detailed) documentation of file and class members alphabetically by member -# name. If set to NO the members will appear in declaration order. +# name. If set to NO, the members will appear in declaration order. # The default value is: YES. SORT_MEMBER_DOCS = YES # If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief # descriptions of file, namespace and class members alphabetically by member -# name. If set to NO the members will appear in declaration order. Note that +# name. If set to NO, the members will appear in declaration order. Note that # this will also influence the order of the classes in the class list. # The default value is: NO. @@ -586,27 +647,25 @@ STRICT_PROTO_MATCHING = NO -# The GENERATE_TODOLIST tag can be used to enable ( YES) or disable ( NO) the -# todo list. This list is created by putting \todo commands in the -# documentation. +# The GENERATE_TODOLIST tag can be used to enable (YES) or disable (NO) the todo +# list. This list is created by putting \todo commands in the documentation. # The default value is: YES. GENERATE_TODOLIST = YES -# The GENERATE_TESTLIST tag can be used to enable ( YES) or disable ( NO) the -# test list. This list is created by putting \test commands in the -# documentation. +# The GENERATE_TESTLIST tag can be used to enable (YES) or disable (NO) the test +# list. This list is created by putting \test commands in the documentation. # The default value is: YES. GENERATE_TESTLIST = YES -# The GENERATE_BUGLIST tag can be used to enable ( YES) or disable ( NO) the bug +# The GENERATE_BUGLIST tag can be used to enable (YES) or disable (NO) the bug # list. This list is created by putting \bug commands in the documentation. # The default value is: YES. GENERATE_BUGLIST = YES -# The GENERATE_DEPRECATEDLIST tag can be used to enable ( YES) or disable ( NO) +# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or disable (NO) # the deprecated list. This list is created by putting \deprecated commands in # the documentation. # The default value is: YES. @@ -631,8 +690,8 @@ MAX_INITIALIZER_LINES = 30 # Set the SHOW_USED_FILES tag to NO to disable the list of files generated at -# the bottom of the documentation of classes and structs. If set to YES the list -# will mention the files that were used to generate the documentation. +# the bottom of the documentation of classes and structs. If set to YES, the +# list will mention the files that were used to generate the documentation. # The default value is: YES. SHOW_USED_FILES = YES @@ -677,7 +736,7 @@ # The CITE_BIB_FILES tag can be used to specify one or more bib files containing # the reference definitions. This must be a list of .bib files. The .bib # extension is automatically appended if omitted. This requires the bibtex tool -# to be installed. See also http://en.wikipedia.org/wiki/BibTeX for more info. +# to be installed. See also https://en.wikipedia.org/wiki/BibTeX for more info. # For LaTeX the style of the bibliography can be controlled using # LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the # search path. See also \cite for info how to create references. @@ -696,7 +755,7 @@ QUIET = NO # The WARNINGS tag can be used to turn on/off the warning messages that are -# generated to standard error ( stderr) by doxygen. If WARNINGS is set to YES +# generated to standard error (stderr) by doxygen. If WARNINGS is set to YES # this implies that the warnings are on. # # Tip: Turn warnings on while writing the documentation. @@ -704,7 +763,7 @@ WARNINGS = YES -# If the WARN_IF_UNDOCUMENTED tag is set to YES, then doxygen will generate +# If the WARN_IF_UNDOCUMENTED tag is set to YES then doxygen will generate # warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag # will automatically be disabled. # The default value is: YES. @@ -721,12 +780,19 @@ # This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that # are documented, but have no documentation for their parameters or return -# value. If set to NO doxygen will only warn about wrong or incomplete parameter -# documentation, but not about the absence of documentation. +# value. If set to NO, doxygen will only warn about wrong or incomplete +# parameter documentation, but not about the absence of documentation. If +# EXTRACT_ALL is set to YES then this flag will automatically be disabled. # The default value is: NO. WARN_NO_PARAMDOC = YES +# If the WARN_AS_ERROR tag is set to YES then doxygen will immediately stop when +# a warning is encountered. +# The default value is: NO. + +WARN_AS_ERROR = NO + # The WARN_FORMAT tag determines the format of the warning messages that doxygen # can produce. The string should contain the $file, $line, and $text tags, which # will be replaced by the file and line number from which the warning originated @@ -750,7 +816,7 @@ # The INPUT tag is used to specify the files and/or directories that contain # documented source files. You may enter file names like myfile.cpp or # directories like /usr/src/myproject. Separate the files or directories with -# spaces. +# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING # Note: If this tag is empty the current directory is searched. INPUT = "@DOXYGEN_INPUT_DIR@" @@ -758,7 +824,7 @@ # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses # libiconv (or the iconv built into libc) for the transcoding. See the libiconv -# documentation (see: http://www.gnu.org/software/libiconv) for the list of +# documentation (see: https://www.gnu.org/software/libiconv/) for the list of # possible encodings. # The default value is: UTF-8. @@ -766,12 +832,19 @@ # If the value of the INPUT tag contains directories, you can use the # FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and -# *.h) to filter out the source-files in the directories. If left blank the -# following patterns are tested:*.c, *.cc, *.cxx, *.cpp, *.c++, *.java, *.ii, -# *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h, *.hh, *.hxx, *.hpp, -# *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc, *.m, *.markdown, -# *.md, *.mm, *.dox, *.py, *.f90, *.f, *.for, *.tcl, *.vhd, *.vhdl, *.ucf, -# *.qsf, *.as and *.js. +# *.h) to filter out the source-files in the directories. +# +# Note that for custom extensions or not directly supported extensions you also +# need to set EXTENSION_MAPPING for the extension otherwise the files are not +# read by doxygen. +# +# If left blank the following patterns are tested:*.c, *.cc, *.cxx, *.cpp, +# *.c++, *.java, *.ii, *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h, +# *.hh, *.hxx, *.hpp, *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc, +# *.m, *.markdown, *.md, *.mm, *.dox (to be provided as doxygen C comment), +# *.doc (to be provided as doxygen C comment), *.txt (to be provided as doxygen +# C comment), *.py, *.pyw, *.f90, *.f95, *.f03, *.f08, *.f, *.for, *.tcl, *.vhd, +# *.vhdl, *.ucf, *.qsf and *.ice. FILE_PATTERNS = *.h \ *.man \ @@ -861,6 +934,10 @@ # Note that the filter must not add or remove lines; it is applied before the # code is scanned, but not when the output code is generated. If lines are added # or removed, the anchors will not be placed correctly. +# +# Note that for custom extensions or not directly supported extensions you also +# need to set EXTENSION_MAPPING for the extension otherwise the files are not +# properly processed by doxygen. INPUT_FILTER = @@ -870,11 +947,15 @@ # (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how # filters are used. If the FILTER_PATTERNS tag is empty or if none of the # patterns match the file name, INPUT_FILTER is applied. +# +# Note that for custom extensions or not directly supported extensions you also +# need to set EXTENSION_MAPPING for the extension otherwise the files are not +# properly processed by doxygen. FILTER_PATTERNS = # If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using -# INPUT_FILTER ) will also be used to filter the input files that are used for +# INPUT_FILTER) will also be used to filter the input files that are used for # producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES). # The default value is: NO. @@ -922,7 +1003,7 @@ STRIP_CODE_COMMENTS = YES # If the REFERENCED_BY_RELATION tag is set to YES then for each documented -# function all documented functions referencing it will be listed. +# entity all documented functions referencing it will be listed. # The default value is: NO. REFERENCED_BY_RELATION = YES @@ -934,7 +1015,7 @@ REFERENCES_RELATION = YES # If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set -# to YES, then the hyperlinks from functions in REFERENCES_RELATION and +# to YES then the hyperlinks from functions in REFERENCES_RELATION and # REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will # link to the documentation. # The default value is: YES. @@ -954,12 +1035,12 @@ # If the USE_HTAGS tag is set to YES then the references to source code will # point to the HTML generated by the htags(1) tool instead of doxygen built-in # source browser. The htags tool is part of GNU's global source tagging system -# (see http://www.gnu.org/software/global/global.html). You will need version +# (see https://www.gnu.org/software/global/global.html). You will need version # 4.8.6 or higher. # # To use it do the following: # - Install the latest version of global -# - Enable SOURCE_BROWSER and USE_HTAGS in the config file +# - Enable SOURCE_BROWSER and USE_HTAGS in the configuration file # - Make sure the INPUT points to the root of the source tree # - Run doxygen as normal # @@ -981,13 +1062,13 @@ VERBATIM_HEADERS = NO -# If the CLANG_ASSISTED_PARSING tag is set to YES, then doxygen will use the +# If the CLANG_ASSISTED_PARSING tag is set to YES then doxygen will use the # clang parser (see: http://clang.llvm.org/) for more accurate parsing at the # cost of reduced performance. This can be particularly helpful with template # rich C++ code for which doxygen's built-in parser lacks the necessary type # information. # Note: The availability of this option depends on whether or not doxygen was -# compiled with the --with-libclang option. +# generated with the -Duse_libclang=ON option for CMake. # The default value is: NO. CLANG_ASSISTED_PARSING = NO @@ -1000,6 +1081,16 @@ CLANG_OPTIONS = +# If clang assisted parsing is enabled you can provide the clang parser with the +# path to the compilation database (see: +# http://clang.llvm.org/docs/HowToSetupToolingForLLVM.html) used when the files +# were built. This is equivalent to specifying the "-p" option to a clang tool, +# such as clang-check. These options will then be passed to the parser. +# Note: The availability of this option depends on whether or not doxygen was +# generated with the -Duse_libclang=ON option for CMake. + +CLANG_DATABASE_PATH = + #--------------------------------------------------------------------------- # Configuration options related to the alphabetical class index #--------------------------------------------------------------------------- @@ -1030,7 +1121,7 @@ # Configuration options related to the HTML output #--------------------------------------------------------------------------- -# If the GENERATE_HTML tag is set to YES doxygen will generate HTML output +# If the GENERATE_HTML tag is set to YES, doxygen will generate HTML output # The default value is: YES. GENERATE_HTML = YES @@ -1096,10 +1187,10 @@ # cascading style sheets that are included after the standard style sheets # created by doxygen. Using this option one can overrule certain style aspects. # This is preferred over using HTML_STYLESHEET since it does not replace the -# standard style sheet and is therefor more robust against future updates. +# standard style sheet and is therefore more robust against future updates. # Doxygen will copy the style sheet files to the output directory. -# Note: The order of the extra stylesheet files is of importance (e.g. the last -# stylesheet in the list overrules the setting of the previous ones in the +# Note: The order of the extra style sheet files is of importance (e.g. the last +# style sheet in the list overrules the setting of the previous ones in the # list). For an example see the documentation. # This tag requires that the tag GENERATE_HTML is set to YES. @@ -1116,9 +1207,9 @@ HTML_EXTRA_FILES = # The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen -# will adjust the colors in the stylesheet and background images according to +# will adjust the colors in the style sheet and background images according to # this color. Hue is specified as an angle on a colorwheel, see -# http://en.wikipedia.org/wiki/Hue for more information. For instance the value +# https://en.wikipedia.org/wiki/Hue for more information. For instance the value # 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300 # purple, and 360 is red again. # Minimum value: 0, maximum value: 359, default value: 220. @@ -1147,12 +1238,24 @@ # If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML # page will contain the date and time when the page was generated. Setting this -# to NO can help when comparing the output of multiple runs. -# The default value is: YES. +# to YES can help to show when doxygen was last run and thus if the +# documentation is up to date. +# The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_TIMESTAMP = YES +# If the HTML_DYNAMIC_MENUS tag is set to YES then the generated HTML +# documentation will contain a main index with vertical navigation menus that +# are dynamically created via JavaScript. If disabled, the navigation index will +# consists of multiple levels of tabs that are statically embedded in every HTML +# page. Disable this option to support browsers that do not have JavaScript, +# like the Qt help browser. +# The default value is: YES. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_DYNAMIC_MENUS = YES + # If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML # documentation will contain sections that can be hidden and shown after the # page has loaded. @@ -1176,13 +1279,13 @@ # If the GENERATE_DOCSET tag is set to YES, additional index files will be # generated that can be used as input for Apple's Xcode 3 integrated development -# environment (see: http://developer.apple.com/tools/xcode/), introduced with -# OSX 10.5 (Leopard). To create a documentation set, doxygen will generate a +# environment (see: https://developer.apple.com/xcode/), introduced with OSX +# 10.5 (Leopard). To create a documentation set, doxygen will generate a # Makefile in the HTML output directory. Running make will produce the docset in # that directory and running make install will install the docset in # ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at -# startup. See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html -# for more information. +# startup. See https://developer.apple.com/library/archive/featuredarticles/Doxy +# genXcode/_index.html for more information. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. @@ -1221,7 +1324,7 @@ # If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three # additional HTML index files: index.hhp, index.hhc, and index.hhk. The # index.hhp is a project file that can be read by Microsoft's HTML Help Workshop -# (see: http://www.microsoft.com/en-us/download/details.aspx?id=21138) on +# (see: https://www.microsoft.com/en-us/download/details.aspx?id=21138) on # Windows. # # The HTML Help Workshop contains a compiler that can convert all HTML output @@ -1244,28 +1347,28 @@ CHM_FILE = dcmtk-help.chm # The HHC_LOCATION tag can be used to specify the location (absolute path -# including file name) of the HTML help compiler ( hhc.exe). If non-empty +# including file name) of the HTML help compiler (hhc.exe). If non-empty, # doxygen will try to run the HTML help compiler on the generated index.hhp. # The file has to be specified with full path. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. HHC_LOCATION = -# The GENERATE_CHI flag controls if a separate .chi index file is generated ( -# YES) or that it should be included in the master .chm file ( NO). +# The GENERATE_CHI flag controls if a separate .chi index file is generated +# (YES) or that it should be included in the master .chm file (NO). # The default value is: NO. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. GENERATE_CHI = NO -# The CHM_INDEX_ENCODING is used to encode HtmlHelp index ( hhk), content ( hhc) +# The CHM_INDEX_ENCODING is used to encode HtmlHelp index (hhk), content (hhc) # and project file content. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. CHM_INDEX_ENCODING = -# The BINARY_TOC flag controls whether a binary table of contents is generated ( -# YES) or a normal table of contents ( NO) in the .chm file. Furthermore it +# The BINARY_TOC flag controls whether a binary table of contents is generated +# (YES) or a normal table of contents (NO) in the .chm file. Furthermore it # enables the Previous and Next buttons. # The default value is: NO. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. @@ -1297,7 +1400,7 @@ # The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help # Project output. For more information please see Qt Help Project / Namespace -# (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#namespace). +# (see: https://doc.qt.io/archives/qt-4.8/qthelpproject.html#namespace). # The default value is: org.doxygen.Project. # This tag requires that the tag GENERATE_QHP is set to YES. @@ -1305,7 +1408,7 @@ # The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt # Help Project output. For more information please see Qt Help Project / Virtual -# Folders (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#virtual- +# Folders (see: https://doc.qt.io/archives/qt-4.8/qthelpproject.html#virtual- # folders). # The default value is: doc. # This tag requires that the tag GENERATE_QHP is set to YES. @@ -1314,7 +1417,7 @@ # If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom # filter to add. For more information please see Qt Help Project / Custom -# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom- +# Filters (see: https://doc.qt.io/archives/qt-4.8/qthelpproject.html#custom- # filters). # This tag requires that the tag GENERATE_QHP is set to YES. @@ -1322,7 +1425,7 @@ # The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the # custom filter to add. For more information please see Qt Help Project / Custom -# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom- +# Filters (see: https://doc.qt.io/archives/qt-4.8/qthelpproject.html#custom- # filters). # This tag requires that the tag GENERATE_QHP is set to YES. @@ -1330,7 +1433,7 @@ # The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this # project's filter section matches. Qt Help Project / Filter Attributes (see: -# http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes). +# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#filter-attributes). # This tag requires that the tag GENERATE_QHP is set to YES. QHP_SECT_FILTER_ATTRS = @@ -1379,7 +1482,7 @@ # index structure (just like the one that is generated for HTML Help). For this # to work a browser that supports JavaScript, DHTML, CSS and frames is required # (i.e. any modern browser). Windows users are probably better off using the -# HTML help feature. Via custom stylesheets (see HTML_EXTRA_STYLESHEET) one can +# HTML help feature. Via custom style sheets (see HTML_EXTRA_STYLESHEET) one can # further fine-tune the look of the index. As an example, the default style # sheet generated by doxygen has an example that shows how to put an image at # the root of the tree instead of the PROJECT_NAME. Since the tree basically has @@ -1407,7 +1510,7 @@ TREEVIEW_WIDTH = 250 -# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open links to +# If the EXT_LINKS_IN_WINDOW option is set to YES, doxygen will open links to # external symbols imported via tag files in a separate window. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. @@ -1423,7 +1526,7 @@ FORMULA_FONTSIZE = 10 -# Use the FORMULA_TRANPARENT tag to determine whether or not the images +# Use the FORMULA_TRANSPARENT tag to determine whether or not the images # generated for formulas are transparent PNGs. Transparent PNGs are not # supported properly for IE 6.0, but are supported on all modern browsers. # @@ -1434,9 +1537,15 @@ FORMULA_TRANSPARENT = YES +# The FORMULA_MACROFILE can contain LaTeX \newcommand and \renewcommand commands +# to create new LaTeX commands to be used in formulas as building blocks. See +# the section "Including formulas" for details. + +FORMULA_MACROFILE = + # Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see -# http://www.mathjax.org) which uses client side Javascript for the rendering -# instead of using prerendered bitmaps. Use this if you do not have LaTeX +# https://www.mathjax.org) which uses client side JavaScript for the rendering +# instead of using pre-rendered bitmaps. Use this if you do not have LaTeX # installed or if you want to formulas look prettier in the HTML output. When # enabled you may also need to install MathJax separately and configure the path # to it using the MATHJAX_RELPATH option. @@ -1462,8 +1571,8 @@ # MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax # Content Delivery Network so you can quickly see the result without installing # MathJax. However, it is strongly recommended to install a local copy of -# MathJax from http://www.mathjax.org before deployment. -# The default value is: http://cdn.mathjax.org/mathjax/latest. +# MathJax from https://www.mathjax.org before deployment. +# The default value is: https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/. # This tag requires that the tag USE_MATHJAX is set to YES. MATHJAX_RELPATH = http://www.mathjax.org/mathjax @@ -1505,7 +1614,7 @@ SEARCHENGINE = YES # When the SERVER_BASED_SEARCH tag is enabled the search engine will be -# implemented using a web server instead of a web client using Javascript. There +# implemented using a web server instead of a web client using JavaScript. There # are two flavors of web server based searching depending on the EXTERNAL_SEARCH # setting. When disabled, doxygen will generate a PHP script for searching and # an index file used by the script. When EXTERNAL_SEARCH is enabled the indexing @@ -1522,9 +1631,9 @@ # external search engine pointed to by the SEARCHENGINE_URL option to obtain the # search results. # -# Doxygen ships with an example indexer ( doxyindexer) and search engine +# Doxygen ships with an example indexer (doxyindexer) and search engine # (doxysearch.cgi) which are based on the open source search engine library -# Xapian (see: http://xapian.org/). +# Xapian (see: https://xapian.org/). # # See the section "External Indexing and Searching" for details. # The default value is: NO. @@ -1535,9 +1644,9 @@ # The SEARCHENGINE_URL should point to a search engine hosted by a web server # which will return the search results when EXTERNAL_SEARCH is enabled. # -# Doxygen ships with an example indexer ( doxyindexer) and search engine +# Doxygen ships with an example indexer (doxyindexer) and search engine # (doxysearch.cgi) which are based on the open source search engine library -# Xapian (see: http://xapian.org/). See the section "External Indexing and +# Xapian (see: https://xapian.org/). See the section "External Indexing and # Searching" for details. # This tag requires that the tag SEARCHENGINE is set to YES. @@ -1573,7 +1682,7 @@ # Configuration options related to the LaTeX output #--------------------------------------------------------------------------- -# If the GENERATE_LATEX tag is set to YES doxygen will generate LaTeX output. +# If the GENERATE_LATEX tag is set to YES, doxygen will generate LaTeX output. # The default value is: YES. GENERATE_LATEX = NO @@ -1589,22 +1698,36 @@ # The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be # invoked. # -# Note that when enabling USE_PDFLATEX this option is only used for generating -# bitmaps for formulas in the HTML output, but not in the Makefile that is -# written to the output directory. -# The default file is: latex. +# Note that when not enabling USE_PDFLATEX the default is latex when enabling +# USE_PDFLATEX the default is pdflatex and when in the later case latex is +# chosen this is overwritten by pdflatex. For specific output languages the +# default can have been set differently, this depends on the implementation of +# the output language. # This tag requires that the tag GENERATE_LATEX is set to YES. LATEX_CMD_NAME = latex # The MAKEINDEX_CMD_NAME tag can be used to specify the command name to generate # index for LaTeX. +# Note: This tag is used in the Makefile / make.bat. +# See also: LATEX_MAKEINDEX_CMD for the part in the generated output file +# (.tex). # The default file is: makeindex. # This tag requires that the tag GENERATE_LATEX is set to YES. MAKEINDEX_CMD_NAME = makeindex -# If the COMPACT_LATEX tag is set to YES doxygen generates more compact LaTeX +# The LATEX_MAKEINDEX_CMD tag can be used to specify the command name to +# generate index for LaTeX. In case there is no backslash (\) as first character +# it will be automatically added in the LaTeX code. +# Note: This tag is used in the generated output file (.tex). +# See also: MAKEINDEX_CMD_NAME for the part in the Makefile / make.bat. +# The default value is: makeindex. +# This tag requires that the tag GENERATE_LATEX is set to YES. + +LATEX_MAKEINDEX_CMD = makeindex + +# If the COMPACT_LATEX tag is set to YES, doxygen generates more compact LaTeX # documents. This may be useful for small projects and may help to save some # trees in general. # The default value is: NO. @@ -1622,9 +1745,12 @@ PAPER_TYPE = a4wide # The EXTRA_PACKAGES tag can be used to specify one or more LaTeX package names -# that should be included in the LaTeX output. To get the times font for -# instance you can specify -# EXTRA_PACKAGES=times +# that should be included in the LaTeX output. The package can be specified just +# by its name or with the correct syntax as to be used with the LaTeX +# \usepackage command. To get the times font for instance you can specify : +# EXTRA_PACKAGES=times or EXTRA_PACKAGES={times} +# To use the option intlimits with the amsmath package you can specify: +# EXTRA_PACKAGES=[intlimits]{amsmath} # If left blank no extra packages will be included. # This tag requires that the tag GENERATE_LATEX is set to YES. @@ -1639,9 +1765,9 @@ # Note: Only use a user-defined header if you know what you are doing! The # following commands have a special meaning inside the header: $title, # $datetime, $date, $doxygenversion, $projectname, $projectnumber, -# $projectbrief, $projectlogo. Doxygen will replace $title with the empy string, -# for the replacement values of the other commands the user is refered to -# HTML_HEADER. +# $projectbrief, $projectlogo. Doxygen will replace $title with the empty +# string, for the replacement values of the other commands the user is referred +# to HTML_HEADER. # This tag requires that the tag GENERATE_LATEX is set to YES. LATEX_HEADER = @@ -1657,6 +1783,17 @@ LATEX_FOOTER = +# The LATEX_EXTRA_STYLESHEET tag can be used to specify additional user-defined +# LaTeX style sheets that are included after the standard style sheets created +# by doxygen. Using this option one can overrule certain style aspects. Doxygen +# will copy the style sheet files to the output directory. +# Note: The order of the extra style sheet files is of importance (e.g. the last +# style sheet in the list overrules the setting of the previous ones in the +# list). +# This tag requires that the tag GENERATE_LATEX is set to YES. + +LATEX_EXTRA_STYLESHEET = + # The LATEX_EXTRA_FILES tag can be used to specify one or more extra images or # other source files which should be copied to the LATEX_OUTPUT output # directory. Note that the files will be copied as-is; there are no commands or @@ -1675,7 +1812,7 @@ PDF_HYPERLINKS = YES # If the USE_PDFLATEX tag is set to YES, doxygen will use pdflatex to generate -# the PDF file directly from the LaTeX files. Set this option to YES to get a +# the PDF file directly from the LaTeX files. Set this option to YES, to get a # higher quality PDF documentation. # The default value is: YES. # This tag requires that the tag GENERATE_LATEX is set to YES. @@ -1710,17 +1847,33 @@ # The LATEX_BIB_STYLE tag can be used to specify the style to use for the # bibliography, e.g. plainnat, or ieeetr. See -# http://en.wikipedia.org/wiki/BibTeX and \cite for more info. +# https://en.wikipedia.org/wiki/BibTeX and \cite for more info. # The default value is: plain. # This tag requires that the tag GENERATE_LATEX is set to YES. LATEX_BIB_STYLE = plain +# If the LATEX_TIMESTAMP tag is set to YES then the footer of each generated +# page will contain the date and time when the page was generated. Setting this +# to NO can help when comparing the output of multiple runs. +# The default value is: NO. +# This tag requires that the tag GENERATE_LATEX is set to YES. + +LATEX_TIMESTAMP = NO + +# The LATEX_EMOJI_DIRECTORY tag is used to specify the (relative or absolute) +# path from which the emoji images will be read. If a relative path is entered, +# it will be relative to the LATEX_OUTPUT directory. If left blank the +# LATEX_OUTPUT directory will be used. +# This tag requires that the tag GENERATE_LATEX is set to YES. + +LATEX_EMOJI_DIRECTORY = + #--------------------------------------------------------------------------- # Configuration options related to the RTF output #--------------------------------------------------------------------------- -# If the GENERATE_RTF tag is set to YES doxygen will generate RTF output. The +# If the GENERATE_RTF tag is set to YES, doxygen will generate RTF output. The # RTF output is optimized for Word 97 and may not look too pretty with other RTF # readers/editors. # The default value is: NO. @@ -1735,7 +1888,7 @@ RTF_OUTPUT = rtf -# If the COMPACT_RTF tag is set to YES doxygen generates more compact RTF +# If the COMPACT_RTF tag is set to YES, doxygen generates more compact RTF # documents. This may be useful for small projects and may help to save some # trees in general. # The default value is: NO. @@ -1755,9 +1908,9 @@ RTF_HYPERLINKS = NO -# Load stylesheet definitions from file. Syntax is similar to doxygen's config -# file, i.e. a series of assignments. You only have to provide replacements, -# missing definitions are set to their default value. +# Load stylesheet definitions from file. Syntax is similar to doxygen's +# configuration file, i.e. a series of assignments. You only have to provide +# replacements, missing definitions are set to their default value. # # See also section "Doxygen usage" for information on how to generate the # default style sheet that doxygen normally uses. @@ -1766,17 +1919,27 @@ RTF_STYLESHEET_FILE = # Set optional variables used in the generation of an RTF document. Syntax is -# similar to doxygen's config file. A template extensions file can be generated -# using doxygen -e rtf extensionFile. +# similar to doxygen's configuration file. A template extensions file can be +# generated using doxygen -e rtf extensionFile. # This tag requires that the tag GENERATE_RTF is set to YES. RTF_EXTENSIONS_FILE = +# If the RTF_SOURCE_CODE tag is set to YES then doxygen will include source code +# with syntax highlighting in the RTF output. +# +# Note that which sources are shown also depends on other settings such as +# SOURCE_BROWSER. +# The default value is: NO. +# This tag requires that the tag GENERATE_RTF is set to YES. + +RTF_SOURCE_CODE = NO + #--------------------------------------------------------------------------- # Configuration options related to the man page output #--------------------------------------------------------------------------- -# If the GENERATE_MAN tag is set to YES doxygen will generate man pages for +# If the GENERATE_MAN tag is set to YES, doxygen will generate man pages for # classes and files. # The default value is: NO. @@ -1820,7 +1983,7 @@ # Configuration options related to the XML output #--------------------------------------------------------------------------- -# If the GENERATE_XML tag is set to YES doxygen will generate an XML file that +# If the GENERATE_XML tag is set to YES, doxygen will generate an XML file that # captures the structure of the code including all documentation. # The default value is: NO. @@ -1834,7 +1997,7 @@ XML_OUTPUT = xml -# If the XML_PROGRAMLISTING tag is set to YES doxygen will dump the program +# If the XML_PROGRAMLISTING tag is set to YES, doxygen will dump the program # listings (including syntax highlighting and cross-referencing information) to # the XML output. Note that enabling this will significantly increase the size # of the XML output. @@ -1843,11 +2006,18 @@ XML_PROGRAMLISTING = YES +# If the XML_NS_MEMB_FILE_SCOPE tag is set to YES, doxygen will include +# namespace members in file scope as well, matching the HTML output. +# The default value is: NO. +# This tag requires that the tag GENERATE_XML is set to YES. + +XML_NS_MEMB_FILE_SCOPE = NO + #--------------------------------------------------------------------------- # Configuration options related to the DOCBOOK output #--------------------------------------------------------------------------- -# If the GENERATE_DOCBOOK tag is set to YES doxygen will generate Docbook files +# If the GENERATE_DOCBOOK tag is set to YES, doxygen will generate Docbook files # that can be used to generate PDF. # The default value is: NO. @@ -1861,7 +2031,7 @@ DOCBOOK_OUTPUT = docbook -# If the DOCBOOK_PROGRAMLISTING tag is set to YES doxygen will include the +# If the DOCBOOK_PROGRAMLISTING tag is set to YES, doxygen will include the # program listings (including syntax highlighting and cross-referencing # information) to the DOCBOOK output. Note that enabling this will significantly # increase the size of the DOCBOOK output. @@ -1874,10 +2044,10 @@ # Configuration options for the AutoGen Definitions output #--------------------------------------------------------------------------- -# If the GENERATE_AUTOGEN_DEF tag is set to YES doxygen will generate an AutoGen -# Definitions (see http://autogen.sf.net) file that captures the structure of -# the code including all documentation. Note that this feature is still -# experimental and incomplete at the moment. +# If the GENERATE_AUTOGEN_DEF tag is set to YES, doxygen will generate an +# AutoGen Definitions (see http://autogen.sourceforge.net/) file that captures +# the structure of the code including all documentation. Note that this feature +# is still experimental and incomplete at the moment. # The default value is: NO. GENERATE_AUTOGEN_DEF = NO @@ -1886,7 +2056,7 @@ # Configuration options related to the Perl module output #--------------------------------------------------------------------------- -# If the GENERATE_PERLMOD tag is set to YES doxygen will generate a Perl module +# If the GENERATE_PERLMOD tag is set to YES, doxygen will generate a Perl module # file that captures the structure of the code including all documentation. # # Note that this feature is still experimental and incomplete at the moment. @@ -1894,7 +2064,7 @@ GENERATE_PERLMOD = NO -# If the PERLMOD_LATEX tag is set to YES doxygen will generate the necessary +# If the PERLMOD_LATEX tag is set to YES, doxygen will generate the necessary # Makefile rules, Perl scripts and LaTeX code to be able to generate PDF and DVI # output from the Perl module output. # The default value is: NO. @@ -1902,9 +2072,9 @@ PERLMOD_LATEX = NO -# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be nicely +# If the PERLMOD_PRETTY tag is set to YES, the Perl module output will be nicely # formatted so it can be parsed by a human reader. This is useful if you want to -# understand what is going on. On the other hand, if this tag is set to NO the +# understand what is going on. On the other hand, if this tag is set to NO, the # size of the Perl module output will be much smaller and Perl will parse it # just the same. # The default value is: YES. @@ -1924,14 +2094,14 @@ # Configuration options related to the preprocessor #--------------------------------------------------------------------------- -# If the ENABLE_PREPROCESSING tag is set to YES doxygen will evaluate all +# If the ENABLE_PREPROCESSING tag is set to YES, doxygen will evaluate all # C-preprocessor directives found in the sources and include files. # The default value is: YES. ENABLE_PREPROCESSING = YES -# If the MACRO_EXPANSION tag is set to YES doxygen will expand all macro names -# in the source code. If set to NO only conditional compilation will be +# If the MACRO_EXPANSION tag is set to YES, doxygen will expand all macro names +# in the source code. If set to NO, only conditional compilation will be # performed. Macro expansion can be done in a controlled way by setting # EXPAND_ONLY_PREDEF to YES. # The default value is: NO. @@ -1947,7 +2117,7 @@ EXPAND_ONLY_PREDEF = YES -# If the SEARCH_INCLUDES tag is set to YES the includes files in the +# If the SEARCH_INCLUDES tag is set to YES, the include files in the # INCLUDE_PATH will be searched if a #include is found. # The default value is: YES. # This tag requires that the tag ENABLE_PREPROCESSING is set to YES. @@ -1991,7 +2161,7 @@ WITH_LIBXML \ WITH_OPENSSL \ WITH_THREADS \ - WITH_ZLIB \ + WITH_ZLIB # If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this # tag can be used to specify a list of macro names that should be expanded. The @@ -2037,37 +2207,32 @@ GENERATE_TAGFILE = @DOXYGEN_TAGFILE@ -# If the ALLEXTERNALS tag is set to YES all external class will be listed in the -# class index. If set to NO only the inherited external classes will be listed. +# If the ALLEXTERNALS tag is set to YES, all external class will be listed in +# the class index. If set to NO, only the inherited external classes will be +# listed. # The default value is: NO. ALLEXTERNALS = NO -# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed in -# the modules index. If set to NO, only the current project's groups will be +# If the EXTERNAL_GROUPS tag is set to YES, all external groups will be listed +# in the modules index. If set to NO, only the current project's groups will be # listed. # The default value is: YES. EXTERNAL_GROUPS = YES -# If the EXTERNAL_PAGES tag is set to YES all external pages will be listed in +# If the EXTERNAL_PAGES tag is set to YES, all external pages will be listed in # the related pages index. If set to NO, only the current project's pages will # be listed. # The default value is: YES. EXTERNAL_PAGES = YES -# The PERL_PATH should be the absolute path and name of the perl script -# interpreter (i.e. the result of 'which perl'). -# The default file (with absolute path) is: /usr/bin/perl. - -PERL_PATH = /usr/bin/perl - #--------------------------------------------------------------------------- # Configuration options related to the dot tool #--------------------------------------------------------------------------- -# If the CLASS_DIAGRAMS tag is set to YES doxygen will generate a class diagram +# If the CLASS_DIAGRAMS tag is set to YES, doxygen will generate a class diagram # (in HTML and LaTeX) for classes with base or super classes. Setting the tag to # NO turns the diagrams off. Note that this option also works with HAVE_DOT # disabled, but it is recommended to install and use dot, since it yields more @@ -2076,15 +2241,6 @@ CLASS_DIAGRAMS = YES -# You can define message sequence charts within doxygen comments using the \msc -# command. Doxygen will then run the mscgen tool (see: -# http://www.mcternan.me.uk/mscgen/)) to produce the chart and insert it in the -# documentation. The MSCGEN_PATH tag allows you to specify the directory where -# the mscgen tool resides. If left empty the tool is assumed to be found in the -# default search path. - -MSCGEN_PATH = - # You can include diagrams made with dia in doxygen documentation. Doxygen will # then run dia to produce the diagram and insert it in the documentation. The # DIA_PATH tag allows you to specify the directory where the dia binary resides. @@ -2092,7 +2248,7 @@ DIA_PATH = -# If set to YES, the inheritance and collaboration graphs will hide inheritance +# If set to YES the inheritance and collaboration graphs will hide inheritance # and usage relations if the target is undocumented or is not a class. # The default value is: YES. @@ -2165,7 +2321,7 @@ GROUP_GRAPHS = YES -# If the UML_LOOK tag is set to YES doxygen will generate inheritance and +# If the UML_LOOK tag is set to YES, doxygen will generate inheritance and # collaboration diagrams in a style similar to the OMG's Unified Modeling # Language. # The default value is: NO. @@ -2217,7 +2373,8 @@ # # Note that enabling this option will significantly increase the time of a run. # So in most cases it will be better to enable call graphs for selected -# functions only using the \callgraph command. +# functions only using the \callgraph command. Disabling a call graph can be +# accomplished by means of the command \hidecallgraph. # The default value is: NO. # This tag requires that the tag HAVE_DOT is set to YES. @@ -2228,7 +2385,8 @@ # # Note that enabling this option will significantly increase the time of a run. # So in most cases it will be better to enable caller graphs for selected -# functions only using the \callergraph command. +# functions only using the \callergraph command. Disabling a caller graph can be +# accomplished by means of the command \hidecallergraph. # The default value is: NO. # This tag requires that the tag HAVE_DOT is set to YES. @@ -2251,13 +2409,17 @@ DIRECTORY_GRAPH = YES # The DOT_IMAGE_FORMAT tag can be used to set the image format of the images -# generated by dot. +# generated by dot. For an explanation of the image formats see the section +# output formats in the documentation of the dot tool (Graphviz (see: +# http://www.graphviz.org/)). # Note: If you choose svg you need to set HTML_FILE_EXTENSION to xhtml in order # to make the SVG files visible in IE 9+ (other browsers do not have this # requirement). # Possible values are: png, png:cairo, png:cairo:cairo, png:cairo:gd, png:gd, # png:gd:gd, jpg, jpg:cairo, jpg:cairo:gd, jpg:gd, jpg:gd:gd, gif, gif:cairo, -# gif:cairo:gd, gif:gd, gif:gd:gd and svg. +# gif:cairo:gd, gif:gd, gif:gd:gd, svg, png:gd, png:gd:gd, png:cairo, +# png:cairo:gd, png:cairo:cairo, png:cairo:gdiplus, png:gdiplus and +# png:gdiplus:gdiplus. # The default value is: png. # This tag requires that the tag HAVE_DOT is set to YES. @@ -2305,10 +2467,19 @@ # PlantUML is not used or called during a preprocessing step. Doxygen will # generate a warning when it encounters a \startuml command in this case and # will not generate output for the diagram. -# This tag requires that the tag HAVE_DOT is set to YES. PLANTUML_JAR_PATH = +# When using plantuml, the PLANTUML_CFG_FILE tag can be used to specify a +# configuration file for plantuml. + +PLANTUML_CFG_FILE = + +# When using plantuml, the specified paths are searched for files specified by +# the !include statement in a plantuml block. + +PLANTUML_INCLUDE_PATH = + # The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of nodes # that will be shown in the graph. If the number of nodes in a graph becomes # larger than this value, doxygen will truncate the graph, which is visualized @@ -2345,7 +2516,7 @@ DOT_TRANSPARENT = NO -# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output +# Set the DOT_MULTI_TARGETS tag to YES to allow dot to generate multiple output # files in one run (i.e. multiple -o and -T options on the command line). This # makes dot run faster, but since only newer versions of dot (>1.8.10) support # this, this feature is disabled by default. @@ -2362,7 +2533,7 @@ GENERATE_LEGEND = YES -# If the DOT_CLEANUP tag is set to YES doxygen will remove the intermediate dot +# If the DOT_CLEANUP tag is set to YES, doxygen will remove the intermediate dot # files that are used to generate the various graphs. # The default value is: YES. # This tag requires that the tag HAVE_DOT is set to YES. diff -Nru dcmtk-3.6.6/doxygen/manpages/man1/cda2dcm.1 dcmtk-3.6.7/doxygen/manpages/man1/cda2dcm.1 --- dcmtk-3.6.6/doxygen/manpages/man1/cda2dcm.1 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/doxygen/manpages/man1/cda2dcm.1 2022-04-28 13:47:25.000000000 +0000 @@ -1,4 +1,4 @@ -.TH "cda2dcm" 1 "Thu Jan 14 2021" "Version 3.6.6" "OFFIS DCMTK" \" -*- nroff -*- +.TH "cda2dcm" 1 "Fri Apr 22 2022" "Version 3.6.7" "OFFIS DCMTK" \" -*- nroff -*- .nh .SH NAME cda2dcm \- Encapsulate CDA file into DICOM file format @@ -238,4 +238,4 @@ 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 data dictionary can be loaded\&. .SH "COPYRIGHT" .PP -Copyright (C) 2018-2021 e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&. +Copyright (C) 2018-2022 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&. diff -Nru dcmtk-3.6.6/doxygen/manpages/man1/dcm2json.1 dcmtk-3.6.7/doxygen/manpages/man1/dcm2json.1 --- dcmtk-3.6.6/doxygen/manpages/man1/dcm2json.1 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/doxygen/manpages/man1/dcm2json.1 2022-04-28 13:47:25.000000000 +0000 @@ -1,4 +1,4 @@ -.TH "dcm2json" 1 "Thu Jan 14 2021" "Version 3.6.6" "OFFIS DCMTK" \" -*- nroff -*- +.TH "dcm2json" 1 "Fri Apr 22 2022" "Version 3.6.7" "OFFIS DCMTK" \" -*- nroff -*- .nh .SH NAME dcm2json \- Convert DICOM file and data set to JSON @@ -207,7 +207,7 @@ ] }, "00100030": { - "vr": "DT", + "vr": "DA", "Value": [ "19670701" ] @@ -282,6 +282,8 @@ Binary data, i\&.e\&. DICOM element values with Value Representations (VR) of OB or OW, as well as OD, OF, OL, OV and UN values are always written as 'InlineBinary' (base64 encoding) to the JSON output\&. A future version of this tool might optionally use a 'BulkDataURI' instead, i\&.e\&. the WADO-RS URL of a bulk data item that contains the element value\&. This would be particularly useful for large amounts of data, such as pixel data\&. .SH "NOTES" .PP +.SS "Numbers as Strings" +The DICOM standard allows certain numeric DICOM value representations, DS, IS, SV and UV, to be converted either to a JSON number or a JSON string\&. \fBdcm2json\fP converts DS and IS values to JSON numbers if they are valid decimal strings or integer strings, and to strings if they contain any illegal character\&. \fBdcm2json\fP converts SV and UV values to numbers if they are not larger than 9007199254740991ll or smaller than -9007199254740991ll, and to strings otherwise\&. While the JSON specification permits larger numbers, these are the largest integers that JavaScript can handle\&. Therefore, many JSON parsers cannot process larger numbers\&. .SS "Character Encoding" As required by the DICOM JSON encoding, \fBdcm2json\fP always creates output in Unicode UTF-8 encoding and converts DICOM datasets accordingly\&. If this is not possible, for example because DCMTK has been compiled without either iconv or ICU library, an error is returned\&. .SH "LOGGING" @@ -333,4 +335,4 @@ 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 data dictionary can be loaded\&. .SH "COPYRIGHT" .PP -Copyright (C) 2016-2021 e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&. +Copyright (C) 2016-2022 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&. diff -Nru dcmtk-3.6.6/doxygen/manpages/man1/dcm2pdf.1 dcmtk-3.6.7/doxygen/manpages/man1/dcm2pdf.1 --- dcmtk-3.6.6/doxygen/manpages/man1/dcm2pdf.1 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/doxygen/manpages/man1/dcm2pdf.1 2022-04-28 13:47:25.000000000 +0000 @@ -1,4 +1,4 @@ -.TH "dcm2pdf" 1 "Thu Jan 14 2021" "Version 3.6.6" "OFFIS DCMTK" \" -*- nroff -*- +.TH "dcm2pdf" 1 "Fri Apr 22 2022" "Version 3.6.7" "OFFIS DCMTK" \" -*- nroff -*- .nh .SH NAME dcm2pdf \- Extract PDF file from DICOM encapsulated PDF @@ -157,4 +157,4 @@ \fBpdf2dcm\fP(1) .SH "COPYRIGHT" .PP -Copyright (C) 2007-2014 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&. +Copyright (C) 2007-2022 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&. diff -Nru dcmtk-3.6.6/doxygen/manpages/man1/dcm2pnm.1 dcmtk-3.6.7/doxygen/manpages/man1/dcm2pnm.1 --- dcmtk-3.6.6/doxygen/manpages/man1/dcm2pnm.1 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/doxygen/manpages/man1/dcm2pnm.1 2022-04-28 13:47:25.000000000 +0000 @@ -1,4 +1,4 @@ -.TH "dcm2pnm" 1 "Thu Jan 14 2021" "Version 3.6.6" "OFFIS DCMTK" \" -*- nroff -*- +.TH "dcm2pnm" 1 "Fri Apr 22 2022" "Version 3.6.7" "OFFIS DCMTK" \" -*- nroff -*- .nh .SH NAME dcm2pnm \- Convert DICOM images to PGM/PPM, PNG, TIFF or BMP @@ -403,7 +403,7 @@ .IP "\(bu" 2 4 = magnification algorithm with bicubic interpolation from Eduard Stanescu .PP -The \fI--write-tiff\fP option is only available when DCMTK has been configured and compiled with support for the external \fBlibtiff\fP TIFF library\&. The availability of the TIFF compression options depends on the \fBlibtiff\fP configuration\&. In particular, the patented LZW algorithm may not be available\&. +The \fI--write-tiff\fP option is only available when DCMTK has been configured and compiled with support for the external \fBlibtiff\fP TIFF library\&. The availability of the TIFF compression options depends on the \fBlibtiff\fP configuration\&. .PP The \fI--write-png\fP option is only available when DCMTK has been configured and compiled with support for the external \fBlibpng\fP PNG library\&. Option \fI--interlace\fP enables progressive image view while loading the PNG file\&. Only a few applications take care of the meta info (TEXT) in a PNG file\&. .SH "TRANSFER SYNTAXES" @@ -452,4 +452,4 @@ \fBdcmj2pnm\fP(1), \fBimg2dcm\fP(1) .SH "COPYRIGHT" .PP -Copyright (C) 1998-2021 e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&. +Copyright (C) 1998-2022 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&. diff -Nru dcmtk-3.6.6/doxygen/manpages/man1/dcm2xml.1 dcmtk-3.6.7/doxygen/manpages/man1/dcm2xml.1 --- dcmtk-3.6.6/doxygen/manpages/man1/dcm2xml.1 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/doxygen/manpages/man1/dcm2xml.1 2022-04-28 13:47:25.000000000 +0000 @@ -1,4 +1,4 @@ -.TH "dcm2xml" 1 "Thu Jan 14 2021" "Version 3.6.6" "OFFIS DCMTK" \" -*- nroff -*- +.TH "dcm2xml" 1 "Fri Apr 22 2022" "Version 3.6.7" "OFFIS DCMTK" \" -*- nroff -*- .nh .SH NAME dcm2xml \- Convert DICOM file and data set to XML @@ -286,4 +286,4 @@ \fBxml2dcm\fP(1), \fBdcmconv\fP(1) .SH "COPYRIGHT" .PP -Copyright (C) 2002-2021 e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&. +Copyright (C) 2002-2022 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&. diff -Nru dcmtk-3.6.6/doxygen/manpages/man1/dcmcjpeg.1 dcmtk-3.6.7/doxygen/manpages/man1/dcmcjpeg.1 --- dcmtk-3.6.6/doxygen/manpages/man1/dcmcjpeg.1 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/doxygen/manpages/man1/dcmcjpeg.1 2022-04-28 13:47:25.000000000 +0000 @@ -1,4 +1,4 @@ -.TH "dcmcjpeg" 1 "Thu Jan 14 2021" "Version 3.6.6" "OFFIS DCMTK" \" -*- nroff -*- +.TH "dcmcjpeg" 1 "Fri Apr 22 2022" "Version 3.6.7" "OFFIS DCMTK" \" -*- nroff -*- .nh .SH NAME dcmcjpeg \- Encode DICOM file to JPEG transfer syntax @@ -147,7 +147,7 @@ +tl --true-lossless true lossless codec (default) - # This option selects an encoder, that guarantees truely lossless + # This option selects an encoder, that guarantees truly lossless # image compression. See NOTES for further information. +pl --pseudo-lossless @@ -647,4 +647,4 @@ \fBdcmdjpeg\fP(1) .SH "COPYRIGHT" .PP -Copyright (C) 2001-2018 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&. +Copyright (C) 2001-2022 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&. diff -Nru dcmtk-3.6.6/doxygen/manpages/man1/dcmcjpls.1 dcmtk-3.6.7/doxygen/manpages/man1/dcmcjpls.1 --- dcmtk-3.6.6/doxygen/manpages/man1/dcmcjpls.1 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/doxygen/manpages/man1/dcmcjpls.1 2022-04-28 13:47:25.000000000 +0000 @@ -1,4 +1,4 @@ -.TH "dcmcjpls" 1 "Thu Jan 14 2021" "Version 3.6.6" "OFFIS DCMTK" \" -*- nroff -*- +.TH "dcmcjpls" 1 "Fri Apr 22 2022" "Version 3.6.7" "OFFIS DCMTK" \" -*- nroff -*- .nh .SH NAME dcmcjpls \- Encode DICOM file to JPEG-LS transfer syntax @@ -180,7 +180,8 @@ # Pad odd-length JPEG-LS bitstreams by writing a zero byte after the # end of image segment marker, i.e. FF D9 00. This is not DICOM conformant # but required for interoperability with the HP LOCO reference implementation, - # which does not support extended JPEG-LS bitstreams..fi + # which does not support extended JPEG-LS bitstreams. +.fi .PP .SS "encapsulated pixel data encoding options" .PP @@ -232,7 +233,7 @@ +ud --uid-default assign new UID if lossy compression (default) - # Assigns a new SOP instance UID if the compression is lossy JPEG. + # Assigns a new SOP instance UID if the compression is lossy JPEG-LS. +ua --uid-always always assign new UID @@ -338,4 +339,4 @@ \fBdcmdjpls\fP(1) .SH "COPYRIGHT" .PP -Copyright (C) 2009-2021 e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&. +Copyright (C) 2009-2022 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&. diff -Nru dcmtk-3.6.6/doxygen/manpages/man1/dcmconv.1 dcmtk-3.6.7/doxygen/manpages/man1/dcmconv.1 --- dcmtk-3.6.6/doxygen/manpages/man1/dcmconv.1 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/doxygen/manpages/man1/dcmconv.1 2022-04-28 13:47:25.000000000 +0000 @@ -1,4 +1,4 @@ -.TH "dcmconv" 1 "Thu Jan 14 2021" "Version 3.6.6" "OFFIS DCMTK" \" -*- nroff -*- +.TH "dcmconv" 1 "Fri Apr 22 2022" "Version 3.6.7" "OFFIS DCMTK" \" -*- nroff -*- .nh .SH NAME dcmconv \- Convert DICOM file encoding @@ -347,4 +347,4 @@ \fBdcmdump\fP(1) .SH "COPYRIGHT" .PP -Copyright (C) 1994-2021 e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&. +Copyright (C) 1994-2022 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&. diff -Nru dcmtk-3.6.6/doxygen/manpages/man1/dcmcrle.1 dcmtk-3.6.7/doxygen/manpages/man1/dcmcrle.1 --- dcmtk-3.6.6/doxygen/manpages/man1/dcmcrle.1 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/doxygen/manpages/man1/dcmcrle.1 2022-04-28 13:47:25.000000000 +0000 @@ -1,4 +1,4 @@ -.TH "dcmcrle" 1 "Thu Jan 14 2021" "Version 3.6.6" "OFFIS DCMTK" \" -*- nroff -*- +.TH "dcmcrle" 1 "Fri Apr 22 2022" "Version 3.6.7" "OFFIS DCMTK" \" -*- nroff -*- .nh .SH NAME dcmcrle \- Encode DICOM file to RLE transfer syntax @@ -212,4 +212,4 @@ \fBdcmdrle\fP(1) .SH "COPYRIGHT" .PP -Copyright (C) 2002-2018 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&. +Copyright (C) 2002-2022 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&. diff -Nru dcmtk-3.6.6/doxygen/manpages/man1/dcmdjpeg.1 dcmtk-3.6.7/doxygen/manpages/man1/dcmdjpeg.1 --- dcmtk-3.6.6/doxygen/manpages/man1/dcmdjpeg.1 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/doxygen/manpages/man1/dcmdjpeg.1 2022-04-28 13:47:25.000000000 +0000 @@ -1,4 +1,4 @@ -.TH "dcmdjpeg" 1 "Thu Jan 14 2021" "Version 3.6.6" "OFFIS DCMTK" \" -*- nroff -*- +.TH "dcmdjpeg" 1 "Fri Apr 22 2022" "Version 3.6.7" "OFFIS DCMTK" \" -*- nroff -*- .nh .SH NAME dcmdjpeg \- Decode JPEG-compressed DICOM file @@ -299,4 +299,4 @@ \fBdcmcjpeg\fP(1) .SH "COPYRIGHT" .PP -Copyright (C) 2001-2019 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&. +Copyright (C) 2001-2022 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&. diff -Nru dcmtk-3.6.6/doxygen/manpages/man1/dcmdjpls.1 dcmtk-3.6.7/doxygen/manpages/man1/dcmdjpls.1 --- dcmtk-3.6.6/doxygen/manpages/man1/dcmdjpls.1 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/doxygen/manpages/man1/dcmdjpls.1 2022-04-28 13:47:25.000000000 +0000 @@ -1,4 +1,4 @@ -.TH "dcmdjpls" 1 "Thu Jan 14 2021" "Version 3.6.6" "OFFIS DCMTK" \" -*- nroff -*- +.TH "dcmdjpls" 1 "Fri Apr 22 2022" "Version 3.6.7" "OFFIS DCMTK" \" -*- nroff -*- .nh .SH NAME dcmdjpls \- Decode JPEG-LS compressed DICOM file @@ -240,4 +240,4 @@ \fBdcmcjpls\fP(1) .SH "COPYRIGHT" .PP -Copyright (C) 2009-2014 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&. +Copyright (C) 2009-2022 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&. diff -Nru dcmtk-3.6.6/doxygen/manpages/man1/dcmdrle.1 dcmtk-3.6.7/doxygen/manpages/man1/dcmdrle.1 --- dcmtk-3.6.6/doxygen/manpages/man1/dcmdrle.1 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/doxygen/manpages/man1/dcmdrle.1 2022-04-28 13:47:25.000000000 +0000 @@ -1,4 +1,4 @@ -.TH "dcmdrle" 1 "Thu Jan 14 2021" "Version 3.6.6" "OFFIS DCMTK" \" -*- nroff -*- +.TH "dcmdrle" 1 "Fri Apr 22 2022" "Version 3.6.7" "OFFIS DCMTK" \" -*- nroff -*- .nh .SH NAME dcmdrle \- Decode RLE-compressed DICOM file @@ -206,4 +206,4 @@ \fBdcmcrle\fP(1) .SH "COPYRIGHT" .PP -Copyright (C) 2002-2014 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany +Copyright (C) 2002-2022 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany diff -Nru dcmtk-3.6.6/doxygen/manpages/man1/dcmdspfn.1 dcmtk-3.6.7/doxygen/manpages/man1/dcmdspfn.1 --- dcmtk-3.6.6/doxygen/manpages/man1/dcmdspfn.1 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/doxygen/manpages/man1/dcmdspfn.1 2022-04-28 13:47:25.000000000 +0000 @@ -1,4 +1,4 @@ -.TH "dcmdspfn" 1 "Thu Jan 14 2021" "Version 3.6.6" "OFFIS DCMTK" \" -*- nroff -*- +.TH "dcmdspfn" 1 "Fri Apr 22 2022" "Version 3.6.7" "OFFIS DCMTK" \" -*- nroff -*- .nh .SH NAME dcmdspfn \- Export standard display curves to a text file @@ -143,4 +143,4 @@ \fBdconvlum\fP(1), \fBdcod2lum\fP(1) .SH "COPYRIGHT" .PP -Copyright (C) 1999-2014 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&. +Copyright (C) 1999-2022 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&. diff -Nru dcmtk-3.6.6/doxygen/manpages/man1/dcmdump.1 dcmtk-3.6.7/doxygen/manpages/man1/dcmdump.1 --- dcmtk-3.6.6/doxygen/manpages/man1/dcmdump.1 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/doxygen/manpages/man1/dcmdump.1 2022-04-28 13:47:25.000000000 +0000 @@ -1,4 +1,4 @@ -.TH "dcmdump" 1 "Thu Jan 14 2021" "Version 3.6.6" "OFFIS DCMTK" \" -*- nroff -*- +.TH "dcmdump" 1 "Fri Apr 22 2022" "Version 3.6.7" "OFFIS DCMTK" \" -*- nroff -*- .nh .SH NAME dcmdump \- Dump DICOM file and data set @@ -364,4 +364,4 @@ \fBdump2dcm\fP(1), \fBdcmconv\fP(1) .SH "COPYRIGHT" .PP -Copyright (C) 1994-2017 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&. +Copyright (C) 1994-2022 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&. diff -Nru dcmtk-3.6.6/doxygen/manpages/man1/dcmftest.1 dcmtk-3.6.7/doxygen/manpages/man1/dcmftest.1 --- dcmtk-3.6.6/doxygen/manpages/man1/dcmftest.1 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/doxygen/manpages/man1/dcmftest.1 2022-04-28 13:47:25.000000000 +0000 @@ -1,4 +1,4 @@ -.TH "dcmftest" 1 "Thu Jan 14 2021" "Version 3.6.6" "OFFIS DCMTK" \" -*- nroff -*- +.TH "dcmftest" 1 "Fri Apr 22 2022" "Version 3.6.7" "OFFIS DCMTK" \" -*- nroff -*- .nh .SH NAME dcmftest \- Test if file uses DICOM part 10 format @@ -28,4 +28,4 @@ \fBdcmgpdir\fP(1), \fBdcmmkdir\fP(1) .SH "COPYRIGHT" .PP -Copyright (C) 1997-2014 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&. +Copyright (C) 1997-2022 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&. diff -Nru dcmtk-3.6.6/doxygen/manpages/man1/dcmgpdir.1 dcmtk-3.6.7/doxygen/manpages/man1/dcmgpdir.1 --- dcmtk-3.6.6/doxygen/manpages/man1/dcmgpdir.1 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/doxygen/manpages/man1/dcmgpdir.1 2022-04-28 13:47:25.000000000 +0000 @@ -1,4 +1,4 @@ -.TH "dcmgpdir" 1 "Thu Jan 14 2021" "Version 3.6.6" "OFFIS DCMTK" \" -*- nroff -*- +.TH "dcmgpdir" 1 "Fri Apr 22 2022" "Version 3.6.7" "OFFIS DCMTK" \" -*- nroff -*- .nh .SH NAME dcmgpdir \- Create a general purpose DICOMDIR @@ -228,4 +228,4 @@ \fBdcmmkdir\fP(1) .SH "COPYRIGHT" .PP -Copyright (C) 1996-2016 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&. +Copyright (C) 1996-2022 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&. diff -Nru dcmtk-3.6.6/doxygen/manpages/man1/dcmicmp.1 dcmtk-3.6.7/doxygen/manpages/man1/dcmicmp.1 --- dcmtk-3.6.6/doxygen/manpages/man1/dcmicmp.1 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/doxygen/manpages/man1/dcmicmp.1 2022-04-28 13:47:25.000000000 +0000 @@ -1,4 +1,4 @@ -.TH "dcmicmp" 1 "Thu Jan 14 2021" "Version 3.6.6" "OFFIS DCMTK" \" -*- nroff -*- +.TH "dcmicmp" 1 "Fri Apr 22 2022" "Version 3.6.7" "OFFIS DCMTK" \" -*- nroff -*- .nh .SH NAME dcmicmp \- Compare DICOM images and compute difference metrics @@ -300,4 +300,4 @@ \fBdcm2pnm\fP(1) .SH "COPYRIGHT" .PP -Copyright (C) 2018 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&. +Copyright (C) 2018-2022 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&. diff -Nru dcmtk-3.6.6/doxygen/manpages/man1/dcmj2pnm.1 dcmtk-3.6.7/doxygen/manpages/man1/dcmj2pnm.1 --- dcmtk-3.6.6/doxygen/manpages/man1/dcmj2pnm.1 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/doxygen/manpages/man1/dcmj2pnm.1 2022-04-28 13:47:25.000000000 +0000 @@ -1,4 +1,4 @@ -.TH "dcmj2pnm" 1 "Thu Jan 14 2021" "Version 3.6.6" "OFFIS DCMTK" \" -*- nroff -*- +.TH "dcmj2pnm" 1 "Fri Apr 22 2022" "Version 3.6.7" "OFFIS DCMTK" \" -*- nroff -*- .nh .SH NAME dcmj2pnm \- Convert DICOM images to PGM/PPM, PNG, TIFF, JPEG or BMP @@ -475,7 +475,7 @@ .IP "\(bu" 2 4 = magnification algorithm with bicubic interpolation from Eduard Stanescu .PP -The \fI--write-tiff\fP option is only available when DCMTK has been configured and compiled with support for the external \fBlibtiff\fP TIFF library\&. The availability of the TIFF compression options depends on the \fBlibtiff\fP configuration\&. In particular, the patented LZW algorithm may not be available\&. +The \fI--write-tiff\fP option is only available when DCMTK has been configured and compiled with support for the external \fBlibtiff\fP TIFF library\&. The availability of the TIFF compression options depends on the \fBlibtiff\fP configuration\&. .PP The \fI--write-png\fP option is only available when DCMTK has been configured and compiled with support for the external \fBlibpng\fP PNG library\&. Option \fI--interlace\fP enables progressive image view while loading the PNG file\&. Only a few applications take care of the meta info (TEXT) in a PNG file\&. .SH "TRANSFER SYNTAXES" @@ -530,4 +530,4 @@ \fBdcm2pnm\fP(1), \fBimg2dcm\fP(1) .SH "COPYRIGHT" .PP -Copyright (C) 2001-2021 e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&. +Copyright (C) 2001-2022 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&. diff -Nru dcmtk-3.6.6/doxygen/manpages/man1/dcml2pnm.1 dcmtk-3.6.7/doxygen/manpages/man1/dcml2pnm.1 --- dcmtk-3.6.6/doxygen/manpages/man1/dcml2pnm.1 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/doxygen/manpages/man1/dcml2pnm.1 2022-04-28 13:47:25.000000000 +0000 @@ -1,4 +1,4 @@ -.TH "dcml2pnm" 1 "Thu Jan 14 2021" "Version 3.6.6" "OFFIS DCMTK" \" -*- nroff -*- +.TH "dcml2pnm" 1 "Fri Apr 22 2022" "Version 3.6.7" "OFFIS DCMTK" \" -*- nroff -*- .nh .SH NAME dcml2pnm \- Convert DICOM images to PGM/PPM, PNG, TIFF or BMP @@ -403,7 +403,7 @@ .IP "\(bu" 2 4 = magnification algorithm with bicubic interpolation from Eduard Stanescu .PP -The \fI--write-tiff\fP option is only available when DCMTK has been configured and compiled with support for the external \fBlibtiff\fP TIFF library\&. The availability of the TIFF compression options depends on the \fBlibtiff\fP configuration\&. In particular, the patented LZW algorithm may not be available\&. +The \fI--write-tiff\fP option is only available when DCMTK has been configured and compiled with support for the external \fBlibtiff\fP TIFF library\&. The availability of the TIFF compression options depends on the \fBlibtiff\fP configuration\&. .PP The \fI--write-png\fP option is only available when DCMTK has been configured and compiled with support for the external \fBlibpng\fP PNG library\&. Option \fI--interlace\fP enables progressive image view while loading the PNG file\&. Only a few applications take care of the meta info (TEXT) in a PNG file\&. .SH "TRANSFER SYNTAXES" @@ -454,4 +454,4 @@ \fBdcm2pnm\fP(1), \fBimg2dcm\fP(1) .SH "COPYRIGHT" .PP -Copyright (C) 2001-2021 e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&. +Copyright (C) 2001-2022 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&. diff -Nru dcmtk-3.6.6/doxygen/manpages/man1/dcmmkcrv.1 dcmtk-3.6.7/doxygen/manpages/man1/dcmmkcrv.1 --- dcmtk-3.6.6/doxygen/manpages/man1/dcmmkcrv.1 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/doxygen/manpages/man1/dcmmkcrv.1 2022-04-28 13:47:25.000000000 +0000 @@ -1,4 +1,4 @@ -.TH "dcmmkcrv" 1 "Thu Jan 14 2021" "Version 3.6.6" "OFFIS DCMTK" \" -*- nroff -*- +.TH "dcmmkcrv" 1 "Fri Apr 22 2022" "Version 3.6.7" "OFFIS DCMTK" \" -*- nroff -*- .nh .SH NAME dcmmkcrv \- Add 2D curve data to image @@ -125,4 +125,4 @@ 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 data dictionary can be loaded\&. .SH "COPYRIGHT" .PP -Copyright (C) 1998-2014 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&. +Copyright (C) 1998-2022 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&. diff -Nru dcmtk-3.6.6/doxygen/manpages/man1/dcmmkdir.1 dcmtk-3.6.7/doxygen/manpages/man1/dcmmkdir.1 --- dcmtk-3.6.6/doxygen/manpages/man1/dcmmkdir.1 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/doxygen/manpages/man1/dcmmkdir.1 2022-04-28 13:47:25.000000000 +0000 @@ -1,4 +1,4 @@ -.TH "dcmmkdir" 1 "Thu Jan 14 2021" "Version 3.6.6" "OFFIS DCMTK" \" -*- nroff -*- +.TH "dcmmkdir" 1 "Fri Apr 22 2022" "Version 3.6.7" "OFFIS DCMTK" \" -*- nroff -*- .nh .SH NAME dcmmkdir \- Create a DICOMDIR file @@ -427,4 +427,4 @@ \fBdcmgpdir\fP(1) .SH "COPYRIGHT" .PP -Copyright (C) 2001-2016 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&. +Copyright (C) 2001-2022 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&. diff -Nru dcmtk-3.6.6/doxygen/manpages/man1/dcmmklut.1 dcmtk-3.6.7/doxygen/manpages/man1/dcmmklut.1 --- dcmtk-3.6.6/doxygen/manpages/man1/dcmmklut.1 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/doxygen/manpages/man1/dcmmklut.1 2022-04-28 13:47:25.000000000 +0000 @@ -1,4 +1,4 @@ -.TH "dcmmklut" 1 "Thu Jan 14 2021" "Version 3.6.6" "OFFIS DCMTK" \" -*- nroff -*- +.TH "dcmmklut" 1 "Fri Apr 22 2022" "Version 3.6.7" "OFFIS DCMTK" \" -*- nroff -*- .nh .SH NAME dcmmklut \- Create DICOM look-up tables @@ -189,4 +189,4 @@ \fI/philips\&.lut\fP - sample LUT in text format .SH "COPYRIGHT" .PP -Copyright (C) 1998-2014 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&. +Copyright (C) 1998-2022 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&. diff -Nru dcmtk-3.6.6/doxygen/manpages/man1/dcmodify.1 dcmtk-3.6.7/doxygen/manpages/man1/dcmodify.1 --- dcmtk-3.6.6/doxygen/manpages/man1/dcmodify.1 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/doxygen/manpages/man1/dcmodify.1 2022-04-28 13:47:25.000000000 +0000 @@ -1,4 +1,4 @@ -.TH "dcmodify" 1 "Thu Jan 14 2021" "Version 3.6.6" "OFFIS DCMTK" \" -*- nroff -*- +.TH "dcmodify" 1 "Fri Apr 22 2022" "Version 3.6.7" "OFFIS DCMTK" \" -*- nroff -*- .nh .SH NAME dcmodify \- Modify DICOM files @@ -441,4 +441,4 @@ 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 data dictionary can be loaded\&. .SH "COPYRIGHT" .PP -Copyright (C) 2003-2014 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&. +Copyright (C) 2003-2022 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&. diff -Nru dcmtk-3.6.6/doxygen/manpages/man1/dcmp2pgm.1 dcmtk-3.6.7/doxygen/manpages/man1/dcmp2pgm.1 --- dcmtk-3.6.6/doxygen/manpages/man1/dcmp2pgm.1 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/doxygen/manpages/man1/dcmp2pgm.1 2022-04-28 13:47:25.000000000 +0000 @@ -1,4 +1,4 @@ -.TH "dcmp2pgm" 1 "Thu Jan 14 2021" "Version 3.6.6" "OFFIS DCMTK" \" -*- nroff -*- +.TH "dcmp2pgm" 1 "Fri Apr 22 2022" "Version 3.6.7" "OFFIS DCMTK" \" -*- nroff -*- .nh .SH NAME dcmp2pgm \- Read DICOM image and presentation state and render bitmap @@ -12,7 +12,7 @@ .PP .SH "DESCRIPTION" .PP -The \fBdcmp2pgm\fP utility renders a monochrome DICOM image under the control of a grayscale softcopy presentation state object into a monochrome bitmap with 8 bits/pixel\&. The bitmap is stored either as 'Portable Gray Map' (PGM) or as a DICOM secondary capture image object\&. If no presentation state is read from file, a default presentation state is created\&. The utility allows to read a configuration file of the Softcopy Presentation State Viewer upon startup\&. In this case, the settings from the configuration file affecting the rendering of the presentation state are used, e\&.g\&. a correction of the 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\&. +The \fBdcmp2pgm\fP utility renders a monochrome DICOM image under the control of a grayscale softcopy presentation state object into a monochrome bitmap with 8 bits/pixel\&. The bitmap is stored either as 'Portable Gray Map' (PGM) or as a DICOM secondary capture image object\&. If no presentation state is read from file, a default presentation state is created\&. The utility allows one to read a configuration file of the Softcopy Presentation State Viewer upon startup\&. In this case, the settings from the configuration file affecting the rendering of the presentation state are used, e\&.g\&. a correction of the 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\&. .SH "PARAMETERS" .PP .PP @@ -111,4 +111,4 @@ \fI/dcmpstat\&.cfg\fP - sample configuration file .SH "COPYRIGHT" .PP -Copyright (C) 1998-2017 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&. +Copyright (C) 1998-2022 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&. diff -Nru dcmtk-3.6.6/doxygen/manpages/man1/dcmprscp.1 dcmtk-3.6.7/doxygen/manpages/man1/dcmprscp.1 --- dcmtk-3.6.6/doxygen/manpages/man1/dcmprscp.1 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/doxygen/manpages/man1/dcmprscp.1 2022-04-28 13:47:25.000000000 +0000 @@ -1,4 +1,4 @@ -.TH "dcmprscp" 1 "Thu Jan 14 2021" "Version 3.6.6" "OFFIS DCMTK" \" -*- nroff -*- +.TH "dcmprscp" 1 "Fri Apr 22 2022" "Version 3.6.7" "OFFIS DCMTK" \" -*- nroff -*- .nh .SH NAME dcmprscp \- DICOM basic grayscale print management SCP @@ -14,7 +14,7 @@ .PP The \fBdcmprscp\fP utility implements the DICOM Basic Grayscale Print Management Service Class as SCP\&. It also supports the optional Presentation LUT SOP Class\&. The utility is intended for use within the DICOMscope viewer\&. .PP -The \fBdcmprscp\fP utility accepts print jobs from a remote Print SCU\&. It does not create real hardcopies but stores print jobs in the local DICOMscope database as a set of Stored Print objects (one per page) and Hardcopy Grayscale images (one per film box N-SET)\&. The DICOMscope application allows to load a Stored Print object created by \fBdcmprscp\fP and to render a screen preview of the hardcopy\&. The \fBdcmprscp\fP utility reads the characteristics of the printer to be emulated from the configuration file\&. +The \fBdcmprscp\fP utility accepts print jobs from a remote Print SCU\&. It does not create real hardcopies but stores print jobs in the local DICOMscope database as a set of Stored Print objects (one per page) and Hardcopy Grayscale images (one per film box N-SET)\&. The DICOMscope application allows one to load a Stored Print object created by \fBdcmprscp\fP and to render a screen preview of the hardcopy\&. The \fBdcmprscp\fP utility reads the characteristics of the printer to be emulated from the configuration file\&. .SH "OPTIONS" .PP .SS "general options" @@ -90,4 +90,4 @@ \fBdcmprscu\fP(1) .SH "COPYRIGHT" .PP -Copyright (C) 1999-2014 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&. +Copyright (C) 1999-2022 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&. diff -Nru dcmtk-3.6.6/doxygen/manpages/man1/dcmprscu.1 dcmtk-3.6.7/doxygen/manpages/man1/dcmprscu.1 --- dcmtk-3.6.6/doxygen/manpages/man1/dcmprscu.1 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/doxygen/manpages/man1/dcmprscu.1 2022-04-28 13:47:25.000000000 +0000 @@ -1,4 +1,4 @@ -.TH "dcmprscu" 1 "Thu Jan 14 2021" "Version 3.6.6" "OFFIS DCMTK" \" -*- nroff -*- +.TH "dcmprscu" 1 "Fri Apr 22 2022" "Version 3.6.7" "OFFIS DCMTK" \" -*- nroff -*- .nh .SH NAME dcmprscu \- Print spooler for presentation state viewer @@ -147,4 +147,4 @@ \fBdcmprscp\fP(1) .SH "COPYRIGHT" .PP -Copyright (C) 1999-2014 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&. +Copyright (C) 1999-2022 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&. diff -Nru dcmtk-3.6.6/doxygen/manpages/man1/dcmpschk.1 dcmtk-3.6.7/doxygen/manpages/man1/dcmpschk.1 --- dcmtk-3.6.6/doxygen/manpages/man1/dcmpschk.1 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/doxygen/manpages/man1/dcmpschk.1 2022-04-28 13:47:25.000000000 +0000 @@ -1,4 +1,4 @@ -.TH "dcmpschk" 1 "Thu Jan 14 2021" "Version 3.6.6" "OFFIS DCMTK" \" -*- nroff -*- +.TH "dcmpschk" 1 "Fri Apr 22 2022" "Version 3.6.7" "OFFIS DCMTK" \" -*- nroff -*- .nh .SH NAME dcmpschk \- Checking tool for presentation states @@ -83,4 +83,4 @@ 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 data dictionary can be loaded\&. .SH "COPYRIGHT" .PP -Copyright (C) 2000-2014 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&. +Copyright (C) 2000-2022 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&. diff -Nru dcmtk-3.6.6/doxygen/manpages/man1/dcmpsmk.1 dcmtk-3.6.7/doxygen/manpages/man1/dcmpsmk.1 --- dcmtk-3.6.6/doxygen/manpages/man1/dcmpsmk.1 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/doxygen/manpages/man1/dcmpsmk.1 2022-04-28 13:47:25.000000000 +0000 @@ -1,4 +1,4 @@ -.TH "dcmpsmk" 1 "Thu Jan 14 2021" "Version 3.6.6" "OFFIS DCMTK" \" -*- nroff -*- +.TH "dcmpsmk" 1 "Fri Apr 22 2022" "Version 3.6.7" "OFFIS DCMTK" \" -*- nroff -*- .nh .SH NAME dcmpsmk \- Create DICOM grayscale softcopy presentation state @@ -12,7 +12,7 @@ .PP .SH "DESCRIPTION" .PP -The \fBdcmpsmk\fP utility reads a DICOM image file and creates a grayscale softcopy presentation state object according to Supplement 33\&. The presentation state object is written back to file\&. A number of command line options allow to specify how certain constructs that might be present in the image file should be referenced or activated in the presentation state\&. 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\&. +The \fBdcmpsmk\fP utility reads a DICOM image file and creates a grayscale softcopy presentation state object according to Supplement 33\&. The presentation state object is written back to file\&. A number of command line options allow one to specify how certain constructs that might be present in the image file should be referenced or activated in the presentation state\&. 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\&. .SH "PARAMETERS" .PP .PP @@ -197,4 +197,4 @@ 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 data dictionary can be loaded\&. .SH "COPYRIGHT" .PP -Copyright (C) 1998-2014 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&. +Copyright (C) 1998-2022 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&. diff -Nru dcmtk-3.6.6/doxygen/manpages/man1/dcmpsprt.1 dcmtk-3.6.7/doxygen/manpages/man1/dcmpsprt.1 --- dcmtk-3.6.6/doxygen/manpages/man1/dcmpsprt.1 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/doxygen/manpages/man1/dcmpsprt.1 2022-04-28 13:47:25.000000000 +0000 @@ -1,4 +1,4 @@ -.TH "dcmpsprt" 1 "Thu Jan 14 2021" "Version 3.6.6" "OFFIS DCMTK" \" -*- nroff -*- +.TH "dcmpsprt" 1 "Fri Apr 22 2022" "Version 3.6.7" "OFFIS DCMTK" \" -*- nroff -*- .nh .SH NAME dcmpsprt \- Read DICOM images and presentation states and render print job @@ -274,4 +274,4 @@ \fBdcmprscu\fP(1) .SH "COPYRIGHT" .PP -Copyright (C) 1999-2014 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&. +Copyright (C) 1999-2022 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&. diff -Nru dcmtk-3.6.6/doxygen/manpages/man1/dcmpsrcv.1 dcmtk-3.6.7/doxygen/manpages/man1/dcmpsrcv.1 --- dcmtk-3.6.6/doxygen/manpages/man1/dcmpsrcv.1 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/doxygen/manpages/man1/dcmpsrcv.1 2022-04-28 13:47:25.000000000 +0000 @@ -1,4 +1,4 @@ -.TH "dcmpsrcv" 1 "Thu Jan 14 2021" "Version 3.6.6" "OFFIS DCMTK" \" -*- nroff -*- +.TH "dcmpsrcv" 1 "Fri Apr 22 2022" "Version 3.6.7" "OFFIS DCMTK" \" -*- nroff -*- .nh .SH NAME dcmpsrcv \- Network receive for presentation state viewer @@ -79,4 +79,4 @@ \fBdcmpssnd\fP(1), \fBstorescp\fP(1) .SH "COPYRIGHT" .PP -Copyright (C) 1998-2014 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&. +Copyright (C) 1998-2022 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&. diff -Nru dcmtk-3.6.6/doxygen/manpages/man1/dcmpssnd.1 dcmtk-3.6.7/doxygen/manpages/man1/dcmpssnd.1 --- dcmtk-3.6.6/doxygen/manpages/man1/dcmpssnd.1 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/doxygen/manpages/man1/dcmpssnd.1 2022-04-28 13:47:25.000000000 +0000 @@ -1,4 +1,4 @@ -.TH "dcmpssnd" 1 "Thu Jan 14 2021" "Version 3.6.6" "OFFIS DCMTK" \" -*- nroff -*- +.TH "dcmpssnd" 1 "Fri Apr 22 2022" "Version 3.6.7" "OFFIS DCMTK" \" -*- nroff -*- .nh .SH NAME dcmpssnd \- Network send for presentation state viewer @@ -84,4 +84,4 @@ \fBdcmpsrcv\fP(1), \fBstorescu\fP(1) .SH "COPYRIGHT" .PP -Copyright (C) 1998-2014 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&. +Copyright (C) 1998-2022 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&. diff -Nru dcmtk-3.6.6/doxygen/manpages/man1/dcmqridx.1 dcmtk-3.6.7/doxygen/manpages/man1/dcmqridx.1 --- dcmtk-3.6.6/doxygen/manpages/man1/dcmqridx.1 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/doxygen/manpages/man1/dcmqridx.1 2022-04-28 13:47:25.000000000 +0000 @@ -1,4 +1,4 @@ -.TH "dcmqridx" 1 "Thu Jan 14 2021" "Version 3.6.6" "OFFIS DCMTK" \" -*- nroff -*- +.TH "dcmqridx" 1 "Fri Apr 22 2022" "Version 3.6.7" "OFFIS DCMTK" \" -*- nroff -*- .nh .SH NAME dcmqridx \- Register a DICOM image file in an image database index file @@ -85,4 +85,4 @@ \fBdcmqrscp\fP(1), \fBdcmqrti\fP(1) .SH "COPYRIGHT" .PP -Copyright (C) 1993-2014 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&. +Copyright (C) 1993-2022 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&. diff -Nru dcmtk-3.6.6/doxygen/manpages/man1/dcmqrscp.1 dcmtk-3.6.7/doxygen/manpages/man1/dcmqrscp.1 --- dcmtk-3.6.6/doxygen/manpages/man1/dcmqrscp.1 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/doxygen/manpages/man1/dcmqrscp.1 2022-04-28 13:47:25.000000000 +0000 @@ -1,4 +1,4 @@ -.TH "dcmqrscp" 1 "Thu Jan 14 2021" "Version 3.6.6" "OFFIS DCMTK" \" -*- nroff -*- +.TH "dcmqrscp" 1 "Fri Apr 22 2022" "Version 3.6.7" "OFFIS DCMTK" \" -*- nroff -*- .nh .SH NAME dcmqrscp \- DICOM image archive (central test node) @@ -827,7 +827,9 @@ PatientRadiationDoseSRStorage 1.2.840.10008.5.1.4.1.1.88.73 PlannedImagingAgentAdministrationSRStorage 1.2.840.10008.5.1.4.1.1.88.74 PerformedImagingAgentAdministrationSRStorage 1.2.840.10008.5.1.4.1.1.88.75 +EnhancedXRayRadiationDoseSRStorage 1.2.840.10008.5.1.4.1.1.88.76 ContentAssessmentResultsStorage 1.2.840.10008.5.1.4.1.1.90.1 +MicroscopyBulkSimpleAnnotationsStorage 1.2.840.10008.5.1.4.1.1.91.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 EncapsulatedSTLStorage 1.2.840.10008.5.1.4.1.1.104.3 @@ -839,6 +841,7 @@ EnhancedPETImageStorage 1.2.840.10008.5.1.4.1.1.130 BasicStructuredDisplayStorage 1.2.840.10008.5.1.4.1.1.131 CTPerformedProcedureProtocolStorage 1.2.840.10008.5.1.4.1.1.200.2 +XAPerformedProcedureProtocolStorage 1.2.840.10008.5.1.4.1.1.200.8 RTImageStorage 1.2.840.10008.5.1.4.1.1.481.1 RTDoseStorage 1.2.840.10008.5.1.4.1.1.481.2 RTStructureSetStorage 1.2.840.10008.5.1.4.1.1.481.3 @@ -859,6 +862,8 @@ TomotherapeuticRadiationRecordStorage 1.2.840.10008.5.1.4.1.1.481.18 CArmPhotonElectronRadiationRecordStorage 1.2.840.10008.5.1.4.1.1.481.19 RoboticRadiationRecordStorage 1.2.840.10008.5.1.4.1.1.481.20 +RTRadiationSetDeliveryInstructionStorage 1.2.840.10008.5.1.4.1.1.481.21 +RTTreatmentPreparationStorage 1.2.840.10008.5.1.4.1.1.481.22 DICOS_CTImageStorage 1.2.840.10008.5.1.4.1.1.501.1 DICOS_DigitalXRayImageStorageForPresentation 1.2.840.10008.5.1.4.1.1.501.2.1 DICOS_DigitalXRayImageStorageForProcessing 1.2.840.10008.5.1.4.1.1.501.2.2 @@ -1012,4 +1017,4 @@ \fBdcmqridx\fP(1), \fBdcmqrti\fP(1) .SH "COPYRIGHT" .PP -Copyright (C) 1993-2021 e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&. +Copyright (C) 1993-2022 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&. diff -Nru dcmtk-3.6.6/doxygen/manpages/man1/dcmqrti.1 dcmtk-3.6.7/doxygen/manpages/man1/dcmqrti.1 --- dcmtk-3.6.6/doxygen/manpages/man1/dcmqrti.1 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/doxygen/manpages/man1/dcmqrti.1 2022-04-28 13:47:25.000000000 +0000 @@ -1,4 +1,4 @@ -.TH "dcmqrti" 1 "Thu Jan 14 2021" "Version 3.6.6" "OFFIS DCMTK" \" -*- nroff -*- +.TH "dcmqrti" 1 "Fri Apr 22 2022" "Version 3.6.7" "OFFIS DCMTK" \" -*- nroff -*- .nh .SH NAME dcmqrti \- The Terminal Initiator Telnet Client Program @@ -324,4 +324,4 @@ \fBdcmqrscp\fP(1) .SH "COPYRIGHT" .PP -Copyright (C) 1993-2014 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&. +Copyright (C) 1993-2022 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&. diff -Nru dcmtk-3.6.6/doxygen/manpages/man1/dcmquant.1 dcmtk-3.6.7/doxygen/manpages/man1/dcmquant.1 --- dcmtk-3.6.6/doxygen/manpages/man1/dcmquant.1 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/doxygen/manpages/man1/dcmquant.1 2022-04-28 13:47:25.000000000 +0000 @@ -1,4 +1,4 @@ -.TH "dcmquant" 1 "Thu Jan 14 2021" "Version 3.6.6" "OFFIS DCMTK" \" -*- nroff -*- +.TH "dcmquant" 1 "Fri Apr 22 2022" "Version 3.6.7" "OFFIS DCMTK" \" -*- nroff -*- .nh .SH NAME dcmquant \- Convert DICOM color images to palette color @@ -243,4 +243,4 @@ 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 data dictionary can be loaded\&. .SH "COPYRIGHT" .PP -Copyright (C) 2001-2017 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&. +Copyright (C) 2001-2022 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&. diff -Nru dcmtk-3.6.6/doxygen/manpages/man1/dcmrecv.1 dcmtk-3.6.7/doxygen/manpages/man1/dcmrecv.1 --- dcmtk-3.6.6/doxygen/manpages/man1/dcmrecv.1 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/doxygen/manpages/man1/dcmrecv.1 2022-04-28 13:47:25.000000000 +0000 @@ -1,4 +1,4 @@ -.TH "dcmrecv" 1 "Thu Jan 14 2021" "Version 3.6.6" "OFFIS DCMTK" \" -*- nroff -*- +.TH "dcmrecv" 1 "Fri Apr 22 2022" "Version 3.6.7" "OFFIS DCMTK" \" -*- nroff -*- .nh .SH NAME dcmrecv \- Simple DICOM storage SCP (receiver) @@ -122,13 +122,23 @@ +cd --add-cert-dir [d]irectory: string add certificates in d to list of certificates -security profile: + +crl --add-crl-file [f]ilename: string + add certificate revocation list file + (implies --enable-crl-vfy) - +px --profile-bcp195 - BCP 195 TLS Profile (default) + +crv --enable-crl-vfy + enable leaf CRL verification + + +cra --enable-crl-all + enable full chain CRL verification + +security profile: +py --profile-bcp195-nd - Non-downgrading BCP 195 TLS Profile + Non-downgrading BCP 195 TLS Profile (default) + + +px --profile-bcp195 + BCP 195 TLS Profile +pz --profile-bcp195-ex Extended BCP 195 TLS Profile @@ -377,4 +387,4 @@ \fBdcmsend\fP(1), \fBstorescu\fP(1), \fBstorescp\fP(1) .SH "COPYRIGHT" .PP -Copyright (C) 2013-2021 e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&. +Copyright (C) 2013-2022 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&. diff -Nru dcmtk-3.6.6/doxygen/manpages/man1/dcmscale.1 dcmtk-3.6.7/doxygen/manpages/man1/dcmscale.1 --- dcmtk-3.6.6/doxygen/manpages/man1/dcmscale.1 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/doxygen/manpages/man1/dcmscale.1 2022-04-28 13:47:25.000000000 +0000 @@ -1,4 +1,4 @@ -.TH "dcmscale" 1 "Thu Jan 14 2021" "Version 3.6.6" "OFFIS DCMTK" \" -*- nroff -*- +.TH "dcmscale" 1 "Fri Apr 22 2022" "Version 3.6.7" "OFFIS DCMTK" \" -*- nroff -*- .nh .SH NAME dcmscale \- Scale DICOM images @@ -230,4 +230,4 @@ 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 data dictionary can be loaded\&. .SH "COPYRIGHT" .PP -Copyright (C) 2002-2021 e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&. +Copyright (C) 2002-2022 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&. diff -Nru dcmtk-3.6.6/doxygen/manpages/man1/dcmsend.1 dcmtk-3.6.7/doxygen/manpages/man1/dcmsend.1 --- dcmtk-3.6.6/doxygen/manpages/man1/dcmsend.1 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/doxygen/manpages/man1/dcmsend.1 2022-04-28 13:47:25.000000000 +0000 @@ -1,4 +1,4 @@ -.TH "dcmsend" 1 "Thu Jan 14 2021" "Version 3.6.6" "OFFIS DCMTK" \" -*- nroff -*- +.TH "dcmsend" 1 "Fri Apr 22 2022" "Version 3.6.7" "OFFIS DCMTK" \" -*- nroff -*- .nh .SH NAME dcmsend \- Simple DICOM storage SCU (sender) @@ -256,8 +256,8 @@ .PP Since \fBdcmsend\fP tries to be as simple as possible for the user, by default presentation contexts might be proposed to the SCP that are strictly speaking 'illegal'\&. This is because, according to the DICOM standard, the SCU always has to propose the default transfer syntax in at least one presentation context associated with each abstract syntax (i\&.e\&. SOP class)\&. This requirement is waived if the SCU only has access to the SOP instance in lossy compressed form or if the decompressed pixel data would be too large to be encoded\&. With option \fI--no-illegal-proposal\fP the strict DICOM-conformant behavior can be enforced, i\&.e\&. no possibly illegal presentation context will be proposed but the corresponding SOP instance will be rejected (if needed)\&. Please note, however, that the size of the decompressed pixel data is not checked\&. .PP -Please note, however, that the default transfer syntax for 'Lossless JPEG -Compression', 'Lossy JPEG Compression' and so on are not always proposed as also required by the DICOM standard\&. The same limitation applies to other compression schemes\&. See DICOM PS 3\&.5 section 10 for details\&. +The default transfer syntax for 'Lossless JPEG Compression', 'Lossy JPEG +Compression' and so on are not always proposed as also required by the DICOM standard\&. The same limitation applies to other compression schemes\&. See DICOM PS 3\&.5 section 10 for details\&. .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--quiet\fP mode only fatal errors are reported\&. In such very severe error events, the application will usually terminate\&. For more details on the different logging levels, see documentation of module 'oflog'\&. @@ -317,4 +317,4 @@ \fBdcmrecv\fP(1), \fBstorescu\fP(1), \fBstorescp\fP(1) .SH "COPYRIGHT" .PP -Copyright (C) 2011-2018 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&. +Copyright (C) 2011-2022 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&. diff -Nru dcmtk-3.6.6/doxygen/manpages/man1/dcmsign.1 dcmtk-3.6.7/doxygen/manpages/man1/dcmsign.1 --- dcmtk-3.6.6/doxygen/manpages/man1/dcmsign.1 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/doxygen/manpages/man1/dcmsign.1 2022-04-28 13:47:25.000000000 +0000 @@ -1,4 +1,4 @@ -.TH "dcmsign" 1 "Thu Jan 14 2021" "Version 3.6.6" "OFFIS DCMTK" \" -*- nroff -*- +.TH "dcmsign" 1 "Fri Apr 22 2022" "Version 3.6.7" "OFFIS DCMTK" \" -*- nroff -*- .nh .SH NAME dcmsign \- Sign and Verify DICOM Files @@ -497,4 +497,4 @@ 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 data dictionary can be loaded\&. .SH "COPYRIGHT" .PP -Copyright (C) 2000-2021 e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&. +Copyright (C) 2000-2022 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&. diff -Nru dcmtk-3.6.6/doxygen/manpages/man1/dcod2lum.1 dcmtk-3.6.7/doxygen/manpages/man1/dcod2lum.1 --- dcmtk-3.6.6/doxygen/manpages/man1/dcod2lum.1 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/doxygen/manpages/man1/dcod2lum.1 2022-04-28 13:47:25.000000000 +0000 @@ -1,4 +1,4 @@ -.TH "dcod2lum" 1 "Thu Jan 14 2021" "Version 3.6.6" "OFFIS DCMTK" \" -*- nroff -*- +.TH "dcod2lum" 1 "Fri Apr 22 2022" "Version 3.6.7" "OFFIS DCMTK" \" -*- nroff -*- .nh .SH NAME dcod2lum \- Convert hardcopy characteristic curve file to softcopy format @@ -47,4 +47,4 @@ \fBdcmdspfn\fP(1) .SH "COPYRIGHT" .PP -Copyright (C) 2002-2014 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&. +Copyright (C) 2002-2022 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&. diff -Nru dcmtk-3.6.6/doxygen/manpages/man1/dconvlum.1 dcmtk-3.6.7/doxygen/manpages/man1/dconvlum.1 --- dcmtk-3.6.6/doxygen/manpages/man1/dconvlum.1 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/doxygen/manpages/man1/dconvlum.1 2022-04-28 13:47:25.000000000 +0000 @@ -1,4 +1,4 @@ -.TH "dconvlum" 1 "Thu Jan 14 2021" "Version 3.6.6" "OFFIS DCMTK" \" -*- nroff -*- +.TH "dconvlum" 1 "Fri Apr 22 2022" "Version 3.6.7" "OFFIS DCMTK" \" -*- nroff -*- .nh .SH NAME dconvlum \- Convert VeriLUM files to DCMTK display files @@ -34,4 +34,4 @@ \fBdcmdspfn\fP(1), \fBdcm2pnm\fP(1) .SH "COPYRIGHT" .PP -Copyright (C) 1999-2014 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&. +Copyright (C) 1999-2022 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&. diff -Nru dcmtk-3.6.6/doxygen/manpages/man1/drtdump.1 dcmtk-3.6.7/doxygen/manpages/man1/drtdump.1 --- dcmtk-3.6.6/doxygen/manpages/man1/drtdump.1 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/doxygen/manpages/man1/drtdump.1 2022-04-28 13:47:25.000000000 +0000 @@ -1,4 +1,4 @@ -.TH "drtdump" 1 "Thu Jan 14 2021" "Version 3.6.6" "OFFIS DCMTK" \" -*- nroff -*- +.TH "drtdump" 1 "Fri Apr 22 2022" "Version 3.6.7" "OFFIS DCMTK" \" -*- nroff -*- .nh .SH NAME drtdump \- Dump DICOM RT file and data set @@ -132,4 +132,4 @@ \fBdcmconv\fP(1), \fBdcmdump\fP(1) .SH "COPYRIGHT" .PP -Copyright (C) 2010-2014 by OFFIS e\&.V\&. and ICSMED AG, Escherweg 2, 26121 Oldenburg, Germany\&. +Copyright (C) 2010-2022 by OFFIS e\&.V\&. and ICSMED AG, Escherweg 2, 26121 Oldenburg, Germany\&. diff -Nru dcmtk-3.6.6/doxygen/manpages/man1/dsr2html.1 dcmtk-3.6.7/doxygen/manpages/man1/dsr2html.1 --- dcmtk-3.6.6/doxygen/manpages/man1/dsr2html.1 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/doxygen/manpages/man1/dsr2html.1 2022-04-28 13:47:25.000000000 +0000 @@ -1,4 +1,4 @@ -.TH "dsr2html" 1 "Thu Jan 14 2021" "Version 3.6.6" "OFFIS DCMTK" \" -*- nroff -*- +.TH "dsr2html" 1 "Fri Apr 22 2022" "Version 3.6.7" "OFFIS DCMTK" \" -*- nroff -*- .nh .SH NAME dsr2html \- Render DICOM SR file and data set to HTML/XHTML @@ -299,4 +299,4 @@ \fBdcmconv\fP(1) .SH "COPYRIGHT" .PP -Copyright (C) 2000-2019 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&. +Copyright (C) 2000-2022 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&. diff -Nru dcmtk-3.6.6/doxygen/manpages/man1/dsr2xml.1 dcmtk-3.6.7/doxygen/manpages/man1/dsr2xml.1 --- dcmtk-3.6.6/doxygen/manpages/man1/dsr2xml.1 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/doxygen/manpages/man1/dsr2xml.1 2022-04-28 13:47:25.000000000 +0000 @@ -1,4 +1,4 @@ -.TH "dsr2xml" 1 "Thu Jan 14 2021" "Version 3.6.6" "OFFIS DCMTK" \" -*- nroff -*- +.TH "dsr2xml" 1 "Fri Apr 22 2022" "Version 3.6.7" "OFFIS DCMTK" \" -*- nroff -*- .nh .SH NAME dsr2xml \- Convert DICOM SR file and data set to XML @@ -271,4 +271,4 @@ \fBxml2dsr\fP(1), \fBdcmconv\fP(1) .SH "COPYRIGHT" .PP -Copyright (C) 2000-2019 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&. +Copyright (C) 2000-2022 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&. diff -Nru dcmtk-3.6.6/doxygen/manpages/man1/dsrdump.1 dcmtk-3.6.7/doxygen/manpages/man1/dsrdump.1 --- dcmtk-3.6.6/doxygen/manpages/man1/dsrdump.1 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/doxygen/manpages/man1/dsrdump.1 2022-04-28 13:47:25.000000000 +0000 @@ -1,4 +1,4 @@ -.TH "dsrdump" 1 "Thu Jan 14 2021" "Version 3.6.6" "OFFIS DCMTK" \" -*- nroff -*- +.TH "dsrdump" 1 "Fri Apr 22 2022" "Version 3.6.7" "OFFIS DCMTK" \" -*- nroff -*- .nh .SH NAME dsrdump \- Dump DICOM SR file and data set @@ -246,4 +246,4 @@ \fBdcmconv\fP(1) .SH "COPYRIGHT" .PP -Copyright (C) 2000-2019 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&. +Copyright (C) 2000-2022 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&. diff -Nru dcmtk-3.6.6/doxygen/manpages/man1/dump2dcm.1 dcmtk-3.6.7/doxygen/manpages/man1/dump2dcm.1 --- dcmtk-3.6.6/doxygen/manpages/man1/dump2dcm.1 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/doxygen/manpages/man1/dump2dcm.1 2022-04-28 13:47:25.000000000 +0000 @@ -1,4 +1,4 @@ -.TH "dump2dcm" 1 "Thu Jan 14 2021" "Version 3.6.6" "OFFIS DCMTK" \" -*- nroff -*- +.TH "dump2dcm" 1 "Fri Apr 22 2022" "Version 3.6.7" "OFFIS DCMTK" \" -*- nroff -*- .nh .SH NAME dump2dcm \- Convert ASCII dump to DICOM file @@ -265,4 +265,4 @@ \fBdcmdump\fP(1) .SH "COPYRIGHT" .PP -Copyright (C) 1996-2021 e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&. +Copyright (C) 1996-2022 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&. diff -Nru dcmtk-3.6.6/doxygen/manpages/man1/echoscu.1 dcmtk-3.6.7/doxygen/manpages/man1/echoscu.1 --- dcmtk-3.6.6/doxygen/manpages/man1/echoscu.1 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/doxygen/manpages/man1/echoscu.1 2022-04-28 13:47:25.000000000 +0000 @@ -1,4 +1,4 @@ -.TH "echoscu" 1 "Thu Jan 14 2021" "Version 3.6.6" "OFFIS DCMTK" \" -*- nroff -*- +.TH "echoscu" 1 "Fri Apr 22 2022" "Version 3.6.7" "OFFIS DCMTK" \" -*- nroff -*- .nh .SH NAME echoscu \- DICOM verification (C-ECHO) SCU @@ -137,13 +137,23 @@ +cd --add-cert-dir [d]irectory: string add certificates in d to list of certificates -security profile: + +crl --add-crl-file [f]ilename: string + add certificate revocation list file + (implies --enable-crl-vfy) - +px --profile-bcp195 - BCP 195 TLS Profile (default) + +crv --enable-crl-vfy + enable leaf CRL verification + + +cra --enable-crl-all + enable full chain CRL verification + +security profile: +py --profile-bcp195-nd - Non-downgrading BCP 195 TLS Profile + Non-downgrading BCP 195 TLS Profile (default) + + +px --profile-bcp195 + BCP 195 TLS Profile +pz --profile-bcp195-ex Extended BCP 195 TLS Profile @@ -184,6 +194,20 @@ -ic --ignore-peer-cert don't verify peer certificate + +offline certificate verification: + + +vc --verify-cert [f]ilename: string + verify certificate against CA settings + + # Load a client certificate and check whether it would be accepted + # when received during a TLS handshake. Print result and exit. + + +rc --is-root-cert [f]ilename: string + check if certificate is self-signed root CA + + # Load a client certificate and check whether it is a valid, + # self-signed root CA certificate. Print result and exit. .fi .PP .SH "NOTES" @@ -230,6 +254,7 @@ .PP .nf EXITCODE_CANNOT_READ_INPUT_FILE 20 (*) +EXITCODE_INVALID_INPUT_FILE 22 .fi .PP .SS "output file errors" @@ -254,4 +279,4 @@ 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 data dictionary can be loaded\&. .SH "COPYRIGHT" .PP -Copyright (C) 1994-2021 e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&. +Copyright (C) 1994-2022 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&. diff -Nru dcmtk-3.6.6/doxygen/manpages/man1/findscu.1 dcmtk-3.6.7/doxygen/manpages/man1/findscu.1 --- dcmtk-3.6.6/doxygen/manpages/man1/findscu.1 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/doxygen/manpages/man1/findscu.1 2022-04-28 13:47:25.000000000 +0000 @@ -1,4 +1,4 @@ -.TH "findscu" 1 "Thu Jan 14 2021" "Version 3.6.6" "OFFIS DCMTK" \" -*- nroff -*- +.TH "findscu" 1 "Fri Apr 22 2022" "Version 3.6.7" "OFFIS DCMTK" \" -*- nroff -*- .nh .SH NAME findscu \- DICOM query (C-FIND) SCU @@ -187,13 +187,23 @@ +cd --add-cert-dir [d]irectory: string add certificates in d to list of certificates -security profile: + +crl --add-crl-file [f]ilename: string + add certificate revocation list file + (implies --enable-crl-vfy) - +px --profile-bcp195 - BCP 195 TLS Profile (default) + +crv --enable-crl-vfy + enable leaf CRL verification + + +cra --enable-crl-all + enable full chain CRL verification + +security profile: +py --profile-bcp195-nd - Non-downgrading BCP 195 TLS Profile + Non-downgrading BCP 195 TLS Profile (default) + + +px --profile-bcp195 + BCP 195 TLS Profile +pz --profile-bcp195-ex Extended BCP 195 TLS Profile @@ -378,4 +388,4 @@ \fBmovescu\fP(1), \fBdump2dcm\fP(1), \fBdcmodify\fP(1) .SH "COPYRIGHT" .PP -Copyright (C) 1994-2021 e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&. +Copyright (C) 1994-2022 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&. diff -Nru dcmtk-3.6.6/doxygen/manpages/man1/getscu.1 dcmtk-3.6.7/doxygen/manpages/man1/getscu.1 --- dcmtk-3.6.6/doxygen/manpages/man1/getscu.1 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/doxygen/manpages/man1/getscu.1 2022-04-28 13:47:25.000000000 +0000 @@ -1,4 +1,4 @@ -.TH "getscu" 1 "Thu Jan 14 2021" "Version 3.6.6" "OFFIS DCMTK" \" -*- nroff -*- +.TH "getscu" 1 "Fri Apr 22 2022" "Version 3.6.7" "OFFIS DCMTK" \" -*- nroff -*- .nh .SH NAME getscu \- DICOM retrieve (C-GET) SCU @@ -473,4 +473,4 @@ \fBfindscu\fP(1), \fBmovescu\fP(1), \fBdump2dcm\fP(1), \fBdcmodify\fP(1) .SH "COPYRIGHT" .PP -Copyright (C) 2011-2018 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&. +Copyright (C) 2011-2022 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&. diff -Nru dcmtk-3.6.6/doxygen/manpages/man1/img2dcm.1 dcmtk-3.6.7/doxygen/manpages/man1/img2dcm.1 --- dcmtk-3.6.6/doxygen/manpages/man1/img2dcm.1 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/doxygen/manpages/man1/img2dcm.1 2022-04-28 13:47:25.000000000 +0000 @@ -1,4 +1,4 @@ -.TH "img2dcm" 1 "Thu Jan 14 2021" "Version 3.6.6" "OFFIS DCMTK" \" -*- nroff -*- +.TH "img2dcm" 1 "Fri Apr 22 2022" "Version 3.6.7" "OFFIS DCMTK" \" -*- nroff -*- .nh .SH NAME img2dcm \- Convert standard image formats into DICOM format @@ -7,21 +7,19 @@ .PP .PP .nf -img2dcm [options] imgfile-in dcmfile-out +img2dcm [options] imgfile-in... dcmfile-out .fi .PP .SH "DESCRIPTION" .PP The \fBimg2dcm\fP 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 additional information (regarding patients, series, etc\&.) stored in the DICOM output file can be extracted from other DICOM files which serve as a 'template' for the resulting DICOM object\&. \fBimg2dcm\fP can also be configured to invent missing DICOM type 1 and type 2 attributes to work even without any template dataset\&. -.PP -\fBimg2dcm\fP only supports single-frame output so far, i\&.e\&. it is not possible to create multi-frame objects\&. Thus, also output SOP Classes that potentially allow multiple frames within one object (such as the new Secondary Capture SOP Classes) can only be created containing a single frame\&. .SH "PARAMETERS" .PP .PP .nf -imgfile-in image file to be imported +imgfile-in image input filename -dcmfile-out DICOM output file +dcmfile-out DICOM output filename .fi .PP .SH "OPTIONS" @@ -66,6 +64,9 @@ -df --dataset-from [f]ilename: string use dataset from DICOM file f + -dx --dataset-from-xml [f]ilename: string + use dataset from XML file f + -stf --study-from [f]ilename: string read patient/study from DICOM file f @@ -88,6 +89,17 @@ -ka --keep-appn keep APPn sections (except JFIF) + + -rc --remove-com + remove COM segment + +XML validation: + + +Vd --validate-document + validate XML document against DTD + + +Vn --check-namespace + check XML namespace in document root .fi .PP .SS "processing options" @@ -110,20 +122,22 @@ (only with --do-checks) +i1 --invent-type1 - invent missing type 1 attributes + invent missing type 1 attributes (default) (only with --do-checks) -i1 --no-type1-invent do not invent missing type 1 attributes (only with --do-checks) -character set: - - +l1 --latin1 - set latin-1 as standard character set (default) +character set conversion of study/series file: - -l1 --no-latin1 - keep 7-bit ASCII as standard character set + -Ct --transliterate + try to approximate characters that cannot be + represented through similar looking characters + + -Cd --discard-illegal + discard characters that cannot be represented + in destination character set other processing options: @@ -137,13 +151,16 @@ target SOP class: -sc --sec-capture - write Secondary Capture SOP class + write Secondary Capture SOP class (default) -nsc --new-sc write new Secondary Capture SOP classes -vlp --vl-photo - write Visible Light Photographic SOP class (default) + write Visible Light Photographic SOP class + + -oph --oph-photo + write Ophthalmic Photography SOP classes output file format: @@ -189,7 +206,11 @@ .PP .PD 0 .IP "\(bu" 2 -Using the \fI--dataset-from\fP option \fBimg2dcm\fP is forced to import attributes from an existing DICOM file\&. The given DICOM file is fully imported and serves as the basis for all further export operations\&. As an exception, the SOP Instance UID is not copied by this option\&. Also image related data like Rows, Columns etc\&. is exchanged during conversion\&. Note that \fBimg2dcm\fP does not check any other attribute values for validity, e\&. g\&. it does not look into sequences to adapt any attributes to the new object (referenced images etc\&.)\&. Therefore, it is recommended to use the templates in the data directory for (old) SC and VLP objects\&. See also section 'Input Templates'\&. +Using the \fI--dataset-from\fP option \fBimg2dcm\fP is forced to import attributes from an existing DICOM file\&. The given DICOM file is fully imported and serves as the basis for all further export operations\&. As an exception, the SOP Instance UID is not copied by this option\&. Also image related data like Rows, Columns etc\&. is exchanged during conversion\&. Note that \fBimg2dcm\fP does not check any other attribute values for validity, e\&.g\&. it does not look into sequences to adapt any attributes to the new object (referenced images etc\&.)\&. Therefore, it is recommended to use the templates in the data directory for (old) SC and VLP objects\&. See also section 'Input Templates'\&. +.PP +.PD 0 +.IP "\(bu" 2 +Using the \fI--dataset-from-xml\fP option \fBimg2dcm\fP is also forced to import attributes from an existing file\&. In this case, however, the file must contain XML data in the format as produced by \fBdcm2xml\fP\&. .PP .PD 0 .IP "\(bu" 2 @@ -238,11 +259,15 @@ .fi .PP .PP +For Ophthalmic Photography images, XML templates are provided (see sample file \fIOP_template_utf_8\&.xml\fP and \fIOP_template_latin_1\&.xml\fP)\&. +.PP It is possible to use any DICOM file as a template\&. Please note that the complete DICOM dataset is imported; hence, it should be assured that only 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 \fBimg2dcm\fP during conversion\&. +.SS "Character Sets" +When an input template is loaded using \fI--dataset-from\fP or \fI--dataset-from-xml\fP, the specific character set of that template is used for the generated DICOM file\&. If the \fI--study-from\fP or \fI--series-from\fP options are used additionally, img2dcm will try to convert the character set of these attributes to that of the template, and will report an error if that is not possible\&. If the \fI--study-from\fP or \fI--series-from\fP options are used without a template, the specific character set of this source is used for the generated DICOM file\&. Any keys specified on the command line with the \fI--key\fP option are treated as raw bytes and override any attributes that may already be present due to a template or study/series file\&. Therefore, care should be taken to not specify a specific character set on the command line if one might be loaded from another file\&. It is also the user's responsibility to ensure that attribute values specified on the command line use the correct encoding, as no conversion will take place before the values are stored in the DICOM file\&. .SS "Input Plugins" The \fBimg2dcm\fP application currently supports the JPEG and the BMP image format as input\&. .SS "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 conversion of even big JPEG files without the need of decoding and re-encoding\&. The JPEG plugin chooses the necessary output transfer syntax automatically depending on the actual encoding of the data inside the JPEG file\&. Therefore, the following Transfer Syntaxes (and their corresponding JPEG encodings) are used by the JPEG 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 conversion of even big JPEG files without the need of decoding and re-encoding\&. The JPEG plugin chooses the necessary output transfer syntax automatically depending on the actual encoding of the data inside the JPEG file\&. Therefore, the following Transfer Syntaxes (and their corresponding JPEG encodings) are used by the JPEG plugin: .PP .PD 0 .IP "\(bu" 2 @@ -264,11 +289,11 @@ .PP JFIF (JPEG File Interchange Format) information facilitates optional APPn markers in a JPEG file\&. Many digital cameras do not integrate such JFIF information into the JPEG output they create\&. For example, JFIF contains information about the pixel aspect ratio of the compressed image\&. If you want the \fBimg2dcm\fP application to insist on a JFIF header in the JPEG stream, you can use the option \fI--insist-on-jfif\fP which will abort if no JFIF information can be found\&. By default, missing JFIF information is ignored\&. .PP -For DICOM it is kind of a 'gray zone', whether the integration of JFIF (or any other APPn) data into the DICOM object's internal JPEG stream is allowed or not\&. However, the most reliable approach is to cut those markers and their information off the JPEG stream\&. This approach is also taken by the \fBimg2dcm\fP application\&. By default, all APPn markers are cut off from the original JPEG stream\&. However, if you want to keep other APPn markers than JFIF (e\&. g\&. EXIF information) inside the DICOM stream, the option \fI--keep-appn\fP 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 \fBalways\fP removed by \fBimg2dcm\fP\&. +For DICOM it is kind of a 'gray zone', whether the integration of JFIF (or any other APPn) data into the DICOM object's internal JPEG stream is allowed or not\&. However, the most reliable approach is to cut those markers and their information off the JPEG stream\&. This approach is also taken by the \fBimg2dcm\fP application\&. By default, all APPn markers are cut off from the original JPEG stream\&. However, if you want to keep other APPn markers than JFIF (e\&.g\&. EXIF information) inside the DICOM stream, the option \fI--keep-appn\fP 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\&. As stated before, JFIF information is always removed by \fBimg2dcm\fP\&. However, when using this option, the APP2 marker is retained, but \fBimg2dcm\fP does not create an equivalent ICC Profile (0028,2000) attribute\&. .SS "BMP Input Plugin" -\fBimg2dcm\fP 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 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\&. +\fBimg2dcm\fP 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 run length encoding will be rejected\&. Such images are uncommon\&. Input images will either be converted into a DICOM image with RGB color model and a bit depth of 24, or into an image with MONOCHROME2 color model an 8 bits per pixel\&. There are no specific options for fine-tuning BMP format conversion\&. .SS "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 \fI-sc\fP), the new Secondary Capture Image SOP classes (option \fI-nsc\fP) and Visible Light Photographic Image SOP class (option \fI-vl\fP) are available\&. Please note that the first one is deprecated according to the DICOM standard but is selected as a default because it is widely supported\&. Future versions of \fBimg2dcm\fP might provide further output plugins for other SOP Classes\&. +The desired output SOP Class can be selected on the command line\&. Currently, export plugins for the Secondary Capture Image SOP class (default, option \fI-sc\fP), the Multiframe Secondary Capture Image SOP classes (option \fI-nsc\fP), Visible Light Photographic Image SOP class (option \fI-vl\fP), and the Ophthalmic Photography Image SOP Classes (option \fI-oph\fP) are available\&. Please note that the first one is deprecated according to the DICOM standard but is selected as a default because it is widely supported\&. Future versions of \fBimg2dcm\fP might provide further output plugins for other SOP Classes\&. .PP For the new Secondary Capture SOP classes, it is not possible to specify which specific SOP class should be used for output\&. That is because these new SOP 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 \fBimg2dcm\fP decides during conversion, which output SOP class is suitable for a given source image\&. .SH "EXAMPLES" @@ -303,7 +328,7 @@ .IP "5." 4 img2dcm image\&.jpg out\&.dcm --no-checks .br -Same as 1), but does not perform any attribute checking and no type 1 and type 2 attribute insertion! So in this case, an invalid DICOM object would be generated\&. This can be interesting if the output file is not meant to be completed but will undergo further transformations, e\&. g\&. adding attributes using \fBdcmodify\fP\&. Only use option \fI--no-checks\fP if you know what you are doing! +Same as 1), but does not perform any attribute checking and no type 1 and type 2 attribute insertion! So in this case, an invalid DICOM object would be generated\&. This can be interesting if the output file is not meant to be completed but will undergo further transformations, e\&.g\&. adding attributes using \fBdcmodify\fP\&. Only use option \fI--no-checks\fP if you know what you are doing! .PP .IP "6." 4 @@ -341,9 +366,11 @@ \fI/SC\&.dump\fP - Sample dump file for Secondary Capture images .br \fI/VLP\&.dump\fP - Sample dump file for Visible Light Photographic images +.br +\fI/OP_template\&.xml\fP - Sample XML template for Ophthalmic Photography images .SH "SEE ALSO" .PP -\fBdcm2pnm\fP(1), \fBdcmj2pnm\fP(1), \fBdump2dcm\fP(1), \fBdcmconv\fP(1), \fBdcmodify\fP(1) +\fBdcm2pnm\fP(1), \fBdcmj2pnm\fP(1), \fBdump2dcm\fP(1), \fBdcmconv\fP(1), \fBdcmodify\fP(1), \fBdcm2xml\fP(1) .SH "COPYRIGHT" .PP -Copyright (C) 2007-2021 e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&. +Copyright (C) 2007-2022 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&. diff -Nru dcmtk-3.6.6/doxygen/manpages/man1/movescu.1 dcmtk-3.6.7/doxygen/manpages/man1/movescu.1 --- dcmtk-3.6.6/doxygen/manpages/man1/movescu.1 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/doxygen/manpages/man1/movescu.1 2022-04-28 13:47:25.000000000 +0000 @@ -1,4 +1,4 @@ -.TH "movescu" 1 "Thu Jan 14 2021" "Version 3.6.6" "OFFIS DCMTK" \" -*- nroff -*- +.TH "movescu" 1 "Fri Apr 22 2022" "Version 3.6.7" "OFFIS DCMTK" \" -*- nroff -*- .nh .SH NAME movescu \- DICOM retrieve (C-MOVE) SCU @@ -532,7 +532,9 @@ PatientRadiationDoseSRStorage 1.2.840.10008.5.1.4.1.1.88.73 PlannedImagingAgentAdministrationSRStorage 1.2.840.10008.5.1.4.1.1.88.74 PerformedImagingAgentAdministrationSRStorage 1.2.840.10008.5.1.4.1.1.88.75 +EnhancedXRayRadiationDoseSRStorage 1.2.840.10008.5.1.4.1.1.88.76 ContentAssessmentResultsStorage 1.2.840.10008.5.1.4.1.1.90.1 +MicroscopyBulkSimpleAnnotationsStorage 1.2.840.10008.5.1.4.1.1.91.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 EncapsulatedSTLStorage 1.2.840.10008.5.1.4.1.1.104.3 @@ -544,6 +546,7 @@ EnhancedPETImageStorage 1.2.840.10008.5.1.4.1.1.130 BasicStructuredDisplayStorage 1.2.840.10008.5.1.4.1.1.131 CTPerformedProcedureProtocolStorage 1.2.840.10008.5.1.4.1.1.200.2 +XAPerformedProcedureProtocolStorage 1.2.840.10008.5.1.4.1.1.200.8 RTImageStorage 1.2.840.10008.5.1.4.1.1.481.1 RTDoseStorage 1.2.840.10008.5.1.4.1.1.481.2 RTStructureSetStorage 1.2.840.10008.5.1.4.1.1.481.3 @@ -564,6 +567,8 @@ TomotherapeuticRadiationRecordStorage 1.2.840.10008.5.1.4.1.1.481.18 CArmPhotonElectronRadiationRecordStorage 1.2.840.10008.5.1.4.1.1.481.19 RoboticRadiationRecordStorage 1.2.840.10008.5.1.4.1.1.481.20 +RTRadiationSetDeliveryInstructionStorage 1.2.840.10008.5.1.4.1.1.481.21 +RTTreatmentPreparationStorage 1.2.840.10008.5.1.4.1.1.481.22 DICOS_CTImageStorage 1.2.840.10008.5.1.4.1.1.501.1 DICOS_DigitalXRayImageStorageForPresentation 1.2.840.10008.5.1.4.1.1.501.2.1 DICOS_DigitalXRayImageStorageForProcessing 1.2.840.10008.5.1.4.1.1.501.2.2 @@ -686,4 +691,4 @@ \fBfindscu\fP(1), \fBstorescp\fP(1), \fBdump2dcm\fP(1) .SH "COPYRIGHT" .PP -Copyright (C) 1994-2021 e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&. +Copyright (C) 1994-2022 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&. diff -Nru dcmtk-3.6.6/doxygen/manpages/man1/pdf2dcm.1 dcmtk-3.6.7/doxygen/manpages/man1/pdf2dcm.1 --- dcmtk-3.6.6/doxygen/manpages/man1/pdf2dcm.1 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/doxygen/manpages/man1/pdf2dcm.1 2022-04-28 13:47:25.000000000 +0000 @@ -1,4 +1,4 @@ -.TH "pdf2dcm" 1 "Thu Jan 14 2021" "Version 3.6.6" "OFFIS DCMTK" \" -*- nroff -*- +.TH "pdf2dcm" 1 "Fri Apr 22 2022" "Version 3.6.7" "OFFIS DCMTK" \" -*- nroff -*- .nh .SH NAME pdf2dcm \- Encapsulate PDF file into DICOM file format @@ -231,4 +231,4 @@ \fBdcm2pdf\fP(1) .SH "COPYRIGHT" .PP -Copyright (C) 2005-2021 e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&. +Copyright (C) 2005-2022 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&. diff -Nru dcmtk-3.6.6/doxygen/manpages/man1/stl2dcm.1 dcmtk-3.6.7/doxygen/manpages/man1/stl2dcm.1 --- dcmtk-3.6.6/doxygen/manpages/man1/stl2dcm.1 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/doxygen/manpages/man1/stl2dcm.1 2022-04-28 13:47:25.000000000 +0000 @@ -1,4 +1,4 @@ -.TH "stl2dcm" 1 "Thu Jan 14 2021" "Version 3.6.6" "OFFIS DCMTK" \" -*- nroff -*- +.TH "stl2dcm" 1 "Fri Apr 22 2022" "Version 3.6.7" "OFFIS DCMTK" \" -*- nroff -*- .nh .SH NAME stl2dcm \- Encapsulate STL file into DICOM file format @@ -248,4 +248,4 @@ 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 data dictionary can be loaded\&. .SH "COPYRIGHT" .PP -Copyright (C) 2018-2021 e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&. +Copyright (C) 2018-2022 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&. diff -Nru dcmtk-3.6.6/doxygen/manpages/man1/storescp.1 dcmtk-3.6.7/doxygen/manpages/man1/storescp.1 --- dcmtk-3.6.6/doxygen/manpages/man1/storescp.1 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/doxygen/manpages/man1/storescp.1 2022-04-28 13:47:25.000000000 +0000 @@ -1,4 +1,4 @@ -.TH "storescp" 1 "Thu Jan 14 2021" "Version 3.6.6" "OFFIS DCMTK" \" -*- nroff -*- +.TH "storescp" 1 "Fri Apr 22 2022" "Version 3.6.7" "OFFIS DCMTK" \" -*- nroff -*- .nh .SH NAME storescp \- DICOM storage (C-STORE) SCP @@ -245,13 +245,23 @@ +cd --add-cert-dir [d]irectory: string add certificates in d to list of certificates -security profile: + +crl --add-crl-file [f]ilename: string + add certificate revocation list file + (implies --enable-crl-vfy) - +px --profile-bcp195 - BCP 195 TLS Profile (default) + +crv --enable-crl-vfy + enable leaf CRL verification + + +cra --enable-crl-all + enable full chain CRL verification + +security profile: +py --profile-bcp195-nd - Non-downgrading BCP 195 TLS Profile + Non-downgrading BCP 195 TLS Profile (default) + + +px --profile-bcp195 + BCP 195 TLS Profile +pz --profile-bcp195-ex Extended BCP 195 TLS Profile @@ -663,7 +673,9 @@ PatientRadiationDoseSRStorage 1.2.840.10008.5.1.4.1.1.88.73 PlannedImagingAgentAdministrationSRStorage 1.2.840.10008.5.1.4.1.1.88.74 PerformedImagingAgentAdministrationSRStorage 1.2.840.10008.5.1.4.1.1.88.75 +EnhancedXRayRadiationDoseSRStorage 1.2.840.10008.5.1.4.1.1.88.76 ContentAssessmentResultsStorage 1.2.840.10008.5.1.4.1.1.90.1 +MicroscopyBulkSimpleAnnotationsStorage 1.2.840.10008.5.1.4.1.1.91.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 EncapsulatedSTLStorage 1.2.840.10008.5.1.4.1.1.104.3 @@ -675,6 +687,7 @@ EnhancedPETImageStorage 1.2.840.10008.5.1.4.1.1.130 BasicStructuredDisplayStorage 1.2.840.10008.5.1.4.1.1.131 CTPerformedProcedureProtocolStorage 1.2.840.10008.5.1.4.1.1.200.2 +XAPerformedProcedureProtocolStorage 1.2.840.10008.5.1.4.1.1.200.8 RTImageStorage 1.2.840.10008.5.1.4.1.1.481.1 RTDoseStorage 1.2.840.10008.5.1.4.1.1.481.2 RTStructureSetStorage 1.2.840.10008.5.1.4.1.1.481.3 @@ -695,6 +708,8 @@ TomotherapeuticRadiationRecordStorage 1.2.840.10008.5.1.4.1.1.481.18 CArmPhotonElectronRadiationRecordStorage 1.2.840.10008.5.1.4.1.1.481.19 RoboticRadiationRecordStorage 1.2.840.10008.5.1.4.1.1.481.20 +RTRadiationSetDeliveryInstructionStorage 1.2.840.10008.5.1.4.1.1.481.21 +RTTreatmentPreparationStorage 1.2.840.10008.5.1.4.1.1.481.22 DICOS_CTImageStorage 1.2.840.10008.5.1.4.1.1.501.1 DICOS_DigitalXRayImageStorageForPresentation 1.2.840.10008.5.1.4.1.1.501.2.1 DICOS_DigitalXRayImageStorageForProcessing 1.2.840.10008.5.1.4.1.1.501.2.2 @@ -795,4 +810,4 @@ \fBstorescu\fP(1) .SH "COPYRIGHT" .PP -Copyright (C) 1996-2021 e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&. +Copyright (C) 1996-2022 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&. diff -Nru dcmtk-3.6.6/doxygen/manpages/man1/storescu.1 dcmtk-3.6.7/doxygen/manpages/man1/storescu.1 --- dcmtk-3.6.6/doxygen/manpages/man1/storescu.1 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/doxygen/manpages/man1/storescu.1 2022-04-28 13:47:25.000000000 +0000 @@ -1,4 +1,4 @@ -.TH "storescu" 1 "Thu Jan 14 2021" "Version 3.6.6" "OFFIS DCMTK" \" -*- nroff -*- +.TH "storescu" 1 "Fri Apr 22 2022" "Version 3.6.7" "OFFIS DCMTK" \" -*- nroff -*- .nh .SH NAME storescu \- DICOM storage (C-STORE) SCU @@ -327,13 +327,23 @@ +cd --add-cert-dir [d]irectory: string add certificates in d to list of certificates -security profile: + +crl --add-crl-file [f]ilename: string + add certificate revocation list file + (implies --enable-crl-vfy) - +px --profile-bcp195 - BCP 195 TLS Profile (default) + +crv --enable-crl-vfy + enable leaf CRL verification + + +cra --enable-crl-all + enable full chain CRL verification + +security profile: +py --profile-bcp195-nd - Non-downgrading BCP 195 TLS Profile + Non-downgrading BCP 195 TLS Profile (default) + + +px --profile-bcp195 + BCP 195 TLS Profile +pz --profile-bcp195-ex Extended BCP 195 TLS Profile @@ -513,4 +523,4 @@ \fBstorescp\fP(1) .SH "COPYRIGHT" .PP -Copyright (C) 1996-2021 e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&. +Copyright (C) 1996-2022 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&. diff -Nru dcmtk-3.6.6/doxygen/manpages/man1/termscu.1 dcmtk-3.6.7/doxygen/manpages/man1/termscu.1 --- dcmtk-3.6.6/doxygen/manpages/man1/termscu.1 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/doxygen/manpages/man1/termscu.1 2022-04-28 13:47:25.000000000 +0000 @@ -1,4 +1,4 @@ -.TH "termscu" 1 "Thu Jan 14 2021" "Version 3.6.6" "OFFIS DCMTK" \" -*- nroff -*- +.TH "termscu" 1 "Fri Apr 22 2022" "Version 3.6.7" "OFFIS DCMTK" \" -*- nroff -*- .nh .SH NAME termscu \- DICOM termination SCU @@ -99,4 +99,4 @@ 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 data dictionary can be loaded\&. .SH "COPYRIGHT" .PP -Copyright (C) 2005-2017 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&. +Copyright (C) 2005-2022 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&. diff -Nru dcmtk-3.6.6/doxygen/manpages/man1/wlmscpfs.1 dcmtk-3.6.7/doxygen/manpages/man1/wlmscpfs.1 --- dcmtk-3.6.6/doxygen/manpages/man1/wlmscpfs.1 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/doxygen/manpages/man1/wlmscpfs.1 2022-04-28 13:47:25.000000000 +0000 @@ -1,4 +1,4 @@ -.TH "wlmscpfs" 1 "Thu Jan 14 2021" "Version 3.6.6" "OFFIS DCMTK" \" -*- nroff -*- +.TH "wlmscpfs" 1 "Fri Apr 22 2022" "Version 3.6.7" "OFFIS DCMTK" \" -*- nroff -*- .nh .SH NAME wlmscpfs \- DICOM Basic Worklist Management SCP (based on data files) @@ -221,7 +221,7 @@ ffffff is the fraction of the current second .PP .PP -This should work as a default for most applications that would like to use request files and want to ensure unique file names\&. If it is desired to change this naming scheme, the option \fI--request-file-format\fP can be used\&. It permits to specify the file naming pattern used by \fI--request-file-path\fP\&. +This should work as a default for most applications that would like to use request files and want to ensure unique file names\&. If it is desired to change this naming scheme, the option \fI--request-file-format\fP can be used\&. It permits one to specify the file naming pattern used by \fI--request-file-path\fP\&. .PP For flexibility, the following placeholders can be used in the pattern provided for \fI--request-file-format\fP: .PP @@ -419,4 +419,4 @@ 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 data dictionary can be loaded\&. .SH "COPYRIGHT" .PP -Copyright (C) 1996-2021 e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&. +Copyright (C) 1996-2022 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&. diff -Nru dcmtk-3.6.6/doxygen/manpages/man1/xml2dcm.1 dcmtk-3.6.7/doxygen/manpages/man1/xml2dcm.1 --- dcmtk-3.6.6/doxygen/manpages/man1/xml2dcm.1 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/doxygen/manpages/man1/xml2dcm.1 2022-04-28 13:47:25.000000000 +0000 @@ -1,4 +1,4 @@ -.TH "xml2dcm" 1 "Thu Jan 14 2021" "Version 3.6.6" "OFFIS DCMTK" \" -*- nroff -*- +.TH "xml2dcm" 1 "Fri Apr 22 2022" "Version 3.6.7" "OFFIS DCMTK" \" -*- nroff -*- .nh .SH NAME xml2dcm \- Convert XML document to DICOM file or data set @@ -119,6 +119,14 @@ +td --write-xfer-deflated write with deflated explicit VR little endian TS +error handling: + + -E --stop-on-error + do not write if document is invalid (default) + + +E --ignore-errors + attempt to write even if document is invalid + post-1993 value representations: +u --enable-new-vr @@ -275,4 +283,4 @@ \fBdcm2xml\fP(1) .SH "COPYRIGHT" .PP -Copyright (C) 2003-2021 e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&. +Copyright (C) 2003-2022 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&. diff -Nru dcmtk-3.6.6/doxygen/manpages/man1/xml2dsr.1 dcmtk-3.6.7/doxygen/manpages/man1/xml2dsr.1 --- dcmtk-3.6.6/doxygen/manpages/man1/xml2dsr.1 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/doxygen/manpages/man1/xml2dsr.1 2022-04-28 13:47:25.000000000 +0000 @@ -1,4 +1,4 @@ -.TH "xml2dsr" 1 "Thu Jan 14 2021" "Version 3.6.6" "OFFIS DCMTK" \" -*- nroff -*- +.TH "xml2dsr" 1 "Fri Apr 22 2022" "Version 3.6.7" "OFFIS DCMTK" \" -*- nroff -*- .nh .SH NAME xml2dsr \- Convert XML document to DICOM SR file @@ -248,4 +248,4 @@ \fBdsr2xml\fP(1) .SH "COPYRIGHT" .PP -Copyright (C) 2003-2019 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&. +Copyright (C) 2003-2022 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&. diff -Nru dcmtk-3.6.6/doxygen/manpages.cfg dcmtk-3.6.7/doxygen/manpages.cfg --- dcmtk-3.6.6/doxygen/manpages.cfg 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/doxygen/manpages.cfg 2022-04-28 13:47:25.000000000 +0000 @@ -1,4 +1,4 @@ -# Doxyfile 1.8.8 +# Doxyfile 1.8.17 # This file describes the settings to be used by the documentation system # doxygen (www.doxygen.org) for a project. @@ -17,11 +17,11 @@ # Project related configuration options #--------------------------------------------------------------------------- -# This tag specifies the encoding used for all characters in the config file -# that follow. The default is UTF-8 which is also the encoding used for all text -# before the first occurrence of this tag. Doxygen uses libiconv (or the iconv -# built into libc) for the transcoding. See http://www.gnu.org/software/libiconv -# for the list of possible encodings. +# This tag specifies the encoding used for all characters in the configuration +# file that follow. The default is UTF-8 which is also the encoding used for all +# text before the first occurrence of this tag. Doxygen uses libiconv (or the +# iconv built into libc) for the transcoding. See +# https://www.gnu.org/software/libiconv/ for the list of possible encodings. # The default value is: UTF-8. DOXYFILE_ENCODING = ISO-8859-1 @@ -46,10 +46,10 @@ PROJECT_BRIEF = -# With the PROJECT_LOGO tag one can specify an logo or icon that is included in -# the documentation. The maximum height of the logo should not exceed 55 pixels -# and the maximum width should not exceed 200 pixels. Doxygen will copy the logo -# to the output directory. +# With the PROJECT_LOGO tag one can specify a logo or an icon that is included +# in the documentation. The maximum height of the logo should not exceed 55 +# pixels and the maximum width should not exceed 200 pixels. Doxygen will copy +# the logo to the output directory. PROJECT_LOGO = @@ -60,7 +60,7 @@ OUTPUT_DIRECTORY = -# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create 4096 sub- +# If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub- # directories (in 2 levels) under the output directory of each output format and # will distribute the generated files over these directories. Enabling this # option can be useful when feeding doxygen a huge amount of source files, where @@ -93,14 +93,22 @@ OUTPUT_LANGUAGE = English -# If the BRIEF_MEMBER_DESC tag is set to YES doxygen will include brief member +# The OUTPUT_TEXT_DIRECTION tag is used to specify the direction in which all +# documentation generated by doxygen is written. Doxygen will use this +# information to generate all generated output in the proper direction. +# Possible values are: None, LTR, RTL and Context. +# The default value is: None. + +OUTPUT_TEXT_DIRECTION = None + +# If the BRIEF_MEMBER_DESC tag is set to YES, doxygen will include brief member # descriptions after the members that are listed in the file and class # documentation (similar to Javadoc). Set to NO to disable this. # The default value is: YES. BRIEF_MEMBER_DESC = YES -# If the REPEAT_BRIEF tag is set to YES doxygen will prepend the brief +# If the REPEAT_BRIEF tag is set to YES, doxygen will prepend the brief # description of a member or function before the detailed description # # Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the @@ -135,7 +143,7 @@ INLINE_INHERITED_MEMB = NO -# If the FULL_PATH_NAMES tag is set to YES doxygen will prepend the full path +# If the FULL_PATH_NAMES tag is set to YES, doxygen will prepend the full path # before files name in the file list and in the header files. If set to NO the # shortest path that makes the file name unique will be used # The default value is: YES. @@ -179,6 +187,16 @@ JAVADOC_AUTOBRIEF = YES +# If the JAVADOC_BANNER tag is set to YES then doxygen will interpret a line +# such as +# /*************** +# as being the beginning of a Javadoc-style comment "banner". If set to NO, the +# Javadoc-style will behave just like regular comments and it will not be +# interpreted by doxygen. +# The default value is: NO. + +JAVADOC_BANNER = NO + # If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first # line (until the first dot) of a Qt-style comment as the brief description. If # set to NO, the Qt-style will behave just like regular Qt-style comments (thus @@ -205,9 +223,9 @@ INHERIT_DOCS = NO -# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce a -# new page for each member. If set to NO, the documentation of a member will be -# part of the file/class/namespace that contains it. +# If the SEPARATE_MEMBER_PAGES tag is set to YES then doxygen will produce a new +# page for each member. If set to NO, the documentation of a member will be part +# of the file/class/namespace that contains it. # The default value is: NO. SEPARATE_MEMBER_PAGES = NO @@ -226,7 +244,12 @@ # will allow you to put the command \sideeffect (or @sideeffect) in the # documentation, which will result in a user-defined paragraph with heading # "Side Effects:". You can put \n's in the value part of an alias to insert -# newlines. +# newlines (in the resulting output). You can put ^^ in the value part of an +# alias to insert a newline as if a physical newline was in the original file. +# When you need a literal { or } or , in the value part of an alias you have to +# escape them by means of a backslash (\), this can lead to conflicts with the +# commands \{ and \} for these it is advised to use the version @{ and @} or use +# a double escape (\\{ and \\}) ALIASES = @@ -264,19 +287,28 @@ OPTIMIZE_OUTPUT_VHDL = NO +# Set the OPTIMIZE_OUTPUT_SLICE tag to YES if your project consists of Slice +# sources only. Doxygen will then generate output that is more tailored for that +# language. For instance, namespaces will be presented as modules, types will be +# separated into more groups, etc. +# The default value is: NO. + +OPTIMIZE_OUTPUT_SLICE = NO + # Doxygen selects the parser to use depending on the extension of the files it # parses. With this tag you can assign which parser to use for a given # extension. Doxygen has a built-in mapping, but you can override or extend it # using this tag. The format is ext=language, where ext is a file extension, and -# language is one of the parsers supported by doxygen: IDL, Java, Javascript, -# C#, C, C++, D, PHP, Objective-C, Python, Fortran (fixed format Fortran: -# FortranFixed, free formatted Fortran: FortranFree, unknown formatted Fortran: -# Fortran. In the later case the parser tries to guess whether the code is fixed -# or free formatted code, this is the default for Fortran type files), VHDL. For -# instance to make doxygen treat .inc files as Fortran files (default is PHP), -# and .f files as C (default is Fortran), use: inc=Fortran f=C. +# language is one of the parsers supported by doxygen: IDL, Java, JavaScript, +# Csharp (C#), C, C++, D, PHP, md (Markdown), Objective-C, Python, Slice, +# Fortran (fixed format Fortran: FortranFixed, free formatted Fortran: +# FortranFree, unknown formatted Fortran: Fortran. In the later case the parser +# tries to guess whether the code is fixed or free formatted code, this is the +# default for Fortran type files), VHDL, tcl. For instance to make doxygen treat +# .inc files as Fortran files (default is PHP), and .f files as C (default is +# Fortran), use: inc=Fortran f=C. # -# Note For files without extension you can use no_extension as a placeholder. +# Note: For files without extension you can use no_extension as a placeholder. # # Note that for custom extensions you also need to set FILE_PATTERNS otherwise # the files are not read by doxygen. @@ -285,7 +317,7 @@ # If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments # according to the Markdown format, which allows for more readable -# documentation. See http://daringfireball.net/projects/markdown/ for details. +# documentation. See https://daringfireball.net/projects/markdown/ for details. # The output of markdown processing is further processed by doxygen, so you can # mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in # case of backward compatibilities issues. @@ -293,10 +325,19 @@ MARKDOWN_SUPPORT = YES +# When the TOC_INCLUDE_HEADINGS tag is set to a non-zero value, all headings up +# to that level are automatically included in the table of contents, even if +# they do not have an id attribute. +# Note: This feature currently applies only to Markdown headings. +# Minimum value: 0, maximum value: 99, default value: 5. +# This tag requires that the tag MARKDOWN_SUPPORT is set to YES. + +TOC_INCLUDE_HEADINGS = 5 + # When enabled doxygen tries to link words that correspond to documented # classes, or namespaces to their corresponding documentation. Such a link can -# be prevented in individual cases by by putting a % sign in front of the word -# or globally by setting AUTOLINK_SUPPORT to NO. +# be prevented in individual cases by putting a % sign in front of the word or +# globally by setting AUTOLINK_SUPPORT to NO. # The default value is: YES. AUTOLINK_SUPPORT = YES @@ -318,7 +359,7 @@ CPP_CLI_SUPPORT = NO # Set the SIP_SUPPORT tag to YES if your project consists of sip (see: -# http://www.riverbankcomputing.co.uk/software/sip/intro) sources only. Doxygen +# https://www.riverbankcomputing.com/software/sip/intro) sources only. Doxygen # will parse them like normal C++ but will assume all classes use public instead # of private inheritance when no explicit protection keyword is present. # The default value is: NO. @@ -336,13 +377,20 @@ IDL_PROPERTY_SUPPORT = YES # If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC -# tag is set to YES, then doxygen will reuse the documentation of the first +# tag is set to YES then doxygen will reuse the documentation of the first # member in the group (if any) for the other members of the group. By default # all members of a group must be documented explicitly. # The default value is: NO. DISTRIBUTE_GROUP_DOC = NO +# If one adds a struct or class to a group and this option is enabled, then also +# any nested class or struct is added to the same group. By default this option +# is disabled and one has to add nested compounds explicitly via \ingroup. +# The default value is: NO. + +GROUP_NESTED_COMPOUNDS = NO + # Set the SUBGROUPING tag to YES to allow class member groups of the same type # (for instance a group of public functions) to be put as a subgroup of that # type (e.g. under the Public Functions section). Set it to NO to prevent @@ -401,7 +449,7 @@ # Build related configuration options #--------------------------------------------------------------------------- -# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in +# If the EXTRACT_ALL tag is set to YES, doxygen will assume all entities in # documentation are documented, even if no documentation was available. Private # class members and static file members will be hidden unless the # EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES. @@ -411,35 +459,41 @@ EXTRACT_ALL = YES -# If the EXTRACT_PRIVATE tag is set to YES all private members of a class will +# If the EXTRACT_PRIVATE tag is set to YES, all private members of a class will # be included in the documentation. # The default value is: NO. EXTRACT_PRIVATE = YES -# If the EXTRACT_PACKAGE tag is set to YES all members with package or internal +# If the EXTRACT_PRIV_VIRTUAL tag is set to YES, documented private virtual +# methods of a class will be included in the documentation. +# The default value is: NO. + +EXTRACT_PRIV_VIRTUAL = NO + +# If the EXTRACT_PACKAGE tag is set to YES, all members with package or internal # scope will be included in the documentation. # The default value is: NO. EXTRACT_PACKAGE = NO -# If the EXTRACT_STATIC tag is set to YES all static members of a file will be +# If the EXTRACT_STATIC tag is set to YES, all static members of a file will be # included in the documentation. # The default value is: NO. EXTRACT_STATIC = YES -# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) defined -# locally in source files will be included in the documentation. If set to NO +# If the EXTRACT_LOCAL_CLASSES tag is set to YES, classes (and structs) defined +# locally in source files will be included in the documentation. If set to NO, # only classes defined in header files are included. Does not have any effect # for Java sources. # The default value is: YES. EXTRACT_LOCAL_CLASSES = YES -# This flag is only useful for Objective-C code. When set to YES local methods, +# This flag is only useful for Objective-C code. If set to YES, local methods, # which are defined in the implementation section but not in the interface are -# included in the documentation. If set to NO only methods in the interface are +# included in the documentation. If set to NO, only methods in the interface are # included. # The default value is: NO. @@ -464,21 +518,21 @@ # If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all # undocumented classes that are normally visible in the class hierarchy. If set -# to NO these classes will be included in the various overviews. This option has -# no effect if EXTRACT_ALL is enabled. +# to NO, these classes will be included in the various overviews. This option +# has no effect if EXTRACT_ALL is enabled. # The default value is: NO. HIDE_UNDOC_CLASSES = NO # If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend -# (class|struct|union) declarations. If set to NO these declarations will be -# included in the documentation. +# declarations. If set to NO, these declarations will be included in the +# documentation. # The default value is: NO. HIDE_FRIEND_COMPOUNDS = NO # If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any -# documentation blocks found inside the body of a function. If set to NO these +# documentation blocks found inside the body of a function. If set to NO, these # blocks will be appended to the function's detailed documentation block. # The default value is: NO. @@ -492,21 +546,28 @@ INTERNAL_DOCS = NO # If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file -# names in lower-case letters. If set to YES upper-case letters are also +# names in lower-case letters. If set to YES, upper-case letters are also # allowed. This is useful if you have classes or files whose names only differ # in case and if your file system supports case sensitive file names. Windows -# and Mac users are advised to set this option to NO. +# (including Cygwin) ands Mac users are advised to set this option to NO. # The default value is: system dependent. CASE_SENSE_NAMES = YES # If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with -# their full class and namespace scopes in the documentation. If set to YES the +# their full class and namespace scopes in the documentation. If set to YES, the # scope will be hidden. # The default value is: NO. HIDE_SCOPE_NAMES = NO +# If the HIDE_COMPOUND_REFERENCE tag is set to NO (default) then doxygen will +# append additional text to a page's title, such as Class Reference. If set to +# YES the compound reference will be hidden. +# The default value is: NO. + +HIDE_COMPOUND_REFERENCE= NO + # If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of # the files that are included by a file in the documentation of that file. # The default value is: YES. @@ -534,14 +595,14 @@ # If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the # (detailed) documentation of file and class members alphabetically by member -# name. If set to NO the members will appear in declaration order. +# name. If set to NO, the members will appear in declaration order. # The default value is: YES. SORT_MEMBER_DOCS = YES # If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief # descriptions of file, namespace and class members alphabetically by member -# name. If set to NO the members will appear in declaration order. Note that +# name. If set to NO, the members will appear in declaration order. Note that # this will also influence the order of the classes in the class list. # The default value is: NO. @@ -586,27 +647,25 @@ STRICT_PROTO_MATCHING = NO -# The GENERATE_TODOLIST tag can be used to enable ( YES) or disable ( NO) the -# todo list. This list is created by putting \todo commands in the -# documentation. +# The GENERATE_TODOLIST tag can be used to enable (YES) or disable (NO) the todo +# list. This list is created by putting \todo commands in the documentation. # The default value is: YES. GENERATE_TODOLIST = NO -# The GENERATE_TESTLIST tag can be used to enable ( YES) or disable ( NO) the -# test list. This list is created by putting \test commands in the -# documentation. +# The GENERATE_TESTLIST tag can be used to enable (YES) or disable (NO) the test +# list. This list is created by putting \test commands in the documentation. # The default value is: YES. GENERATE_TESTLIST = NO -# The GENERATE_BUGLIST tag can be used to enable ( YES) or disable ( NO) the bug +# The GENERATE_BUGLIST tag can be used to enable (YES) or disable (NO) the bug # list. This list is created by putting \bug commands in the documentation. # The default value is: YES. GENERATE_BUGLIST = NO -# The GENERATE_DEPRECATEDLIST tag can be used to enable ( YES) or disable ( NO) +# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or disable (NO) # the deprecated list. This list is created by putting \deprecated commands in # the documentation. # The default value is: YES. @@ -631,8 +690,8 @@ MAX_INITIALIZER_LINES = 30 # Set the SHOW_USED_FILES tag to NO to disable the list of files generated at -# the bottom of the documentation of classes and structs. If set to YES the list -# will mention the files that were used to generate the documentation. +# the bottom of the documentation of classes and structs. If set to YES, the +# list will mention the files that were used to generate the documentation. # The default value is: YES. SHOW_USED_FILES = YES @@ -677,7 +736,7 @@ # The CITE_BIB_FILES tag can be used to specify one or more bib files containing # the reference definitions. This must be a list of .bib files. The .bib # extension is automatically appended if omitted. This requires the bibtex tool -# to be installed. See also http://en.wikipedia.org/wiki/BibTeX for more info. +# to be installed. See also https://en.wikipedia.org/wiki/BibTeX for more info. # For LaTeX the style of the bibliography can be controlled using # LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the # search path. See also \cite for info how to create references. @@ -696,7 +755,7 @@ QUIET = NO # The WARNINGS tag can be used to turn on/off the warning messages that are -# generated to standard error ( stderr) by doxygen. If WARNINGS is set to YES +# generated to standard error (stderr) by doxygen. If WARNINGS is set to YES # this implies that the warnings are on. # # Tip: Turn warnings on while writing the documentation. @@ -704,7 +763,7 @@ WARNINGS = YES -# If the WARN_IF_UNDOCUMENTED tag is set to YES, then doxygen will generate +# If the WARN_IF_UNDOCUMENTED tag is set to YES then doxygen will generate # warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag # will automatically be disabled. # The default value is: YES. @@ -721,12 +780,19 @@ # This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that # are documented, but have no documentation for their parameters or return -# value. If set to NO doxygen will only warn about wrong or incomplete parameter -# documentation, but not about the absence of documentation. +# value. If set to NO, doxygen will only warn about wrong or incomplete +# parameter documentation, but not about the absence of documentation. If +# EXTRACT_ALL is set to YES then this flag will automatically be disabled. # The default value is: NO. WARN_NO_PARAMDOC = NO +# If the WARN_AS_ERROR tag is set to YES then doxygen will immediately stop when +# a warning is encountered. +# The default value is: NO. + +WARN_AS_ERROR = NO + # The WARN_FORMAT tag determines the format of the warning messages that doxygen # can produce. The string should contain the $file, $line, and $text tags, which # will be replaced by the file and line number from which the warning originated @@ -750,7 +816,7 @@ # The INPUT tag is used to specify the files and/or directories that contain # documented source files. You may enter file names like myfile.cpp or # directories like /usr/src/myproject. Separate the files or directories with -# spaces. +# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING # Note: If this tag is empty the current directory is searched. INPUT = "@DOXYGEN_INPUT_DIR@" @@ -758,7 +824,7 @@ # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses # libiconv (or the iconv built into libc) for the transcoding. See the libiconv -# documentation (see: http://www.gnu.org/software/libiconv) for the list of +# documentation (see: https://www.gnu.org/software/libiconv/) for the list of # possible encodings. # The default value is: UTF-8. @@ -766,12 +832,19 @@ # If the value of the INPUT tag contains directories, you can use the # FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and -# *.h) to filter out the source-files in the directories. If left blank the -# following patterns are tested:*.c, *.cc, *.cxx, *.cpp, *.c++, *.java, *.ii, -# *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h, *.hh, *.hxx, *.hpp, -# *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc, *.m, *.markdown, -# *.md, *.mm, *.dox, *.py, *.f90, *.f, *.for, *.tcl, *.vhd, *.vhdl, *.ucf, -# *.qsf, *.as and *.js. +# *.h) to filter out the source-files in the directories. +# +# Note that for custom extensions or not directly supported extensions you also +# need to set EXTENSION_MAPPING for the extension otherwise the files are not +# read by doxygen. +# +# If left blank the following patterns are tested:*.c, *.cc, *.cxx, *.cpp, +# *.c++, *.java, *.ii, *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h, +# *.hh, *.hxx, *.hpp, *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc, +# *.m, *.markdown, *.md, *.mm, *.dox (to be provided as doxygen C comment), +# *.doc (to be provided as doxygen C comment), *.txt (to be provided as doxygen +# C comment), *.py, *.pyw, *.f90, *.f95, *.f03, *.f08, *.f, *.for, *.tcl, *.vhd, +# *.vhdl, *.ucf, *.qsf and *.ice. FILE_PATTERNS = *.man @@ -859,6 +932,10 @@ # Note that the filter must not add or remove lines; it is applied before the # code is scanned, but not when the output code is generated. If lines are added # or removed, the anchors will not be placed correctly. +# +# Note that for custom extensions or not directly supported extensions you also +# need to set EXTENSION_MAPPING for the extension otherwise the files are not +# properly processed by doxygen. INPUT_FILTER = @@ -868,11 +945,15 @@ # (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how # filters are used. If the FILTER_PATTERNS tag is empty or if none of the # patterns match the file name, INPUT_FILTER is applied. +# +# Note that for custom extensions or not directly supported extensions you also +# need to set EXTENSION_MAPPING for the extension otherwise the files are not +# properly processed by doxygen. FILTER_PATTERNS = # If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using -# INPUT_FILTER ) will also be used to filter the input files that are used for +# INPUT_FILTER) will also be used to filter the input files that are used for # producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES). # The default value is: NO. @@ -920,7 +1001,7 @@ STRIP_CODE_COMMENTS = YES # If the REFERENCED_BY_RELATION tag is set to YES then for each documented -# function all documented functions referencing it will be listed. +# entity all documented functions referencing it will be listed. # The default value is: NO. REFERENCED_BY_RELATION = YES @@ -932,7 +1013,7 @@ REFERENCES_RELATION = YES # If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set -# to YES, then the hyperlinks from functions in REFERENCES_RELATION and +# to YES then the hyperlinks from functions in REFERENCES_RELATION and # REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will # link to the documentation. # The default value is: YES. @@ -952,12 +1033,12 @@ # If the USE_HTAGS tag is set to YES then the references to source code will # point to the HTML generated by the htags(1) tool instead of doxygen built-in # source browser. The htags tool is part of GNU's global source tagging system -# (see http://www.gnu.org/software/global/global.html). You will need version +# (see https://www.gnu.org/software/global/global.html). You will need version # 4.8.6 or higher. # # To use it do the following: # - Install the latest version of global -# - Enable SOURCE_BROWSER and USE_HTAGS in the config file +# - Enable SOURCE_BROWSER and USE_HTAGS in the configuration file # - Make sure the INPUT points to the root of the source tree # - Run doxygen as normal # @@ -979,13 +1060,13 @@ VERBATIM_HEADERS = YES -# If the CLANG_ASSISTED_PARSING tag is set to YES, then doxygen will use the +# If the CLANG_ASSISTED_PARSING tag is set to YES then doxygen will use the # clang parser (see: http://clang.llvm.org/) for more accurate parsing at the # cost of reduced performance. This can be particularly helpful with template # rich C++ code for which doxygen's built-in parser lacks the necessary type # information. # Note: The availability of this option depends on whether or not doxygen was -# compiled with the --with-libclang option. +# generated with the -Duse_libclang=ON option for CMake. # The default value is: NO. CLANG_ASSISTED_PARSING = NO @@ -998,6 +1079,16 @@ CLANG_OPTIONS = +# If clang assisted parsing is enabled you can provide the clang parser with the +# path to the compilation database (see: +# http://clang.llvm.org/docs/HowToSetupToolingForLLVM.html) used when the files +# were built. This is equivalent to specifying the "-p" option to a clang tool, +# such as clang-check. These options will then be passed to the parser. +# Note: The availability of this option depends on whether or not doxygen was +# generated with the -Duse_libclang=ON option for CMake. + +CLANG_DATABASE_PATH = + #--------------------------------------------------------------------------- # Configuration options related to the alphabetical class index #--------------------------------------------------------------------------- @@ -1028,7 +1119,7 @@ # Configuration options related to the HTML output #--------------------------------------------------------------------------- -# If the GENERATE_HTML tag is set to YES doxygen will generate HTML output +# If the GENERATE_HTML tag is set to YES, doxygen will generate HTML output # The default value is: YES. GENERATE_HTML = NO @@ -1094,10 +1185,10 @@ # cascading style sheets that are included after the standard style sheets # created by doxygen. Using this option one can overrule certain style aspects. # This is preferred over using HTML_STYLESHEET since it does not replace the -# standard style sheet and is therefor more robust against future updates. +# standard style sheet and is therefore more robust against future updates. # Doxygen will copy the style sheet files to the output directory. -# Note: The order of the extra stylesheet files is of importance (e.g. the last -# stylesheet in the list overrules the setting of the previous ones in the +# Note: The order of the extra style sheet files is of importance (e.g. the last +# style sheet in the list overrules the setting of the previous ones in the # list). For an example see the documentation. # This tag requires that the tag GENERATE_HTML is set to YES. @@ -1114,9 +1205,9 @@ HTML_EXTRA_FILES = # The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen -# will adjust the colors in the stylesheet and background images according to +# will adjust the colors in the style sheet and background images according to # this color. Hue is specified as an angle on a colorwheel, see -# http://en.wikipedia.org/wiki/Hue for more information. For instance the value +# https://en.wikipedia.org/wiki/Hue for more information. For instance the value # 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300 # purple, and 360 is red again. # Minimum value: 0, maximum value: 359, default value: 220. @@ -1145,12 +1236,24 @@ # If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML # page will contain the date and time when the page was generated. Setting this -# to NO can help when comparing the output of multiple runs. -# The default value is: YES. +# to YES can help to show when doxygen was last run and thus if the +# documentation is up to date. +# The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_TIMESTAMP = YES +# If the HTML_DYNAMIC_MENUS tag is set to YES then the generated HTML +# documentation will contain a main index with vertical navigation menus that +# are dynamically created via JavaScript. If disabled, the navigation index will +# consists of multiple levels of tabs that are statically embedded in every HTML +# page. Disable this option to support browsers that do not have JavaScript, +# like the Qt help browser. +# The default value is: YES. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_DYNAMIC_MENUS = YES + # If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML # documentation will contain sections that can be hidden and shown after the # page has loaded. @@ -1174,13 +1277,13 @@ # If the GENERATE_DOCSET tag is set to YES, additional index files will be # generated that can be used as input for Apple's Xcode 3 integrated development -# environment (see: http://developer.apple.com/tools/xcode/), introduced with -# OSX 10.5 (Leopard). To create a documentation set, doxygen will generate a +# environment (see: https://developer.apple.com/xcode/), introduced with OSX +# 10.5 (Leopard). To create a documentation set, doxygen will generate a # Makefile in the HTML output directory. Running make will produce the docset in # that directory and running make install will install the docset in # ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at -# startup. See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html -# for more information. +# startup. See https://developer.apple.com/library/archive/featuredarticles/Doxy +# genXcode/_index.html for more information. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. @@ -1219,7 +1322,7 @@ # If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three # additional HTML index files: index.hhp, index.hhc, and index.hhk. The # index.hhp is a project file that can be read by Microsoft's HTML Help Workshop -# (see: http://www.microsoft.com/en-us/download/details.aspx?id=21138) on +# (see: https://www.microsoft.com/en-us/download/details.aspx?id=21138) on # Windows. # # The HTML Help Workshop contains a compiler that can convert all HTML output @@ -1242,28 +1345,28 @@ CHM_FILE = # The HHC_LOCATION tag can be used to specify the location (absolute path -# including file name) of the HTML help compiler ( hhc.exe). If non-empty +# including file name) of the HTML help compiler (hhc.exe). If non-empty, # doxygen will try to run the HTML help compiler on the generated index.hhp. # The file has to be specified with full path. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. HHC_LOCATION = -# The GENERATE_CHI flag controls if a separate .chi index file is generated ( -# YES) or that it should be included in the master .chm file ( NO). +# The GENERATE_CHI flag controls if a separate .chi index file is generated +# (YES) or that it should be included in the master .chm file (NO). # The default value is: NO. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. GENERATE_CHI = NO -# The CHM_INDEX_ENCODING is used to encode HtmlHelp index ( hhk), content ( hhc) +# The CHM_INDEX_ENCODING is used to encode HtmlHelp index (hhk), content (hhc) # and project file content. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. CHM_INDEX_ENCODING = -# The BINARY_TOC flag controls whether a binary table of contents is generated ( -# YES) or a normal table of contents ( NO) in the .chm file. Furthermore it +# The BINARY_TOC flag controls whether a binary table of contents is generated +# (YES) or a normal table of contents (NO) in the .chm file. Furthermore it # enables the Previous and Next buttons. # The default value is: NO. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. @@ -1295,7 +1398,7 @@ # The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help # Project output. For more information please see Qt Help Project / Namespace -# (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#namespace). +# (see: https://doc.qt.io/archives/qt-4.8/qthelpproject.html#namespace). # The default value is: org.doxygen.Project. # This tag requires that the tag GENERATE_QHP is set to YES. @@ -1303,7 +1406,7 @@ # The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt # Help Project output. For more information please see Qt Help Project / Virtual -# Folders (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#virtual- +# Folders (see: https://doc.qt.io/archives/qt-4.8/qthelpproject.html#virtual- # folders). # The default value is: doc. # This tag requires that the tag GENERATE_QHP is set to YES. @@ -1312,7 +1415,7 @@ # If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom # filter to add. For more information please see Qt Help Project / Custom -# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom- +# Filters (see: https://doc.qt.io/archives/qt-4.8/qthelpproject.html#custom- # filters). # This tag requires that the tag GENERATE_QHP is set to YES. @@ -1320,7 +1423,7 @@ # The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the # custom filter to add. For more information please see Qt Help Project / Custom -# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom- +# Filters (see: https://doc.qt.io/archives/qt-4.8/qthelpproject.html#custom- # filters). # This tag requires that the tag GENERATE_QHP is set to YES. @@ -1328,7 +1431,7 @@ # The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this # project's filter section matches. Qt Help Project / Filter Attributes (see: -# http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes). +# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#filter-attributes). # This tag requires that the tag GENERATE_QHP is set to YES. QHP_SECT_FILTER_ATTRS = @@ -1377,7 +1480,7 @@ # index structure (just like the one that is generated for HTML Help). For this # to work a browser that supports JavaScript, DHTML, CSS and frames is required # (i.e. any modern browser). Windows users are probably better off using the -# HTML help feature. Via custom stylesheets (see HTML_EXTRA_STYLESHEET) one can +# HTML help feature. Via custom style sheets (see HTML_EXTRA_STYLESHEET) one can # further fine-tune the look of the index. As an example, the default style # sheet generated by doxygen has an example that shows how to put an image at # the root of the tree instead of the PROJECT_NAME. Since the tree basically has @@ -1405,7 +1508,7 @@ TREEVIEW_WIDTH = 250 -# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open links to +# If the EXT_LINKS_IN_WINDOW option is set to YES, doxygen will open links to # external symbols imported via tag files in a separate window. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. @@ -1421,7 +1524,7 @@ FORMULA_FONTSIZE = 10 -# Use the FORMULA_TRANPARENT tag to determine whether or not the images +# Use the FORMULA_TRANSPARENT tag to determine whether or not the images # generated for formulas are transparent PNGs. Transparent PNGs are not # supported properly for IE 6.0, but are supported on all modern browsers. # @@ -1432,9 +1535,15 @@ FORMULA_TRANSPARENT = YES +# The FORMULA_MACROFILE can contain LaTeX \newcommand and \renewcommand commands +# to create new LaTeX commands to be used in formulas as building blocks. See +# the section "Including formulas" for details. + +FORMULA_MACROFILE = + # Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see -# http://www.mathjax.org) which uses client side Javascript for the rendering -# instead of using prerendered bitmaps. Use this if you do not have LaTeX +# https://www.mathjax.org) which uses client side JavaScript for the rendering +# instead of using pre-rendered bitmaps. Use this if you do not have LaTeX # installed or if you want to formulas look prettier in the HTML output. When # enabled you may also need to install MathJax separately and configure the path # to it using the MATHJAX_RELPATH option. @@ -1460,8 +1569,8 @@ # MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax # Content Delivery Network so you can quickly see the result without installing # MathJax. However, it is strongly recommended to install a local copy of -# MathJax from http://www.mathjax.org before deployment. -# The default value is: http://cdn.mathjax.org/mathjax/latest. +# MathJax from https://www.mathjax.org before deployment. +# The default value is: https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/. # This tag requires that the tag USE_MATHJAX is set to YES. MATHJAX_RELPATH = http://www.mathjax.org/mathjax @@ -1503,7 +1612,7 @@ SEARCHENGINE = NO # When the SERVER_BASED_SEARCH tag is enabled the search engine will be -# implemented using a web server instead of a web client using Javascript. There +# implemented using a web server instead of a web client using JavaScript. There # are two flavors of web server based searching depending on the EXTERNAL_SEARCH # setting. When disabled, doxygen will generate a PHP script for searching and # an index file used by the script. When EXTERNAL_SEARCH is enabled the indexing @@ -1520,9 +1629,9 @@ # external search engine pointed to by the SEARCHENGINE_URL option to obtain the # search results. # -# Doxygen ships with an example indexer ( doxyindexer) and search engine +# Doxygen ships with an example indexer (doxyindexer) and search engine # (doxysearch.cgi) which are based on the open source search engine library -# Xapian (see: http://xapian.org/). +# Xapian (see: https://xapian.org/). # # See the section "External Indexing and Searching" for details. # The default value is: NO. @@ -1533,9 +1642,9 @@ # The SEARCHENGINE_URL should point to a search engine hosted by a web server # which will return the search results when EXTERNAL_SEARCH is enabled. # -# Doxygen ships with an example indexer ( doxyindexer) and search engine +# Doxygen ships with an example indexer (doxyindexer) and search engine # (doxysearch.cgi) which are based on the open source search engine library -# Xapian (see: http://xapian.org/). See the section "External Indexing and +# Xapian (see: https://xapian.org/). See the section "External Indexing and # Searching" for details. # This tag requires that the tag SEARCHENGINE is set to YES. @@ -1571,7 +1680,7 @@ # Configuration options related to the LaTeX output #--------------------------------------------------------------------------- -# If the GENERATE_LATEX tag is set to YES doxygen will generate LaTeX output. +# If the GENERATE_LATEX tag is set to YES, doxygen will generate LaTeX output. # The default value is: YES. GENERATE_LATEX = NO @@ -1587,22 +1696,36 @@ # The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be # invoked. # -# Note that when enabling USE_PDFLATEX this option is only used for generating -# bitmaps for formulas in the HTML output, but not in the Makefile that is -# written to the output directory. -# The default file is: latex. +# Note that when not enabling USE_PDFLATEX the default is latex when enabling +# USE_PDFLATEX the default is pdflatex and when in the later case latex is +# chosen this is overwritten by pdflatex. For specific output languages the +# default can have been set differently, this depends on the implementation of +# the output language. # This tag requires that the tag GENERATE_LATEX is set to YES. LATEX_CMD_NAME = latex # The MAKEINDEX_CMD_NAME tag can be used to specify the command name to generate # index for LaTeX. +# Note: This tag is used in the Makefile / make.bat. +# See also: LATEX_MAKEINDEX_CMD for the part in the generated output file +# (.tex). # The default file is: makeindex. # This tag requires that the tag GENERATE_LATEX is set to YES. MAKEINDEX_CMD_NAME = makeindex -# If the COMPACT_LATEX tag is set to YES doxygen generates more compact LaTeX +# The LATEX_MAKEINDEX_CMD tag can be used to specify the command name to +# generate index for LaTeX. In case there is no backslash (\) as first character +# it will be automatically added in the LaTeX code. +# Note: This tag is used in the generated output file (.tex). +# See also: MAKEINDEX_CMD_NAME for the part in the Makefile / make.bat. +# The default value is: makeindex. +# This tag requires that the tag GENERATE_LATEX is set to YES. + +LATEX_MAKEINDEX_CMD = makeindex + +# If the COMPACT_LATEX tag is set to YES, doxygen generates more compact LaTeX # documents. This may be useful for small projects and may help to save some # trees in general. # The default value is: NO. @@ -1620,9 +1743,12 @@ PAPER_TYPE = a4wide # The EXTRA_PACKAGES tag can be used to specify one or more LaTeX package names -# that should be included in the LaTeX output. To get the times font for -# instance you can specify -# EXTRA_PACKAGES=times +# that should be included in the LaTeX output. The package can be specified just +# by its name or with the correct syntax as to be used with the LaTeX +# \usepackage command. To get the times font for instance you can specify : +# EXTRA_PACKAGES=times or EXTRA_PACKAGES={times} +# To use the option intlimits with the amsmath package you can specify: +# EXTRA_PACKAGES=[intlimits]{amsmath} # If left blank no extra packages will be included. # This tag requires that the tag GENERATE_LATEX is set to YES. @@ -1637,9 +1763,9 @@ # Note: Only use a user-defined header if you know what you are doing! The # following commands have a special meaning inside the header: $title, # $datetime, $date, $doxygenversion, $projectname, $projectnumber, -# $projectbrief, $projectlogo. Doxygen will replace $title with the empy string, -# for the replacement values of the other commands the user is refered to -# HTML_HEADER. +# $projectbrief, $projectlogo. Doxygen will replace $title with the empty +# string, for the replacement values of the other commands the user is referred +# to HTML_HEADER. # This tag requires that the tag GENERATE_LATEX is set to YES. LATEX_HEADER = @@ -1655,6 +1781,17 @@ LATEX_FOOTER = +# The LATEX_EXTRA_STYLESHEET tag can be used to specify additional user-defined +# LaTeX style sheets that are included after the standard style sheets created +# by doxygen. Using this option one can overrule certain style aspects. Doxygen +# will copy the style sheet files to the output directory. +# Note: The order of the extra style sheet files is of importance (e.g. the last +# style sheet in the list overrules the setting of the previous ones in the +# list). +# This tag requires that the tag GENERATE_LATEX is set to YES. + +LATEX_EXTRA_STYLESHEET = + # The LATEX_EXTRA_FILES tag can be used to specify one or more extra images or # other source files which should be copied to the LATEX_OUTPUT output # directory. Note that the files will be copied as-is; there are no commands or @@ -1673,7 +1810,7 @@ PDF_HYPERLINKS = NO # If the USE_PDFLATEX tag is set to YES, doxygen will use pdflatex to generate -# the PDF file directly from the LaTeX files. Set this option to YES to get a +# the PDF file directly from the LaTeX files. Set this option to YES, to get a # higher quality PDF documentation. # The default value is: YES. # This tag requires that the tag GENERATE_LATEX is set to YES. @@ -1708,17 +1845,33 @@ # The LATEX_BIB_STYLE tag can be used to specify the style to use for the # bibliography, e.g. plainnat, or ieeetr. See -# http://en.wikipedia.org/wiki/BibTeX and \cite for more info. +# https://en.wikipedia.org/wiki/BibTeX and \cite for more info. # The default value is: plain. # This tag requires that the tag GENERATE_LATEX is set to YES. LATEX_BIB_STYLE = plain +# If the LATEX_TIMESTAMP tag is set to YES then the footer of each generated +# page will contain the date and time when the page was generated. Setting this +# to NO can help when comparing the output of multiple runs. +# The default value is: NO. +# This tag requires that the tag GENERATE_LATEX is set to YES. + +LATEX_TIMESTAMP = NO + +# The LATEX_EMOJI_DIRECTORY tag is used to specify the (relative or absolute) +# path from which the emoji images will be read. If a relative path is entered, +# it will be relative to the LATEX_OUTPUT directory. If left blank the +# LATEX_OUTPUT directory will be used. +# This tag requires that the tag GENERATE_LATEX is set to YES. + +LATEX_EMOJI_DIRECTORY = + #--------------------------------------------------------------------------- # Configuration options related to the RTF output #--------------------------------------------------------------------------- -# If the GENERATE_RTF tag is set to YES doxygen will generate RTF output. The +# If the GENERATE_RTF tag is set to YES, doxygen will generate RTF output. The # RTF output is optimized for Word 97 and may not look too pretty with other RTF # readers/editors. # The default value is: NO. @@ -1733,7 +1886,7 @@ RTF_OUTPUT = rtf -# If the COMPACT_RTF tag is set to YES doxygen generates more compact RTF +# If the COMPACT_RTF tag is set to YES, doxygen generates more compact RTF # documents. This may be useful for small projects and may help to save some # trees in general. # The default value is: NO. @@ -1753,9 +1906,9 @@ RTF_HYPERLINKS = NO -# Load stylesheet definitions from file. Syntax is similar to doxygen's config -# file, i.e. a series of assignments. You only have to provide replacements, -# missing definitions are set to their default value. +# Load stylesheet definitions from file. Syntax is similar to doxygen's +# configuration file, i.e. a series of assignments. You only have to provide +# replacements, missing definitions are set to their default value. # # See also section "Doxygen usage" for information on how to generate the # default style sheet that doxygen normally uses. @@ -1764,17 +1917,27 @@ RTF_STYLESHEET_FILE = # Set optional variables used in the generation of an RTF document. Syntax is -# similar to doxygen's config file. A template extensions file can be generated -# using doxygen -e rtf extensionFile. +# similar to doxygen's configuration file. A template extensions file can be +# generated using doxygen -e rtf extensionFile. # This tag requires that the tag GENERATE_RTF is set to YES. RTF_EXTENSIONS_FILE = +# If the RTF_SOURCE_CODE tag is set to YES then doxygen will include source code +# with syntax highlighting in the RTF output. +# +# Note that which sources are shown also depends on other settings such as +# SOURCE_BROWSER. +# The default value is: NO. +# This tag requires that the tag GENERATE_RTF is set to YES. + +RTF_SOURCE_CODE = NO + #--------------------------------------------------------------------------- # Configuration options related to the man page output #--------------------------------------------------------------------------- -# If the GENERATE_MAN tag is set to YES doxygen will generate man pages for +# If the GENERATE_MAN tag is set to YES, doxygen will generate man pages for # classes and files. # The default value is: NO. @@ -1818,7 +1981,7 @@ # Configuration options related to the XML output #--------------------------------------------------------------------------- -# If the GENERATE_XML tag is set to YES doxygen will generate an XML file that +# If the GENERATE_XML tag is set to YES, doxygen will generate an XML file that # captures the structure of the code including all documentation. # The default value is: NO. @@ -1832,7 +1995,7 @@ XML_OUTPUT = xml -# If the XML_PROGRAMLISTING tag is set to YES doxygen will dump the program +# If the XML_PROGRAMLISTING tag is set to YES, doxygen will dump the program # listings (including syntax highlighting and cross-referencing information) to # the XML output. Note that enabling this will significantly increase the size # of the XML output. @@ -1841,11 +2004,18 @@ XML_PROGRAMLISTING = YES +# If the XML_NS_MEMB_FILE_SCOPE tag is set to YES, doxygen will include +# namespace members in file scope as well, matching the HTML output. +# The default value is: NO. +# This tag requires that the tag GENERATE_XML is set to YES. + +XML_NS_MEMB_FILE_SCOPE = NO + #--------------------------------------------------------------------------- # Configuration options related to the DOCBOOK output #--------------------------------------------------------------------------- -# If the GENERATE_DOCBOOK tag is set to YES doxygen will generate Docbook files +# If the GENERATE_DOCBOOK tag is set to YES, doxygen will generate Docbook files # that can be used to generate PDF. # The default value is: NO. @@ -1859,7 +2029,7 @@ DOCBOOK_OUTPUT = docbook -# If the DOCBOOK_PROGRAMLISTING tag is set to YES doxygen will include the +# If the DOCBOOK_PROGRAMLISTING tag is set to YES, doxygen will include the # program listings (including syntax highlighting and cross-referencing # information) to the DOCBOOK output. Note that enabling this will significantly # increase the size of the DOCBOOK output. @@ -1872,10 +2042,10 @@ # Configuration options for the AutoGen Definitions output #--------------------------------------------------------------------------- -# If the GENERATE_AUTOGEN_DEF tag is set to YES doxygen will generate an AutoGen -# Definitions (see http://autogen.sf.net) file that captures the structure of -# the code including all documentation. Note that this feature is still -# experimental and incomplete at the moment. +# If the GENERATE_AUTOGEN_DEF tag is set to YES, doxygen will generate an +# AutoGen Definitions (see http://autogen.sourceforge.net/) file that captures +# the structure of the code including all documentation. Note that this feature +# is still experimental and incomplete at the moment. # The default value is: NO. GENERATE_AUTOGEN_DEF = NO @@ -1884,7 +2054,7 @@ # Configuration options related to the Perl module output #--------------------------------------------------------------------------- -# If the GENERATE_PERLMOD tag is set to YES doxygen will generate a Perl module +# If the GENERATE_PERLMOD tag is set to YES, doxygen will generate a Perl module # file that captures the structure of the code including all documentation. # # Note that this feature is still experimental and incomplete at the moment. @@ -1892,7 +2062,7 @@ GENERATE_PERLMOD = NO -# If the PERLMOD_LATEX tag is set to YES doxygen will generate the necessary +# If the PERLMOD_LATEX tag is set to YES, doxygen will generate the necessary # Makefile rules, Perl scripts and LaTeX code to be able to generate PDF and DVI # output from the Perl module output. # The default value is: NO. @@ -1900,9 +2070,9 @@ PERLMOD_LATEX = NO -# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be nicely +# If the PERLMOD_PRETTY tag is set to YES, the Perl module output will be nicely # formatted so it can be parsed by a human reader. This is useful if you want to -# understand what is going on. On the other hand, if this tag is set to NO the +# understand what is going on. On the other hand, if this tag is set to NO, the # size of the Perl module output will be much smaller and Perl will parse it # just the same. # The default value is: YES. @@ -1922,14 +2092,14 @@ # Configuration options related to the preprocessor #--------------------------------------------------------------------------- -# If the ENABLE_PREPROCESSING tag is set to YES doxygen will evaluate all +# If the ENABLE_PREPROCESSING tag is set to YES, doxygen will evaluate all # C-preprocessor directives found in the sources and include files. # The default value is: YES. ENABLE_PREPROCESSING = YES -# If the MACRO_EXPANSION tag is set to YES doxygen will expand all macro names -# in the source code. If set to NO only conditional compilation will be +# If the MACRO_EXPANSION tag is set to YES, doxygen will expand all macro names +# in the source code. If set to NO, only conditional compilation will be # performed. Macro expansion can be done in a controlled way by setting # EXPAND_ONLY_PREDEF to YES. # The default value is: NO. @@ -1945,7 +2115,7 @@ EXPAND_ONLY_PREDEF = NO -# If the SEARCH_INCLUDES tag is set to YES the includes files in the +# If the SEARCH_INCLUDES tag is set to YES, the include files in the # INCLUDE_PATH will be searched if a #include is found. # The default value is: YES. # This tag requires that the tag ENABLE_PREPROCESSING is set to YES. @@ -2021,37 +2191,32 @@ GENERATE_TAGFILE = -# If the ALLEXTERNALS tag is set to YES all external class will be listed in the -# class index. If set to NO only the inherited external classes will be listed. +# If the ALLEXTERNALS tag is set to YES, all external class will be listed in +# the class index. If set to NO, only the inherited external classes will be +# listed. # The default value is: NO. ALLEXTERNALS = NO -# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed in -# the modules index. If set to NO, only the current project's groups will be +# If the EXTERNAL_GROUPS tag is set to YES, all external groups will be listed +# in the modules index. If set to NO, only the current project's groups will be # listed. # The default value is: YES. EXTERNAL_GROUPS = YES -# If the EXTERNAL_PAGES tag is set to YES all external pages will be listed in +# If the EXTERNAL_PAGES tag is set to YES, all external pages will be listed in # the related pages index. If set to NO, only the current project's pages will # be listed. # The default value is: YES. EXTERNAL_PAGES = YES -# The PERL_PATH should be the absolute path and name of the perl script -# interpreter (i.e. the result of 'which perl'). -# The default file (with absolute path) is: /usr/bin/perl. - -PERL_PATH = /usr/bin/perl - #--------------------------------------------------------------------------- # Configuration options related to the dot tool #--------------------------------------------------------------------------- -# If the CLASS_DIAGRAMS tag is set to YES doxygen will generate a class diagram +# If the CLASS_DIAGRAMS tag is set to YES, doxygen will generate a class diagram # (in HTML and LaTeX) for classes with base or super classes. Setting the tag to # NO turns the diagrams off. Note that this option also works with HAVE_DOT # disabled, but it is recommended to install and use dot, since it yields more @@ -2060,15 +2225,6 @@ CLASS_DIAGRAMS = YES -# You can define message sequence charts within doxygen comments using the \msc -# command. Doxygen will then run the mscgen tool (see: -# http://www.mcternan.me.uk/mscgen/)) to produce the chart and insert it in the -# documentation. The MSCGEN_PATH tag allows you to specify the directory where -# the mscgen tool resides. If left empty the tool is assumed to be found in the -# default search path. - -MSCGEN_PATH = - # You can include diagrams made with dia in doxygen documentation. Doxygen will # then run dia to produce the diagram and insert it in the documentation. The # DIA_PATH tag allows you to specify the directory where the dia binary resides. @@ -2076,7 +2232,7 @@ DIA_PATH = -# If set to YES, the inheritance and collaboration graphs will hide inheritance +# If set to YES the inheritance and collaboration graphs will hide inheritance # and usage relations if the target is undocumented or is not a class. # The default value is: YES. @@ -2149,7 +2305,7 @@ GROUP_GRAPHS = YES -# If the UML_LOOK tag is set to YES doxygen will generate inheritance and +# If the UML_LOOK tag is set to YES, doxygen will generate inheritance and # collaboration diagrams in a style similar to the OMG's Unified Modeling # Language. # The default value is: NO. @@ -2201,7 +2357,8 @@ # # Note that enabling this option will significantly increase the time of a run. # So in most cases it will be better to enable call graphs for selected -# functions only using the \callgraph command. +# functions only using the \callgraph command. Disabling a call graph can be +# accomplished by means of the command \hidecallgraph. # The default value is: NO. # This tag requires that the tag HAVE_DOT is set to YES. @@ -2212,7 +2369,8 @@ # # Note that enabling this option will significantly increase the time of a run. # So in most cases it will be better to enable caller graphs for selected -# functions only using the \callergraph command. +# functions only using the \callergraph command. Disabling a caller graph can be +# accomplished by means of the command \hidecallergraph. # The default value is: NO. # This tag requires that the tag HAVE_DOT is set to YES. @@ -2235,13 +2393,17 @@ DIRECTORY_GRAPH = YES # The DOT_IMAGE_FORMAT tag can be used to set the image format of the images -# generated by dot. +# generated by dot. For an explanation of the image formats see the section +# output formats in the documentation of the dot tool (Graphviz (see: +# http://www.graphviz.org/)). # Note: If you choose svg you need to set HTML_FILE_EXTENSION to xhtml in order # to make the SVG files visible in IE 9+ (other browsers do not have this # requirement). # Possible values are: png, png:cairo, png:cairo:cairo, png:cairo:gd, png:gd, # png:gd:gd, jpg, jpg:cairo, jpg:cairo:gd, jpg:gd, jpg:gd:gd, gif, gif:cairo, -# gif:cairo:gd, gif:gd, gif:gd:gd and svg. +# gif:cairo:gd, gif:gd, gif:gd:gd, svg, png:gd, png:gd:gd, png:cairo, +# png:cairo:gd, png:cairo:cairo, png:cairo:gdiplus, png:gdiplus and +# png:gdiplus:gdiplus. # The default value is: png. # This tag requires that the tag HAVE_DOT is set to YES. @@ -2289,10 +2451,19 @@ # PlantUML is not used or called during a preprocessing step. Doxygen will # generate a warning when it encounters a \startuml command in this case and # will not generate output for the diagram. -# This tag requires that the tag HAVE_DOT is set to YES. PLANTUML_JAR_PATH = +# When using plantuml, the PLANTUML_CFG_FILE tag can be used to specify a +# configuration file for plantuml. + +PLANTUML_CFG_FILE = + +# When using plantuml, the specified paths are searched for files specified by +# the !include statement in a plantuml block. + +PLANTUML_INCLUDE_PATH = + # The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of nodes # that will be shown in the graph. If the number of nodes in a graph becomes # larger than this value, doxygen will truncate the graph, which is visualized @@ -2329,7 +2500,7 @@ DOT_TRANSPARENT = NO -# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output +# Set the DOT_MULTI_TARGETS tag to YES to allow dot to generate multiple output # files in one run (i.e. multiple -o and -T options on the command line). This # makes dot run faster, but since only newer versions of dot (>1.8.10) support # this, this feature is disabled by default. @@ -2346,7 +2517,7 @@ GENERATE_LEGEND = YES -# If the DOT_CLEANUP tag is set to YES doxygen will remove the intermediate dot +# If the DOT_CLEANUP tag is set to YES, doxygen will remove the intermediate dot # files that are used to generate the various graphs. # The default value is: YES. # This tag requires that the tag HAVE_DOT is set to YES. diff -Nru dcmtk-3.6.6/.gitignore dcmtk-3.6.7/.gitignore --- dcmtk-3.6.6/.gitignore 1970-01-01 00:00:00.000000000 +0000 +++ dcmtk-3.6.7/.gitignore 2022-04-28 13:47:25.000000000 +0000 @@ -0,0 +1,101 @@ +# Ignore all kinds of object and library files +*.o +*.so +*.a +build + +# Ignore all Makefiles except the top-level one +Makefile +!/Makefile + +# Files generated by various configure scripts +config.status +config.log +config/Makefile.def +config/include/dcmtk/config/arith.h +config/include/dcmtk/config/osconfig.h + +# Directories created by autoconf +config/autom4te.cache/ + +# Ignore all temporary and log files +*.tmp +*.log +*.*~ + +# Patch files +*.patch + +# HTML documentation +doxygen/htmldocs/ +doxygen/dcmtk.tag + +# Built binary files +*/tests/tests +config/arith +config/lzwtest.tif +dcmdata/apps/cda2dcm +dcmdata/apps/dcm2json +dcmdata/apps/dcm2pdf +dcmdata/apps/dcm2xml +dcmdata/apps/dcmconv +dcmdata/apps/dcmcrle +dcmdata/apps/dcmdrle +dcmdata/apps/dcmdump +dcmdata/apps/dcmftest +dcmdata/apps/dcmgpdir +dcmdata/apps/dcmodify +dcmdata/apps/dump2dcm +dcmdata/apps/img2dcm +dcmdata/apps/pdf2dcm +dcmdata/apps/stl2dcm +dcmdata/apps/xml2dcm +dcmdata/libsrc/mkdeftag +dcmdata/libsrc/mkdictbi +dcmimage/apps/dcm2pnm +dcmimage/apps/dcmicmp +dcmimage/apps/dcmquant +dcmimage/apps/dcmscale +dcmimgle/apps/dcmdspfn +dcmimgle/apps/dcod2lum +dcmimgle/apps/dconvlum +dcmjpeg/apps/dcmcjpeg +dcmjpeg/apps/dcmdjpeg +dcmjpeg/apps/dcmj2pnm +dcmjpeg/apps/dcmmkdir +dcmjpls/apps/dcmcjpls +dcmjpls/apps/dcmdjpls +dcmjpls/apps/dcml2pnm +dcmnet/apps/dcmrecv +dcmnet/apps/dcmsend +dcmnet/apps/echoscu +dcmnet/apps/findscu +dcmnet/apps/getscu +dcmnet/apps/movescu +dcmnet/apps/storescp +dcmnet/apps/storescu +dcmnet/apps/termscu +dcmpstat/apps/dcmmkcrv +dcmpstat/apps/dcmmklut +dcmpstat/apps/dcmp2pgm +dcmpstat/apps/dcmprscp +dcmpstat/apps/dcmprscu +dcmpstat/apps/dcmpschk +dcmpstat/apps/dcmpsmk +dcmpstat/apps/dcmpsprt +dcmpstat/apps/dcmpsrcv +dcmpstat/apps/dcmpssnd +dcmpstat/tests/msgserv +dcmqrdb/apps/dcmqridx +dcmqrdb/apps/dcmqrscp +dcmqrdb/apps/dcmqrti +dcmrt/apps/drtdump +dcmrt/tests/drttest +dcmsign/apps/dcmsign +dcmsr/apps/dsr2html +dcmsr/apps/dsr2xml +dcmsr/apps/dsrdump +dcmsr/apps/xml2dsr +dcmsr/tests/mkreport +dcmwlm/apps/wlmscpfs +dcmwlm/tests/wltest diff -Nru dcmtk-3.6.6/INSTALL dcmtk-3.6.7/INSTALL --- dcmtk-3.6.6/INSTALL 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/INSTALL 2022-04-28 13:47:25.000000000 +0000 @@ -1,3 +1,4 @@ +================================== DICOM TOOLKIT (DCMTK) INSTALLATION ================================== @@ -6,15 +7,13 @@ ============== The DICOM toolkit (DCMTK) needs to be compiled with a C++ compiler. We -recommend using the GNU C++ compiler in versions higher than 4.2.1 (most of the -development for this release was done using GNU C++ 6.3.0 on Debian Linux). -The software is also known to compile using the SUNPro C++ compiler, Clang and -Microsoft Visual Studio. +recommend using the GNU C++ compiler in versions higher than 4.8.5 (most of the +development for this release was done using GNU gcc 10.2.1 on Debian Linux and +GNU gcc 9.4.0 on Ubuntu Linux). The software is also known to compile using +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 Exceptions and -RTTI have been avoided and fall back implementations for all used STL classes -are provided). +keep language demands to a minimum. You will need several hundred Mbytes of disk space to compile all the software. @@ -33,26 +32,27 @@ Windows 7 / Intel x86 / Microsoft Visual C++ 2010 Express (VS 10) 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 / Microsoft Visual C++ 2019 Community (VS 16) + Windows 7 / Intel x86 / MinGW gcc 9.2.0 (i686-w64-mingw32) Windows 7 / amd64|x86_64 / Microsoft Visual C++ 2010 Express (VS 10) Windows 7 / amd64|x86_64 / Microsoft Visual C++ 2015 Community (VS 14) - Windows 10 / Intel x86 / Microsoft Visual C++ 2008 Express (VS 9) - Windows 10 / Intel x86 / Microsoft Visual C++ 2010 Express (VS 10) - Windows 10 / Intel x86 / Microsoft Visual C++ 2012 Express (VS 11) - Windows 10 / Intel x86 / Microsoft Visual C++ 2013 Express (VS 12) + Windows 7 / amd64|x86_64 / Microsoft Visual C++ 2017 Community (VS 15) + Windows 7 / amd64|x86_64 / Microsoft Visual C++ 2019 Community (VS 16) + Windows 7 / amd64|x86_64 / MinGW gcc 9.2.0 (x86_64-w64-mingw32) + Windows 7 / amd64|x86_64 / Cygwin GCC 7.4.0 (x86_64-pc-cygwin) Windows 10 / Intel x86 / Microsoft Visual C++ 2015 Community (VS 14) Windows 10 / Intel x86 / Microsoft Visual C++ 2017 Community (VS 15) Windows 10 / Intel x86 / Microsoft Visual C++ 2019 Community (VS 16) - Windows 10 / Intel x86 / MinGW gcc 9.2.0 (i686-w64-mingw32) - Windows 10 / Intel x86 / MinGW gcc 10.2.0 (i686-w64-mingw32) - Windows 10 / Intel x86 / MinGW Clang 10.0.1 (i686-w64-mingw32) - Windows 10 / amd64|x86_64 / Microsoft Visual C++ 2012 Express (VS 11) - Windows 10 / amd64|x86_64 / Microsoft Visual C++ 2013 Express (VS 12) + Windows 10 / Intel x86 / Microsoft Visual C++ 2022 Community (VS 17) + Windows 10 / Intel x86 / MinGW gcc 11.2.0 (i686-w64-mingw32) + Windows 10 / Intel x86 / MinGW Clang 13.0.0 (i686-w64-windows-gnu) Windows 10 / amd64|x86_64 / Microsoft Visual C++ 2015 Community (VS 14) Windows 10 / amd64|x86_64 / Microsoft Visual C++ 2017 Community (VS 15) Windows 10 / amd64|x86_64 / Microsoft Visual C++ 2019 Community (VS 16) - Windows 10 / amd64|x86_64 / MinGW gcc 9.2.0 (x86_64-w64-mingw32) - Windows 10 / amd64|x86_64 / MinGW gcc 10.2.0 (x86_64-w64-mingw32) - Windows 10 / amd64|x86_64 / MinGW Clang 10.0.1 (x86_64-w64-mingw32) + Windows 10 / amd64|x86_64 / Microsoft Visual C++ 2022 Community (VS 17) + Windows 10 / amd64|x86_64 / MinGW gcc 11.2.0 (x86_64-w64-mingw32) + Windows 10 / amd64|x86_64 / MinGW Clang 13.0.0 (x86_64-w64-windows-gnu) Unix (or lookalikes) -------------------- @@ -61,29 +61,60 @@ operating system / hardware / compiler combinations using the instructions given below: - FreeBSD 12.2 / amd64|x86_64 / Clang 10.0.1 - Linux 3.2.0 / amd64|x86_64 / GNU gcc 4.4.7 (Debian 7.11) + FreeBSD 13.0 / amd64|x86_64 / Clang 11.0.1 Linux 3.10.0 / amd64|x86_64 / Clang 3.4.2 (CentOS 7.9) Linux 3.10.0 / amd64|x86_64 / GNU gcc 4.8.5 (CentOS 7.9) + Linux 4.19.0 / amd64|x86_64 / Clang 7.0.1 (Debian 10) + Linux 4.19.0 / amd64|x86_64 / GNU 10.3.1 (Alpine 3.15.0 with musl libc) + Linux 4.19.0 / amd64|x86_64 / GNU gcc 8.3.0 (Debian 10) + Linux 4.19.0 / amd64|x86_64 / GNU gcc 8.3.0 (Debian 10) + Linux 5.10.0 / Intel x86 / Clang 11.0.1 (Debian 11) + Linux 5.10.0 / Intel x86 / GNU gcc 10.2.1 (Debian 11) + Linux 5.4.0 / amd64|x86_64 / Clang 10.0.0 (Ubuntu 20.04) + Linux 5.4.0 / amd64|x86_64 / Clang 9.0.1 (Ubuntu 20.04) + Linux 5.4.0 / amd64|x86_64 / GNU gcc 10.3.0 (Ubuntu 20.04) + Linux 5.4.0 / amd64|x86_64 / GNU gcc 9.3.0 (Ubuntu 20.04) + Linux 5.13.0 / amd64|x86_64 / Clang 13.0.0-2 (Ubuntu 21.10) + Linux 5.13.0 / amd64|x86_64 / GNU gcc 11.2.0 (Ubuntu 21.10) + MacOS X 10.15 / amd64|x86_64 / Apple Clang 11.0.0 + MacOS X 10.15 / amd64|x86_64 / GNU gcc 9.2.0 + NetBSD 9.0 / amd64|x86_64 / Clang 10.0.1 + NetBSD 9.0 / amd64|x86_64 / GNU gcc 7.5.0 + OpenBSD 7.0 / amd64|x86_64 / Clang 11.1.1 + OpenIndiana / amd64|x86_64 / GNU gcc 10.3.0 (OpenIndiana 2021.10) + +Cross Compiling +--------------- + +For target platforms other than Android, see section "CROSS COMPILING WITH CMAKE" +below. For Android, the current DCMTK release can be cross-compiled targeting +the following platform: + + Android / arm64 / GNU gcc 8.3.0 (API 24, ABI arm64-v8a) + +Cross compiling support with running configuration and unit tests is 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. + +Other Platforms +--------------- + +The previous minor release DCMTK 3.6.6 was also tested on the following +platforms that may still work, but were not tested again for this minor release: + + FreeBSD 12.2 / amd64|x86_64 / Clang 10.0.1 Linux 3.13.0 / amd64|x86_64 / Clang 3.9.1 (Linux Mint 17.3) Linux 3.13.0 / amd64|x86_64 / GNU gcc 4.8.5 (Linux Mint 17.3) Linux 3.13.0 / amd64|x86_64 / GNU gcc 5.5.0 (Linux Mint 17.3) Linux 3.13.0 / amd64|x86_64 / GNU gcc 6.5.0 (Linux Mint 17.3) Linux 3.13.0 / amd64|x86_64 / GNU gcc 7.5.0 (Linux Mint 17.3) Linux 3.13.0 / amd64|x86_64 / GNU gcc 8.4.0 (Linux Mint 17.3) + Linux 3.2.0 / amd64|x86_64 / GNU gcc 4.4.7 (Debian 7.11) Linux 4.19.0 / Intel x86 / Clang 7.0.1 (Debian 10) Linux 4.19.0 / Intel x86 / GNU gcc 8.3.0 (Debian 10) - Linux 4.19.0 / amd64|x86_64 / Clang 7.0.1 (Debian 10) - Linux 4.19.0 / amd64|x86_64 / GNU gcc 8.3.0 (Debian 10) Linux 4.19.41 / amd64|x86_64 / GNU 8.3.0 (Alpine 3.9.4 with musl libc) - Linux 5.4.0 / amd64|x86_64 / Clang 9.0.1 (Ubuntu 20.04) - Linux 5.4.0 / amd64|x86_64 / Clang 10.0.0 (Ubuntu 20.04) - Linux 5.4.0 / amd64|x86_64 / GNU gcc 9.3.0 (Ubuntu 20.04) - Linux 5.4.0 / amd64|x86_64 / GNU gcc 10.2.0 (Ubuntu 20.04) - Linux 5.8.0 / amd64|x86_64 / GNU gcc 10.2.0 (Ubuntu 20.10) - Linux 5.8.0 / amd64|x86_64 / Clang 11.0.0 (Ubuntu 20.10) - MacOS X 10.15 / amd64|x86_64 / Apple Clang 11.0.0 - MacOS X 10.15 / amd64|x86_64 / GNU gcc 9.2.0 NetBSD 9.0 / amd64|x86_64 / Clang 9.0.1 NetBSD 9.0 / amd64|x86_64 / GNU gcc 7.4.0 OpenBSD 6.8 / amd64|x86_64 / Clang 10.0.1 @@ -93,23 +124,14 @@ 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) - -Cross Compiling ---------------- - -The current DCMTK release can be cross-compiled targeting the following -platforms: - - Android / arm64 / GNU gcc 8.3.0 (API 24, ABI arm64-v8a) - -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. - -Other Platforms ---------------- + Windows 10 / Intel x86 / Microsoft Visual C++ 2008 Express (VS 9) + Windows 10 / Intel x86 / Microsoft Visual C++ 2010 Express (VS 10) + Windows 10 / Intel x86 / Microsoft Visual C++ 2012 Express (VS 11) + Windows 10 / Intel x86 / Microsoft Visual C++ 2013 Express (VS 12) + Windows 10 / Intel x86 / MinGW Clang 10.0.1 (i686-w64-mingw32) + Windows 10 / Intel x86 / MinGW gcc 10.2.0 (i686-w64-mingw32) + Windows 10 / amd64|x86_64 / Microsoft Visual C++ 2012 Express (VS 11) + Windows 10 / amd64|x86_64 / Microsoft Visual C++ 2013 Express (VS 12) The previous minor release DCMTK 3.6.5 was also tested on the following platforms that may still work, but were not tested again for this minor release: @@ -149,20 +171,6 @@ Windows 7 / amd64|x86_64 / CygWin 2.8.0 (gcc 6.3.0) OpenIndiana / Intel x86 / Clang 4.0.0 (OpenIndiana 2017.04) -The previous release DCMTK 3.6.2 was also tested on the following platforms -that may still work, but were not tested again for this minor release: - - QNX 6.5 / Intel x86 / GNU gcc 4.4.2 (see note *1) - 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) - Cross compilers: Windows 7 / Intel x86 / MinGW gcc 4.9.1 (Linux host) @@ -170,15 +178,8 @@ 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. - -Platform Notes --------------- - -(*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. +IRIX, NeXTStep, OSF/1, QNX, Solaris/SunOS, Ultrix. Also the Intel C++ Compiler +and other compilers might still work but we haven't tested them this time. OPENSSL SUPPORT @@ -194,14 +195,7 @@ recommended by RFC 7525 / BCP 195 are only available starting with this OpenSSL release. Furthermore, users should make care that the most recent OpenSSL patch level is applied. This release of DCMTK is known to compile with -the OpenSSL releases 1.0.1 to 1.1.1i. - -Note: DCMTK 3.6.6 is explicitly NOT approved for use with the upcoming -OpenSSL 3.0.0 library, which is currently in "alpha" status. OpenSSL 3.0 -will NOT work correctly with the dcmsign module, as it requires some additional -code to load the RIPEMD160 routines, which have been moved to the so-called -"legacy provider" that is not active by default; the required modifications -will be included in the next DCMTK release. +the OpenSSL releases 1.0.1 to 3.0.0. When using CMake, if support for security enhancements is desired, a compiled version of the OpenSSL libraries and include files must be available during @@ -210,6 +204,23 @@ standard paths on Unix platforms. For Windows platforms, check the discussion on CMake below. +Known Issues related to OpenSSL +------------------------------- + +The ABI of various DCMTK libraries changes when DCMTK is built with or without +OpenSSL. This may result in hard to locate bugs e.g. when using a command line +tool that depend on one of those libraries while mixing a non OpenSSL build +with an OpenSSL enabled build of DCMTK (for example when installing an OpenSSL +enabled DCMTK on top of a DCMTK installation without OpenSSL support). We have +introduced a CMake variable called "DCMTK_TLS_LIBRARY_POSTFIX" as a workaround. +If you plan on mixing OpenSSL and non OpenSSL enabled builds (or can't be sure +that your builds won't be mixed by somebody else), we suggest setting +"DCMTK_TLS_LIBRARY_POSTFIX" to some different string for the different builds +(e.g. an empty string for the non OpenSSL build and "-openssl" for the other). +This way, all affected libraries will be named including the chosen postfix, +effectively preventing the unintended mixing and, therefore, preventing the +bugs. + ZLIB SUPPORT ============ @@ -217,8 +228,8 @@ 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.8 to 1.2.11, although other releases may work as well. +compression routines. This release of DCMTK is known to compile with zlib +releases 1.2.11, although other releases may work as well. 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. @@ -229,11 +240,8 @@ 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.8.2 to -4.1.0, 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. +This release of DCMTK is known to compile with libtiff release 4.3.0, +although other releases may work as well. 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. @@ -244,8 +252,8 @@ 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.50 to 1.6.37, although other releases may work as well. +This release of DCMTK is known to compile with libpng release 1.6.37, +although other releases may work as well. When using CMake, a compiled version of the libpng libraries and include files must be available during compilation of DCMTK. See discussion on CMake @@ -257,8 +265,8 @@ 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.9.4 to 2.9.10, although other releases may work as well. +purpose. This release of DCMTK is known to compile with libxml2 release +2.9.12, although other releases may work as well. 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 @@ -310,7 +318,7 @@ 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 release 1.15, although other releases may work as +compile with the libiconv release 1.16, although other releases may work as well. When using CMake, a compiled version of the libiconv and libcharset libraries @@ -322,15 +330,14 @@ 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 59.1 to 68.1.0, although other releases may work -as well. +compile with ICU release 70.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 + ISO 2022 IR 87 (JIS X0208) + ISO 2022 IR 159 (JIS X0212) Furthermore, the ICU-based implementation currently does not support transliteration. @@ -433,8 +440,8 @@ CMake which will generate suitable build files for all of DCMTK's projects from these files. -DCMTK 3.6.6 requires CMake version 2.8.5 or later. We recommend using the -latest stable release of CMake (currently version 3.19.2) since newer versions +DCMTK 3.6.7 requires CMake version 2.8.8 or later. We recommend using the +latest stable release of CMake (currently version 3.22.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 @@ -488,17 +495,13 @@ 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. +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. Microsoft Windows with CMake ---------------------------- @@ -518,7 +521,7 @@ 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.6". + the DCMTK source code resides, e.g. "C:\dcmtk-3.6.7". 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-msvc15". 4. In the combobox "Build for:" or "Specify the generator for this project:" @@ -532,7 +535,7 @@ 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.9.7". The support of all other external libraries can + e.g. "C:\libxml2-2.9.12". The support of all other external libraries can be turned on in a similar way: libpng support: @@ -541,11 +544,11 @@ libtiff support: set "DCMTK_WITH_TIFF" to "ON" and - set "WITH_LIBTIFFINC" e.g. to "C:\libtiff-4.1.0" + set "WITH_LIBTIFFINC" e.g. to "C:\libtiff-4.3.0" OpenSSL support: set "DCMTK_WITH_OPENSSL" to "ON" and - set "WITH_OPENSSLINC" e.g. to "C:\openssl-1.1.1i" + set "WITH_OPENSSLINC" e.g. to "C:\openssl-1.1.1n" zlib support: set "DCMTK_WITH_ZLIB" to "ON" and @@ -613,10 +616,10 @@ libraries can be downloaded from https://www.dcmtk.org/dcmtk#lib-win. In the CMake GUI, there are a few more settings that can be modified - to affect the way DCMTK is compiled. The most important of these are: + to affect the way DCMTK is compiled. The most important of these are: - DCMTK_OVERWRITE_WIN32_COMPILER_FLAGS: By default, DCMTK will compile - using the default compiler options selected by CMake. When this macro + using the default compiler options selected by CMake. When this macro is enabled, these default options are modified based on the value of the DCMTK_COMPILE_WIN32_MULTITHREADED_DLL setting (see below). Default: ON. @@ -634,7 +637,7 @@ Default: OFF. - BUILD_SINGLE_SHARED_LIBRARY: Build a single shared library for the whole toolkit. This setting overrides the value of the option - BUILD_SHARED_LIBS, which is set to ON. Default: OFF. + BUILD_SHARED_LIBS, which is set to ON. Default: OFF. 7. Go "Configure" a second time. (CMake will adjust the configuration according to the displayed specifications.) @@ -659,19 +662,10 @@ Please note that other Windows compilers, e.g. Borland C++ Builder, are currently not actively supported. However, they may work. -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. 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 etc. - The new implementation uses etc. as defined in ANSI/ISO C++. - 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. +Known limitations of DCMTK on the Windows platform: +- The dcmqrscp tool cannot spark multiple processes. Every association must be + handled completely before a new association is possible. Unix with CMake --------------- @@ -692,41 +686,41 @@ 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-3.6.6-build - cd dcmtk-3.6.6-build - cmake ../dcmtk-3.6.6 + mkdir dcmtk-3.6.7-build + cd dcmtk-3.6.7-build + cmake ../dcmtk-3.6.7 make -j8 - make DESTDIR=../dcmtk-3.6.6-install install + make DESTDIR=../dcmtk-3.6.7-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.6. DCMTK will be +current working directory into a folder named dcmtk-3.6.7. DCMTK will be configured using CMake with the default options, detecting and including all available support libraries and then compiled using eight CPU cores ('make -j8', adjust as needed). The result will be installed to the directory -"dcmtk-3.6.6-install" next to the source code directory. +"dcmtk-3.6.7-install" next to the source code directory. If you want to modify your build configuration, like enabling or disabling some features of DCMTK (e.g. PNG support), or if you need to modify the -predefined build-variables, you can use the curses based cmake configuration +predefined build-variables, you can use the curses based CMake configuration tool 'ccmake'. First, create the initial build setup (system check) and then -call ccmake: +call 'ccmake': - mkdir dcmtk-3.6.6-build - cd dcmtk-3.6.6-build - cmake ../dcmtk-3.6.6 - ccmake ../dcmtk-3.6.6 + mkdir dcmtk-3.6.7-build + cd dcmtk-3.6.7-build + cmake ../dcmtk-3.6.7 + ccmake ../dcmtk-3.6.7 Now you can modify the configuration values. Please see the help on the bottom of the screen. When finished, press 'c' to generate a new build configuration, -then quit ccmake. Now you can continue to build by calling 'make' etc. +then quit 'ccmake'. Now you can continue to build by calling 'make' etc. If you already know the variable names, types and values to set, you can skip the 'ccmake' step above and can call 'cmake' directly with the values set. Example for a build with TCP wrapper disabled: - mkdir dcmtk-3.6.6-build - cd dcmtk-3.6.6-build - cmake -DDCMTK_WITH_WRAP:BOOL=FALSE ../dcmtk-3.6.6 + mkdir dcmtk-3.6.7-build + cd dcmtk-3.6.7-build + cmake -DDCMTK_WITH_WRAP:BOOL=FALSE ../dcmtk-3.6.7 ... The format is NAME:TYPE=VALUE. Use 'ccmake' to find out the variable names and @@ -738,8 +732,9 @@ Default: OFF. - CMAKE_BUILD_TYPE: Debug or Release build, default: Release. - CMAKE_INSTALL_PREFIX: Installation prefix, default: /usr/local. - - DCMTK_ENABLE_BUILTIN_DICTIONARY: Activate the built-in DICOM data - dictionary? Default: ON on Windows, OFF on Linux/Posix. + - DCMTK_DEFAULT_DICT: Activate the builtin, external or no DICOM data + dictionary on DCMTK startup? Default: builtin on Windows, external on + Linux/Posix. - DCMTK_ENABLE_CXX11: Assume the compiler is C++11 compliant. Default: OFF. - DCMTK_ENABLE_STL: Replace DCMTK's OFString, OFList, OFVector etc. by the STL classes std::string, std::list, std::vector etc. Default: OFF. @@ -753,7 +748,7 @@ 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.6" or "doxygen" directory; Windows and other CMake users should +"dcmtk-3.6.7" 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 @@ -826,16 +821,79 @@ For more information, call this program with the --help option. +CROSS COMPILING WITH CMAKE +========================== + +The main challenge when cross-compiling DCMTK is that some of the feature tests +performed by CMake require certain small test programs to be compiled and run, +which does not work in a cross-compilation setting. Starting with DCMTK 3.6.7, +basic support for cross-compilation has been added. This can be enabled by +setting the CMake variable "DCMTK_NO_TRY_RUN": + + cmake -DDCMTK_NO_TRY_RUN:BOOL=TRUE + +In this case, CMake expects all test results that are normally achieved by +executing certain test programs to be provided by the user on the command line. +In detail, these are the variables that need to be provided: + + The following variables are only used when compiling with libiconv support + and can otherwise be set to default values: + - DCMTK_ICONV_FLAGS_ANALYZED: should always be set to TRUE + - DCMTK_FIXED_ICONV_CONVERSION_FLAGS: The output printed by the test program + config/tests/iconv.cc, when run on the target platform. This value is only + used when compiling with old libiconv versions (older than libiconv 1.8) + and determines the iconv behaviour when encountering illegal byte sequences + during a character set conversion. Possible values are: + - "AbortTranscodingOnIllegalSequence" (use as default) + - "DiscardIllegalSequences" + - DCMTK_STDLIBC_ICONV_HAS_DEFAULT_ENCODING: true if the test program + config/tests/lciconv.cc exits with a return code of zero, false otherwise. + This test determines if libiconv has a default encoding, i.e. if + iconv_open() accepts "" as an argument. Use FALSE as default. + + The following variables are only used when compiling with DCMTK_ENABLE_STL + and can otherwise be set to 0: + - HAVE_STL_VECTOR_TEST_RESULT: 1 if the platform provides a working + implementation, 0 otherwise + - HAVE_STL_ALGORITHM_TEST_RESULT: 1 if the platform provides a working + implementation, 0 otherwise + - HAVE_STL_LIMITS_TEST_RESULT: 1 if the platform provides a working + implementation, 0 otherwise + - HAVE_STL_LIST_TEST_RESULT: 1 if the platform provides a working + implementation, 0 otherwise + - HAVE_STL_MAP_TEST_RESULT: 1 if the platform provides a working + implementation, 0 otherwise + - HAVE_STL_MEMORY_TEST_RESULT: 1 if the platform provides a working + implementation, 0 otherwise + - HAVE_STL_STACK_TEST_RESULT: 1 if the platform provides a working + implementation, 0 otherwise + - HAVE_STL_STRING_TEST_RESULT: 1 if the platform provides a working + implementation, 0 otherwise + - HAVE_STL_TYPE_TRAITS_TEST_RESULT: 1 if the platform provides a working + implementation, 0 otherwise + - HAVE_STL_TUPLE_TEST_RESULT: 1 if the platform provides a working + implementation, 0 otherwise + - HAVE_STL_SYSTEM_ERROR_TEST_RESULT: 1 if the platform provides a working + implementation, 0 otherwise + + Furthermore, the file "arith.h" must be generated and copied to + config/include/dcmtk/config/arith.h in the **build** directory. + This file can be generated by compiling config/tests/arith.cc + and running the executable on the target platform. + +For further information on cross-compiling DCMTK, see: +https://support.dcmtk.org/redmine/projects/dcmtk/wiki/Cross_Compiling + + BUILDING (Unix with Autoconf) ============================= -Configuring a DCMTK build with GNU Autoconf has been deprecated with DCMTK -release 3.6.6 and will be removed in future releases. In the current release, -the "configure" script in DCMTK's top-level main directory has been removed -as the final warning for users of the Autoconf toolchain. If you prefer to -build DCMTK with Autoconf, however, this is still possible. Perform the -following steps from the top-level (dcmtk-3.6.6) directory to compile and -install the software: +Configuring a DCMTK build with GNU Autoconf has been deprecated and will be +removed in future releases. In the current release, the "configure" script in +DCMTK's top-level main directory has been removed as the final warning for users +of the Autoconf toolchain. If you prefer to build DCMTK with Autoconf, however, +this is still possible. Perform the following steps from the top-level +(dcmtk-3.6.7) directory to compile and install the software: Step 0: cd config @@ -865,15 +923,15 @@ 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.1.1i", then you should start configure +installed in "/usr/local/apps/openssl-1.1.1n", then you should start configure as: ./configure --ignore-deprecation - --with-opensslinc=/usr/local/apps/openssl-1.1.1i + --with-opensslinc=/usr/local/apps/openssl-1.1.1n Configure will assume that the OpenSSL include files are installed in -"/usr/local/apps/openssl-1.1.1i/include" and will expect the library in -"/usr/local/apps/openssl-1.1.1i/lib". Appropriate options will be passed to +"/usr/local/apps/openssl-1.1.1n/include" and will expect the library in +"/usr/local/apps/openssl-1.1.1n/lib". Appropriate options will be passed to the compiler and the linker. Support for zlib, libtiff, libpng, libxml2, libwrap and libiconv can be enabled @@ -882,13 +940,13 @@ ./configure --ignore-deprecation --with-libzlibinc=/usr/local/apps/zlib-1.2.11 - --with-libtiffinc=/usr/local/apps/libtiff-4.1.0 + --with-libtiffinc=/usr/local/apps/libtiff-4.0.10 --with-libpnginc=/usr/local/apps/libpng-1.6.37 - --with-libxmlinc=/usr/local/apps/libxml2-2.9.10 + --with-libxmlinc=/usr/local/apps/libxml2-2.9.9 --with-libwrapinc=/usr/local/apps/tcp_wrappers-7.6 - --with-libiconvinc=/usr/local/apps/libiconv-1.16 + --with-libiconvinc=/usr/local/apps/libiconv-1.15 - --with-libicuinc=/usr/local/apps/icu-68.1.0 + --with-libicuinc=/usr/local/apps/icu-65.1 Different configure options can be combined in any order. configure --help will print a list of all existing configure options. configure --help=short @@ -901,14 +959,11 @@ --disable-threads compile without MT support --enable-lfs=TYPE compile with LFS support (lfs/lfs64/auto=default) --disable-lfs compile without LFS support - --enable-std-includes use C++ ANSI standard includes - --disable-std-includes use old C++ includes + --enable-default-dict=TYPE enable default dictionary and specify type + (external=default/builtin) + --disable-default-dict disable default dictionary --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) @@ -954,8 +1009,8 @@ This generates a new Makefile and configure script in the top-level toolkit directory. -Solving configuration and compilation problems with Autoconf ------------------------------------------------------------- +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 @@ -985,7 +1040,7 @@ Have fun. -M. Eichelberg, J. Riesmeier, M. Onken, J. Schlamelcher, P. Arizpe Gomez +M. Eichelberg, J. Riesmeier, M. Onken, J. Schlamelcher DCMTK Development Team, Oldenburg, Germany. -Last revised: 2021-01-14 (Onken) +Last revised: 2022-04-07 (Onken) diff -Nru dcmtk-3.6.6/oflog/include/dcmtk/oflog/config.h dcmtk-3.6.7/oflog/include/dcmtk/oflog/config.h --- dcmtk-3.6.6/oflog/include/dcmtk/oflog/config.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/oflog/include/dcmtk/oflog/config.h 2022-04-28 13:47:25.000000000 +0000 @@ -28,6 +28,8 @@ #include "dcmtk/ofstd/ofdefine.h" /* We need DCMTK_DECL_EXPORT/_IMPORT */ +#include "dcmtk/ofstd/ofstdinc.h" + #ifdef oflog_EXPORTS # define DCMTK_INSIDE_LOG4CPLUS #endif diff -Nru dcmtk-3.6.6/oflog/include/dcmtk/oflog/helpers/strhelp.h dcmtk-3.6.7/oflog/include/dcmtk/oflog/helpers/strhelp.h --- dcmtk-3.6.6/oflog/include/dcmtk/oflog/helpers/strhelp.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/oflog/include/dcmtk/oflog/helpers/strhelp.h 2022-04-28 13:47:25.000000000 +0000 @@ -42,13 +42,15 @@ namespace helpers { /** - * Returns s in upper case. + * @param s the value to be converted into uppercase + * @returns s in upper case. */ DCMTK_LOG4CPLUS_EXPORT log4cplus::tstring toUpper(const log4cplus::tstring& s); /** - * Returns s in lower case. + * @param s the value to be converted into lowercase + * @returns s in upper case. */ DCMTK_LOG4CPLUS_EXPORT log4cplus::tstring toLower(const log4cplus::tstring& s); @@ -65,6 +67,11 @@ * list tokens; * tokenize(s, '.', back_insert_iterator >(tokens)); * + * @param s the string to be tokenized + * @param c the delimiter to be used to tokenized + * @param result the resulting tokens + * @param collapseTokens when false, multiple adjacent delimiters + * will result in zero length tokens. */ template inline @@ -103,9 +110,6 @@ // integer overflow of an signed type is undefined behavior :( // This code is based upon http://www.fefe.de/intof.html - // True if intType is unsigned - const OFBool isUnsigned = (OFstatic_cast(intType, -1) < 0) ? OFFalse : OFTrue; - // If intType is a signed type, halfMaxSigned is intType_MAX / 2 const intType halfMaxSigned = OFstatic_cast(intType, 1) << (sizeof(intType) * 8 - 2); @@ -116,7 +120,7 @@ const intType minSigned = OFstatic_cast(intType, -1) - maxSigned; // This is the minimum value that intType can represent; - const intType minVal = isUnsigned ? 0 : minSigned; + const intType minVal = (OFstatic_cast(intType, -1) < 0) ? minSigned : 0; //if (value == (STD_NAMESPACE numeric_limits::min) ()) if (value == minVal) diff -Nru dcmtk-3.6.6/oflog/include/dcmtk/oflog/spi/filter.h dcmtk-3.6.7/oflog/include/dcmtk/oflog/spi/filter.h --- dcmtk-3.6.6/oflog/include/dcmtk/oflog/spi/filter.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/oflog/include/dcmtk/oflog/spi/filter.h 2022-04-28 13:47:25.000000000 +0000 @@ -19,7 +19,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -/** @file +/** @file * This header defines Filter and all of it's subclasses. */ #ifndef DCMTK_LOG4CPLUS_SPI_FILTER_HEADER_ @@ -48,15 +48,16 @@ namespace spi { - enum FilterResult { DENY, /**< The log event must be dropped immediately - * without consulting with the remaining + /*! The possible results a filter can give */ + enum FilterResult { DENY, /*!< The log event must be dropped immediately + * without consulting with the remaining * filters, if any, in the chain. */ - NEUTRAL, /**< This filter is neutral with respect to - * the log event; the remaining filters, if - * if any, should be consulted for a final + NEUTRAL, /*!< This filter is neutral with respect to + * the log event; the remaining filters, if + * if any, should be consulted for a final * decision. */ - ACCEPT /**< The log event must be logged immediately - * without consulting with the remaining + ACCEPT /*!< The log event must be logged immediately + * without consulting with the remaining * filters, if any, in the chain. */ }; @@ -65,12 +66,12 @@ class InternalLoggingEvent; - /** - * This method is used to filter an InternalLoggingEvent. - * - * Note: filter can be NULL. + /** This method is used to filter an InternalLoggingEvent. + * @param filter the filter to be applied to the event + * @param event the event where the filter is applied on + * @remark filter can be NULL. */ - DCMTK_LOG4CPLUS_EXPORT FilterResult checkFilter(const Filter* filter, + DCMTK_LOG4CPLUS_EXPORT FilterResult checkFilter(const Filter* filter, const InternalLoggingEvent& event); typedef helpers::SharedObjectPtr FilterPtr; @@ -79,7 +80,7 @@ /** * Users should extend this class to implement customized logging * event filtering. Note that the {@link Logger} and {@link - * Appender} classes have built-in filtering rules. It is suggested + * Appender} classes have built-in filtering rules. It is suggested * that you first use and understand the built-in rules before rushing * to write your own custom filters. * @@ -90,7 +91,7 @@ * * If the value {@link #DENY} is returned, then the log event is * dropped immediately without consulting with the remaining - * filters. + * filters. * * If the value {@link #NEUTRAL} is returned, then the next filter * in the chain is consulted. If there are no more filters in the @@ -98,13 +99,13 @@ * filters, the default behaviour is to log all logging events. * * If the value {@link #ACCEPT} is returned, then the log - * event is logged without consulting the remaining filters. + * event is logged without consulting the remaining filters. * * The philosophy of log4cplus filters is largely inspired from the - * Linux ipchains. + * Linux ipchains. */ - class DCMTK_LOG4CPLUS_EXPORT Filter - : public virtual log4cplus::helpers::SharedObject + class DCMTK_LOG4CPLUS_EXPORT Filter + : public virtual log4cplus::helpers::SharedObject { public: // ctor and dtor @@ -117,7 +118,7 @@ */ void appendFilter(FilterPtr filter); - /** + /** * If the decision is DENY, then the event will be * dropped. If the decision is NEUTRAL, then the next * filter, if any, will be invoked. If the decision is ACCEPT then @@ -125,7 +126,7 @@ * the chain. * * @param event The LoggingEvent to decide upon. - * @return The decision of the filter. + * @return The decision of the filter. */ virtual FilterResult decide(const InternalLoggingEvent& event) const = 0; @@ -135,7 +136,7 @@ */ FilterPtr next; }; - + /** @@ -152,7 +153,7 @@ DenyAllFilter (const log4cplus::helpers::Properties&); /** - * Always returns the {@link #DENY} regardless of the + * Always returns the {@link #DENY} regardless of the * {@link InternalLoggingEvent} parameter. */ virtual FilterResult decide(const InternalLoggingEvent& event) const; @@ -165,7 +166,7 @@ * The filter admits two options LogLevelToMatch and * AcceptOnMatch. If there is an exact match between the value * of the LogLevelToMatch option and the LogLevel of the {@link - * spi::InternalLoggingEvent}, then the {@link #decide} method returns + * spi::InternalLoggingEvent}, then the {@link #decide} method returns * {@link #ACCEPT} in case the AcceptOnMatch option value is set * to true, if it is false then {@link #DENY} * is returned. If there is no match, {@link #NEUTRAL} is returned. @@ -181,7 +182,7 @@ * Returns {@link #NEUTRAL} if the LogLevelToMatch * option is not set or if there is no match. Otherwise, if * there is a match, then the returned decision is {@link #ACCEPT} - * if the AcceptOnMatch property is set to true. + * if the AcceptOnMatch property is set to true. * The returned decision is {@link #DENY} if the AcceptOnMatch * property is set to false. */ @@ -256,7 +257,7 @@ * StringToMatch option and the message of the Logging event, * then the {@link #decide} method returns {@link #ACCEPT} if * the AcceptOnMatch option value is true, if it is false then - * {@link #DENY} is returned. If there is no match, {@link #NEUTRAL} + * {@link #DENY} is returned. If there is no match, {@link #NEUTRAL} * is returned. */ class DCMTK_LOG4CPLUS_EXPORT StringMatchFilter : public Filter { diff -Nru dcmtk-3.6.6/oflog/include/dcmtk/oflog/syslogap.h dcmtk-3.6.7/oflog/include/dcmtk/oflog/syslogap.h --- dcmtk-3.6.6/oflog/include/dcmtk/oflog/syslogap.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/oflog/include/dcmtk/oflog/syslogap.h 2022-04-28 13:47:25.000000000 +0000 @@ -67,6 +67,7 @@ * \note Messages sent to remote syslog using UDP are conforming * to RFC5424. */ + class DCMTK_LOG4CPLUS_EXPORT SysLogAppender : public Appender { public: // Ctors @@ -93,12 +94,13 @@ // Data tstring ident; - int facility; typedef void (SysLogAppender:: * AppendFuncType) ( const spi::InternalLoggingEvent&); AppendFuncType appendFunc; + int facility; + tstring host; int port; helpers::Socket syslogSocket; diff -Nru dcmtk-3.6.6/oflog/include/dcmtk/oflog/thread/impl/syncwin.h dcmtk-3.6.7/oflog/include/dcmtk/oflog/thread/impl/syncwin.h --- dcmtk-3.6.6/oflog/include/dcmtk/oflog/thread/impl/syncwin.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/oflog/include/dcmtk/oflog/thread/impl/syncwin.h 2022-04-28 13:47:25.000000000 +0000 @@ -30,6 +30,7 @@ #include +#include "dcmtk/ofstd/ofdiag.h" namespace dcmtk { namespace log4cplus { namespace thread { namespace impl { @@ -240,6 +241,8 @@ DCMTK_LOG4CPLUS_THROW_RTE ("ManualResetEvent::wait"); } +#include DCMTK_DIAGNOSTIC_PUSH +#include DCMTK_DIAGNOSTIC_IGNORE_UNREACHABLE_CODE_WARNING inline bool @@ -256,12 +259,16 @@ default: DCMTK_LOG4CPLUS_THROW_RTE ("ManualResetEvent::timed_wait"); - // Silence warnings about not returning any value from function - // returning bool. + /* Without the following line, MSVC warns that not all code paths return a value. + * With the following line, MSVC warns about unreachable code. Great. + * We keep the line in the code and suppress the unreachable code warning using a pragma. + */ return false; } } +#include DCMTK_DIAGNOSTIC_POP + inline void diff -Nru dcmtk-3.6.6/oflog/include/dcmtk/oflog/thread/syncpub.h dcmtk-3.6.7/oflog/include/dcmtk/oflog/thread/syncpub.h --- dcmtk-3.6.6/oflog/include/dcmtk/oflog/thread/syncpub.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/oflog/include/dcmtk/oflog/thread/syncpub.h 2022-04-28 13:47:25.000000000 +0000 @@ -1,16 +1,16 @@ // -*- C++ -*- // Copyright (C) 2010, Vaclav Haisman. All rights reserved. -// +// // Redistribution and use in source and binary forms, with or without modifica- // tion, 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. -// +// // THIS SOFTWARE IS PROVIDED ``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 @@ -63,7 +63,7 @@ DCMTK_LOG4CPLUS_INLINE_EXPORT Mutex::Mutex (Mutex::Type t) - : mtx (DCMTK_LOG4CPLUS_THREADED (new impl::Mutex (t)) + 0) + : mtx (DCMTK_LOG4CPLUS_THREADED (new impl::Mutex (t) + 0)) { } @@ -106,7 +106,7 @@ DCMTK_LOG4CPLUS_INLINE_EXPORT Semaphore::Semaphore (unsigned DCMTK_LOG4CPLUS_THREADED (max), unsigned DCMTK_LOG4CPLUS_THREADED (initial)) - : sem (DCMTK_LOG4CPLUS_THREADED (new impl::Semaphore (max, initial)) + 0) + : sem (DCMTK_LOG4CPLUS_THREADED (new impl::Semaphore (max, initial) + 0)) { } @@ -148,7 +148,7 @@ DCMTK_LOG4CPLUS_INLINE_EXPORT FairMutex::FairMutex () - : mtx (DCMTK_LOG4CPLUS_THREADED (new impl::FairMutex) + 0) + : mtx (DCMTK_LOG4CPLUS_THREADED (new impl::FairMutex+ 0 )) { } @@ -190,7 +190,7 @@ DCMTK_LOG4CPLUS_INLINE_EXPORT ManualResetEvent::ManualResetEvent (bool DCMTK_LOG4CPLUS_THREADED (sig)) - : ev (DCMTK_LOG4CPLUS_THREADED (new impl::ManualResetEvent (sig)) + 0) + : ev (DCMTK_LOG4CPLUS_THREADED (new impl::ManualResetEvent (sig) + 0)) { } @@ -252,7 +252,7 @@ DCMTK_LOG4CPLUS_INLINE_EXPORT SharedMutex::SharedMutex () - : sm (DCMTK_LOG4CPLUS_THREADED (new impl::SharedMutex) + 0) + : sm (DCMTK_LOG4CPLUS_THREADED (new impl::SharedMutex + 0)) { } @@ -293,7 +293,7 @@ } -} } // namespace log4cplus { namespace thread { +} } // namespace log4cplus { namespace thread { } // end namespace dcmtk #endif // DCMTK_LOG4CPLUS_ENABLE_SYNCPRIMS_PUB_IMPL diff -Nru dcmtk-3.6.6/oflog/libsrc/CMakeLists.txt dcmtk-3.6.7/oflog/libsrc/CMakeLists.txt --- dcmtk-3.6.6/oflog/libsrc/CMakeLists.txt 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/oflog/libsrc/CMakeLists.txt 2022-04-28 13:47:25.000000000 +0000 @@ -2,11 +2,63 @@ if(WIN32 AND NOT CYGWIN) # clfs needs extra libraries and thus is ignored here - set(OFLOG_PLATFORM_LIBRARIES winsock windebap winconap) + set(OFLOG_PLATFORM_LIBRARIES winsock.cc windebap.cc winconap.cc) else() - set(OFLOG_PLATFORM_LIBRARIES unixsock) + set(OFLOG_PLATFORM_LIBRARIES unixsock.cc) endif() -DCMTK_ADD_LIBRARY(oflog oflog apndimpl appender config consap factory fileap filter globinit hierarchy hierlock layout logger logimpl logevent loglevel loglog lloguser ndc ntelogap nullap objreg patlay pointer property rootlog sleep socketap sockbuff socket strhelp syncprims syslogap threads timehelp clogger env fileinfo lockfile mdc queue snprintf tls version log4judp logmacro asyncap cygwin32 striconv strcloc strccloc ${OFLOG_PLATFORM_LIBRARIES}) +DCMTK_ADD_LIBRARY(oflog + apndimpl.cc + appender.cc + asyncap.cc + clogger.cc + config.cc + consap.cc + cygwin32.cc + env.cc + factory.cc + fileap.cc + fileinfo.cc + filter.cc + globinit.cc + hierarchy.cc + hierlock.cc + layout.cc + lloguser.cc + lockfile.cc + log4judp.cc + logevent.cc + logger.cc + logimpl.cc + loglevel.cc + loglog.cc + logmacro.cc + mdc.cc + ndc.cc + ntelogap.cc + nullap.cc + objreg.cc + oflog.cc + patlay.cc + pointer.cc + property.cc + queue.cc + rootlog.cc + sleep.cc + snprintf.cc + sockbuff.cc + socket.cc + socketap.cc + strccloc.cc + strcloc.cc + strhelp.cc + striconv.cc + syncprims.cc + syslogap.cc + threads.cc + timehelp.cc + tls.cc + version.cc + ${OFLOG_PLATFORM_LIBRARIES}) DCMTK_TARGET_LINK_MODULES(oflog ofstd) diff -Nru dcmtk-3.6.6/oflog/libsrc/globinit.cc dcmtk-3.6.7/oflog/libsrc/globinit.cc --- dcmtk-3.6.6/oflog/libsrc/globinit.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/oflog/libsrc/globinit.cc 2022-04-28 13:47:25.000000000 +0000 @@ -352,8 +352,7 @@ threadCleanup(); } -#endif - +#else //! Thread local storage clean up function for POSIX threads. static @@ -401,6 +400,8 @@ threadCleanup (); } +#endif + static void diff -Nru dcmtk-3.6.6/oflog/libsrc/hierlock.cc dcmtk-3.6.7/oflog/libsrc/hierlock.cc --- dcmtk-3.6.6/oflog/libsrc/hierlock.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/oflog/libsrc/hierlock.cc 2022-04-28 13:47:25.000000000 +0000 @@ -44,7 +44,7 @@ h.initializeLoggerList(loggerList); // Lock all of the Hierarchy's Loggers' mutexs - LoggerList::iterator it; + LoggerList::iterator it = loggerList.begin();; try { for (it = loggerList.begin(); it != loggerList.end(); ++it) diff -Nru dcmtk-3.6.6/oflog/libsrc/lockfile.cc dcmtk-3.6.7/oflog/libsrc/lockfile.cc --- dcmtk-3.6.6/oflog/libsrc/lockfile.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/oflog/libsrc/lockfile.cc 2022-04-28 13:47:25.000000000 +0000 @@ -284,20 +284,19 @@ void LockFile::unlock () const { - LogLog & loglog = getLogLog (); - int ret = 0; - #if defined (DCMTK_LOG4CPLUS_USE_WIN32_LOCKFILEEX) + LogLog & loglog = getLogLog (); HANDLE fh = get_os_HANDLE (data->fd, loglog); - ret = UnlockFile(fh, 0, 0, (STD_NAMESPACE numeric_limits::max) (), + int ret = UnlockFile(fh, 0, 0, (STD_NAMESPACE numeric_limits::max) (), (STD_NAMESPACE numeric_limits::max) ()); if (! ret) loglog.error (tstring (DCMTK_LOG4CPLUS_TEXT ("UnlockFile() failed: ")) + convertIntegerToString (GetLastError ()), true); #elif defined (DCMTK_LOG4CPLUS_USE_WIN32_LOCKING) - ret = _locking (data->fd, _LK_UNLCK, (STD_NAMESPACE numeric_limits::max) ()); + LogLog & loglog = getLogLog (); + int ret = _locking (data->fd, _LK_UNLCK, (STD_NAMESPACE numeric_limits::max) ()); if (ret != 0) loglog.error (tstring (DCMTK_LOG4CPLUS_TEXT ("_locking() failed: ")) + convertIntegerToString (errno), true); @@ -306,24 +305,27 @@ close (); #elif defined (DCMTK_LOG4CPLUS_USE_SETLKW) + LogLog & loglog = getLogLog (); struct flock fl; fl.l_type = F_UNLCK; fl.l_whence = SEEK_SET; fl.l_start = 0; fl.l_len = 0; - ret = fcntl (data->fd, F_SETLKW, &fl); + int ret = fcntl (data->fd, F_SETLKW, &fl); if (ret != 0) loglog.error (tstring (DCMTK_LOG4CPLUS_TEXT("fcntl(F_SETLKW) failed: ")) + convertIntegerToString (errno), true); #elif defined (DCMTK_LOG4CPLUS_USE_LOCKF) - ret = lockf (data->fd, F_ULOCK, 0); + LogLog & loglog = getLogLog (); + int ret = lockf (data->fd, F_ULOCK, 0); if (ret != 0) loglog.error (tstring (DCMTK_LOG4CPLUS_TEXT("lockf() failed: ")) + convertIntegerToString (errno), true); #elif defined (DCMTK_LOG4CPLUS_USE_FLOCK) - ret = flock (data->fd, LOCK_UN); + LogLog & loglog = getLogLog (); + int ret = flock (data->fd, LOCK_UN); if (ret != 0) loglog.error (tstring (DCMTK_LOG4CPLUS_TEXT("flock() failed: ")) + convertIntegerToString (errno), true); diff -Nru dcmtk-3.6.6/oflog/libsrc/snprintf.cc dcmtk-3.6.7/oflog/libsrc/snprintf.cc --- dcmtk-3.6.6/oflog/libsrc/snprintf.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/oflog/libsrc/snprintf.cc 2022-04-28 13:47:25.000000000 +0000 @@ -46,12 +46,15 @@ size_t const START_BUF_SIZE = 512; +#if defined (DCMTK_LOG4CPLUS_USE_POOR_MANS_SNPRINTF) + #if defined (_WIN32) char const NULL_FILE[] = "NUL"; #else char const NULL_FILE[] = "/dev/null"; #endif +#endif namespace { diff -Nru dcmtk-3.6.6/oflog/libsrc/syslogap.cc dcmtk-3.6.7/oflog/libsrc/syslogap.cc --- dcmtk-3.6.6/oflog/libsrc/syslogap.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/oflog/libsrc/syslogap.cc 2022-04-28 13:47:25.000000000 +0000 @@ -219,8 +219,8 @@ SysLogAppender::SysLogAppender(const tstring& id) : ident(id) - , facility (0) , appendFunc (&SysLogAppender::appendLocal) + , facility (0) , host () , port (0) , syslogSocket () @@ -239,8 +239,8 @@ SysLogAppender::SysLogAppender(const helpers::Properties & properties) : Appender(properties) , ident () - , facility (0) , appendFunc (0) + , facility (0) , host () , port (0) , syslogSocket () @@ -281,8 +281,8 @@ SysLogAppender::SysLogAppender(const tstring& id, const tstring & h, int p, const tstring & f) : ident (id) - , facility (parseFacility (helpers::toLower (f))) , appendFunc (&SysLogAppender::appendRemote) + , facility (parseFacility (helpers::toLower (f))) , host (h) , port (p) , syslogSocket (host, OFstatic_cast(unsigned short, port), true) diff -Nru dcmtk-3.6.6/ofstd/include/dcmtk/ofstd/diag/asincond.def dcmtk-3.6.7/ofstd/include/dcmtk/ofstd/diag/asincond.def --- dcmtk-3.6.6/ofstd/include/dcmtk/ofstd/diag/asincond.def 1970-01-01 00:00:00.000000000 +0000 +++ dcmtk-3.6.7/ofstd/include/dcmtk/ofstd/diag/asincond.def 2022-04-28 13:47:25.000000000 +0000 @@ -0,0 +1,4 @@ +// Clang and GCC don't seem to have such a warning +#ifdef _MSC_VER +#pragma warning(disable: 4706) +#endif diff -Nru dcmtk-3.6.6/ofstd/include/dcmtk/ofstd/diag/cnvrsn.def dcmtk-3.6.7/ofstd/include/dcmtk/ofstd/diag/cnvrsn.def --- dcmtk-3.6.6/ofstd/include/dcmtk/ofstd/diag/cnvrsn.def 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/ofstd/include/dcmtk/ofstd/diag/cnvrsn.def 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,7 @@ #if defined(__clang__) #pragma clang diagnostic ignored "-Wconversion" -#elif DCMTK_DIAGNOSTIC_MIN_GCC_VERSION(4,6,0) +/* The next line is equivalent to #elif DCMTK_DIAGNOSTIC_MIN_GCC_VERSION(4,6,0) */ +#elif ( defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6 ) ) ) #pragma GCC diagnostic ignored "-Wconversion" #elif defined(_MSC_VER) #pragma warning(disable: 4244) diff -Nru dcmtk-3.6.6/ofstd/include/dcmtk/ofstd/diag/constexp.def dcmtk-3.6.7/ofstd/include/dcmtk/ofstd/diag/constexp.def --- dcmtk-3.6.6/ofstd/include/dcmtk/ofstd/diag/constexp.def 1970-01-01 00:00:00.000000000 +0000 +++ dcmtk-3.6.7/ofstd/include/dcmtk/ofstd/diag/constexp.def 2022-04-28 13:47:25.000000000 +0000 @@ -0,0 +1,4 @@ +// Clang and GCC don't seem to have such a warning +#ifdef _MSC_VER +#pragma warning(disable: 4127) +#endif diff -Nru dcmtk-3.6.6/ofstd/include/dcmtk/ofstd/diag/ignrattr.def dcmtk-3.6.7/ofstd/include/dcmtk/ofstd/diag/ignrattr.def --- dcmtk-3.6.6/ofstd/include/dcmtk/ofstd/diag/ignrattr.def 1970-01-01 00:00:00.000000000 +0000 +++ dcmtk-3.6.7/ofstd/include/dcmtk/ofstd/diag/ignrattr.def 2022-04-28 13:47:25.000000000 +0000 @@ -0,0 +1,12 @@ +#if defined(__clang__) +#pragma clang diagnostic ignored "-Wignored-attributes" + +/* The next line is equivalent to #elif DCMTK_DIAGNOSTIC_MIN_GCC_VERSION(6,0,0) */ +#elif ( defined(__GNUC__) && (__GNUC__ >= 6 ) ) +#pragma GCC diagnostic ignored "-Wignored-attributes" + +// Visual Studio does not seem to have such a warning yet, +// uncomment and replace ? when it does: +//#elif DCMTK_DIAGNOSTIC_MIN_MSC_VER(????) +//#pragma warning(disable: ????) +#endif diff -Nru dcmtk-3.6.6/ofstd/include/dcmtk/ofstd/diag/memacces.def dcmtk-3.6.7/ofstd/include/dcmtk/ofstd/diag/memacces.def --- dcmtk-3.6.6/ofstd/include/dcmtk/ofstd/diag/memacces.def 1970-01-01 00:00:00.000000000 +0000 +++ dcmtk-3.6.7/ofstd/include/dcmtk/ofstd/diag/memacces.def 2022-04-28 13:47:25.000000000 +0000 @@ -0,0 +1,8 @@ +#if defined(__clang__) +/* no such warning in Clang */ +/* The next line is equivalent to #elif DCMTK_DIAGNOSTIC_MIN_GCC_VERSION(8,0,0) */ +#elif ( defined(__GNUC__) && (__GNUC__ >= 8 ) ) +#pragma GCC diagnostic ignored "-Wclass-memaccess" +#elif defined(_MSC_VER) +/* no such warning in MSVC */ +#endif diff -Nru dcmtk-3.6.6/ofstd/include/dcmtk/ofstd/diag/overflow.def dcmtk-3.6.7/ofstd/include/dcmtk/ofstd/diag/overflow.def --- dcmtk-3.6.6/ofstd/include/dcmtk/ofstd/diag/overflow.def 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/ofstd/include/dcmtk/ofstd/diag/overflow.def 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,7 @@ #if defined(__clang__) #pragma clang diagnostic ignored "-Winteger-overflow" -#elif DCMTK_DIAGNOSTIC_MIN_GCC_VERSION(4,6,0) +/* The next line is equivalent to #elif DCMTK_DIAGNOSTIC_MIN_GCC_VERSION(4,6,0) */ +#elif ( defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6 ) ) ) #pragma GCC diagnostic ignored "-Woverflow" #elif defined(_MSC_VER) #pragma warning(disable: 4307) diff -Nru dcmtk-3.6.6/ofstd/include/dcmtk/ofstd/diag/pessmove.def dcmtk-3.6.7/ofstd/include/dcmtk/ofstd/diag/pessmove.def --- dcmtk-3.6.6/ofstd/include/dcmtk/ofstd/diag/pessmove.def 1970-01-01 00:00:00.000000000 +0000 +++ dcmtk-3.6.7/ofstd/include/dcmtk/ofstd/diag/pessmove.def 2022-04-28 13:47:25.000000000 +0000 @@ -0,0 +1,8 @@ +#if ( defined(__clang__) && (__clang_major__ >= 4) ) +#pragma clang diagnostic ignored "-Wpessimizing-move" +/* The next line is equivalent to #elif DCMTK_DIAGNOSTIC_MIN_GCC_VERSION(9,0,0) */ +#elif ( defined(__GNUC__) && (__GNUC__ >= 9 ) ) +#pragma GCC diagnostic ignored "-Wpessimizing-move" +#elif defined(_MSC_VER) +/* no such warning in MSVC */ +#endif diff -Nru dcmtk-3.6.6/ofstd/include/dcmtk/ofstd/diag/pop.def dcmtk-3.6.7/ofstd/include/dcmtk/ofstd/diag/pop.def --- dcmtk-3.6.6/ofstd/include/dcmtk/ofstd/diag/pop.def 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/ofstd/include/dcmtk/ofstd/diag/pop.def 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,7 @@ #if defined(__clang__) #pragma clang diagnostic pop -#elif DCMTK_DIAGNOSTIC_MIN_GCC_VERSION(4,6,0) +/* The next line is equivalent to #elif DCMTK_DIAGNOSTIC_MIN_GCC_VERSION(4,6,0) */ +#elif ( defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6 ) ) ) #pragma GCC diagnostic pop #elif defined(_MSC_VER) #pragma warning(pop) diff -Nru dcmtk-3.6.6/ofstd/include/dcmtk/ofstd/diag/push.def dcmtk-3.6.7/ofstd/include/dcmtk/ofstd/diag/push.def --- dcmtk-3.6.6/ofstd/include/dcmtk/ofstd/diag/push.def 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/ofstd/include/dcmtk/ofstd/diag/push.def 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,7 @@ #if defined(__clang__) #pragma clang diagnostic push -#elif DCMTK_DIAGNOSTIC_MIN_GCC_VERSION(4,6,0) +/* The next line is equivalent to #elif DCMTK_DIAGNOSTIC_MIN_GCC_VERSION(4,6,0) */ +#elif ( defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6 ) ) ) #pragma GCC diagnostic push #elif defined(_MSC_VER) #pragma warning(push) diff -Nru dcmtk-3.6.6/ofstd/include/dcmtk/ofstd/diag/shadow.def dcmtk-3.6.7/ofstd/include/dcmtk/ofstd/diag/shadow.def --- dcmtk-3.6.6/ofstd/include/dcmtk/ofstd/diag/shadow.def 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/ofstd/include/dcmtk/ofstd/diag/shadow.def 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,7 @@ #if defined(__clang__) #pragma clang diagnostic ignored "-Wshadow" -#elif DCMTK_DIAGNOSTIC_MIN_GCC_VERSION(4,6,0) +/* The next line is equivalent to #elif DCMTK_DIAGNOSTIC_MIN_GCC_VERSION(4,6,0) */ +#elif ( defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6 ) ) ) #pragma GCC diagnostic ignored "-Wshadow" // Visual Studio doesn't seem to have such a warning yet, uncomment // and replace ???? when it does diff -Nru dcmtk-3.6.6/ofstd/include/dcmtk/ofstd/diag/signcmp.def dcmtk-3.6.7/ofstd/include/dcmtk/ofstd/diag/signcmp.def --- dcmtk-3.6.6/ofstd/include/dcmtk/ofstd/diag/signcmp.def 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/ofstd/include/dcmtk/ofstd/diag/signcmp.def 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,7 @@ #if defined(__clang__) #pragma clang diagnostic ignored "-Wsign-compare" -#elif DCMTK_DIAGNOSTIC_MIN_GCC_VERSION(4,6,0) +/* The next line is equivalent to #elif DCMTK_DIAGNOSTIC_MIN_GCC_VERSION(4,6,0) */ +#elif ( defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6 ) ) ) #pragma GCC diagnostic ignored "-Wsign-compare" #elif defined(_MSC_VER) #pragma warning(disable: 4018) diff -Nru dcmtk-3.6.6/ofstd/include/dcmtk/ofstd/diag/slfassov.def dcmtk-3.6.7/ofstd/include/dcmtk/ofstd/diag/slfassov.def --- dcmtk-3.6.6/ofstd/include/dcmtk/ofstd/diag/slfassov.def 1970-01-01 00:00:00.000000000 +0000 +++ dcmtk-3.6.7/ofstd/include/dcmtk/ofstd/diag/slfassov.def 2022-04-28 13:47:25.000000000 +0000 @@ -0,0 +1,4 @@ +// GCC and MSVC don't seem to have such a warning +#if ( defined(__clang__) && (__clang_major__ >= 6) ) +#pragma clang diagnostic ignored "-Wself-assign-overloaded" +#endif diff -Nru dcmtk-3.6.6/ofstd/include/dcmtk/ofstd/diag/stralias.def dcmtk-3.6.7/ofstd/include/dcmtk/ofstd/diag/stralias.def --- dcmtk-3.6.6/ofstd/include/dcmtk/ofstd/diag/stralias.def 1970-01-01 00:00:00.000000000 +0000 +++ dcmtk-3.6.7/ofstd/include/dcmtk/ofstd/diag/stralias.def 2022-04-28 13:47:25.000000000 +0000 @@ -0,0 +1,8 @@ +#if defined(__clang__) +#pragma clang diagnostic ignored "-Wstrict-aliasing" +/* The next line is equivalent to #elif DCMTK_DIAGNOSTIC_MIN_GCC_VERSION(4,6,0) */ +#elif ( defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6 ) ) ) +#pragma GCC diagnostic ignored "-Wstrict-aliasing" +#elif defined(_MSC_VER) +/* no such warning on MSVC */ +#endif diff -Nru dcmtk-3.6.6/ofstd/include/dcmtk/ofstd/diag/unreachb.def dcmtk-3.6.7/ofstd/include/dcmtk/ofstd/diag/unreachb.def --- dcmtk-3.6.6/ofstd/include/dcmtk/ofstd/diag/unreachb.def 1970-01-01 00:00:00.000000000 +0000 +++ dcmtk-3.6.7/ofstd/include/dcmtk/ofstd/diag/unreachb.def 2022-04-28 13:47:25.000000000 +0000 @@ -0,0 +1,4 @@ +// For now we only define a MSVC pragma +#ifdef _MSC_VER +#pragma warning(disable: 4702) +#endif diff -Nru dcmtk-3.6.6/ofstd/include/dcmtk/ofstd/diag/vsdeclpd.def dcmtk-3.6.7/ofstd/include/dcmtk/ofstd/diag/vsdeclpd.def --- dcmtk-3.6.6/ofstd/include/dcmtk/ofstd/diag/vsdeclpd.def 1970-01-01 00:00:00.000000000 +0000 +++ dcmtk-3.6.7/ofstd/include/dcmtk/ofstd/diag/vsdeclpd.def 2022-04-28 13:47:25.000000000 +0000 @@ -0,0 +1,4 @@ +// Clang and GCC don't seem to have such a warning +#ifdef _MSC_VER +#pragma warning(disable: 4324) +#endif diff -Nru dcmtk-3.6.6/ofstd/include/dcmtk/ofstd/diag/vsobjdes.def dcmtk-3.6.7/ofstd/include/dcmtk/ofstd/diag/vsobjdes.def --- dcmtk-3.6.6/ofstd/include/dcmtk/ofstd/diag/vsobjdes.def 1970-01-01 00:00:00.000000000 +0000 +++ dcmtk-3.6.7/ofstd/include/dcmtk/ofstd/diag/vsobjdes.def 2022-04-28 13:47:25.000000000 +0000 @@ -0,0 +1,4 @@ +// Clang and GCC don't seem to have such a warning +#ifdef _MSC_VER +#pragma warning(disable: 4611) +#endif diff -Nru dcmtk-3.6.6/ofstd/include/dcmtk/ofstd/ofassert.h dcmtk-3.6.7/ofstd/include/dcmtk/ofstd/ofassert.h --- dcmtk-3.6.6/ofstd/include/dcmtk/ofstd/ofassert.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/ofstd/include/dcmtk/ofstd/ofassert.h 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2018, OFFIS e.V. + * Copyright (C) 2018-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -26,9 +26,6 @@ #include "dcmtk/config/osconfig.h" -#define INCLUDE_CASSERT -#include "dcmtk/ofstd/ofstdinc.h" - /** @file ofassert.h * Including run time and compile time assertion features and implementing * fallback implementations for the ones that are not available. @@ -39,7 +36,7 @@ #define OFstatic_assert static_assert #else // HAVE_STATIC_ASSERT template -class OFstatic_assert_t; +struct OFstatic_assert_t; template<> struct OFstatic_assert_t { OFstatic_assert_t( const char* = OFnullptr ) {} }; #define OFstatic_assert( E, M ) OFstatic_assert_t(M); diff -Nru dcmtk-3.6.6/ofstd/include/dcmtk/ofstd/ofbmanip.h dcmtk-3.6.7/ofstd/include/dcmtk/ofstd/ofbmanip.h --- dcmtk-3.6.6/ofstd/include/dcmtk/ofstd/ofbmanip.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/ofstd/include/dcmtk/ofstd/ofbmanip.h 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1997-2019, OFFIS e.V. + * Copyright (C) 1997-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -26,10 +26,9 @@ #include "dcmtk/config/osconfig.h" #include "dcmtk/ofstd/ofcast.h" #include "dcmtk/ofstd/ofdefine.h" +#include "dcmtk/ofstd/oftypes.h" -#define INCLUDE_CSTRING -#define INCLUDE_CSTDINT -#include "dcmtk/ofstd/ofstdinc.h" +#include /*---------------------* * class declaration * @@ -155,14 +154,7 @@ static void zeroMem(T *dest, const size_t count) { -#ifdef HAVE_MEMZERO - memzero(dest, count * sizeof(T)); -#else - size_t i; - T *q = dest; - for (i = count; i != 0; --i) - *q++ = 0; -#endif + memset(dest, 0, count * sizeof(T)); } }; diff -Nru dcmtk-3.6.6/ofstd/include/dcmtk/ofstd/ofcmdln.h dcmtk-3.6.7/ofstd/include/dcmtk/ofstd/ofcmdln.h --- dcmtk-3.6.6/ofstd/include/dcmtk/ofstd/ofcmdln.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/ofstd/include/dcmtk/ofstd/ofcmdln.h 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1998-2019, OFFIS e.V. + * Copyright (C) 1998-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -31,10 +31,6 @@ #include "dcmtk/ofstd/ofconsol.h" #include "dcmtk/ofstd/offile.h" -#define INCLUDE_CSTDIO -#include "dcmtk/ofstd/ofstdinc.h" - - /*--------------------* * macro definition * *--------------------*/ diff -Nru dcmtk-3.6.6/ofstd/include/dcmtk/ofstd/ofcond.h dcmtk-3.6.7/ofstd/include/dcmtk/ofstd/ofcond.h --- dcmtk-3.6.6/ofstd/include/dcmtk/ofstd/ofcond.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/ofstd/include/dcmtk/ofstd/ofcond.h 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2001-2018, OFFIS e.V. + * Copyright (C) 2001-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -28,11 +28,8 @@ #include "dcmtk/ofstd/oftypes.h" /* for class OFBool */ #include "dcmtk/ofstd/ofstring.h" /* for class OFString */ #include "dcmtk/ofstd/ofcast.h" - -#define INCLUDE_CSTRING /* for strdup() */ -#define INCLUDE_CSTDLIB /* for free() */ -#include "dcmtk/ofstd/ofstdinc.h" - +#include +#include /* for free() */ // include this file in doxygen documentation diff -Nru dcmtk-3.6.6/ofstd/include/dcmtk/ofstd/ofconfig.h dcmtk-3.6.7/ofstd/include/dcmtk/ofstd/ofconfig.h --- dcmtk-3.6.6/ofstd/include/dcmtk/ofstd/ofconfig.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/ofstd/include/dcmtk/ofstd/ofconfig.h 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1997-2011, OFFIS e.V. + * Copyright (C) 1997-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -28,9 +28,6 @@ #include "dcmtk/ofstd/ofstack.h" #include "dcmtk/ofstd/ofstream.h" -#define INCLUDE_CSTDIO -#include "dcmtk/ofstd/ofstdinc.h" - /* * Short description of configuration file structure: * - The data in a configuration file have a tree structure. diff -Nru dcmtk-3.6.6/ofstd/include/dcmtk/ofstd/ofconsol.h dcmtk-3.6.7/ofstd/include/dcmtk/ofstd/ofconsol.h --- dcmtk-3.6.6/ofstd/include/dcmtk/ofstd/ofconsol.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/ofstd/include/dcmtk/ofstd/ofconsol.h 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1999-2018, OFFIS e.V. + * Copyright (C) 1999-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -57,10 +57,6 @@ #include "dcmtk/ofstd/ofstream.h" #include "dcmtk/ofstd/ofthread.h" -#define INCLUDE_CSTDLIB -#include "dcmtk/ofstd/ofstdinc.h" - - /** Singleton class which provides thread-safe access to the standard console * output and error streams. Allows multiple threads to concurrently create * output even if that output is redirected to file or memory. @@ -202,6 +198,14 @@ */ static OFConsole& instance(); + /** redirect stderr to stdout on file descriptor level + */ + static void mergeStderrStdout(); + + /** remove a redirection of stderr to stdout on file descriptor level + */ + static void unmergeStderrStdout(); + private: /** default constructor. After construction, the cout methods refer to the @@ -226,6 +230,9 @@ /** true if streams are combined, false otherwise */ int joined; + /** file descriptor for stderr, if redirected on FILE I/O level */ + static int old_stderr; + #ifdef WITH_THREADS /** mutex protecting access to cout * @remark This member is only available if DCMTK is compiled with thread diff -Nru dcmtk-3.6.6/ofstd/include/dcmtk/ofstd/ofdefine.h dcmtk-3.6.7/ofstd/include/dcmtk/ofstd/ofdefine.h --- dcmtk-3.6.6/ofstd/include/dcmtk/ofstd/ofdefine.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/ofstd/include/dcmtk/ofstd/ofdefine.h 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1994-2017, OFFIS e.V. + * Copyright (C) 1994-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -26,9 +26,7 @@ #include "dcmtk/ofstd/ofcast.h" #include "dcmtk/ofstd/ofexport.h" -#define INCLUDE_CSTRING -#include "dcmtk/ofstd/ofstdinc.h" - +#include #ifdef ofstd_EXPORTS #define DCMTK_OFSTD_EXPORT DCMTK_DECL_EXPORT @@ -36,30 +34,6 @@ #define DCMTK_OFSTD_EXPORT DCMTK_DECL_IMPORT #endif - -#ifdef HAVE_BZERO -#ifndef HAVE_PROTOTYPE_BZERO -BEGIN_EXTERN_C -extern void bzero(char* s, int len); -END_EXTERN_C -#endif -#endif - - -/* memzero */ -#ifdef HAVE_MEMSET -# undef memzero -# define memzero(d, n) memset((d), 0, (n)) -# define HAVE_MEMZERO /* This makes using this easier */ -#else -# ifdef HAVE_BZERO -# undef memzero -// some platforms, e.g. OSF1, require the first parameter to be char *. -# define memzero(d, n) bzero(OFstatic_cast(char *, d), (n)) -# define HAVE_MEMZERO /* This makes using this easier */ -# endif -#endif - /* memcpy */ #ifndef HAVE_MEMCPY # ifdef HAVE_BCOPY diff -Nru dcmtk-3.6.6/ofstd/include/dcmtk/ofstd/ofdeprec.h dcmtk-3.6.7/ofstd/include/dcmtk/ofstd/ofdeprec.h --- dcmtk-3.6.6/ofstd/include/dcmtk/ofstd/ofdeprec.h 1970-01-01 00:00:00.000000000 +0000 +++ dcmtk-3.6.7/ofstd/include/dcmtk/ofstd/ofdeprec.h 2022-04-28 13:47:25.000000000 +0000 @@ -0,0 +1,86 @@ +/* + * + * Copyright (C) 2021, 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: Jan Schlamelcher + * + * Purpose: Marking functions as deprecated that shall no longer be used + * + */ + +#ifndef OFDEPREC_H +#define OFDEPREC_H + +#ifdef DOXYGEN + +/*! @file ofdeprec.h + * @brief Defines macros for marking functions as deprecated + * @details #include "dcmtk/ofstd/ofdeprec.h" + */ + +/*! @brief A macro for marking a function as deprecated. + * @details + *

    Example

    + * @code{.cpp} + * OFdeprecated void myFunction() {...} + * @endcode + * @details + * If the compiler supports function deprecation, using this macro will lead + * to a diagnostic message being emitted whenever the marked function is + * used. + */ +#define OFdeprecated + +/*! @brief A macro for marking a function as deprecated with a custom message. + * @param MESSAGE the message to print as part of the diagnostic output. + * @details + *

    Example

    + * @code{.cpp} + * OFdeprecated_msg("use myNewFunction() instead") void myFunction() {...} + * void myNewFunction() {...} + * @endcode + * @details + * If the compiler supports function deprecation with a custom message, using + * this macro will lead to a diagnostic message including the custom message + * being emitted whenever the marked function is used. + * If the compiler does not support custom messages, it will fall back to + * OFdeprecated. + */ +#define OFdeprecated_msg(MESSAGE) + +#else // DOXYGEN + +#ifdef HAVE_CXX14_DEPRECATED_ATTRIBUTE +#define OFdeprecated [[deprecated]] +#elif defined(HAVE_ATTRIBUTE_DEPRECATED) +#define OFdeprecated __attribute__((deprecated)) +#elif defined(HAVE_DECLSPEC_DEPRECATED) +#define OFdeprecated __declspec(deprecated) +#else +#define OFdeprecated +#endif + +#ifdef HAVE_CXX14_DEPRECATED_ATTRIBUTE_MSG +#define OFdeprecated_msg(MESSAGE) [[deprecated(#MESSAGE)]] +#elif defined(HAVE_ATTRIBUTE_DEPRECATED_MSG) +#define OFdeprecated_msg(MESSAGE) __attribute__((deprecated(#MESSAGE))) +#elif defined(HAVE_DECLSPEC_DEPRECATED_MSG) +#define OFdeprecated_msg(MESSAGE) __declspec(deprecated(#MESSAGE)) +#else +#define OFdeprecated_msg(MESSAGE) OFdeprecated +#endif + +#endif // NOT DOXYGEN + +#endif // OFDEPREC_H diff -Nru dcmtk-3.6.6/ofstd/include/dcmtk/ofstd/ofdiag.h dcmtk-3.6.7/ofstd/include/dcmtk/ofstd/ofdiag.h --- dcmtk-3.6.6/ofstd/include/dcmtk/ofstd/ofdiag.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/ofstd/include/dcmtk/ofstd/ofdiag.h 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2016, OFFIS e.V. + * Copyright (C) 2016-2022, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -123,6 +123,90 @@ */ #define DCMTK_DIAGNOSTIC_IGNORE_VISUAL_STUDIO_PERFORMANCE_WARNING +/*! @brief A macro to disable warnings about a conditional expression being constant + * @note The macro may only be used in conjunction with #include! + * @remarks The warning indicates that a conditional expression will always yield + * the same result. In C++17, the "if constexpr" statement should be used in this case, + * but DCMTK does not (yet) expect a fully C++17 compliant compiler. + * @see DCMTK_DIAGNOSTIC_PUSH for an example. + */ +#define DCMTK_DIAGNOSTIC_IGNORE_CONST_EXPRESSION_WARNING + +/*! @brief A macro to disable warnings about a self-assignment of a variable + * using an overloaded operator. + * @note The macro may only be used in conjunction with #include! + * @see DCMTK_DIAGNOSTIC_PUSH for an example. + */ +#define DCMTK_DIAGNOSTIC_IGNORE_SELF_ASSIGN_OVERLOADED_WARNING + +/*! @brief A macro to disable warnings about an assignment within a conditional expression + * @note The macro may only be used in conjunction with #include! + * @remarks The warning indicates that an assignment takes place within a + * conditional expression, which might indicate that "=" was used erroneously instead of "==". + * @see DCMTK_DIAGNOSTIC_PUSH for an example. + */ +#define DCMTK_DIAGNOSTIC_IGNORE_ASSIGNMENT_IN_COND_EXPRESSION_WARNING + +/*! @brief A macro to disable warnings about raw memory access to class structures + * @note The macro may only be used in conjunction with #include! + * @remarks The warning indicates that the destination of a call to a raw memory + * function such as memset or memcpy is an object of class type, and when writing + * into such an object might bypass the class non-trivial or deleted constructor + * or copy assignment, violate const-correctness or encapsulation, or corrupt + * virtual table pointers. + * @see DCMTK_DIAGNOSTIC_PUSH for an example. + */ +#define DCMTK_DIAGNOSTIC_IGNORE_CLASS_MEMACCESS_WARNING + +/*! @brief A macro to disable warnings about pessimizing use of std::move(). + * @note The macro may only be used in conjunction with #include! + * @remarks The warning indicates that moving a local object in a return + * statement prevents copy elision and thus causes less efficient code + * to be generated. + * @see DCMTK_DIAGNOSTIC_PUSH for an example. + */ +#define DCMTK_DIAGNOSTIC_IGNORE_PESSIMIZING_MOVE_WARNING + +/*! @brief A macro to disable warnings about code that breaks strict + * aliasing rules + * @note The macro may only be used in conjunction with #include! + * @remarks The warning indicates that certain code constructs will + * break strict aliasing rules, such as dereferencing a type-punned pointer. + * @see DCMTK_DIAGNOSTIC_PUSH for an example. + */ +#define DCMTK_DIAGNOSTIC_IGNORE_STRICT_ALIASING_WARNING + +/*! @brief A macro to disable Visual Studio warnings about structure + * padding due to __declspec(align). + * @note The macro may only be used in conjunction with #include! + * @remarks The warning indicates that a certain structure has been + * padded at the end because of a __declspec(align) declaration. + * @see DCMTK_DIAGNOSTIC_PUSH for an example. + */ +#define DCMTK_DIAGNOSTIC_IGNORE_VISUAL_STUDIO_DECLSPEC_PADDING_WARNING + +/*! @brief A macro to disable Visual Studio warnings about non-portability + * of the interaction between a function like setjmp and C++ object destruction + * @note The macro may only be used in conjunction with #include! + * @remarks The warning indicates that on some platforms, functions + * that include 'catch' may not support C++ object semantics of + * destruction when out of scope. + * @see DCMTK_DIAGNOSTIC_PUSH for an example. + */ +#define DCMTK_DIAGNOSTIC_IGNORE_VISUAL_STUDIO_OBJECT_DESTRUCTION_WARNING + +/*! @brief A macro to disable warnings about unreachable code + * @note The macro may only be used in conjunction with #include! + * @see DCMTK_DIAGNOSTIC_PUSH for an example. + */ +#define DCMTK_DIAGNOSTIC_IGNORE_UNREACHABLE_CODE_WARNING + +/*! @brief A macro to disable warnings about ignored attributes due to attribute redeclaration + * @note The macro may only be used in conjunction with #include! + * @see DCMTK_DIAGNOSTIC_PUSH for an example. + */ +#define DCMTK_DIAGNOSTIC_IGNORE_ATTRIBUTE_REDECLARATION + #else // DOXYGEN #define DCMTK_DIAGNOSTIC_PUSH "dcmtk/ofstd/diag/push.def" @@ -135,6 +219,16 @@ #define DCMTK_DIAGNOSTIC_IGNORE_SHADOW "dcmtk/ofstd/diag/shadow.def" #define DCMTK_DIAGNOSTIC_IGNORE_NO_SUITABLE_DEFINITION_FOR_TEMPLATE_INSTANTIATION "dcmtk/ofstd/diag/nsdfti.def" #define DCMTK_DIAGNOSTIC_IGNORE_VISUAL_STUDIO_PERFORMANCE_WARNING "dcmtk/ofstd/diag/vsprfw.def" +#define DCMTK_DIAGNOSTIC_IGNORE_CONST_EXPRESSION_WARNING "dcmtk/ofstd/diag/constexp.def" +#define DCMTK_DIAGNOSTIC_IGNORE_SELF_ASSIGN_OVERLOADED_WARNING "dcmtk/ofstd/diag/slfassov.def" +#define DCMTK_DIAGNOSTIC_IGNORE_ASSIGNMENT_IN_COND_EXPRESSION_WARNING "dcmtk/ofstd/diag/asincond.def" +#define DCMTK_DIAGNOSTIC_IGNORE_CLASS_MEMACCESS_WARNING "dcmtk/ofstd/diag/memacces.def" +#define DCMTK_DIAGNOSTIC_IGNORE_PESSIMIZING_MOVE_WARNING "dcmtk/ofstd/diag/pessmove.def" +#define DCMTK_DIAGNOSTIC_IGNORE_STRICT_ALIASING_WARNING "dcmtk/ofstd/diag/stralias.def" +#define DCMTK_DIAGNOSTIC_IGNORE_VISUAL_STUDIO_DECLSPEC_PADDING_WARNING "dcmtk/ofstd/diag/vsdeclpd.def" +#define DCMTK_DIAGNOSTIC_IGNORE_VISUAL_STUDIO_OBJECT_DESTRUCTION_WARNING "dcmtk/ofstd/diag/vsobjdes.def" +#define DCMTK_DIAGNOSTIC_IGNORE_UNREACHABLE_CODE_WARNING "dcmtk/ofstd/diag/unreachb.def" +#define DCMTK_DIAGNOSTIC_IGNORE_ATTRIBUTE_REDECLARATION "dcmtk/ofstd/diag/ignrattr.def" // readable shorthands for compiler version checks #define DCMTK_DIAGNOSTIC_MIN_GCC_VERSION(MAJOR, MINOR, PATCH)\ diff -Nru dcmtk-3.6.6/ofstd/include/dcmtk/ofstd/oferror.h dcmtk-3.6.7/ofstd/include/dcmtk/ofstd/oferror.h --- dcmtk-3.6.6/ofstd/include/dcmtk/ofstd/oferror.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/ofstd/include/dcmtk/ofstd/oferror.h 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2017-2018, OFFIS e.V. + * Copyright (C) 2017-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -37,8 +37,6 @@ #else // fallback implementations -#define INCLUDE_CERRNO -#include "dcmtk/ofstd/ofstdinc.h" #include "dcmtk/ofstd/ofstring.h" diff -Nru dcmtk-3.6.6/ofstd/include/dcmtk/ofstd/offile.h dcmtk-3.6.7/ofstd/include/dcmtk/ofstd/offile.h --- dcmtk-3.6.6/ofstd/include/dcmtk/ofstd/offile.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/ofstd/include/dcmtk/ofstd/offile.h 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2006-2020, OFFIS e.V. + * Copyright (C) 2006-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -29,13 +29,9 @@ #include "dcmtk/ofstd/ofstring.h" /* for class OFString */ #include "dcmtk/ofstd/ofstd.h" /* for class OFStandard */ -#define INCLUDE_UNISTD -#define INCLUDE_CSTDIO -#define INCLUDE_CSTRING -#define INCLUDE_CSTDARG -#define INCLUDE_CERRNO -//#define INCLUDE_CWCHAR /* not yet implemented in "ofstdinc.h" */ -#include "dcmtk/ofstd/ofstdinc.h" +#include +#include +#include BEGIN_EXTERN_C #ifdef HAVE_SYS_STAT_H @@ -191,12 +187,12 @@ */ void swap(OFFilename &arg); - /** checks whether this object stores an empty filename + /** check whether this object stores an empty filename * @return OFTrue if the filename is empty, OFFalse otherwise */ OFBool isEmpty() const; - /** checks whether this object stores a wide character filename + /** check whether this object stores a wide character filename * @return OFTrue if the filename uses wide characters, OFFalse otherwise */ inline OFBool usesWideChars() const @@ -229,6 +225,26 @@ } #endif + /** check whether the standard input or output streams should be used by + * comparing the filename with "-" + * @return OFTrue if stdin or stdout should be used, OFFalse otherwise + */ + OFBool isStandardStream() const + { + OFBool result = OFFalse; +#if defined(WIDE_CHAR_FILE_IO_FUNCTONS) && defined(_WIN32) + if (usesWideChars()) + { + result = (wcscmp(getWideCharPointer(), L"-") == 0); + } else +#endif + if (getCharPointer() != NULL) + { + result = (strcmp(getCharPointer(), "-") == 0); + } + return result; + } + /** replace currently stored filename by given value * @param filename filename to be stored (8-bit characters, e.g. UTF-8) * @param convert convert given filename to wide character encoding as an @@ -312,7 +328,7 @@ * on Unix platforms are based on errno and strerror/strerror_r, but may be based * on other mechanisms on platforms where errno does not exist. */ -class OFFile +class DCMTK_OFSTD_EXPORT OFFile { public: /// default constructor, creates an object that is not associated with any file. @@ -431,17 +447,7 @@ * @param modes "r" or "w" * @return true if pipe was successfully created, false otherwise */ - OFBool popen(const char *command, const char *modes) - { - if (file_) fclose(); -#ifdef HAVE_POPEN - file_ = :: popen(command, modes); -#else - file_ = _popen(command, modes); -#endif - if (file_) popened_ = OFTrue; else storeLastError(); - return (file_ != NULL); - } + OFBool popen(const char *command, const char *modes); /** opens the file whose name is the string pointed to by path and associates * the stream pointed maintained by this object with it. The original stream @@ -491,29 +497,7 @@ * maintained by this object results in undefined behaviour. * @return 0 upon success, EOF otherwise, in which case the error code is set. */ - int fclose() - { - int result = 0; - if (file_) - { - if (popened_) - { -#ifdef HAVE_PCLOSE - result = :: pclose(file_); -#else - result = _pclose(file_); -#endif - } - else - { - result = STDIO_NAMESPACE fclose(file_); - } - // After calling fclose() once, the FILE* is gone even if fclose() failed. - file_ = NULL; - } - if (result) storeLastError(); - return result; - } + int fclose(); /** waits for the associated process (created with popen) to terminate and * returns the exit status of the command as returned by wait4. @@ -839,7 +823,6 @@ */ offile_off_t ftell() { - offile_off_t result; #ifdef _WIN32 // Windows does not have a 64-bit ftell, and _telli64 cannot be used // because it operates on file descriptors and ignores FILE buffers. @@ -851,8 +834,9 @@ storeLastError(); return -1; } - return pos; + return OFstatic_cast(offile_off_t, pos); #else + offile_off_t result; #ifdef HAVE_FSEEKO #ifdef EXPLICIT_LFS_64 result = :: ftello64(file_); @@ -862,9 +846,9 @@ #else result = STDIO_NAMESPACE ftell(file_); #endif -#endif if (result < 0) storeLastError(); return result; +#endif } /** alternate interface equivalent to ftell, storing the current value of the diff -Nru dcmtk-3.6.6/ofstd/include/dcmtk/ofstd/offilsys.h dcmtk-3.6.7/ofstd/include/dcmtk/ofstd/offilsys.h --- dcmtk-3.6.6/ofstd/include/dcmtk/ofstd/offilsys.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/ofstd/include/dcmtk/ofstd/offilsys.h 2022-04-28 13:47:25.000000000 +0000 @@ -52,6 +52,28 @@ class DCMTK_OFSTD_EXPORT OFpath { public: + /** Determines how string representations of pathnames are interpreted by + * the constructors of OFpath. + * @note Since native_format and generic_format are the same on Unix like + * systems, using auto_format will have no effect on them, i.e. the path + * is expected to use slash ('/') as the separator on Unix like systems. + */ + enum format + { + /** Native pathname format. + */ + native_format, + + /** Generic pathname format. + */ + generic_format, + + /** Implementation-defined pathname format, auto-detected where + * possible. + */ + auto_format + }; + /** The path separator used in the native path syntax, i.e.\ '\' on Windows * and '/' everywhere else. */ @@ -79,25 +101,21 @@ /** Construct an OFpath from a const char*. * @param cstr a plain old C character string. + * @param fmt specifies how cstr is to be interpreted, e.g. what character + * to expect as the separator or whether to auto detect it. * @warning This constructor does not exists in the real * std::filesystem::path, where various character strings (e.g. char* * and wchar_t*) are handled uniformly by one of the template * constructors. - * @note Automatic path conversion (e.g. replacing all '/' with '\' on - * Windows) is currently not available, which is why this constructor - * lacks the second parameter "format" and instead always expects - * the argument to be given in the native format. */ - OFpath( const char* const cstr ); + OFpath( const char* const cstr, format fmt = auto_format ); /** Constructs an OFpath from an OFString. * @param string an OFString. - * @note Automatic path conversion (e.g. replacing all '/' with '\' on - * Windows) is currently not available, which is why this constructor - * lacks the second parameter "format" and instead always expects - * the argument to be given in the native format. + * @param fmt specifies how the string is to be interpreted, e.g. what + * character to expect as the separator or whether to auto detect it. */ - OFpath( const OFString& string ); + OFpath( const OFString& string, format fmt = auto_format ); /** Copy-assign another OFpath to this one. * Effectively: this->native() = rhs.native(). @@ -211,6 +229,10 @@ size_t findRootName() const; size_t findFilename() const; size_t findExtension() const; +#ifdef _WIN32 + // helper function to convert the separator to the native one + void convertSeparator(format fmt); +#endif // the actual native string, who would have guessed OFString m_NativeString; #endif diff -Nru dcmtk-3.6.6/ofstd/include/dcmtk/ofstd/oflimits.h dcmtk-3.6.7/ofstd/include/dcmtk/ofstd/oflimits.h --- dcmtk-3.6.6/ofstd/include/dcmtk/ofstd/oflimits.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/ofstd/include/dcmtk/ofstd/oflimits.h 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2014-2019, OFFIS e.V. + * Copyright (C) 2014-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -82,10 +82,9 @@ #else // fallback implementations entirely without using the native STL -#define INCLUDE_CLIMITS -#define INCLUDE_CFLOAT -#define INCLUDE_CMATH -#include "dcmtk/ofstd/ofstdinc.h" +#include +#include +#include /** Enumeration constants of type OFfloat_round_style indicate the rounding style * used by floating-point arithmetics whenever a result of an expression is stored @@ -153,7 +152,7 @@ */ static const OFBool is_specialized; - /** OFTrue for all signed arithmetic types T and + /** OFTrue for all signed arithmetic types T and * OFFalse for the unsigned types. *

    C++11 standard definitions used:

    * T | %is_signed diff -Nru dcmtk-3.6.6/ofstd/include/dcmtk/ofstd/oflist.h dcmtk-3.6.7/ofstd/include/dcmtk/ofstd/oflist.h --- dcmtk-3.6.6/ofstd/include/dcmtk/ofstd/oflist.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/ofstd/include/dcmtk/ofstd/oflist.h 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1997-2019, OFFIS e.V. + * Copyright (C) 1997-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -77,9 +77,10 @@ #include #endif -#define INCLUDE_CASSERT -#define INCLUDE_CSTDDEF -#include "dcmtk/ofstd/ofstdinc.h" +// #define INCLUDE_CASSERT +// #define INCLUDE_CSTDDEF +// #include "dcmtk/ofstd/ofstdinc.h" +#include #define OFLIST_TYPENAME diff -Nru dcmtk-3.6.6/ofstd/include/dcmtk/ofstd/ofset.h dcmtk-3.6.7/ofstd/include/dcmtk/ofstd/ofset.h --- dcmtk-3.6.6/ofstd/include/dcmtk/ofstd/ofset.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/ofstd/include/dcmtk/ofstd/ofset.h 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2002-2010, OFFIS e.V. + * Copyright (C) 2002-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -26,9 +26,6 @@ #include "dcmtk/config/osconfig.h" #include "dcmtk/ofstd/oftypes.h" -#define INCLUDE_CSTDDEF /* For NULL */ -#include "dcmtk/ofstd/ofstdinc.h" - #define STARTING_SIZE 8 /** This abstract template class provides a data structure and operations for administrating a diff -Nru dcmtk-3.6.6/ofstd/include/dcmtk/ofstd/ofsockad.h dcmtk-3.6.7/ofstd/include/dcmtk/ofstd/ofsockad.h --- dcmtk-3.6.6/ofstd/include/dcmtk/ofstd/ofsockad.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/ofstd/include/dcmtk/ofstd/ofsockad.h 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2017-2018, OFFIS e.V. + * Copyright (C) 2017-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -23,20 +23,34 @@ #define OFSOCKAD_H #include "dcmtk/config/osconfig.h" // make sure OS specific configuration is included first -#include "dcmtk/ofstd/ofdefine.h" // for memzero() +#include "dcmtk/ofstd/ofdefine.h" #include "dcmtk/ofstd/ofstream.h" BEGIN_EXTERN_C +END_EXTERN_C + +#ifdef HAVE_WINDOWS_H +#include +#include /* for struct sockaddr_in6 */ +#endif + +BEGIN_EXTERN_C #ifdef HAVE_SYS_TYPES_H #include #endif #ifdef HAVE_SYS_SOCKET_H +/* some systems (such as DEC Ultrix) don't protect from double inclusion */ #ifndef DCOMPAT_SYS_SOCKET_H_ #define DCOMPAT_SYS_SOCKET_H_ -/* some systems don't protect sys/socket.h (e.g. DEC Ultrix) */ #include #endif #endif +#ifdef HAVE_NETINET_IN_H +#include +#endif +#ifdef HAVE_ARPA_INET_H +#include +#endif END_EXTERN_C #ifdef HAVE_WINDOWS_H @@ -44,6 +58,8 @@ #include /* for socklen_t */ #endif +#include // for memset() + /* forward declarations */ struct sockaddr; struct sockaddr_in; @@ -56,6 +72,14 @@ class DCMTK_OFSTD_EXPORT OFSockAddr { public: + union socket_address + { + + struct sockaddr sa; + struct sockaddr_in s4; + struct sockaddr_in6 s6; + struct sockaddr_storage ss; + }; /// Default constructor OFSockAddr() { clear(); } @@ -63,33 +87,33 @@ /// Destructor ~OFSockAddr() { } - /// initialize address storage object with memzero - void clear() { memzero(&sa, sizeof(sa)); } + /// initialize address storage object with memset + void clear() { memset(&sa, 0, sizeof(sa)); } /** access socket address storage object as struct sockaddr (opaque address) * @return address storage object as struct sockaddr *. */ - struct sockaddr *getSockaddr() { return OFreinterpret_cast(struct sockaddr *, &sa); } + struct sockaddr *getSockaddr() { return &sa.sa; } /** access socket address storage object as struct sockaddr_in (IPv4 address) * @return address storage object as struct sockaddr_in *. */ - struct sockaddr_in *getSockaddr_in() { return OFreinterpret_cast(struct sockaddr_in *, &sa); } + struct sockaddr_in *getSockaddr_in() { return &sa.s4; } /** access socket address storage object as struct sockaddr_in6 (IPv6 address) * @return address storage object as struct sockaddr_in6 *. */ - struct sockaddr_in6 *getSockaddr_in6() { return OFreinterpret_cast(struct sockaddr_in6 *, &sa); } + struct sockaddr_in6 *getSockaddr_in6() { return &sa.s6; } /** access socket address storage object as const struct sockaddr_in (IPv4 address) * @return address storage object as const struct sockaddr_in *. */ - const struct sockaddr_in *getSockaddr_in_const() const { return OFreinterpret_cast(const struct sockaddr_in *, &sa); } + const struct sockaddr_in *getSockaddr_in_const() const { return &sa.s4; } /** access socket address storage object as const struct sockaddr_in6 (IPv6 address) * @return address storage object as const struct sockaddr_in6 *. */ - const struct sockaddr_in6 *getSockaddr_in6_const() const { return OFreinterpret_cast(const struct sockaddr_in6 *, &sa); } + const struct sockaddr_in6 *getSockaddr_in6_const() const { return &sa.s6; } /** return size of sockaddr struct depending on current protocol family * @return size of sockaddr struct depending on current protocol family @@ -99,12 +123,12 @@ /** get current protocol family. Returns 0 if uninitialized, AF_INET or AF_INET6 otherwise. * @return current protocol family of the socket address. */ - short getFamily() const { return sa.ss_family; } + short getFamily() const { return sa.ss.ss_family; } /** set current protocol family. * @param family protocol family, should be AF_INET or AF_INET6. */ - void setFamily(short family) { sa.ss_family = family; } + void setFamily(short family) { sa.ss.ss_family = family; } /** set port number for current protocol family. * Only works if the family has been set to AF_INET or AF_INET6 prior to calling this method. @@ -117,7 +141,7 @@ /** container for the socket address structure. * Guaranteed to be large enough for all supported protocol types. */ - struct sockaddr_storage sa; + socket_address sa; }; diff -Nru dcmtk-3.6.6/ofstd/include/dcmtk/ofstd/ofstack.h dcmtk-3.6.7/ofstd/include/dcmtk/ofstd/ofstack.h --- dcmtk-3.6.6/ofstd/include/dcmtk/ofstd/ofstack.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/ofstd/include/dcmtk/ofstd/ofstack.h 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1997-2017, OFFIS e.V. + * Copyright (C) 1997-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -38,9 +38,7 @@ #define OFStack std::stack #else -#define INCLUDE_CASSERT -#define INCLUDE_CSTDDEF -#include "dcmtk/ofstd/ofstdinc.h" +#include #ifndef HAVE_CLASS_TEMPLATE #error Your C++ compiler cannot handle class templates: diff -Nru dcmtk-3.6.6/ofstd/include/dcmtk/ofstd/ofstd.h dcmtk-3.6.7/ofstd/include/dcmtk/ofstd/ofstd.h --- dcmtk-3.6.6/ofstd/include/dcmtk/ofstd/ofstd.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/ofstd/include/dcmtk/ofstd/ofstd.h 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2000-2019, OFFIS e.V. + * Copyright (C) 2000-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -33,13 +33,16 @@ #include "dcmtk/ofstd/oflimits.h" /* for OFnumeric_limits::max() */ #include "dcmtk/ofstd/oferror.h" -#define INCLUDE_CASSERT -#define INCLUDE_CSTDLIB -#define INCLUDE_CSTDIO -#define INCLUDE_CSTRING -#define INCLUDE_CSTDARG -#define INCLUDE_UNISTD -#include "dcmtk/ofstd/ofstdinc.h" +#include +#include +#include +#include +#include +#ifdef HAVE_UNISTD_H +BEGIN_EXTERN_C +#include +END_EXTERN_C +#endif BEGIN_EXTERN_C #ifdef HAVE_SYS_TYPES_H @@ -144,39 +147,39 @@ #endif } - /* Standard C99 formatted string output function. - * This is an implementation of the snprintf(3) function as defined in the - * C99 standard. Like all functions of the printf() family, it produces - * output according to a format string. Output is written to the character - * array passed as parameter str. The function never writes more than size - * bytes and guarantees that the result will be NUL terminated, although - * it may be truncated if the buffer provided is too small. - * @param str string buffer to write to - * @param size size of string buffer, in bytes - * @param format printf() format string - * @param ... parameters to be formatted - * @return number of characters that have been written (if the buffer is - * large enough) or the number of characters that would have been - * written (if the buffer is too small), in both cases not including - * the final NUL character. + /** Standard C99 formatted string output function. + * This is an implementation of the snprintf(3) function as defined in the + * C99 standard. Like all functions of the printf() family, it produces + * output according to a format string. Output is written to the character + * array passed as parameter str. The function never writes more than size + * bytes and guarantees that the result will be NUL terminated, although + * it may be truncated if the buffer provided is too small. + * @param str string buffer to write to + * @param size size of string buffer, in bytes + * @param format printf() format string + * @param ... parameters to be formatted + * @return number of characters that have been written (if the buffer is + * large enough) or the number of characters that would have been + * written (if the buffer is too small), in both cases not including + * the final NUL character. */ static int snprintf(char *str, size_t size, const char *format, ...); - /* Standard C99 formatted string output function. - * This is an implementation of the snprintf(3) function as defined in the - * C99 standard. Like all functions of the printf() family, it produces - * output according to a format string. Output is written to the character - * array passed as parameter str. The function never writes more than size - * bytes and guarantees that the result will be NUL terminated, although - * it may be truncated if the buffer provided is too small. - * @param str string buffer to write to - * @param size size of string buffer, in bytes - * @param format printf() format string - * @param ap parameters to be formatted - * @return number of characters that have been written (if the buffer is - * large enough) or the number of characters that would have been - * written (if the buffer is too small), in both cases not including - * the final NUL character. + /** Standard C99 formatted string output function. + * This is an implementation of the snprintf(3) function as defined in the + * C99 standard. Like all functions of the printf() family, it produces + * output according to a format string. Output is written to the character + * array passed as parameter str. The function never writes more than size + * bytes and guarantees that the result will be NUL terminated, although + * it may be truncated if the buffer provided is too small. + * @param str string buffer to write to + * @param size size of string buffer, in bytes + * @param format printf() format string + * @param ap parameters to be formatted + * @return number of characters that have been written (if the buffer is + * large enough) or the number of characters that would have been + * written (if the buffer is too small), in both cases not including + * the final NUL character. */ static int vsnprintf(char *str, size_t size, const char *format, va_list ap); @@ -981,7 +984,7 @@ * be OFTrue. * @tparam Count the number of digits to extract. Must be greater zero * and less or equal to OFnumeric_limits::digits10 - * @param string a pointer to a character array to extract digits from. + * @tparam string a pointer to a character array to extract digits from. * @return a value of type T that is equivalent to the number represented * by the digits. * @details @@ -1020,7 +1023,7 @@ static OFTypename OFenable_if < OFnumeric_limits::is_integer && ( Count > 1 ) && - OFnumeric_limits::digits10 >= Count, + OFstatic_cast(size_t, OFnumeric_limits::digits10) >= Count, T >::type extractDigits(const char* string) { @@ -1151,6 +1154,17 @@ */ static OFerror_code getLastNetworkErrorCode(); + /** Method that ensures that the current thread is actually sleeping for the + * defined number of seconds (at least). + * The problem with the regular sleep() function called from + * OFStandard::sleep is that it might be interrupted by signals or a + * network timeout (depending on the operating system). This methods + * re-executes OFStandard's sleep method until the desired number of + * seconds have elapsed. + * @param seconds The number of seconds to sleep (at least) + */ + static void forceSleep(Uint32 seconds); + private: /** private implementation of strlcpy. Called when strlcpy diff -Nru dcmtk-3.6.6/ofstd/include/dcmtk/ofstd/ofstdinc.h dcmtk-3.6.7/ofstd/include/dcmtk/ofstd/ofstdinc.h --- dcmtk-3.6.6/ofstd/include/dcmtk/ofstd/ofstdinc.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/ofstd/include/dcmtk/ofstd/ofstdinc.h 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2002-2018, OFFIS e.V. + * Copyright (C) 2002-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -44,351 +44,163 @@ #endif #endif -/* Header files as defined in ISO/IEC 14882:1998, Section 17.4.1.2, Table 11 - * These are header files for the Standard C++ Library. +/* Print an error message in case some user code still uses the now unsupported + * include macros. A clear error message is better than follow-up errors due to + * "suddenly" missing includes. */ -// define INCLUDE_ALGORITHM to include "ofalgo.h" #ifdef INCLUDE_ALGORITHM -#include "dcmtk/ofstd/ofalgo.h" +#error "Macro INCLUDE_ALGORITHM not supported anymore. Include 'dcmtk/ofstd/ofalgo.h' instead." #endif -// we don't yet support , , , , - -// all stream related headers are handled by "ofstream.h" -#if defined(INCLUDE_IOSFWD) || defined(INCLUDE_IOSTREAM) || defined(INCLUDE_ISTREAM) || \ - defined(INCLUDE_OSTREAM) || defined(INCLUDE_IOMANIP) || defined(INCLUDE_IOS) || \ - defined(INCLUDE_FSTREAM) || defined(INCLUDE_SSTREAM) -#include "dcmtk/ofstd/ofstream.h" -#endif - -// we don't yet support , - -// define INCLUDE_LIST to include "oflist.h" -#ifdef INCLUDE_LIST -#include "dcmtk/ofstd/oflist.h" -#endif - -// define INCLUDE_LOCALE to include or if available -#ifdef INCLUDE_LOCALE -#ifdef USE_STD_CXX_INCLUDES -#include -#elif defined(HAVE_LOCALE_H) -#include -#endif -#endif - -// we don't yet support , , - -// define INCLUDE_MAP to include "ofmap.h" -#ifdef INCLUDE_MAP -#include "dcmtk/ofstd/ofmap.h" -#endif - -// define INCLUDE_MEMORY to include or if available -#ifdef INCLUDE_MEMORY -#ifdef USE_STD_CXX_INCLUDES -#include -#elif defined(HAVE_MEMORY_H) -#include -#endif -#endif - -// define INCLUDE_NEW to include or if available -#ifdef INCLUDE_NEW -#ifdef USE_STD_CXX_INCLUDES -#include -#elif defined(HAVE_NEW_H) -#include -#endif -#endif - -// define INCLUDE_STACK to include "ofstack.h" -#ifdef INCLUDE_STACK -#include "dcmtk/ofstd/ofstack.h" -#endif - -// we don't yet support - -// define INCLUDE_STREAMBUF to include or if available -#ifdef INCLUDE_STREAMBUF -#ifdef USE_STD_CXX_INCLUDES -#include -#elif defined(HAVE_STREAMBUF_H) -#include -#endif -#endif - -// define INCLUDE_STRING to include "ofstring.h" -#ifdef INCLUDE_STRING -#include "dcmtk/ofstd/ofstring.h" -#endif - -// we don't yet support , - -// define INCLUDE_VECTOR to include "ofvector.h" -#ifdef INCLUDE_VECTOR -#include "dcmtk/ofstd/ofvector.h" -#endif - - -/* Header files as defined in ISO/IEC 14882:1998, Section 17.4.1.2, Table 12 - * These are header files for the Standard C Library. - */ - -// define INCLUDE_CASSERT to include or if available #ifdef INCLUDE_CASSERT -#ifdef USE_STD_CXX_INCLUDES -#include -#elif defined(HAVE_ASSERT_H) -BEGIN_EXTERN_C -#include -END_EXTERN_C -#endif +#error "Macro INCLUDE_CASSERT not supported anymore. Include directly." #endif -// define INCLUDE_CCTYPE to include or if available #ifdef INCLUDE_CCTYPE -#ifdef USE_STD_CXX_INCLUDES -#include -#elif defined(HAVE_CTYPE_H) -BEGIN_EXTERN_C -#include -END_EXTERN_C -#endif +#error "Macro INCLUDE_CCTYPE not supported anymore. Include directly." #endif -// define INCLUDE_CERRNO to include or if available #ifdef INCLUDE_CERRNO -#ifdef USE_STD_CXX_INCLUDES -#include -#elif defined(HAVE_ERRNO_H) -BEGIN_EXTERN_C -#include -END_EXTERN_C -#endif +#error "Macro INCLUDE_CERRNO not supported anymore. Include directly." #endif -// define INCLUDE_CFLOAT to include or if available #ifdef INCLUDE_CFLOAT -#ifdef USE_STD_CXX_INCLUDES -#include -#elif defined(HAVE_FLOAT_H) -BEGIN_EXTERN_C -#include -END_EXTERN_C +#error "Macro INCLUDE_CFLOAT not supported anymore. Include directly." #endif + +#ifdef INCLUDE_CINTTYPES +#error "Macro INCLUDE_CINTTYPES not supported anymore. Include (C99) or (C++11) directly." #endif -// define INCLUDE_CISO646 to include or if available #ifdef INCLUDE_CISO646 -#ifdef USE_STD_CXX_INCLUDES -#include -#elif defined(HAVE_ISO646_H) -BEGIN_EXTERN_C -#include -END_EXTERN_C -#endif +#error "Macro INCLUDE_CISO646 not supported anymore. Include directly." #endif -// define INCLUDE_CLIMITS to include or if available #ifdef INCLUDE_CLIMITS -#ifdef USE_STD_CXX_INCLUDES -#include -#elif defined(HAVE_LIMITS_H) -BEGIN_EXTERN_C -#include -END_EXTERN_C -#endif +#error "Macro INCLUDE_CLIMITS not supported anymore. Include directly." #endif -// define INCLUDE_CLOCALE to include or if available #ifdef INCLUDE_CLOCALE -#ifdef USE_STD_CXX_INCLUDES -#include -#elif defined(HAVE_LOCALE_H) -BEGIN_EXTERN_C -#include -END_EXTERN_C -#endif +#error "Macro INCLUDE_CLOCALE not supported anymore. Include directly." #endif -// define INCLUDE_CMATH to include or if available #ifdef INCLUDE_CMATH -#if defined(USE_STD_CXX_INCLUDES) && defined(HAVE_CMATH) -#include -#elif defined(HAVE_MATH_H) -#ifndef INCLUDE_MATH_H_AS_CXX -// some systems use C++ language features in -BEGIN_EXTERN_C -#endif -#include -#ifndef INCLUDE_MATH_H_AS_CXX -END_EXTERN_C -#endif -#endif +#error "Macro INCLUDE_CMATH not supported anymore. Include directly." #endif -// define INCLUDE_CSETJMP to include or if available #ifdef INCLUDE_CSETJMP -#ifdef USE_STD_CXX_INCLUDES -#include -#elif defined(HAVE_SETJMP_H) -BEGIN_EXTERN_C -#include -END_EXTERN_C -#endif +#error "Macro INCLUDE_CSETJMP not supported anymore. Include directly." #endif -// define INCLUDE_CSIGNAL to include or if available #ifdef INCLUDE_CSIGNAL -#ifdef USE_STD_CXX_INCLUDES -#include -#elif defined(HAVE_SIGNAL_H) -BEGIN_EXTERN_C -#include -END_EXTERN_C -#endif +#error "Macro INCLUDE_CSIGNAL not supported anymore. Include directly." #endif -// define INCLUDE_CSTDARG to include or if available #ifdef INCLUDE_CSTDARG -#ifdef USE_STD_CXX_INCLUDES -#include -#elif defined(HAVE_STDARG_H) -BEGIN_EXTERN_C -#include -END_EXTERN_C -#endif +#error "Macro INCLUDE_CSTDARG not supported anymore. Include directly." #endif -// define INCLUDE_CSTDDEF to include or if available #ifdef INCLUDE_CSTDDEF -#if defined(USE_STD_CXX_INCLUDES) && defined(HAVE_CSTDDEF) -#include -#elif defined(HAVE_STDDEF_H) -BEGIN_EXTERN_C -#include -END_EXTERN_C -#endif +#error "Macro INCLUDE_CSTDDEF not supported anymore. Include directly." #endif -// define INCLUDE_CSTDDINT to include , or if available #ifdef INCLUDE_CSTDINT -#if defined(USE_STD_CXX_INCLUDES) && defined(HAVE_CSTDINT) -#include -#elif defined(HAVE_STDINT_H) -#include -#elif defined(HAVE_SYS_TYPES_H) -#include +#error "Macro INCLUDE_CSTDINT not supported anymore. Include directly." #endif + +#ifdef INCLUDE_CSTDIO +#error "Macro INCLUDE_CSTDIO not supported anymore. Include directly." #endif -// define INCLUDE_CINTTYPES to include or if available -#ifdef INCLUDE_CINTTYPES -// TODO: see DCMTK issues 762, 774 and 778 -//#ifdef USE_STD_CXX_INCLUDES -//#include -//#elif defined(HAVE_INTTYPES_H) -#ifdef HAVE_INTTYPES_H -BEGIN_EXTERN_C -#include -END_EXTERN_C +#ifdef INCLUDE_CSTDLIB +#error "Macro INCLUDE_CSTDLIB not supported anymore. Include directly." #endif + +#ifdef INCLUDE_CSTRING +#error "Macro INCLUDE_CSTRING not supported anymore. Include directly." #endif -// define INCLUDE_CSTDIO to include or if available -#ifdef INCLUDE_CSTDIO -#ifdef USE_STD_CXX_INCLUDES -#include -#elif defined(HAVE_STDIO_H) -BEGIN_EXTERN_C -#include -END_EXTERN_C +#ifdef INCLUDE_CTIME +#error "Macro INCLUDE_CTIME not supported anymore. Include directly." #endif -// MSVC6 doesn't know vsnprintf(), but it does know _vsnprintf() -#if defined(_WIN32) && !defined(HAVE_VSNPRINTF) -#define vsnprintf _vsnprintf + +#ifdef INCLUDE_CWCTYPE +#error "Macro INCLUDE_CWCTYPE not supported anymore. Include directly." #endif + +#ifdef INCLUDE_FSTREAM +#error "Macro INCLUDE_FSTREAM not supported anymore. Include 'dcmtk/ofstd/ofstream.h' instead." #endif -// define INCLUDE_CSTDLIB to include or if available -#ifdef INCLUDE_CSTDLIB -#ifdef USE_STD_CXX_INCLUDES -#include -#elif defined(HAVE_STDLIB_H) -/* workaround for bug in Borland C++ Builder */ -#ifndef __BORLANDC__ -BEGIN_EXTERN_C +#ifdef INCLUDE_IOMANIP +#error "Macro INCLUDE_IOMANIP not supported anymore. Include 'dcmtk/ofstd/ofstream.h' instead." #endif -#include -#ifndef __BORLANDC__ -END_EXTERN_C + +#ifdef INCLUDE_IOS +#error "Macro INCLUDE_IOS not supported anymore. Include 'dcmtk/ofstd/ofstream.h' instead." #endif + +#ifdef INCLUDE_IOSFWD +#error "Macro INCLUDE_IOSFWD not supported anymore. Include 'dcmtk/ofstd/ofstream.h' instead." #endif + +#ifdef INCLUDE_IOSTREAM +#error "Macro INCLUDE_IOSTREAM not supported anymore. Include 'dcmtk/ofstd/ofstream.h' instead." #endif -// define INCLUDE_CSTRING to include or if available -#ifdef INCLUDE_CSTRING -#ifdef USE_STD_CXX_INCLUDES -#include -#elif defined(HAVE_STRING_H) -BEGIN_EXTERN_C -#include -END_EXTERN_C -#endif -// Some platforms define additional string functions like bzero or -// strcasecmp in , so we always include this file if available. -#ifdef HAVE_STRINGS_H -BEGIN_EXTERN_C -#include -END_EXTERN_C +#ifdef INCLUDE_ISTREAM +#error "Macro INCLUDE_ISTREAM not supported anymore. Include 'dcmtk/ofstd/ofstream.h' instead." #endif + +#ifdef INCLUDE_LIBC +#error "Macro INCLUDE_LIBC not supported anymore. Include directly." #endif -// define INCLUDE_CTIME to include or if available -#ifdef INCLUDE_CTIME -#ifdef USE_STD_CXX_INCLUDES -#include -#elif defined(HAVE_TIME_H) -BEGIN_EXTERN_C -#include -END_EXTERN_C +#ifdef INCLUDE_LIST +#error "Macro INCLUDE_LIST not supported anymore. Include 'dcmtk/ofstd/oflist.h' instead." #endif + +#ifdef INCLUDE_LOCALE +#error "Macro INCLUDE_LOCALE not supported anymore. Include directly." #endif -// define INCLUDE_CWCTYPE to include or if available -#ifdef INCLUDE_CWCTYPE -#ifdef USE_STD_CXX_INCLUDES -#include -#elif defined(HAVE_WCTYPE_H) -BEGIN_EXTERN_C -#include -END_EXTERN_C +#ifdef INCLUDE_MAP +#error "Macro INCLUDE_MAP not supported anymore. Include 'dcmtk/ofstd/ofmap.h' instead." #endif + +#ifdef INCLUDE_MEMORY +#error "Macro INCLUDE_MEMORY not supported anymore. Include directly." #endif +#ifdef INCLUDE_NEW +#error "Macro INCLUDE_NEW not supported anymore. Include directly." +#endif -/* Headers other than ISO C++, such as BSD and Posix.1 headers */ +#ifdef INCLUDE_OSTREAM +#error "Macro INCLUDE_OSTREAM not supported anymore. Include 'dcmtk/ofstd/ofstream.h' instead." +#endif -// define INCLUDE_LIBC to include if available -#ifdef INCLUDE_LIBC -#ifdef HAVE_LIBC_H -#ifndef INCLUDE_LIBC_H_AS_CXX -BEGIN_EXTERN_C +#ifdef INCLUDE_SSTREAM +#error "Macro INCLUDE_SSTREAM not supported anymore. Include 'dcmtk/ofstd/ofstream.h' instead." #endif -#include -#ifndef INCLUDE_LIBC_H_AS_CXX -END_EXTERN_C + +#ifdef INCLUDE_STACK +#error "Macro INCLUDE_STACK not supported anymore. Include 'dcmtk/ofstd/ofstack.h' instead." #endif + +#ifdef INCLUDE_STREAMBUF +#error "Macro INCLUDE_STREAMBUF not supported anymore. Include directly." #endif + +#ifdef INCLUDE_STRING +#error "Macro INCLUDE_STRING not supported anymore. Include 'dcmtk/ofstd/ofstring.h' instead." #endif -// define INCLUDE_UNISTD to include if available #ifdef INCLUDE_UNISTD -#ifdef HAVE_UNISTD_H -BEGIN_EXTERN_C -#include -END_EXTERN_C +#error "Macro INCLUDE_UNISTD not supported anymore. Include directly." #endif + +#ifdef INCLUDE_VECTOR +#error "Macro INCLUDE_VECTOR not supported anymore. Include 'dcmtk/ofstd/ofvector.h' instead." #endif diff -Nru dcmtk-3.6.6/ofstd/include/dcmtk/ofstd/ofstream.h dcmtk-3.6.7/ofstd/include/dcmtk/ofstd/ofstream.h --- dcmtk-3.6.6/ofstd/include/dcmtk/ofstd/ofstream.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/ofstd/include/dcmtk/ofstd/ofstream.h 2022-04-28 13:47:25.000000000 +0000 @@ -25,8 +25,6 @@ #include "dcmtk/config/osconfig.h" -#ifdef USE_STD_CXX_INCLUDES - #include #ifdef HAVE_IOS #include @@ -50,31 +48,7 @@ * If user code still relies on namespace std to be included, compile with * macro USING_STD_NAMESPACE defined. */ -#ifdef USING_STD_NAMESPACE -namespace std { } -using namespace std; -#endif - -#else /* USE_STD_CXX_INCLUDES */ - -#include -#include -// For old STREAMS library: preference for strstream -#if defined(HAVE_STRSTREA_H) || defined(HAVE_STRSTREAM_H) -#ifdef HAVE_STRSTREA_H -#include -#else -#include -#endif -#elif defined(HAVE_SSTREAM_H) -#include -#define USE_STRINGSTREAM -#else -#error DCMTK needs stringstream or strstream type -#endif -#include - -#endif /* USE_STD_CXX_INCLUDES */ +#include "dcmtk/ofstd/ofstdinc.h" // define STD_NAMESPACE to std:: if the standard namespace exists #ifndef STD_NAMESPACE diff -Nru dcmtk-3.6.6/ofstd/include/dcmtk/ofstd/ofstring.h dcmtk-3.6.7/ofstd/include/dcmtk/ofstd/ofstring.h --- dcmtk-3.6.6/ofstd/include/dcmtk/ofstd/ofstring.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/ofstd/include/dcmtk/ofstd/ofstring.h 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1997-2017, OFFIS e.V. + * Copyright (C) 1997-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -49,12 +49,7 @@ ** Declare our own string class */ -#define INCLUDE_CASSERT -#define INCLUDE_CSTRING -#define INCLUDE_CSTDLIB -#define INCLUDE_LIBC -#define INCLUDE_UNISTD -#include "dcmtk/ofstd/ofstdinc.h" +#include #include "dcmtk/ofstd/ofstream.h" #include "dcmtk/ofstd/oftypes.h" diff -Nru dcmtk-3.6.6/ofstd/include/dcmtk/ofstd/oftest.h dcmtk-3.6.7/ofstd/include/dcmtk/ofstd/oftest.h --- dcmtk-3.6.6/ofstd/include/dcmtk/ofstd/oftest.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/ofstd/include/dcmtk/ofstd/oftest.h 2022-04-28 13:47:25.000000000 +0000 @@ -105,13 +105,11 @@ } /** Execute this test case. - * @param result the list of error messages generated by this test. * @see #OFCHECK(condition) */ virtual void run() = 0; /** Add a new failure to the result set. - * @param result list of test failures * @param file filename for this failure * @param line line number for this failure * @param message error description. diff -Nru dcmtk-3.6.6/ofstd/include/dcmtk/ofstd/oftime.h dcmtk-3.6.7/ofstd/include/dcmtk/ofstd/oftime.h --- dcmtk-3.6.6/ofstd/include/dcmtk/ofstd/oftime.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/ofstd/include/dcmtk/ofstd/oftime.h 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2002-2020, OFFIS e.V. + * Copyright (C) 2002-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -25,9 +25,6 @@ #include "dcmtk/config/osconfig.h" -#define INCLUDE_CTIME -#include "dcmtk/ofstd/ofstdinc.h" - BEGIN_EXTERN_C #ifdef HAVE_SYS_TYPES_H # include /* for struct time_t */ diff -Nru dcmtk-3.6.6/ofstd/include/dcmtk/ofstd/oftypes.h dcmtk-3.6.7/ofstd/include/dcmtk/ofstd/oftypes.h --- dcmtk-3.6.6/ofstd/include/dcmtk/ofstd/oftypes.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/ofstd/include/dcmtk/ofstd/oftypes.h 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1997-2019, OFFIS e.V. + * Copyright (C) 1997-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -27,17 +27,24 @@ #include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ #include "dcmtk/ofstd/ofdefine.h" +// some C++ implementations only define printf format macros like PRIu32 +// when this macro is defined before or are included. +#define __STDC_FORMAT_MACROS 1 + // include this file in doxygen documentation /** @file oftypes.h * @brief Definition of standard types used throughout the toolkit */ +#include "dcmtk/ofstd/ofstdinc.h" + // use native types if C++11 is supported #ifdef HAVE_CXX11 #include #include #include +#include #define OFTypename typename #define OFlonglong long long @@ -68,11 +75,17 @@ #else // fallback definitions -#define INCLUDE_OSTREAM -#define INCLUDE_CSTDINT -#define INCLUDE_CSTDDEF -#define INCLUDE_CINTTYPES -#include "dcmtk/ofstd/ofstdinc.h" +#include +BEGIN_EXTERN_C +#ifdef HAVE_STDINT_H +#include +#endif +#ifdef HAVE_INTTYPES_H +#include +#endif +END_EXTERN_C + +#include "dcmtk/ofstd/ofstream.h" typedef signed char Sint8; typedef unsigned char Uint8; diff -Nru dcmtk-3.6.6/ofstd/include/dcmtk/ofstd/ofvector.h dcmtk-3.6.7/ofstd/include/dcmtk/ofstd/ofvector.h --- dcmtk-3.6.6/ofstd/include/dcmtk/ofstd/ofvector.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/ofstd/include/dcmtk/ofstd/ofvector.h 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2010-2018, OFFIS e.V. + * Copyright (C) 2010-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -41,9 +41,8 @@ #else -#define INCLUDE_CASSERT /* for assert() */ -#define INCLUDE_CSTDLIB /* for NULL */ -#include "dcmtk/ofstd/ofstdinc.h" +#include + #include "dcmtk/ofstd/oftypes.h" /* for OFBool */ /** this is a resizable array. You can add and remove elements after it was diff -Nru dcmtk-3.6.6/ofstd/include/dcmtk/ofstd/ofvriant.h dcmtk-3.6.7/ofstd/include/dcmtk/ofstd/ofvriant.h --- dcmtk-3.6.6/ofstd/include/dcmtk/ofstd/ofvriant.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/ofstd/include/dcmtk/ofstd/ofvriant.h 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2016-2017, OFFIS e.V. + * Copyright (C) 2016-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -23,6 +23,7 @@ #define OFVARIANT_H #include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ +#include "dcmtk/ofstd/ofdiag.h" /** @file * Declares OFvariant and related functionality. @@ -39,6 +40,10 @@ #include #include +// suppress warnings generated by old gcc 4.x compiler versions +#include DCMTK_DIAGNOSTIC_PUSH +#include DCMTK_DIAGNOSTIC_IGNORE_STRICT_ALIASING_WARNING + template class OFvariant_traits { @@ -373,6 +378,8 @@ return (v.*visit[v.index()])( std::forward( fn ) ); } +#include DCMTK_DIAGNOSTIC_POP + #elif !defined(DOXYGEN) // fallback implementation // Include the actual implementation (that emulates variadic templates) @@ -429,7 +436,7 @@ * argument. * @tparam T the type of the argument, will be deduced automatically. * @param t an object of type `T` that will be converted to one of the alternatives. - * @precondition There must be at least one alternative that can be constructed from + * @remark There must be at least one alternative that can be constructed from * the given parameter `t` and there must be exactly one such alternative that * takes precedence over the others. * @attention t will be perfectly forwarded if C++11 support is available, i.e. the diff -Nru dcmtk-3.6.6/ofstd/include/dcmtk/ofstd/ofxml.h dcmtk-3.6.7/ofstd/include/dcmtk/ofstd/ofxml.h --- dcmtk-3.6.6/ofstd/include/dcmtk/ofstd/ofxml.h 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/ofstd/include/dcmtk/ofstd/ofxml.h 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2011-2020, OFFIS e.V. + * Copyright (C) 2011-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were slightly modified by @@ -138,9 +138,8 @@ // DCMTK: we need this header file at the beginning of each file #include "dcmtk/config/osconfig.h" -// DCMTK: we want to use our own standard include wrappers -#define INCLUDE_CSTDLIB -#include "dcmtk/ofstd/ofstdinc.h" +#include + #include "dcmtk/ofstd/ofdefine.h" // DCMTK: The XML parser is compiled in wide char (UTF-16) mode if and only if this macro is defined. diff -Nru dcmtk-3.6.6/ofstd/libsrc/CMakeLists.txt dcmtk-3.6.7/ofstd/libsrc/CMakeLists.txt --- dcmtk-3.6.6/ofstd/libsrc/CMakeLists.txt 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/ofstd/libsrc/CMakeLists.txt 2022-04-28 13:47:25.000000000 +0000 @@ -1,4 +1,31 @@ # create library from source files -DCMTK_ADD_LIBRARY(ofstd ofchrenc ofcmdln ofconapp ofcond ofconfig ofconsol ofcrc32 ofdate ofdatime oferror offile offilsys offname oflist ofstd ofstring ofstrutl ofthread oftime oftimer oftempf ofxml ofuuid ofmath ofsockad ofrand) +DCMTK_ADD_LIBRARY(ofstd + ofchrenc.cc + ofcmdln.cc + ofconapp.cc + ofcond.cc + ofconfig.cc + ofconsol.cc + ofcrc32.cc + ofdate.cc + ofdatime.cc + oferror.cc + offile.cc + offilsys.cc + offname.cc + oflist.cc + ofstd.cc + ofstring.cc + ofstrutl.cc + ofthread.cc + oftime.cc + oftimer.cc + oftempf.cc + ofxml.cc + ofuuid.cc + ofmath.cc + ofsockad.cc + ofrand.cc +) -DCMTK_TARGET_LINK_LIBRARIES(ofstd ${CHARSET_CONVERSION_LIBS} ${SOCKET_LIBS} ${THREAD_LIBS} ${WIN32_STD_LIBRARIES}) +DCMTK_TARGET_LINK_LIBRARIES(ofstd config ${CHARSET_CONVERSION_LIBS} ${SOCKET_LIBS} ${THREAD_LIBS} ${WIN32_STD_LIBRARIES}) diff -Nru dcmtk-3.6.6/ofstd/libsrc/Makefile.dep dcmtk-3.6.7/ofstd/libsrc/Makefile.dep --- dcmtk-3.6.6/ofstd/libsrc/Makefile.dep 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/ofstd/libsrc/Makefile.dep 2022-04-28 13:47:25.000000000 +0000 @@ -6,10 +6,14 @@ ../include/dcmtk/ofstd/ofstring.h ../include/dcmtk/ofstd/ofmem.h \ ../include/dcmtk/ofstd/ofutil.h ../include/dcmtk/ofstd/oftraits.h \ ../include/dcmtk/ofstd/variadic/tuplefwd.h \ - ../include/dcmtk/ofstd/ofthread.h ../include/dcmtk/ofstd/ofstd.h \ - ../include/dcmtk/ofstd/oflist.h ../include/dcmtk/ofstd/oflimits.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/oferror.h ../include/dcmtk/ofstd/ofdiag.h \ - ../include/dcmtk/ofstd/ofconsol.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 \ ../include/dcmtk/ofstd/ofcmdln.h ../include/dcmtk/ofstd/oftypes.h \ ../include/dcmtk/ofstd/ofdefine.h ../include/dcmtk/ofstd/ofcast.h \ @@ -19,9 +23,10 @@ ../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/ofcond.h \ - ../include/dcmtk/ofstd/oflimits.h ../include/dcmtk/ofstd/oferror.h \ - ../include/dcmtk/ofstd/ofchrenc.h ../include/dcmtk/ofstd/ofmem.h \ - ../include/dcmtk/ofstd/ofutil.h \ + ../include/dcmtk/ofstd/oflimits.h \ + ../../config/include/dcmtk/config/arith.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 \ @@ -33,7 +38,11 @@ ../include/dcmtk/ofstd/ofconsol.h ../include/dcmtk/ofstd/ofthread.h \ ../include/dcmtk/ofstd/offile.h ../include/dcmtk/ofstd/ofstd.h \ ../include/dcmtk/ofstd/ofcond.h ../include/dcmtk/ofstd/oflimits.h \ - ../include/dcmtk/ofstd/oferror.h ../include/dcmtk/ofstd/ofexit.h + ../../config/include/dcmtk/config/arith.h \ + ../include/dcmtk/ofstd/oferror.h ../include/dcmtk/ofstd/ofexit.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 \ ../include/dcmtk/ofstd/ofdefine.h ../include/dcmtk/ofstd/ofcast.h \ @@ -47,32 +56,32 @@ ../include/dcmtk/ofstd/ofstack.h ofconsol.o: ofconsol.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/ofstd/ofconsol.h ../include/dcmtk/ofstd/ofstream.h \ - ../include/dcmtk/ofstd/ofthread.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/ofstdinc.h ../include/dcmtk/ofstd/ofthread.h \ + ../include/dcmtk/ofstd/oftypes.h ../include/dcmtk/ofstd/ofdefine.h \ + ../include/dcmtk/ofstd/ofcast.h ../include/dcmtk/ofstd/ofexport.h \ ../include/dcmtk/ofstd/ofstring.h ofcrc32.o: ofcrc32.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/ofstd/ofcrc32.h ../include/dcmtk/ofstd/ofdefine.h \ - ../include/dcmtk/ofstd/ofcast.h ../include/dcmtk/ofstd/ofexport.h \ - ../include/dcmtk/ofstd/ofstdinc.h + ../include/dcmtk/ofstd/ofcast.h ../include/dcmtk/ofstd/ofexport.h ofdate.o: ofdate.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/ofstd/ofdate.h ../include/dcmtk/ofstd/ofstring.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 ofdatime.o: ofdatime.cc ../../config/include/dcmtk/config/osconfig.h \ - ../include/dcmtk/ofstd/ofstdinc.h ../include/dcmtk/ofstd/ofdatime.h \ - ../include/dcmtk/ofstd/ofstring.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/ofdatime.h ../include/dcmtk/ofstd/ofstring.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/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/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/ofstdinc.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 \ @@ -84,20 +93,19 @@ ../include/dcmtk/ofstd/ofstream.h ../include/dcmtk/ofstd/ofstring.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 ../include/dcmtk/ofstd/oferror.h \ - ../include/dcmtk/ofstd/offilsys.h ../include/dcmtk/ofstd/ofmem.h \ - ../include/dcmtk/ofstd/ofutil.h \ - ../include/dcmtk/ofstd/variadic/tuplefwd.h \ - ../include/dcmtk/ofstd/ofthread.h + ../include/dcmtk/ofstd/oflimits.h \ + ../../config/include/dcmtk/config/arith.h \ + ../include/dcmtk/ofstd/oferror.h ../include/dcmtk/ofstd/offilsys.h \ + ../include/dcmtk/ofstd/ofmem.h ../include/dcmtk/ofstd/ofutil.h \ + ../include/dcmtk/ofstd/variadic/tuplefwd.h offilsys.o: offilsys.cc ../../config/include/dcmtk/config/osconfig.h \ - ../include/dcmtk/ofstd/ofstdinc.h ../include/dcmtk/ofstd/offilsys.h \ - ../include/dcmtk/ofstd/ofstring.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/offilsys.h ../include/dcmtk/ofstd/ofstring.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/ofmem.h ../include/dcmtk/ofstd/ofutil.h \ ../include/dcmtk/ofstd/oftraits.h \ - ../include/dcmtk/ofstd/variadic/tuplefwd.h \ - ../include/dcmtk/ofstd/ofthread.h + ../include/dcmtk/ofstd/variadic/tuplefwd.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 \ @@ -105,7 +113,9 @@ ../include/dcmtk/ofstd/ofstream.h ../include/dcmtk/ofstd/ofstring.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 ../include/dcmtk/ofstd/oferror.h + ../include/dcmtk/ofstd/oflimits.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 \ @@ -113,9 +123,9 @@ ../include/dcmtk/ofstd/ofstream.h ofmath.o: ofmath.cc ../../config/math.cc \ ../../config/include/dcmtk/config/osconfig.h \ - ../include/dcmtk/ofstd/ofstdinc.h ../include/dcmtk/ofstd/ofstream.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/ofmath.h ../include/dcmtk/ofstd/oftraits.h ofrand.o: ofrand.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/ofstd/ofrand.h ../include/dcmtk/ofstd/oftypes.h \ @@ -124,11 +134,13 @@ ../include/dcmtk/ofstd/ofstream.h ../include/dcmtk/ofstd/ofstd.h \ ../include/dcmtk/ofstd/oflist.h ../include/dcmtk/ofstd/ofstring.h \ ../include/dcmtk/ofstd/oftraits.h ../include/dcmtk/ofstd/ofcond.h \ - ../include/dcmtk/ofstd/oflimits.h ../include/dcmtk/ofstd/oferror.h + ../include/dcmtk/ofstd/oflimits.h \ + ../../config/include/dcmtk/config/arith.h \ + ../include/dcmtk/ofstd/oferror.h ofsockad.o: ofsockad.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/ofstd/ofsockad.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/ofstream.h ../include/dcmtk/ofstd/ofstdinc.h ofstd.o: ofstd.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 \ @@ -136,6 +148,7 @@ ../include/dcmtk/ofstd/ofstdinc.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/offile.h \ ../include/dcmtk/ofstd/oftuple.h ../include/dcmtk/ofstd/ofutil.h \ ../include/dcmtk/ofstd/variadic/tuplefwd.h \ @@ -145,8 +158,10 @@ ../include/dcmtk/ofstd/variadic/tuple.h \ ../include/dcmtk/ofstd/diag/pop.def ../include/dcmtk/ofstd/ofmath.h \ ../include/dcmtk/ofstd/ofsockad.h ../include/dcmtk/ofstd/ofvector.h \ - ../include/dcmtk/ofstd/ofgrp.h ../include/dcmtk/ofstd/ofpwd.h \ - ../include/dcmtk/ofstd/ofoption.h ../include/dcmtk/ofstd/ofalign.h + ../include/dcmtk/ofstd/oftimer.h ../include/dcmtk/ofstd/ofgrp.h \ + ../include/dcmtk/ofstd/ofpwd.h ../include/dcmtk/ofstd/ofoption.h \ + ../include/dcmtk/ofstd/ofalign.h \ + ../include/dcmtk/ofstd/diag/stralias.def ofstring.o: ofstring.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 \ @@ -154,7 +169,9 @@ ../include/dcmtk/ofstd/ofstream.h ../include/dcmtk/ofstd/ofbmanip.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 ../include/dcmtk/ofstd/oferror.h + ../include/dcmtk/ofstd/oflimits.h \ + ../../config/include/dcmtk/config/arith.h \ + ../include/dcmtk/ofstd/oferror.h ofstrutl.o: ofstrutl.cc ../include/dcmtk/ofstd/ofstrutl.h \ ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/ofstd/ofstring.h ../include/dcmtk/ofstd/oftypes.h \ @@ -169,12 +186,17 @@ ../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 \ ../include/dcmtk/ofstd/oferror.h ofthread.o: ofthread.cc ../../config/include/dcmtk/config/osconfig.h \ - ../include/dcmtk/ofstd/ofthread.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/ofstring.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/ofstdinc.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/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 \ @@ -183,11 +205,13 @@ ../include/dcmtk/ofstd/ofexport.h ../include/dcmtk/ofstd/ofstream.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 ../include/dcmtk/ofstd/oferror.h + ../include/dcmtk/ofstd/oflimits.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 \ - ../include/dcmtk/ofstd/ofexport.h ../include/dcmtk/ofstd/ofstdinc.h + ../include/dcmtk/ofstd/ofstdinc.h ../include/dcmtk/ofstd/ofdefine.h \ + ../include/dcmtk/ofstd/ofcast.h ../include/dcmtk/ofstd/ofexport.h ofuuid.o: ofuuid.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/ofstd/ofuuid.h ../include/dcmtk/ofstd/oftypes.h \ ../include/dcmtk/ofstd/ofdefine.h ../include/dcmtk/ofstd/ofcast.h \ @@ -196,8 +220,11 @@ ../include/dcmtk/ofstd/ofrand.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 ../include/dcmtk/ofstd/oferror.h + ../include/dcmtk/ofstd/oflimits.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 \ - ../include/dcmtk/ofstd/ofexport.h + ../include/dcmtk/ofstd/ofstdinc.h ../include/dcmtk/ofstd/ofdiag.h \ + ../include/dcmtk/ofstd/ofxml.h ../include/dcmtk/ofstd/ofdefine.h \ + ../include/dcmtk/ofstd/ofcast.h ../include/dcmtk/ofstd/ofexport.h \ + ../include/dcmtk/ofstd/diag/memacces.def diff -Nru dcmtk-3.6.6/ofstd/libsrc/ofchrenc.cc dcmtk-3.6.7/ofstd/libsrc/ofchrenc.cc --- dcmtk-3.6.6/ofstd/libsrc/ofchrenc.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/ofstd/libsrc/ofchrenc.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2011-2019, OFFIS e.V. + * Copyright (C) 2011-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -26,9 +26,7 @@ #include "dcmtk/ofstd/ofstd.h" #include "dcmtk/ofstd/ofdiag.h" #include "dcmtk/ofstd/ofconsol.h" - -#define INCLUDE_CERRNO -#include "dcmtk/ofstd/ofstdinc.h" +#include #ifdef HAVE_WINDOWS_H #define WIN32_LEAN_AND_MEAN @@ -376,8 +374,9 @@ // different encoding flags and only has a (varying) fixed functionality // that we detect with a configuration test. return flags == DCMTK_FIXED_ICONV_CONVERSION_FLAGS; -#endif +#else return OFFalse; +#endif } unsigned getConversionFlags() const @@ -404,8 +403,9 @@ // different encoding flags and only has a (varying) fixed functionality // that we detect with a configuration test. return DCMTK_FIXED_ICONV_CONVERSION_FLAGS; -#endif +#else return 0; +#endif } OFBool setConversionFlags(const unsigned flags) @@ -451,8 +451,9 @@ // different encoding flags and only has a (varying) fixed functionality // that we detect with a configuration test. return flags == DCMTK_FIXED_ICONV_CONVERSION_FLAGS; -#endif +#else return OFFalse; +#endif } @@ -600,14 +601,17 @@ } +#ifdef DCMTK_ENABLE_CHARSET_CONVERSION OFBool OFCharacterEncoding::supportsConversionFlags(const unsigned flags) { -#ifdef DCMTK_ENABLE_CHARSET_CONVERSION return Implementation::supportsConversionFlags(flags); +} #else +OFBool OFCharacterEncoding::supportsConversionFlags(const unsigned /* flags */) +{ return OFFalse; -#endif } +#endif OFCharacterEncoding::OFCharacterEncoding() @@ -678,9 +682,9 @@ } +#ifdef DCMTK_ENABLE_CHARSET_CONVERSION OFCondition OFCharacterEncoding::setConversionFlags(const unsigned flags) { -#ifdef DCMTK_ENABLE_CHARSET_CONVERSION if (TheImplementation) { if (TheImplementation->setConversionFlags(flags)) @@ -689,42 +693,55 @@ "Conversion flags not supported by the underlying implementation"); } return EC_NoEncodingSelected; -#endif +} +#else +OFCondition OFCharacterEncoding::setConversionFlags(const unsigned /* flags */) +{ return EC_NoEncodingLibrary; } +#endif +#ifdef DCMTK_ENABLE_CHARSET_CONVERSION OFCondition OFCharacterEncoding::selectEncoding(const OFString &fromEncoding, const OFString &toEncoding) { -#ifdef DCMTK_ENABLE_CHARSET_CONVERSION OFCondition result; TheImplementation.reset(Implementation::create(fromEncoding, toEncoding, result)); return result; +} #else +OFCondition OFCharacterEncoding::selectEncoding(const OFString & /* fromEncoding */, + const OFString & /* toEncoding */) +{ return EC_NoEncodingLibrary; -#endif } +#endif +#ifdef DCMTK_ENABLE_CHARSET_CONVERSION OFCondition OFCharacterEncoding::convertString(const OFString &fromString, OFString &toString, const OFBool clearMode) { -#ifdef DCMTK_ENABLE_CHARSET_CONVERSION return convertString(fromString.c_str(), fromString.length(), toString, clearMode); +} #else +OFCondition OFCharacterEncoding::convertString(const OFString & /* fromString */, + OFString & /* toString */, + const OFBool /* clearMode */) +{ return EC_NoEncodingLibrary; -#endif } +#endif +#ifdef DCMTK_ENABLE_CHARSET_CONVERSION OFCondition OFCharacterEncoding::convertString(const char *fromString, const size_t fromLength, OFString &toString, const OFBool clearMode) { -#ifdef DCMTK_ENABLE_CHARSET_CONVERSION if (TheImplementation) { // first, clear result variable if requested @@ -733,10 +750,16 @@ return TheImplementation->convert(toString, fromString, fromLength); } return EC_NoEncodingSelected; +} #else +OFCondition OFCharacterEncoding::convertString(const char * /* fromString */, + const size_t /* fromLength */, + OFString & /* toString */, + const OFBool /* clearMode */) +{ return EC_NoEncodingLibrary; -#endif } +#endif #ifdef HAVE_WINDOWS_H // Windows-specific conversion functions diff -Nru dcmtk-3.6.6/ofstd/libsrc/ofcmdln.cc dcmtk-3.6.7/ofstd/libsrc/ofcmdln.cc --- dcmtk-3.6.6/ofstd/libsrc/ofcmdln.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/ofstd/libsrc/ofcmdln.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1998-2019, OFFIS e.V. + * Copyright (C) 1998-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -1160,9 +1160,15 @@ #ifdef DCMTK_USE_WCHAR_T // Windows-specific version with wide character strings (UTF-16) +#ifdef DEBUG OFCommandLine::E_ParseStatus OFCommandLine::parseCommandFile(const wchar_t *argValue, const OFString &strValue, OFList &argList) +#else +OFCommandLine::E_ParseStatus OFCommandLine::parseCommandFile(const wchar_t *argValue, + const OFString & /* strValue */, + OFList &argList) +#endif { E_ParseStatus result = PS_NoArguments; /* check for command file parameter (syntax: "@filename") */ diff -Nru dcmtk-3.6.6/ofstd/libsrc/ofconapp.cc dcmtk-3.6.7/ofstd/libsrc/ofconapp.cc --- dcmtk-3.6.6/ofstd/libsrc/ofconapp.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/ofstd/libsrc/ofconapp.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1999-2018, OFFIS e.V. + * Copyright (C) 1999-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -28,9 +28,8 @@ #ifdef DCMTK_ENABLE_CHARSET_CONVERSION #include "dcmtk/ofstd/ofchrenc.h" /* for OFCharacterEncoding */ -#define INCLUDE_LOCALE -#include "dcmtk/ofstd/ofstdinc.h" /* for setlocale() */ -#endif // WITH_LIBICONV +#include +#endif // DCMTK_ENABLE_CHARSET_CONVERSION #ifdef HAVE_WINDOWS_H #define WIN32_LEAN_AND_MEAN @@ -167,10 +166,55 @@ (*output) << "Code page: " << GetOEMCP() << " (OEM) / " << GetACP() << " (ANSI)" << OFendl; } #endif + /* output details on DCMTK's build options */ + (*output) << "Build options:"; #ifdef DEBUG /* indicate that debug code is present */ - (*output) << OFendl << "Compiled with DEBUG defined, i.e. with debug code" << OFendl; + (*output) << " debug"; #endif +#ifdef ofstd_EXPORTS + /* indicate that shared library support is enabled */ + (*output) << " shared"; +#endif +#ifdef HAVE_CXX11 + /* indicate that C++11 is used */ + (*output) << " cxx11"; +#endif +#ifdef HAVE_STL + /* indicate that the C++ STL is used */ + (*output) << " stl"; +#endif +#ifdef WITH_THREADS + /* indicate that MT support is enabled */ + (*output) << " threads"; +#endif +#ifdef DCMTK_ENABLE_LFS + /* indicate that LFS support is enabled */ + (*output) << " lfs"; +#endif +#if DCM_DICT_DEFAULT == 1 + /* indicate that the builtin data dictionary is enabled */ + (*output) << " builtin-dict"; +#elif DCM_DICT_DEFAULT == 2 + /* indicate that the external data dictionary is enabled */ + (*output) << " extern-dict"; +#endif +#ifdef DCM_DICT_USE_DCMDICTPATH + /* indicate that the DCMDICTPATH environment variable is checked */ + (*output) << " dcmdictpath"; +#elif DCM_DICT_DEFAULT == 0 + /* indicate that no data dictionary is available */ + (*output) << " no-dict"; +#endif +#ifdef ENABLE_PRIVATE_TAGS + /* indicate that private tag dictionary is enabled */ + (*output) << " private-tags"; +#endif +#ifdef DCMTK_ENABLE_CHARSET_CONVERSION + /* indicate that character set conversion is enabled */ + (*output) << " char-conv"; +#endif + (*output) << OFendl; } /* release output stream */ if (stdError) diff -Nru dcmtk-3.6.6/ofstd/libsrc/ofconfig.cc dcmtk-3.6.7/ofstd/libsrc/ofconfig.cc --- dcmtk-3.6.6/ofstd/libsrc/ofconfig.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/ofstd/libsrc/ofconfig.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1997-2014, OFFIS e.V. + * Copyright (C) 1997-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -24,10 +24,7 @@ #include "dcmtk/ofstd/ofconfig.h" #include "dcmtk/ofstd/ofcast.h" -#define INCLUDE_CSTRING -#define INCLUDE_CCTYPE -#include "dcmtk/ofstd/ofstdinc.h" - +#include OFConfigFileNode::OFConfigFileNode(const char *keyword) : brother_(NULL) diff -Nru dcmtk-3.6.6/ofstd/libsrc/ofconsol.cc dcmtk-3.6.7/ofstd/libsrc/ofconsol.cc --- dcmtk-3.6.6/ofstd/libsrc/ofconsol.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/ofstd/libsrc/ofconsol.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2000-2010, OFFIS e.V. + * Copyright (C) 2000-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -23,8 +23,22 @@ #include "dcmtk/ofstd/ofconsol.h" #include "dcmtk/ofstd/ofthread.h" -#define INCLUDE_CASSERT -#include "dcmtk/ofstd/ofstdinc.h" +#include +#ifdef HAVE_UNISTD_H +BEGIN_EXTERN_C +#include +END_EXTERN_C +#endif + + +BEGIN_EXTERN_C +#ifdef HAVE_FCNTL_H +#include +#endif +#ifdef HAVE_IO_H +#include +#endif +END_EXTERN_C #ifdef DCMTK_GUI @@ -120,6 +134,64 @@ return instance_; } +int OFConsole::old_stderr = -1; + +void OFConsole::mergeStderrStdout() +{ + fflush(stderr); + if (fileno(stderr) != fileno(stdout)) + { + /* duplicate the stderr file descriptor to be the same as stdout */ + if (old_stderr < 0) old_stderr = dup(fileno(stderr)); + + /* now duplicate the file descriptor of stdout into the file descriptor of stderr. + * This will silently close the previous file descriptor of stderr. + */ + if (0 != dup2(fileno(stdout), fileno(stderr))) + { + OFConsole::instance().lockCerr() << "Unable to redirect stderr to stdout" << OFendl; + OFConsole::instance().unlockCerr(); + } + } + +#ifndef __BORLANDC__ /* setvbuf on stdout/stderr does not work with Borland C++ */ + /* set stdout and stderr to unbuffered mode */ + if (setvbuf(stdout, NULL, _IONBF, 0 ) != 0 ) + { + OFConsole::instance().lockCerr() << "Unable to switch stdout to unbuffered mode" << OFendl; + OFConsole::instance().unlockCerr(); + } + if (setvbuf(stderr, NULL, _IONBF, 0 ) != 0 ) + { + OFConsole::instance().lockCerr() << "Unable to switch stderr to unbuffered mode" << OFendl; + OFConsole::instance().unlockCerr(); + } +#endif /* __BORLANDC__ */ +} + + +void OFConsole::unmergeStderrStdout() +{ + /* only execute this code if stderr was actually redirected before */ + if (old_stderr > 0) + { + if (0 != dup2(old_stderr, fileno(stderr))) + { + OFConsole::instance().lockCerr() << "Error: Unable to release redirection of stderr to stdout" << OFendl; + OFConsole::instance().unlockCerr(); + } + +#ifndef __BORLANDC__ + /* switch stdout to buffered mode */ + if (setvbuf(stdout, NULL, _IOFBF, BUFSIZ ) != 0 ) + { + OFConsole::instance().lockCerr() << "Error: Unable to switch stdout to buffered mode" << OFendl; + OFConsole::instance().unlockCerr(); + + } +#endif /* __BORLANDC__ */ + } +} class OFConsoleInitializer { diff -Nru dcmtk-3.6.6/ofstd/libsrc/ofdate.cc dcmtk-3.6.7/ofstd/libsrc/ofdate.cc --- dcmtk-3.6.6/ofstd/libsrc/ofdate.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/ofstd/libsrc/ofdate.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2002-2011, OFFIS e.V. + * Copyright (C) 2002-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -22,10 +22,8 @@ #include "dcmtk/config/osconfig.h" #include "dcmtk/ofstd/ofdate.h" - -#define INCLUDE_CSTDIO -#define INCLUDE_CTIME #include "dcmtk/ofstd/ofstdinc.h" +#include /*------------------* diff -Nru dcmtk-3.6.6/ofstd/libsrc/ofdatime.cc dcmtk-3.6.7/ofstd/libsrc/ofdatime.cc --- dcmtk-3.6.6/ofstd/libsrc/ofdatime.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/ofstd/libsrc/ofdatime.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2002-2017, OFFIS e.V. + * Copyright (C) 2002-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -22,18 +22,15 @@ #include "dcmtk/config/osconfig.h" -#define INCLUDE_CTIME -#define INCLUDE_CCTYPE -#define INCLUDE_CSTRING -#include "dcmtk/ofstd/ofstdinc.h" - -BEGIN_EXTERN_C #ifdef HAVE_SYS_TYPES_H +BEGIN_EXTERN_C #include /* for struct time_t */ -#endif END_EXTERN_C +#endif #include "dcmtk/ofstd/ofdatime.h" +#include "dcmtk/ofstd/ofstdinc.h" +#include /*------------------* diff -Nru dcmtk-3.6.6/ofstd/libsrc/oferror.cc dcmtk-3.6.7/ofstd/libsrc/oferror.cc --- dcmtk-3.6.6/ofstd/libsrc/oferror.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/ofstd/libsrc/oferror.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2017, OFFIS e.V. + * Copyright (C) 2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -26,8 +26,6 @@ // 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" diff -Nru dcmtk-3.6.6/ofstd/libsrc/offile.cc dcmtk-3.6.7/ofstd/libsrc/offile.cc --- dcmtk-3.6.6/ofstd/libsrc/offile.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/ofstd/libsrc/offile.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2011-2020, OFFIS e.V. + * Copyright (C) 2011-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -26,6 +26,15 @@ #include "dcmtk/ofstd/offile.h" #include "dcmtk/ofstd/offilsys.h" #include "dcmtk/ofstd/ofutil.h" +#include + +#ifdef __SUNPRO_CC +BEGIN_EXTERN_C +#include +END_EXTERN_C +#else +#include +#endif #ifdef HAVE_WINDOWS_H #include "dcmtk/ofstd/ofchrenc.h" /* for class OFCharacterEncoding */ @@ -223,3 +232,41 @@ stream << OFSTRING_GUARD(filename.getCharPointer()); return stream; } + +OFBool OFFile::popen(const char *command, const char *modes) +{ + if (file_) fclose(); +#if defined(HAVE_POPEN) || defined(__SUNPRO_CC) + // SunPro defines popen() in a header file where CMake cannot find it, but it is there. + file_ = :: popen(command, modes); +#else + file_ = _popen(command, modes); +#endif + if (file_) popened_ = OFTrue; else storeLastError(); + return (file_ != NULL); +} + +int OFFile::fclose() +{ + int result = 0; + if (file_) + { + if (popened_) + { +#if defined(HAVE_PCLOSE) || defined(__SUNPRO_CC) + // SunPro defines pclose() in a header file where CMake cannot find it, but it is there. + result = :: pclose(file_); +#else + result = _pclose(file_); +#endif + } + else + { + result = STDIO_NAMESPACE fclose(file_); + } + // After calling fclose() once, the FILE* is gone even if fclose() failed. + file_ = NULL; + } + if (result) storeLastError(); + return result; +} diff -Nru dcmtk-3.6.6/ofstd/libsrc/offilsys.cc dcmtk-3.6.7/ofstd/libsrc/offilsys.cc --- dcmtk-3.6.6/ofstd/libsrc/offilsys.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/ofstd/libsrc/offilsys.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2018, OFFIS e.V. + * Copyright (C) 2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -21,9 +21,10 @@ #include "dcmtk/config/osconfig.h" -#define INCLUDE_CLIMITS -#define INCLUDE_CASSERT -#include "dcmtk/ofstd/ofstdinc.h" +#include +#include +#include + #include "dcmtk/ofstd/offilsys.h" #ifdef _WIN32 @@ -66,17 +67,47 @@ m_NativeString.swap( OFrvalue_access( rhs ).m_NativeString ); } -OFpath::OFpath( const char* const cstr ) +OFpath::OFpath( const char* const cstr, format fmt ) : m_NativeString( cstr ) { - +#ifdef _WIN32 + convertSeparator(fmt); +#endif } -OFpath::OFpath( const OFString& string ) +OFpath::OFpath( const OFString& string, format fmt ) : m_NativeString( string ) { +#ifdef _WIN32 + convertSeparator(fmt); +#endif +} +#ifdef _WIN32 +void OFpath::convertSeparator( format fmt ) +{ + size_t pos = OFString_npos; + switch( fmt ) + { + case native_format: + return; + case auto_format: + pos = m_NativeString.find_first_of( "\\/" ); + if( pos == OFString_npos || m_NativeString[pos] == preferred_separator ) + return; + break; + default: + case generic_format: + pos = m_NativeString.find( '/' ); + if( pos == OFString_npos ) + return; + break; + } + m_NativeString[pos] = preferred_separator; + for( pos = m_NativeString.find( '/', pos + 1 ); pos != OFString_npos; pos = m_NativeString.find( '/', pos + 1 ) ) + m_NativeString[pos] = preferred_separator; } +#endif OFpath& OFpath::operator=( const OFpath& rhs ) { diff -Nru dcmtk-3.6.6/ofstd/libsrc/offname.cc dcmtk-3.6.7/ofstd/libsrc/offname.cc --- dcmtk-3.6.6/ofstd/libsrc/offname.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/ofstd/libsrc/offname.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1997-2018, OFFIS e.V. + * Copyright (C) 1997-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -24,12 +24,10 @@ #include "dcmtk/ofstd/offname.h" #include "dcmtk/ofstd/ofcast.h" #include "dcmtk/ofstd/ofstd.h" /* for OFString::myrand_r */ - -#define INCLUDE_CERRNO -#define INCLUDE_CSTRING -#define INCLUDE_CTIME -#define INCLUDE_CSTDLIB #include "dcmtk/ofstd/ofstdinc.h" +#include +#include + BEGIN_EXTERN_C #ifdef HAVE_SYS_TYPES_H diff -Nru dcmtk-3.6.6/ofstd/libsrc/ofrand.cc dcmtk-3.6.7/ofstd/libsrc/ofrand.cc --- dcmtk-3.6.6/ofstd/libsrc/ofrand.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/ofstd/libsrc/ofrand.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2018, OFFIS e.V. + * Copyright (C) 2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -24,11 +24,9 @@ #include "dcmtk/ofstd/ofrand.h" #include "dcmtk/ofstd/ofcast.h" #include "dcmtk/ofstd/ofstd.h" - -#define INCLUDE_CSTDIO -#define INCLUDE_CSTDDEF -#define INCLUDE_CTIME #include "dcmtk/ofstd/ofstdinc.h" +#include + BEGIN_EXTERN_C #ifdef HAVE_SYS_TIME_H diff -Nru dcmtk-3.6.6/ofstd/libsrc/ofsockad.cc dcmtk-3.6.7/ofstd/libsrc/ofsockad.cc --- dcmtk-3.6.6/ofstd/libsrc/ofsockad.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/ofstd/libsrc/ofsockad.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2017-2018, OFFIS e.V. + * Copyright (C) 2017-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -23,26 +23,9 @@ #include "dcmtk/ofstd/ofsockad.h" #include "dcmtk/ofstd/ofstream.h" -BEGIN_EXTERN_C -#ifdef HAVE_SYS_SOCKET_H -#include -#endif -#ifdef HAVE_NETINET_IN_H -#include -#endif -#ifdef HAVE_ARPA_INET_H -#include -#endif -END_EXTERN_C - -#ifdef HAVE_WINDOWS_H -#include -#include /* for struct sockaddr_in6 */ -#endif - socklen_t OFSockAddr::size() const { - switch (sa.ss_family) + switch (getFamily()) { case AF_INET: return sizeof(struct sockaddr_in); @@ -57,7 +40,7 @@ { struct sockaddr_in *si = NULL; struct sockaddr_in6 *si6 = NULL; - switch (sa.ss_family) + switch (getFamily()) { case AF_INET: si = getSockaddr_in(); diff -Nru dcmtk-3.6.6/ofstd/libsrc/ofstd.cc dcmtk-3.6.7/ofstd/libsrc/ofstd.cc --- dcmtk-3.6.6/ofstd/libsrc/ofstd.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/ofstd/libsrc/ofstd.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2001-2020, OFFIS e.V. + * Copyright (C) 2001-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -92,6 +92,15 @@ #include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ +#ifdef __SUNPRO_CC +BEGIN_EXTERN_C +// SunPro declares vsnprintf() only in , not in . +#include +END_EXTERN_C +#else +#include +#endif + #include "dcmtk/ofstd/ofstd.h" #include "dcmtk/ofstd/ofcond.h" #include "dcmtk/ofstd/offile.h" @@ -100,15 +109,12 @@ #include "dcmtk/ofstd/ofmath.h" #include "dcmtk/ofstd/ofsockad.h" #include "dcmtk/ofstd/ofvector.h" +#include "dcmtk/ofstd/ofdiag.h" +#include "dcmtk/ofstd/oftimer.h" -#define INCLUDE_CMATH -#define INCLUDE_CFLOAT -#define INCLUDE_CSTRING -#define INCLUDE_CSTDIO -#define INCLUDE_CCTYPE -#define INCLUDE_UNISTD -#include "dcmtk/ofstd/ofstdinc.h" +#include +#include /* for memset() */ BEGIN_EXTERN_C #ifdef HAVE_SYS_STAT_H @@ -220,7 +226,7 @@ { if (siz != 0) *d = '\0'; /* NUL-terminate dst */ - while (*s++) /* do_nothing */ ; + while (*s++) /* do nothing */ ; } return(s - src - 1); /* count does not include NUL */ @@ -594,6 +600,13 @@ { const wchar_t *strValue = pathName.getWideCharPointer(); const wchar_t *strPos = wcsrchr(strValue, L'\\' /* WIDE_PATH_SEPARATOR */); + + // Windows accepts both backslash and forward slash as path separators. + const wchar_t *strPos2 = wcsrchr(strValue, L'/'); + + // if strPos2 points to a character closer to the end of the string, use this instead of strPos + if ((strPos == NULL) || ((strPos2 != NULL) && (strPos2 > strPos))) strPos = strPos2; + /* path separator found? */ if (strPos == NULL) { @@ -614,6 +627,15 @@ { const char *strValue = pathName.getCharPointer(); const char *strPos = strrchr(strValue, PATH_SEPARATOR); + +#ifdef _WIN32 + // Windows accepts both backslash and forward slash as path separators. + const char *strPos2 = strrchr(strValue, '/'); + + // if strPos2 points to a character closer to the end of the string, use this instead of strPos + if ((strPos == NULL) || ((strPos2 != NULL) && (strPos2 > strPos))) strPos = strPos2; +#endif + /* path separator found? */ if (strPos == NULL) { @@ -651,6 +673,13 @@ { const wchar_t *strValue = pathName.getWideCharPointer(); const wchar_t *strPos = wcsrchr(strValue, L'\\' /* WIDE_PATH_SEPARATOR */); + + // Windows accepts both backslash and forward slash as path separators. + const wchar_t *strPos2 = wcsrchr(strValue, L'/'); + + // if strPos2 points to a character closer to the end of the string, use this instead of strPos + if ((strPos == NULL) || ((strPos2 != NULL) && (strPos2 > strPos))) strPos = strPos2; + /* path separator found? */ if (strPos == NULL) { @@ -670,6 +699,15 @@ { const char *strValue = pathName.getCharPointer(); const char *strPos = strrchr(strValue, PATH_SEPARATOR); + +#ifdef _WIN32 + // Windows accepts both backslash and forward slash as path separators. + const char *strPos2 = strrchr(strValue, '/'); + + // if strPos2 points to a character closer to the end of the string, use this instead of strPos + if ((strPos == NULL) || ((strPos2 != NULL) && (strPos2 > strPos))) strPos = strPos2; +#endif + /* path separator found? */ if (strPos == NULL) { @@ -709,7 +747,9 @@ { const wchar_t *strValue = dirName.getWideCharPointer(); size_t strLength = (strValue == NULL) ? 0 : wcslen(strValue); - while ((strLength > 1) && (strValue[strLength - 1] == L'\\' /* WIDE_PATH_SEPARATOR */)) + // Windows accepts both backslash and forward slash as path separators. + while ((strLength > 1) && ((strValue[strLength - 1] == L'\\' /* WIDE_PATH_SEPARATOR */) || + (strValue[strLength - 1] == L'/' ))) --strLength; /* avoid "." as a directory name, use empty string instead */ if (allowEmptyDirName && ((strLength == 0) || ((strLength == 1) && (strValue[0] == L'.')))) @@ -731,8 +771,15 @@ { const char *strValue = dirName.getCharPointer(); size_t strLength = (strValue == NULL) ? 0 : strlen(strValue); +#ifdef _WIN32 + // Windows accepts both backslash and forward slash as path separators. + while ((strLength > 1) && ((strValue[strLength - 1] == PATH_SEPARATOR) || + (strValue[strLength - 1] == '/' ))) + --strLength; +#else while ((strLength > 1) && (strValue[strLength - 1] == PATH_SEPARATOR)) --strLength; +#endif /* avoid "." as a directory name, use empty string instead */ if (allowEmptyDirName && ((strLength == 0) || ((strLength == 1) && (strValue[0] == '.')))) result.clear(); @@ -776,7 +823,8 @@ size_t strLength = (strValue == NULL) ? 0 : wcslen(strValue); /* check whether 'fileName' contains absolute path */ /* (this check also covers UNC syntax, e.g. "\\server\...") */ - if ((strLength > 0) && (strValue[0] == L'\\' /* WIDE_PATH_SEPARATOR */)) + // Windows accepts both backslash and forward slash as path separators. + if ((strLength > 0) && ((strValue[0] == L'\\' /* WIDE_PATH_SEPARATOR */) || (strValue[0] == L'/'))) { result.set(strValue, OFTrue /*convert*/); return result; @@ -788,7 +836,8 @@ const wchar_t c = strValue[0]; if (((c >= L'A') && (c <= L'Z')) || ((c >= L'a') && (c <= L'z'))) { - if ((strValue[1] == L':') && (strValue[2] == L'\\' /* WIDE_PATH_SEPARATOR */)) + // Windows accepts both backslash and forward slash as path separators. + if ((strValue[1] == L':') && ((strValue[2] == L'\\' /* WIDE_PATH_SEPARATOR */))||(strValue[2] == L'/')) { result.set(strValue, OFTrue /*convert*/); return result; @@ -817,7 +866,8 @@ wchar_t *tmpString = new wchar_t[strLength + resLength + 1 + 1]; wcscpy(tmpString, resValue); /* add path separator (if required) ... */ - if (resValue[resLength - 1] != L'\\' /* WIDE_PATH_SEPARATOR */) + // Windows accepts both backslash and forward slash as path separators. + if ((resValue[resLength - 1] != L'\\' /* WIDE_PATH_SEPARATOR */) && (resValue[resLength - 1] != L'/')) { tmpString[resLength] = L'\\' /* WIDE_PATH_SEPARATOR */; tmpString[resLength + 1] = L'\0'; @@ -836,7 +886,12 @@ size_t strLength = (strValue == NULL) ? 0 : strlen(strValue); /* check whether 'fileName' contains absolute path */ /* (this check also covers UNC syntax, e.g. "\\server\...") */ +#ifdef _WIN32 + // Windows accepts both backslash and forward slash as path separators. + if ((strLength > 0) && ((strValue[0] == PATH_SEPARATOR) || (strValue[0] == '/'))) +#else if ((strLength > 0) && (strValue[0] == PATH_SEPARATOR)) +#endif { result.set(strValue); return result; @@ -848,7 +903,7 @@ const char c = strValue[0]; if (((c >= 'A') && (c <= 'Z')) || ((c >= 'a') && (c <= 'z'))) { - if ((strValue[1] == ':') && (strValue[2] == '\\')) + if ((strValue[1] == ':') && ((strValue[2] == '\\') || (strValue[2] == '/'))) { result.set(strValue); return result; @@ -871,7 +926,12 @@ char *tmpString = new char[buflen]; OFStandard::strlcpy(tmpString, resValue, buflen); /* add path separator (if required) ... */ +#ifdef _WIN32 + // Windows accepts both backslash and forward slash as path separators. + if ((resValue[resLength - 1] != PATH_SEPARATOR) && (resValue[resLength - 1] != '/')) +#else if (resValue[resLength - 1] != PATH_SEPARATOR) +#endif { tmpString[resLength] = PATH_SEPARATOR; tmpString[resLength + 1] = '\0'; @@ -924,7 +984,7 @@ /* remove root dir prefix from path name */ wcscpy(tmpString, pathValue + rootLength); /* remove leading path separator (if present) */ - if (!allowLeadingPathSeparator && (tmpString[0] == PATH_SEPARATOR)) + if (!allowLeadingPathSeparator && ((tmpString[0] == PATH_SEPARATOR) || (tmpString[0] == '/'))) result.set(tmpString + 1, OFTrue /*convert*/); else result.set(tmpString, OFTrue /*convert*/); @@ -964,7 +1024,12 @@ /* remove root dir prefix from path name */ OFStandard::strlcpy(tmpString, pathValue + rootLength, buflen); /* remove leading path separator (if present) */ +#ifdef _WIN32 + // Windows accepts both backslash and forward slash as path separators. + if (!allowLeadingPathSeparator && ((tmpString[0] == PATH_SEPARATOR) || (tmpString[0] == '/'))) +#else if (!allowLeadingPathSeparator && (tmpString[0] == PATH_SEPARATOR)) +#endif result.set(tmpString + 1); else result.set(tmpString); @@ -1232,12 +1297,22 @@ size_t rootLength = (rootValue == NULL) ? 0 : wcslen(rootValue); /* check for absolute path containing Windows drive name, e. g. "c:\", * is not required since the root directory should always exist */ +#ifdef _WIN32 + // Windows accepts both backslash and forward slash as path separators. + if ((dirLength > 1) && ((dirValue[dirLength - 1] == L'\\' /* WIDE_PATH_SEPARATOR */) || (dirValue[dirLength - 1] == L'/'))) +#else if ((dirLength > 1) && (dirValue[dirLength - 1] == L'\\' /* WIDE_PATH_SEPARATOR */)) +#endif { /* ignore trailing path separator */ --dirLength; } +#ifdef _WIN32 + // Windows accepts both backslash and forward slash as path separators. + if ((rootLength > 1) && ((rootValue[rootLength - 1] == L'\\' /* WIDE_PATH_SEPARATOR */) || (rootValue[rootLength - 1] == L'/'))) +#else if ((rootLength > 1) && (rootValue[rootLength - 1] == L'\\' /* WIDE_PATH_SEPARATOR */)) +#endif { /* ignore trailing path separator */ --rootLength; @@ -1261,7 +1336,13 @@ /* search for next path separator */ do { ++pos; +#ifdef _WIN32 + // Windows accepts both backslash and forward slash as path separators. + } while ((dirValue[pos] != L'\\' /* WIDE_PATH_SEPARATOR */) && (dirValue[pos] != L'/') && (dirValue[pos] != '\0')); +#else } while ((dirValue[pos] != L'\\' /* WIDE_PATH_SEPARATOR */) && (dirValue[pos] != L'\0')); +#endif + /* get name of current directory component */ wchar_t *subDir = new wchar_t[pos + 1]; wcsncpy(subDir, dirValue, pos /*num*/); @@ -1293,12 +1374,22 @@ size_t rootLength = (rootValue == NULL) ? 0 : strlen(rootValue); /* check for absolute path containing Windows drive name, e. g. "c:\", * is not required since the root directory should always exist */ +#ifdef _WIN32 + // Windows accepts both backslash and forward slash as path separators. + if ((dirLength > 1) && ((dirValue[dirLength - 1] == PATH_SEPARATOR) || (dirValue[dirLength - 1] == '/'))) +#else if ((dirLength > 1) && (dirValue[dirLength - 1] == PATH_SEPARATOR)) +#endif { /* ignore trailing path separator */ --dirLength; } +#ifdef _WIN32 + // Windows accepts both backslash and forward slash as path separators. + if ((rootLength > 1) && ((rootValue[rootLength - 1] == PATH_SEPARATOR) || (rootValue[rootLength - 1] == '/'))) +#else if ((rootLength > 1) && (rootValue[rootLength - 1] == PATH_SEPARATOR)) +#endif { /* ignore trailing path separator */ --rootLength; @@ -1322,7 +1413,12 @@ /* search for next path separator */ do { ++pos; +#ifdef _WIN32 + // Windows accepts both backslash and forward slash as path separators. + } while ((dirValue[pos] != PATH_SEPARATOR) && (dirValue[pos] != '/') && (dirValue[pos] != '\0')); +#else } while ((dirValue[pos] != PATH_SEPARATOR) && (dirValue[pos] != '\0')); +#endif /* get name of current directory component */ char *subDir = new char[pos + 1]; strlcpy(subDir, dirValue, pos + 1 /*size*/); @@ -2673,6 +2769,7 @@ #endif } + long OFStandard::getProcessID() { #ifdef _WIN32 @@ -2736,9 +2833,7 @@ // We have getaddrinfo(). In this case we also presume that we have // getnameinfo(), since both functions were introduced together. // This is the preferred implementation, being thread-safe and protocol independent. - - struct sockaddr_storage sas; // this type is large enough to hold all supported protocol specific sockaddr structs - memzero(&sas, sizeof(sas)); + OFSockAddr sas; // a DNS name must be shorter than 256 characters, so this should be enough char hostname[512]; @@ -2747,14 +2842,14 @@ if (type == AF_INET) { if (len != sizeof(struct in_addr)) return result; // invalid address length - struct sockaddr_in *sa4 = OFreinterpret_cast(sockaddr_in *, &sas); + struct sockaddr_in *sa4 = sas.getSockaddr_in(); sa4->sin_family = AF_INET; memcpy(&sa4->sin_addr, addr, len); } else if (type == AF_INET6) { if (len != sizeof(struct in6_addr)) return result; // invalid address length - struct sockaddr_in6 *sa6 = OFreinterpret_cast(sockaddr_in6 *, &sas); + struct sockaddr_in6 *sa6 = sas.getSockaddr_in6(); sa6->sin6_family = AF_INET6; memcpy(&sa6->sin6_addr, addr, len); } @@ -2762,10 +2857,10 @@ int err = EAI_AGAIN; int rep = DCMTK_MAX_EAI_AGAIN_REPETITIONS; - struct sockaddr *sa = OFreinterpret_cast(struct sockaddr *, &sas); + struct sockaddr *sa = sas.getSockaddr(); // perform reverse DNS lookup. Repeat while we receive temporary failures. - while ((EAI_AGAIN == err) && (rep-- > 0)) err = getnameinfo(sa, sizeof(sas), hostname, 512, NULL, 0, 0); + while ((EAI_AGAIN == err) && (rep-- > 0)) err = getnameinfo(sa, sizeof(struct sockaddr_storage), hostname, 512, NULL, 0, 0); if ((err == 0) && (hostname[0] != '\0')) result = hostname; #elif defined(HAVE_GETHOSTBYADDR_R) @@ -3137,6 +3232,21 @@ #endif } + +void OFStandard::forceSleep(Uint32 seconds) +{ + OFTimer timer; + double elapsed = timer.getDiff(); + while (elapsed < OFstatic_cast(double, seconds)) + { + // Use ceiling since otherwise we could wait too short + OFStandard::sleep(OFstatic_cast(unsigned int, ceil(seconds - elapsed))); + elapsed = timer.getDiff(); + } +} + +#include DCMTK_DIAGNOSTIC_IGNORE_STRICT_ALIASING_WARNING + // black magic: // The C++ standard says that std::in_place should not be called as a function, // but the linker says we still need a function body. Normally, we would mark diff -Nru dcmtk-3.6.6/ofstd/libsrc/ofstring.cc dcmtk-3.6.7/ofstd/libsrc/ofstring.cc --- dcmtk-3.6.6/ofstd/libsrc/ofstring.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/ofstd/libsrc/ofstring.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1997-2019, OFFIS e.V. + * Copyright (C) 1997-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -38,9 +38,6 @@ #include "dcmtk/ofstd/oftypes.h" #include "dcmtk/ofstd/ofstd.h" -#define INCLUDE_CCTYPE -#include "dcmtk/ofstd/ofstdinc.h" - static const char* verify_string(const char *s) { if (s == NULL) diff -Nru dcmtk-3.6.6/ofstd/libsrc/oftempf.cc dcmtk-3.6.7/ofstd/libsrc/oftempf.cc --- dcmtk-3.6.6/ofstd/libsrc/oftempf.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/ofstd/libsrc/oftempf.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2011-2015, OFFIS e.V. + * Copyright (C) 2011-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -24,10 +24,9 @@ #include "dcmtk/ofstd/oftempf.h" #include "dcmtk/ofstd/offname.h" #include "dcmtk/ofstd/ofstd.h" - -#define INCLUDE_CERRNO -#define INCLUDE_CTIME #include "dcmtk/ofstd/ofstdinc.h" +#include + BEGIN_EXTERN_C #ifdef HAVE_IO_H diff -Nru dcmtk-3.6.6/ofstd/libsrc/ofthread.cc dcmtk-3.6.7/ofstd/libsrc/ofthread.cc --- dcmtk-3.6.6/ofstd/libsrc/ofthread.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/ofstd/libsrc/ofthread.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2000-2018, OFFIS e.V. + * Copyright (C) 2000-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -28,11 +28,6 @@ /* if WITH_THREADS is undefined, we don't even attempt to implement a thread interface. */ #ifdef WITH_THREADS -#define INCLUDE_CSTDLIB -#define INCLUDE_CSTRING -#define INCLUDE_CERRNO -#include "dcmtk/ofstd/ofstdinc.h" - #include "dcmtk/ofstd/ofstd.h" #ifdef _DARWIN_C_SOURCE @@ -76,6 +71,7 @@ #include "dcmtk/ofstd/ofthread.h" #include "dcmtk/ofstd/ofconsol.h" #include "dcmtk/ofstd/ofstring.h" +#include // The Posix interfaces are not always correctly declared as volatile, // so we need a two-step cast from our internal representation diff -Nru dcmtk-3.6.6/ofstd/libsrc/oftime.cc dcmtk-3.6.7/ofstd/libsrc/oftime.cc --- dcmtk-3.6.6/ofstd/libsrc/oftime.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/ofstd/libsrc/oftime.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2002-2020, OFFIS e.V. + * Copyright (C) 2002-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -21,11 +21,9 @@ #include "dcmtk/config/osconfig.h" - -#define INCLUDE_CSTDIO -#define INCLUDE_CTIME -#define INCLUDE_CSTRING #include "dcmtk/ofstd/ofstdinc.h" +#include + BEGIN_EXTERN_C #ifdef HAVE_SYS_TIME_H diff -Nru dcmtk-3.6.6/ofstd/libsrc/ofuuid.cc dcmtk-3.6.7/ofstd/libsrc/ofuuid.cc --- dcmtk-3.6.6/ofstd/libsrc/ofuuid.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/ofstd/libsrc/ofuuid.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2011-2018, OFFIS e.V. + * Copyright (C) 2011-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -27,9 +27,6 @@ #include "dcmtk/ofstd/ofthread.h" #include "dcmtk/ofstd/ofstd.h" -#define INCLUDE_CASSERT -#include "dcmtk/ofstd/ofstdinc.h" - BEGIN_EXTERN_C #ifdef HAVE_SYS_TIME_H #include diff -Nru dcmtk-3.6.6/ofstd/libsrc/ofxml.cc dcmtk-3.6.7/ofstd/libsrc/ofxml.cc --- dcmtk-3.6.6/ofstd/libsrc/ofxml.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/ofstd/libsrc/ofxml.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2011-2019, OFFIS e.V. + * Copyright (C) 2011-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were slightly modified by @@ -104,6 +104,8 @@ #endif // DCMTK: we need this header file at the beginning of each file #include "dcmtk/config/osconfig.h" +#include "dcmtk/ofstd/ofstdinc.h" +#include "dcmtk/ofstd/ofdiag.h" // DCMTK: we need the correct header file (was "xmlParser.h") #include "dcmtk/ofstd/ofxml.h" @@ -117,32 +119,37 @@ // to have "MessageBoxA" to display error messages for openFileHelper #endif -// DCMTK: we want to use our own standard include wrappers -#define INCLUDE_CMEMORY -#define INCLUDE_CASSERT -#define INCLUDE_CSTDIO -#define INCLUDE_CSTRING -#define INCLUDE_CSTDLIB +#include +#include +#include +#include #include "dcmtk/ofstd/ofstdinc.h" -// DCMTK: 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 atoi; using STD_NAMESPACE fread; -using STD_NAMESPACE fwrite; +using STD_NAMESPACE atof; +using STD_NAMESPACE fclose; using STD_NAMESPACE fprintf; +using STD_NAMESPACE realloc; +using STD_NAMESPACE atol; +using STD_NAMESPACE fwrite; using STD_NAMESPACE fseek; using STD_NAMESPACE ftell; -using STD_NAMESPACE fclose; + +#ifdef HAVE_STRINGS_H +BEGIN_EXTERN_C +#include +END_EXTERN_C #endif +// The code in this class ensures that raw access to 'struct XMLNode' +// is safe. Therefore it is safe to suppress this warning. +#include DCMTK_DIAGNOSTIC_IGNORE_CLASS_MEMACCESS_WARNING + XMLCSTR XMLNode::getVersion() { return _CXML("v2.44"); } void freeXMLString(XMLSTR t){if(t)free(t);} @@ -419,7 +426,6 @@ static inline XMLSTR xstrstr(XMLCSTR c1, XMLCSTR c2) { return OFconst_cast(XMLSTR, strstr(c1,c2)); } static inline XMLSTR xstrcpy(XMLSTR c1, XMLCSTR c2) { return OFconst_cast(XMLSTR, strcpy(c1,c2)); } #endif - static inline int _strnicmp(const char *c1,const char *c2, int l) { return strncasecmp(c1,c2,l);} #endif @@ -788,7 +794,7 @@ XMLSTR dd=dest; XMLCHAR ch; XMLCharacterEntity *entity; - while ((ch=*source)) + while ((ch=*source) != 0) { entity=XMLEntities; do @@ -847,7 +853,7 @@ int r=0; XMLCharacterEntity *entity; XMLCHAR ch; - while ((ch=*source)) + while ((ch=*source) != 0) { entity=XMLEntities; do @@ -1062,7 +1068,7 @@ nFoundMatch = FALSE; // Search through the string to find a matching quote - while((ch = getNextChar(pXML))) + while((ch = getNextChar(pXML)) != 0) { if (ch==chTemp) { nFoundMatch = TRUE; break; } if (ch==_CXML('<')) break; @@ -1167,7 +1173,7 @@ { // Indicate we are dealing with text *pType = eTokenText; - while((ch = getNextChar(pXML))) + while((ch = getNextChar(pXML)) != 0) { if XML_isSPACECHAR(ch) { @@ -2282,7 +2288,7 @@ if (!dropWhiteSpace) nFormat=0; nFormat = nFormat ? 0 : -1; cbStr = CreateXMLStringR(d, 0, nFormat); - // Alllocate memory for the XML string + the NULL terminator and + // Allocate memory for the XML string + the NULL terminator and // create the recursively XML string. lpszResult=OFreinterpret_cast(XMLSTR, malloc((cbStr+1)*sizeof(XMLCHAR))); CreateXMLStringR(d, lpszResult, nFormat); diff -Nru dcmtk-3.6.6/ofstd/tests/CMakeLists.txt dcmtk-3.6.7/ofstd/tests/CMakeLists.txt --- dcmtk-3.6.6/ofstd/tests/CMakeLists.txt 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/ofstd/tests/CMakeLists.txt 2022-04-28 13:47:25.000000000 +0000 @@ -1,5 +1,31 @@ # declare executables -DCMTK_ADD_EXECUTABLE(ofstd_tests tests tatof terror tmap tvec tfilsys tftoa tthread tbase64 tstring tstrutl tlist tstack tofdatim tofstd tmarkup tchrenc txml tuuid toffile tmem toption ttuple tlimits tvariant) +DCMTK_ADD_EXECUTABLE(ofstd_tests + tests.cc + tatof.cc + terror.cc + tmap.cc + tvec.cc + tfilsys.cc + tftoa.cc + tthread.cc + tbase64.cc + tstring.cc + tstrutl.cc + tlist.cc + tstack.cc + tofdatim.cc + tofstd.cc + tmarkup.cc + tchrenc.cc + txml.cc + tuuid.cc + toffile.cc + tmem.cc + toption.cc + ttuple.cc + tlimits.cc + tvariant.cc +) # make sure executables are linked to the corresponding libraries DCMTK_TARGET_LINK_MODULES(ofstd_tests ofstd) diff -Nru dcmtk-3.6.6/ofstd/tests/Makefile.dep dcmtk-3.6.7/ofstd/tests/Makefile.dep --- dcmtk-3.6.6/ofstd/tests/Makefile.dep 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/ofstd/tests/Makefile.dep 2022-04-28 13:47:25.000000000 +0000 @@ -65,7 +65,8 @@ ../include/dcmtk/ofstd/ofstd.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/ofexit.h + ../include/dcmtk/ofstd/oferror.h ../include/dcmtk/ofstd/ofexit.h \ + ../include/dcmtk/ofstd/ofxml.h tfilsys.o: tfilsys.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 \ @@ -82,7 +83,9 @@ ../include/dcmtk/ofstd/offilsys.h ../include/dcmtk/ofstd/ofmem.h \ ../include/dcmtk/ofstd/ofutil.h \ ../include/dcmtk/ofstd/variadic/tuplefwd.h \ - ../include/dcmtk/ofstd/ofvector.h ../include/dcmtk/ofstd/ofassert.h + ../include/dcmtk/ofstd/ofvector.h ../include/dcmtk/ofstd/ofassert.h \ + ../include/dcmtk/ofstd/ofdiag.h ../include/dcmtk/ofstd/diag/slfassov.def \ + ../include/dcmtk/ofstd/diag/constexp.def 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 \ @@ -169,7 +172,8 @@ ../../config/include/dcmtk/config/arith.h \ ../include/dcmtk/ofstd/oferror.h ../include/dcmtk/ofstd/ofexit.h \ ../include/dcmtk/ofstd/ofmem.h ../include/dcmtk/ofstd/ofutil.h \ - ../include/dcmtk/ofstd/variadic/tuplefwd.h + ../include/dcmtk/ofstd/variadic/tuplefwd.h \ + ../include/dcmtk/ofstd/ofdiag.h ../include/dcmtk/ofstd/diag/pessmove.def tofdatim.o: tofdatim.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/ofstd/ofdate.h ../include/dcmtk/ofstd/ofstring.h \ ../include/dcmtk/ofstd/oftypes.h ../include/dcmtk/ofstd/ofdefine.h \ @@ -195,6 +199,7 @@ ../../config/include/dcmtk/config/arith.h \ ../include/dcmtk/ofstd/oferror.h ../include/dcmtk/ofstd/ofconsol.h \ ../include/dcmtk/ofstd/ofthread.h ../include/dcmtk/ofstd/ofrand.h \ + ../include/dcmtk/ofstd/ofdiag.h ../include/dcmtk/ofstd/diag/constexp.def \ ../include/dcmtk/ofstd/oftest.h ../include/dcmtk/ofstd/ofconapp.h \ ../include/dcmtk/ofstd/ofcmdln.h ../include/dcmtk/ofstd/ofexbl.h \ ../include/dcmtk/ofstd/ofexit.h @@ -301,7 +306,9 @@ ../include/dcmtk/ofstd/diag/mmtag.def \ ../include/dcmtk/ofstd/variadic/tuplefrd.h \ ../include/dcmtk/ofstd/variadic/tuple.h \ - ../include/dcmtk/ofstd/diag/pop.def + ../include/dcmtk/ofstd/diag/pop.def \ + ../include/dcmtk/ofstd/diag/constexp.def \ + ../include/dcmtk/ofstd/diag/cnvrsn.def tuuid.o: tuuid.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 \ @@ -329,12 +336,12 @@ ../include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ ../include/dcmtk/ofstd/oferror.h ../include/dcmtk/ofstd/ofexit.h \ - ../include/dcmtk/ofstd/ofvriant.h \ + ../include/dcmtk/ofstd/ofvriant.h ../include/dcmtk/ofstd/ofdiag.h \ ../include/dcmtk/ofstd/variadic/variant.h \ ../include/dcmtk/ofstd/variadic/helpers.h \ ../include/dcmtk/ofstd/ofalign.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/push.def \ ../include/dcmtk/ofstd/diag/cnvrsn.def \ ../include/dcmtk/ofstd/diag/vsprfw.def \ ../include/dcmtk/ofstd/diag/pop.def diff -Nru dcmtk-3.6.6/ofstd/tests/tatof.cc dcmtk-3.6.7/ofstd/tests/tatof.cc --- dcmtk-3.6.6/ofstd/tests/tatof.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/ofstd/tests/tatof.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1997-2020, OFFIS e.V. + * Copyright (C) 1997-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -27,9 +27,7 @@ #define OFTEST_OFSTD_ONLY #include "dcmtk/ofstd/oftest.h" -#define INCLUDE_CMATH -#include "dcmtk/ofstd/ofstdinc.h" - +#include struct ValuePair { diff -Nru dcmtk-3.6.6/ofstd/tests/tfilsys.cc dcmtk-3.6.7/ofstd/tests/tfilsys.cc --- dcmtk-3.6.6/ofstd/tests/tfilsys.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/ofstd/tests/tfilsys.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2018, OFFIS e.V. + * Copyright (C) 2018-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -29,6 +29,11 @@ #include "dcmtk/ofstd/ofvector.h" #include "dcmtk/ofstd/oftraits.h" #include "dcmtk/ofstd/ofassert.h" +#include "dcmtk/ofstd/ofdiag.h" /* for DCMTK_DIAGNOSTIC macros */ + +// suppress warning about "p /= p" lines, which are intentional for this test case. +#include DCMTK_DIAGNOSTIC_IGNORE_SELF_ASSIGN_OVERLOADED_WARNING +#include DCMTK_DIAGNOSTIC_IGNORE_CONST_EXPRESSION_WARNING OFTEST(ofstd_filesystem) { @@ -79,6 +84,11 @@ OFCHECK_EQUAL( ( OFpath( "test" ) / "..bla" ).extension(), ".bla" ); OFCHECK_EQUAL( ( OFpath( "test" ) / ".." ).extension(), "" ); OFCHECK_EQUAL( ( OFpath( "test" ) / "..." ).extension(), "." ); + // separator conversion + OFCHECK_EQUAL( OFpath( "path/to/file" ), expected ); + OFCHECK_EQUAL( OFpath( OFpath( expected ).native() ), expected ); + OFCHECK_EQUAL( ( OFpath( "path/to/file", OFpath::generic_format ) ), expected ); + OFCHECK_EQUAL( ( OFpath( OFpath( expected ).native(), OFpath::native_format ) ), expected ); // self append OFpath p( OFString( "my" ) + OFpath::preferred_separator + "path" ); expected = OFString( "my" ) diff -Nru dcmtk-3.6.6/ofstd/tests/tmem.cc dcmtk-3.6.7/ofstd/tests/tmem.cc --- dcmtk-3.6.6/ofstd/tests/tmem.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/ofstd/tests/tmem.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2012-2013, OFFIS e.V. + * Copyright (C) 2012-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -25,6 +25,8 @@ #define OFTEST_OFSTD_ONLY #include "dcmtk/ofstd/oftest.h" #include "dcmtk/ofstd/ofmem.h" +#include "dcmtk/ofstd/ofdiag.h" +#include DCMTK_DIAGNOSTIC_IGNORE_PESSIMIZING_MOVE_WARNING OFrvalue > testMove() { diff -Nru dcmtk-3.6.6/ofstd/tests/toffile.cc dcmtk-3.6.7/ofstd/tests/toffile.cc --- dcmtk-3.6.6/ofstd/tests/toffile.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/ofstd/tests/toffile.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2002-2018, OFFIS e.V. + * Copyright (C) 2002-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -26,15 +26,13 @@ #include "dcmtk/ofstd/ofconsol.h" #include "dcmtk/ofstd/ofstd.h" #include "dcmtk/ofstd/ofrand.h" +#include "dcmtk/ofstd/ofdiag.h" /* for DCMTK_DIAGNOSTIC macros */ + +#include DCMTK_DIAGNOSTIC_IGNORE_CONST_EXPRESSION_WARNING #define OFTEST_OFSTD_ONLY #include "dcmtk/ofstd/oftest.h" -#define INCLUDE_CTIME -#define INCLUDE_CSTDLIB -#define INCLUDE_IOSTREAM -#include "dcmtk/ofstd/ofstdinc.h" - // size of block (Uint32 values, not bytes): 1 MByte #define BLOCKSIZE 0x40000 // size of file (in blocks): 6 GByte @@ -232,7 +230,8 @@ if (1 == file.fread(&v, sizeof(Uint32), 1)) { // successfully read value. Now check if the value is correct. - expected = (OFstatic_cast(offile_off_t, FILESIZE) * BLOCKSIZE * sizeof(Uint32) + pos) / sizeof(Uint32); + expected = OFstatic_cast(offile_off_t, FILESIZE); + expected = (expected * BLOCKSIZE * sizeof(Uint32) + pos) / sizeof(Uint32); if (v != OFstatic_cast(Uint32, expected)) { COUT << "\nError: unexpected data read after fseek(SEEK_END) to block " << block diff -Nru dcmtk-3.6.6/ofstd/tests/tofstd.cc dcmtk-3.6.7/ofstd/tests/tofstd.cc --- dcmtk-3.6.6/ofstd/tests/tofstd.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/ofstd/tests/tofstd.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2002-2018, OFFIS e.V. + * Copyright (C) 2002-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -52,6 +52,11 @@ OFString slashFile; slashFile = PATH_SEPARATOR; slashFile += "file"; +#ifdef _WIN32 + OFString slashFile2; + slashFile2 = '/'; + slashFile2 += "file"; +#endif OFStandard::normalizeDirName(result, input); OFCHECK_EQUAL(result, normalized); @@ -61,6 +66,12 @@ OFStandard::combineDirAndFilename(result, input, PATH_SEPARATOR + file); OFCHECK_EQUAL(result, slashFile); + +#ifdef _WIN32 + OFStandard::combineDirAndFilename(result, input, '/' + file); + OFCHECK_EQUAL(result, slashFile2); +#endif + } OFTEST(ofstd_testPaths_1) @@ -167,6 +178,84 @@ // hidden files/directories start with a "." (on Unix systems) OFStandard::combineDirAndFilename(result, "", ".hidden", OFTrue /*allowEmptyDirName*/); OFCHECK_EQUAL(result, ".hidden"); + +#ifdef _WIN32 + // now some special cases for Windows, where both slash and backslash are + // supported as path separators + pathSeparator = '/'; + sourceRoot = ".." + pathSeparator + ".."; + + normalized = sourceRoot; + input = normalized + pathSeparator; + combined = normalized + PATH_SEPARATOR + "file"; + + checkExists(input, OFTrue, OFFalse, OFTrue); + checkPathHandling(input, normalized, combined); + + // Trailing slashes shouldn't matter + input += pathSeparator + pathSeparator + pathSeparator; + + checkExists(input, OFTrue, OFFalse, OFTrue); + checkPathHandling(input, normalized, combined); + + // Now check a non-existent file + normalized = sourceRoot + pathSeparator + "does_not_exist"; + input = normalized; + combined = input + PATH_SEPARATOR + "file"; + + checkExists(input, OFFalse, OFFalse, OFFalse); + checkPathHandling(input, normalized, combined); + + // Check the working dir handling + input = normalized = "."; + combined = "."; + combined += PATH_SEPARATOR; + combined += "file"; + + checkExists(input, OFTrue, OFFalse, OFTrue); + checkPathHandling(input, normalized, combined); + + // Check what happens to "///" + normalized = pathSeparator; + input = pathSeparator + pathSeparator + pathSeparator; + combined = normalized + "file"; + + // No checkExists() since Windows doesn't have "/" + checkPathHandling(input, normalized, combined); + + // Now come some special tests for combineDirAndFilename + input = pathSeparator + pathSeparator + "caesar" + pathSeparator + "share"; + OFStandard::combineDirAndFilename(result, input, "file"); + OFCHECK_EQUAL(result, input + PATH_SEPARATOR + "file"); + + OFStandard::combineDirAndFilename(result, input, pathSeparator + "file"); + OFCHECK_EQUAL(result, pathSeparator + "file"); + + combined = "."; + combined += PATH_SEPARATOR; + combined += "file"; + OFStandard::combineDirAndFilename(result, "", "file"); + OFCHECK_EQUAL(result, combined); + + OFStandard::combineDirAndFilename(result, "", "file", OFTrue /*allowEmptyDirName*/); + OFCHECK_EQUAL(result, "file"); + + OFStandard::combineDirAndFilename(result, "", "."); + OFCHECK_EQUAL(result, "."); + + OFStandard::combineDirAndFilename(result, "..", "."); + OFCHECK_EQUAL(result, ".."); + + OFStandard::combineDirAndFilename(result, "", ""); + OFCHECK_EQUAL(result, "."); + + OFStandard::combineDirAndFilename(result, "", "", OFTrue /*allowEmptyDirName*/); + OFCHECK_EQUAL(result, ""); + + // hidden files/directories start with a "." (on Unix systems) + OFStandard::combineDirAndFilename(result, "", ".hidden", OFTrue /*allowEmptyDirName*/); + OFCHECK_EQUAL(result, ".hidden"); +#endif } OFTEST(ofstd_testPaths_2) @@ -185,6 +274,18 @@ OFCHECK_EQUAL(result, "dirname"); OFStandard::getDirNameFromPath(result, "dirname", OFFalse /*assumeDirName*/); OFCHECK_EQUAL(result, ""); +#ifdef _WIN32 + // on Windows, we also check paths containing '/' as a path separator, + // as well as mixed paths containing both separators + OFStandard::getDirNameFromPath(result, "dirname/filename"); + OFCHECK_EQUAL(result, "dirname"); + OFStandard::getDirNameFromPath(result, "dirname/dirname" + pathSeparator +"filename"); + OFCHECK_EQUAL(result, "dirname/dirname"); + OFStandard::getDirNameFromPath(result, "dirname" + pathSeparator + "dirname/filename"); + OFCHECK_EQUAL(result, "dirname" + pathSeparator + "dirname"); + OFStandard::getDirNameFromPath(result, "/dirname/"); + OFCHECK_EQUAL(result, "/dirname"); +#endif // Check getFilenameFromPath() OFStandard::getFilenameFromPath(result, "dirname" + pathSeparator + "filename"); diff -Nru dcmtk-3.6.6/ofstd/tests/tthread.cc dcmtk-3.6.7/ofstd/tests/tthread.cc --- dcmtk-3.6.6/ofstd/tests/tthread.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/ofstd/tests/tthread.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2000-2015, OFFIS e.V. + * Copyright (C) 2000-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -36,10 +36,10 @@ } while (0) static OFMutex *mutex=NULL; -static int mtx_var=0; -static int mtx_cond1=0; -static int mtx_cond2=0; -static int mtx_cond3=0; +static volatile int mtx_var=0; +static volatile int mtx_cond1=0; +static volatile int mtx_cond2=0; +static volatile int mtx_cond3=0; static const int wait_timeout = 100; @@ -83,6 +83,9 @@ OFString errmsg; mutex = new OFMutex(); if ((!mutex)||(! mutex->initialized())) BAILOUT("creation of mutex failed"); + OFMutex memory_barrier; + if (! memory_barrier.initialized()) BAILOUT("creation of mutex failed"); + int condition = mutex->trylock(); if (condition) { @@ -100,10 +103,17 @@ if (0 != t2.start()) BAILOUT("unable to create thread, mutex test failed"); OFStandard::milliSleep(wait_timeout); // since I've got the mutex, nobody should write to mtx_var + memory_barrier.lock(); // locking the mutex acts as a (inefficient, but portable) memory barrier + memory_barrier.unlock(); if (mtx_var != -1) BAILOUT("mutex test failed"); int i=0; - while ((i++<5) && (!mtx_cond1)) OFStandard::milliSleep(wait_timeout); + while ((i++<10) && (!mtx_cond1)) + { + memory_barrier.lock(); // locking the mutex acts as a (inefficient, but portable) memory barrier + memory_barrier.unlock(); + OFStandard::milliSleep(wait_timeout); + } if (!mtx_cond1) BAILOUT("mutex trylock test failed"); if (0 != (condition = mutex->unlock())) @@ -113,7 +123,12 @@ BAILOUT(errmsg); } - while ((i++<5) && ((!mtx_cond2)||(!mtx_cond3))) OFStandard::milliSleep(wait_timeout); + while ((i++<10) && ((!mtx_cond2)||(!mtx_cond3))) + { + memory_barrier.lock(); // locking the mutex acts as a (inefficient, but portable) memory barrier + memory_barrier.unlock(); + OFStandard::milliSleep(wait_timeout); + } if ((!mtx_cond2) || (!mtx_cond3)) BAILOUT("mutex lock/unlock test failed"); if (0 != t1.join()) BAILOUT("unable to join thread, mutex test failed"); @@ -123,10 +138,10 @@ } static OFSemaphore *semaphore=NULL; -static int sem_cond1=0; -static int sem_cond2=0; -static int sem_cond3=0; -static int sem_cond4=0; +static volatile int sem_cond1=0; +static volatile int sem_cond2=0; +static volatile int sem_cond3=0; +static volatile int sem_cond4=0; class SemaT1: public OFThread { @@ -162,6 +177,11 @@ if (0== semaphore->post()) sem_cond4=1; } } + else + { + sem_cond3 = 1; // acquired semaphore + if (0== semaphore->post()) sem_cond4=1; + } } }; @@ -187,11 +207,19 @@ BAILOUT(errmsg); } + OFMutex memory_barrier; + if (! memory_barrier.initialized()) BAILOUT("creation of mutex failed"); + SemaT1 t1; if (0 != t1.start()) BAILOUT("unable to create thread, semaphore test failed"); int i=0; - while ((i++<5) && (!sem_cond1)) OFStandard::milliSleep(wait_timeout); + while ((i++<10) && (!sem_cond1)) + { + memory_barrier.lock(); // locking the mutex acts as a (inefficient, but portable) memory barrier + memory_barrier.unlock(); + OFStandard::milliSleep(wait_timeout); + } if (!sem_cond1) BAILOUT("semaphore lock/unlock test failed"); SemaT2 t2; @@ -202,8 +230,14 @@ mutex->unlock(); i=0; - while ((i++<5) && ((!sem_cond2)||(!sem_cond3)||(!sem_cond4))) OFStandard::milliSleep(wait_timeout); - if ((!mtx_cond2) || (!mtx_cond3) || (!sem_cond4)) BAILOUT("semaphore lock/unlock test failed"); + while ((i++<10) && ((!sem_cond2)||(!sem_cond3)||(!sem_cond4))) + { + memory_barrier.lock(); // locking the mutex acts as a (inefficient, but portable) memory barrier + memory_barrier.unlock(); + OFStandard::milliSleep(wait_timeout); + } + + if ((!sem_cond2)||(!sem_cond3)||(!sem_cond4)) BAILOUT("semaphore lock/unlock test failed: sem_cond2=" << sem_cond2 << ", sem_cond3=" << sem_cond3 << ", sem_cond4=" << sem_cond4); if (0 != t1.join()) BAILOUT("unable to join thread, semaphore test failed"); if (0 != t2.join()) BAILOUT("unable to join thread, semaphore test failed"); @@ -214,13 +248,13 @@ static OFReadWriteLock *rwlock=NULL; static OFMutex *mutex2=NULL; -static int rw_cond1=0; -static int rw_cond2=0; -static int rw_cond3=0; -static int rw_cond4=0; -static int rw_cond5=0; -static int rw_cond6=0; -static int rw_cond7=0; +static volatile int rw_cond1=0; +static volatile int rw_cond2=0; +static volatile int rw_cond3=0; +static volatile int rw_cond4=0; +static volatile int rw_cond5=0; +static volatile int rw_cond6=0; +static volatile int rw_cond7=0; class RWLockT2: public OFThread { @@ -298,12 +332,20 @@ BAILOUT(errmsg); } + OFMutex memory_barrier; + if (! memory_barrier.initialized()) BAILOUT("creation of mutex failed"); + RWLockT2 t2; RWLockT1 t1(t2); if (0 != t1.start()) BAILOUT("unable to create thread, read/write lock/unlock test failed"); int i=0; - while ((i++<5) && ((!rw_cond1)||(!rw_cond5))) OFStandard::milliSleep(wait_timeout); + while ((i++<10) && ((!rw_cond1)||(!rw_cond5))) + { + memory_barrier.lock(); // locking the mutex acts as a (inefficient, but portable) memory barrier + memory_barrier.unlock(); + OFStandard::milliSleep(wait_timeout); + } if ((!rw_cond1)||(!rw_cond5)) BAILOUT("read/write lock/unlock test failed"); condition = rwlock->rdunlock(); @@ -314,12 +356,20 @@ BAILOUT(errmsg); } OFStandard::milliSleep(wait_timeout); + memory_barrier.lock(); // locking the mutex acts as a (inefficient, but portable) memory barrier + memory_barrier.unlock(); if (rw_cond6) BAILOUT("read/write lock/unlock test failed"); mutex->unlock(); i=0; - while ((i++<5) && ((!rw_cond2)||(!rw_cond3)||(!rw_cond4)||(!rw_cond5)||(!rw_cond6)||(!rw_cond7))) OFStandard::milliSleep(wait_timeout); + while ((i++<10) && ((!rw_cond2)||(!rw_cond3)||(!rw_cond4)||(!rw_cond5)||(!rw_cond6)||(!rw_cond7))) + { + memory_barrier.lock(); // locking the mutex acts as a (inefficient, but portable) memory barrier + memory_barrier.unlock(); + OFStandard::milliSleep(wait_timeout); + } + if ((!rw_cond2)||(!rw_cond3)||(!rw_cond4)||(!rw_cond5)||(!rw_cond6)||(!rw_cond7)) BAILOUT("read/write lock/unlock test failed"); if (0 != t1.join()) BAILOUT("unable to join thread, read/write lock/unlock test failed"); @@ -422,12 +472,20 @@ BAILOUT(errmsg); } + OFMutex memory_barrier; + if (! memory_barrier.initialized()) BAILOUT("creation of mutex failed"); + RWLockerT2 t2; RWLockerT1 t1(t2); if (0 != t1.start()) BAILOUT("unable to create thread, read/write lock test failed"); int i=0; - while ((i++<5) && ((!rw_cond1)||(!rw_cond5))) OFStandard::milliSleep(wait_timeout); + while ((i++<10) && ((!rw_cond1)||(!rw_cond5))) + { + memory_barrier.lock(); // locking the mutex acts as a (inefficient, but portable) memory barrier + memory_barrier.unlock(); + OFStandard::milliSleep(wait_timeout); + } if ((!rw_cond1)||(!rw_cond5)) BAILOUT("read/write lock test failed"); condition = rwlockLocker.unlock(); @@ -438,12 +496,20 @@ BAILOUT(errmsg); } OFStandard::milliSleep(wait_timeout); + memory_barrier.lock(); // locking the mutex acts as a (inefficient, but portable) memory barrier + memory_barrier.unlock(); if (rw_cond6) BAILOUT("read/write lock test failed"); mutex->unlock(); i=0; - while ((i++<5) && ((!rw_cond2)||(!rw_cond3)||(!rw_cond4)||(!rw_cond5)||(!rw_cond6)||(!rw_cond7))) OFStandard::milliSleep(wait_timeout); + while ((i++<10) && ((!rw_cond2)||(!rw_cond3)||(!rw_cond4)||(!rw_cond5)||(!rw_cond6)||(!rw_cond7))) + { + memory_barrier.lock(); // locking the mutex acts as a (inefficient, but portable) memory barrier + memory_barrier.unlock(); + OFStandard::milliSleep(wait_timeout); + } + if ((!rw_cond2)||(!rw_cond3)||(!rw_cond4)||(!rw_cond5)||(!rw_cond6)||(!rw_cond7)) BAILOUT("read/write lock test failed"); if (0 != t1.join()) BAILOUT("unable to join thread, read/write lock test failed"); @@ -456,10 +522,10 @@ static OFThreadSpecificData *tsdata=NULL; -static int tsd_cond1=0; -static int tsd_cond2=0; -static int tsd_cond3=0; -static int tsd_cond4=0; +static volatile int tsd_cond1=0; +static volatile int tsd_cond2=0; +static volatile int tsd_cond3=0; +static volatile int tsd_cond4=0; class TSDataT1: public OFThread { @@ -532,6 +598,9 @@ BAILOUT(errmsg); } + OFMutex memory_barrier; + if (! memory_barrier.initialized()) BAILOUT("creation of mutex failed"); + TSDataT1 t1; if (0 != t1.start()) BAILOUT("unable to create thread, thread specific data test failed"); @@ -540,7 +609,12 @@ int i=0; - while ((i++<5) && ((!tsd_cond1)||(!tsd_cond2))) OFStandard::milliSleep(wait_timeout); + while ((i++<10) && ((!tsd_cond1)||(!tsd_cond2))) + { + memory_barrier.lock(); // locking the mutex acts as a (inefficient, but portable) memory barrier + memory_barrier.unlock(); + OFStandard::milliSleep(wait_timeout); + } if ((!tsd_cond1)||(!tsd_cond2)) BAILOUT("thread specific data write test failed"); @@ -560,7 +634,13 @@ } i=0; - while ((i++<5) && ((!tsd_cond3)||(!tsd_cond4))) OFStandard::milliSleep(wait_timeout); + while ((i++<10) && ((!tsd_cond3)||(!tsd_cond4))) + { + memory_barrier.lock(); // locking the mutex acts as a (inefficient, but portable) memory barrier + memory_barrier.unlock(); + OFStandard::milliSleep(wait_timeout); + } + if ((!tsd_cond3)||(!tsd_cond4)) BAILOUT("thread specific data read test failed"); if (0 != t1.join()) BAILOUT("unable to create thread, thread specific data test failed"); diff -Nru dcmtk-3.6.6/ofstd/tests/ttuple.cc dcmtk-3.6.7/ofstd/tests/ttuple.cc --- dcmtk-3.6.6/ofstd/tests/ttuple.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/ofstd/tests/ttuple.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2014-2017, OFFIS e.V. + * Copyright (C) 2014-2021, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -19,22 +19,20 @@ * */ -// Disable some warnings. -// We're testing if a tuple containing floats can be initialized from a tuple of -// ints, which is required by the standard. But this gives precision warnings -// on some compilers / at some settings and we don't want to see these warnings. -#ifdef __GNUG__ -#pragma GCC diagnostic ignored "-Wconversion" -#elif defined(_MSC_VER) -#pragma warning(disable: 4244) -#endif - #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/oftuple.h" #include "dcmtk/ofstd/ofstring.h" +#include "dcmtk/ofstd/ofdiag.h" /* for DCMTK_DIAGNOSTIC macros */ + +// Disable some warnings. +// We're testing if a tuple containing floats can be initialized from a tuple of +// ints, which is required by the standard. But this gives precision warnings +// on some compilers / at some settings and we don't want to see these warnings. +#include DCMTK_DIAGNOSTIC_IGNORE_CONST_EXPRESSION_WARNING +#include DCMTK_DIAGNOSTIC_IGNORE_IMPLICIT_CONVERSION OFTEST(ofstd_tuple) { diff -Nru dcmtk-3.6.6/ofstd/tests/tuuid.cc dcmtk-3.6.7/ofstd/tests/tuuid.cc --- dcmtk-3.6.6/ofstd/tests/tuuid.cc 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/ofstd/tests/tuuid.cc 2022-04-28 13:47:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2011, OFFIS e.V. + * Copyright (C) 2011-2021, 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/ofstd/oftest.h" #include "dcmtk/ofstd/ofuuid.h" -#define INCLUDE_CSTRING -#include "dcmtk/ofstd/ofstdinc.h" /* needed for memcmp() */ - - OFTEST(ofstd_OFUUID_1) { /* Verify that two UUIDs are different and a UUID is equal to itself */ diff -Nru dcmtk-3.6.6/README dcmtk-3.6.7/README --- dcmtk-3.6.6/README 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/README 2022-04-28 13:47:25.000000000 +0000 @@ -40,12 +40,12 @@ this software see the HISTORY file. For answers to frequently asked questions please consult the FAQ: - http://forum.dcmtk.org/faq/ + https://forum.dcmtk.org/faq/ In addition to the API documentation, there is also a Wiki system where further information (e.g. HOWTOs) can be found: - http://support.dcmtk.org/wiki/ + https://support.dcmtk.org/wiki/ If you find bugs or other problems with this software, we would appreciate hearing about them. Please send electronic mail to: @@ -56,4 +56,4 @@ suggested fix. For general questions on how to compile, install or use the toolkit we recommend the public discussion forum at: - http://forum.dcmtk.org/ + https://forum.dcmtk.org/ diff -Nru dcmtk-3.6.6/VERSION dcmtk-3.6.7/VERSION --- dcmtk-3.6.6/VERSION 2021-01-14 14:16:29.000000000 +0000 +++ dcmtk-3.6.7/VERSION 2022-04-28 13:47:25.000000000 +0000 @@ -1 +1 @@ -3.6.6 +3.6.7