diff --git a/CMakeExternals/ITK-4.13.3.patch b/CMakeExternals/ITK-4.13.3.patch deleted file mode 100644 index a21a50b384..0000000000 --- a/CMakeExternals/ITK-4.13.3.patch +++ /dev/null @@ -1,53 +0,0 @@ -diff --git a/Modules/Core/Common/include/itkBoundingBox.h b/Modules/Core/Common/include/itkBoundingBox.h -index 36b03aaa7f..64205acfab 100644 ---- a/Modules/Core/Common/include/itkBoundingBox.h -+++ b/Modules/Core/Common/include/itkBoundingBox.h -@@ -87,7 +87,7 @@ public: - itkTypeMacro(BoundingBox, Object); - - /** Method for creation through the object factory. */ -- itkNewMacro(Self); -+ itkFactorylessNewMacro(Self); - - /** Hold on to the type information specified by the template parameters. */ - typedef TPointIdentifier PointIdentifier; -diff --git a/Modules/Core/Common/include/itkVectorContainer.h b/Modules/Core/Common/include/itkVectorContainer.h -index 72293c4ce8..e6366c66b5 100644 ---- a/Modules/Core/Common/include/itkVectorContainer.h -+++ b/Modules/Core/Common/include/itkVectorContainer.h -@@ -92,7 +92,7 @@ public: - typedef VectorType STLContainerType; - - /** Method for creation through the object factory. */ -- itkNewMacro(Self); -+ itkFactorylessNewMacro(Self); - - /** Standard part of every itk Object. */ - itkTypeMacro(VectorContainer, Object); -diff --git a/Modules/Core/Transform/include/itkScalableAffineTransform.h b/Modules/Core/Transform/include/itkScalableAffineTransform.h -index 4e830476a2..b5efeb95a4 100644 ---- a/Modules/Core/Transform/include/itkScalableAffineTransform.h -+++ b/Modules/Core/Transform/include/itkScalableAffineTransform.h -@@ -47,7 +47,8 @@ public: - itkTypeMacro(ScalableAffineTransform, AffineTransform); - - /** New macro for creation of through a Smart Pointer */ -- itkNewMacro(Self); -+ itkFactorylessNewMacro(Self); -+ itkCloneMacro(Self); - - /** Dimension of the domain space. */ - itkStaticConstMacro(InputSpaceDimension, unsigned int, NDimensions); -diff --git a/Modules/ThirdParty/OpenJPEG/src/openjpeg/opj_includes.h b/Modules/ThirdParty/OpenJPEG/src/openjpeg/opj_includes.h -index e75a220d4d..90d5bf1218 100644 ---- a/Modules/ThirdParty/OpenJPEG/src/openjpeg/opj_includes.h -+++ b/Modules/ThirdParty/OpenJPEG/src/openjpeg/opj_includes.h -@@ -88,7 +88,7 @@ Most compilers implement their own version of this keyword ... - #endif - - /* MSVC and Borland C do not have lrintf */ --#if defined(_MSC_VER) || defined(__BORLANDC__) -+#if (defined(_MSC_VER) && _MSC_VER < 1928) || defined(__BORLANDC__) - - /* MSVC 64bits doesn't support _asm */ - #if !defined(_WIN64) diff --git a/CMakeExternals/ITK.cmake b/CMakeExternals/ITK.cmake index 3869dd614a..4bb85c5d7d 100644 --- a/CMakeExternals/ITK.cmake +++ b/CMakeExternals/ITK.cmake @@ -1,87 +1,87 @@ #----------------------------------------------------------------------------- # ITK #----------------------------------------------------------------------------- # Sanity checks if(DEFINED ITK_DIR AND NOT EXISTS ${ITK_DIR}) message(FATAL_ERROR "ITK_DIR variable is defined but corresponds to non-existing directory") endif() set(proj ITK) set(proj_DEPENDENCIES GDCM) if(MITK_USE_OpenCV) list(APPEND proj_DEPENDENCIES OpenCV) endif() if(MITK_USE_HDF5) list(APPEND proj_DEPENDENCIES HDF5) endif() set(ITK_DEPENDS ${proj}) if(NOT DEFINED ITK_DIR) set(additional_cmake_args -DUSE_WRAP_ITK:BOOL=OFF) + list(APPEND additional_cmake_args + -DITKV4_COMPATIBILITY:BOOL=OFF + -DITK_LEGACY_REMOVE:BOOL=ON + ) + if(MITK_USE_OpenCV) list(APPEND additional_cmake_args -DModule_ITKVideoBridgeOpenCV:BOOL=ON -DOpenCV_DIR:PATH=${OpenCV_DIR} ) endif() # Keep the behaviour of ITK 4.3 which by default turned on ITK Review # see MITK bug #17338 list(APPEND additional_cmake_args -DModule_ITKReview:BOOL=ON -DModule_ITKOpenJPEG:BOOL=ON # for 4.7, the OpenJPEG is needed by review but the variable must be set -DModule_IsotropicWavelets:BOOL=ON ) if(CTEST_USE_LAUNCHERS) list(APPEND additional_cmake_args "-DCMAKE_PROJECT_${proj}_INCLUDE:FILEPATH=${CMAKE_ROOT}/Modules/CTestUseLaunchers.cmake" ) endif() mitk_query_custom_ep_vars() ExternalProject_Add(${proj} LIST_SEPARATOR ${sep} UPDATE_COMMAND "" - URL ${MITK_THIRDPARTY_DOWNLOAD_PREFIX_URL}/InsightToolkit-4.13.3.tar.gz - URL_MD5 d1c10c8288b47577d718a71190444815 - PATCH_COMMAND - # 2021/03/26: Only the patch file changed since the last snapshot. - # The only purpose of this comment is to change this .cmake file - # to make our build system aware of a change. - ${PATCH_COMMAND} -N -p1 -i ${CMAKE_CURRENT_LIST_DIR}/ITK-4.13.3.patch + URL ${MITK_THIRDPARTY_DOWNLOAD_PREFIX_URL}/InsightToolkit-5.1.2.tar.gz + URL_MD5 e939fc61e7354eba20f98fbd7b034ec2 CMAKE_GENERATOR ${gen} CMAKE_GENERATOR_PLATFORM ${gen_platform} CMAKE_ARGS ${ep_common_args} ${additional_cmake_args} -DBUILD_EXAMPLES:BOOL=OFF -DITK_USE_SYSTEM_GDCM:BOOL=ON -DGDCM_DIR:PATH=${GDCM_DIR} -DITK_USE_SYSTEM_HDF5:BOOL=ON -DHDF5_DIR:PATH=${HDF5_DIR} ${${proj}_CUSTOM_CMAKE_ARGS} CMAKE_CACHE_ARGS ${ep_common_cache_args} ${${proj}_CUSTOM_CMAKE_CACHE_ARGS} CMAKE_CACHE_DEFAULT_ARGS ${ep_common_cache_default_args} ${${proj}_CUSTOM_CMAKE_CACHE_DEFAULT_ARGS} DEPENDS ${proj_DEPENDENCIES} ) set(ITK_DIR ${ep_prefix}) mitkFunctionInstallExternalCMakeProject(${proj}) else() mitkMacroEmptyExternalProject(${proj} "${proj_DEPENDENCIES}") endif()