From fe4f2d05fda541bf18be1da837d7645d83463da0 Mon Sep 17 00:00:00 2001 From: Mengna-Li <543250287@qq.com> Date: Fri, 18 Feb 2022 02:17:44 +0000 Subject: [PATCH 1/3] update itk to v5.2.1 --- ports/itk/cufftw.patch | 58 -------------------- ports/itk/hdf5.patch | 20 ------- ports/itk/portfile.cmake | 12 ++-- ports/itk/python_gpu_wrapping.patch | 85 +++++++++-------------------- ports/itk/vcpkg.json | 3 +- versions/baseline.json | 4 +- versions/i-/itk.json | 5 ++ 7 files changed, 38 insertions(+), 149 deletions(-) delete mode 100644 ports/itk/cufftw.patch delete mode 100644 ports/itk/hdf5.patch diff --git a/ports/itk/cufftw.patch b/ports/itk/cufftw.patch deleted file mode 100644 index 17365fb2f1f0e3..00000000000000 --- a/ports/itk/cufftw.patch +++ /dev/null @@ -1,58 +0,0 @@ -From 0f47aae05217884193a39690c2beef566f4ed3b1 Mon Sep 17 00:00:00 2001 -From: Stephen Aylward -Date: Sat, 25 Apr 2020 20:15:21 -0400 -Subject: [PATCH] BUG: CUFFTW paths were not being set and unnecessary FFTW - files used - -FindFFTW sets the FFTW_INCLUDES variable. The FFTW_INCLUDE_PATH var is -specific to FFTW (not used by CUFFTW). - -FFTWGlobalConfiguration file is only needed if FFTW is being used, -not if CUFFT is being used. ---- - CMake/FindFFTW.cmake | 2 +- - Modules/Filtering/FFT/CMakeLists.txt | 2 +- - Modules/Filtering/FFT/src/CMakeLists.txt | 9 +++++---- - 3 files changed, 7 insertions(+), 6 deletions(-) - -diff --git a/CMake/FindFFTW.cmake b/CMake/FindFFTW.cmake -index 785edc2b628..e1935899cab 100644 ---- a/CMake/FindFFTW.cmake -+++ b/CMake/FindFFTW.cmake -@@ -62,7 +62,7 @@ if(ITK_USE_FFTWD OR ITK_USE_FFTWF) - find_path(FFTW_INCLUDE_PATH fftw3.h ${FFTW_INC_SEARCHPATH}) - endif() - -- if(FFTW_INCLUDE_PATH) -+ if(FFTW_INCLUDE_PATH OR CUFFTW_INCLUDE_PATH) - if(ITK_USE_CUFFTW) - file(TO_CMAKE_PATH "${CUFFTW_INCLUDE_PATH}" CUFFTW_INCLUDE_PATH) - set(FFTW_INCLUDE ${CUFFTW_INCLUDE_PATH}) -diff --git a/Modules/Filtering/FFT/CMakeLists.txt b/Modules/Filtering/FFT/CMakeLists.txt -index 7d9d1900b56..713530149cb 100644 ---- a/Modules/Filtering/FFT/CMakeLists.txt -+++ b/Modules/Filtering/FFT/CMakeLists.txt -@@ -5,5 +5,5 @@ if(ITK_USE_CUFFTW) - else() - set(ITKFFT_LIBRARIES ITKFFT) - endif() --set(ITKFFT_INCLUDE_DIRS ${FFTW_INCLUDE_PATH}) -+set(ITKFFT_INCLUDE_DIRS ${FFTW_INCLUDE}) - itk_module_impl() -diff --git a/Modules/Filtering/FFT/src/CMakeLists.txt b/Modules/Filtering/FFT/src/CMakeLists.txt -index 3f3137b8cd4..bde3ee906f8 100644 ---- a/Modules/Filtering/FFT/src/CMakeLists.txt -+++ b/Modules/Filtering/FFT/src/CMakeLists.txt -@@ -1,7 +1,8 @@ --set(ITKFFT_SRCS -- itkFFTWGlobalConfiguration.cxx -- itkComplexToComplexFFTImageFilter.cxx -- ) -+set(ITKFFT_SRCS itkComplexToComplexFFTImageFilter.cxx) -+ -+if( ITK_USE_FFTWF OR ITK_USE_FFTWD AND NOT ITK_USE_CUFFTW) -+ list(APPEND ITKFFT_SRCS itkFFTWGlobalConfiguration.cxx ) -+endif() - - itk_module_add_library(ITKFFT ${ITKFFT_SRCS}) - diff --git a/ports/itk/hdf5.patch b/ports/itk/hdf5.patch deleted file mode 100644 index 091594cda0e933..00000000000000 --- a/ports/itk/hdf5.patch +++ /dev/null @@ -1,20 +0,0 @@ -diff --git a/Modules/ThirdParty/HDF5/CMakeLists.txt b/Modules/ThirdParty/HDF5/CMakeLists.txt -index a700ecdfb..0a683a52b 100644 ---- a/Modules/ThirdParty/HDF5/CMakeLists.txt -+++ b/Modules/ThirdParty/HDF5/CMakeLists.txt -@@ -25,11 +25,11 @@ endif() - ") - endif() - -- set(ITKHDF5_LIBRARIES ) -- if(BUILD_SHARED_LIBS) -- list(APPEND ITKHDF5_LIBRARIES ${HDF5_C_SHARED_LIBRARY} ${HDF5_CXX_SHARED_LIBRARY}) -+ set(ITKHDF5_LIBRARIES) -+ if(HDF5_BUILD_SHARED_LIBS) -+ list(APPEND ITKHDF5_LIBRARIES hdf5::hdf5_cpp-shared hdf5::hdf5-shared) - else() -- list(APPEND ITKHDF5_LIBRARIES ${HDF5_C_STATIC_LIBRARY} ${HDF5_CXX_STATIC_LIBRARY}) -+ list(APPEND ITKHDF5_LIBRARIES hdf5::hdf5_cpp-static hdf5::hdf5-static) - endif() - - set(ITKHDF5_INCLUDE_DIRS diff --git a/ports/itk/portfile.cmake b/ports/itk/portfile.cmake index 12eb0bf43b1931..08b7ae402078c1 100644 --- a/ports/itk/portfile.cmake +++ b/ports/itk/portfile.cmake @@ -3,11 +3,10 @@ vcpkg_buildpath_length_warning(37) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO InsightSoftwareConsortium/ITK - REF d3286c9cc04ba16cc8f73de9a98fbcd7c02f3c7b - SHA512 c358449870d580aeb10e32f8be0ca39e8a76d8dc06fda973788fafb5971333e546611c399190be49d40f5f3c18a1105d9699eef271a560aff25ce168a396926e + REF 95800fd4d4b08678a6c0ebb63eb242893025b660 #5.2.1 + SHA512 fe703bc6ed681cb9983d7d6e21c8ffa7650337e470c09a7241de58a463c23e315516b1a81a18c14f682706056a0ec66932b63d2e24945bdcea03169bc1122bb2 HEAD_REF master PATCHES - hdf5.patch double-conversion.patch openjpeg.patch openjpeg2.patch @@ -15,7 +14,6 @@ vcpkg_from_github( wrapping.patch python_gpu_wrapping.patch opencl.patch - cufftw.patch use-the-lrintf-intrinsic.patch ) @@ -194,9 +192,9 @@ file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib/cmake") file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/lib/cmake") file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") -file(REMOVE "${CURRENT_PACKAGES_DIR}/include/ITK-5.1/vcl_where_root_dir.h") +file(REMOVE "${CURRENT_PACKAGES_DIR}/include/ITK-5.3/vcl_where_root_dir.h") -vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/ITK-5.1/itk_eigen.h" "include(${SOURCE_PATH}/CMake/UseITK.cmake)" "include(UseITK)") -vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/ITK-5.1/itk_eigen.h" "message(STATUS \"From ITK: Eigen3_DIR: ${CURRENT_INSTALLED_DIR}/share/eigen3\")" "") +vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/ITK-5.3/itk_eigen.h" "include(${SOURCE_PATH}/CMake/UseITK.cmake)" "include(UseITK)") +vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/ITK-5.3/itk_eigen.h" "message(STATUS \"From ITK: Eigen3_DIR: ${CURRENT_INSTALLED_DIR}/share/eigen3\")" "") file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/itk/python_gpu_wrapping.patch b/ports/itk/python_gpu_wrapping.patch index 37367d979e0fb8..5b52e4ceca573a 100644 --- a/ports/itk/python_gpu_wrapping.patch +++ b/ports/itk/python_gpu_wrapping.patch @@ -1,41 +1,19 @@ -diff --git a/CMake/itkOpenCL.cmake b/CMake/itkOpenCL.cmake -index 0ccbe144d..fa381524f 100644 ---- a/CMake/itkOpenCL.cmake -+++ b/CMake/itkOpenCL.cmake -@@ -48,7 +48,7 @@ if(ITK_USE_GPU) - ) - set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/${OUTPUT_FILE} - PROPERTIES GENERATED ON) -- set(${SRC_VAR} ${${SRC_VAR}} ${OUTPUT_FILE}) -+ set(${SRC_VAR} ${${SRC_VAR}} ${CMAKE_CURRENT_BINARY_DIR}/${OUTPUT_FILE}) - endmacro() - - macro(write_gpu_kernels GPUKernels GPU_SRC) diff --git a/Modules/Core/Common/include/itkMacro.h b/Modules/Core/Common/include/itkMacro.h -index 1816f722a..3a6a8aee5 100644 ---- a/Modules/Core/Common/include/itkMacro.h +index 7d2072af..44fb5246 100644 +--- a/Modules/Core/Common/include/itkMacro.h +++ b/Modules/Core/Common/include/itkMacro.h -@@ -1141,7 +1141,7 @@ compilers. - #define itkGetVectorMacro(name, type, count) \ - virtual type * Get##name() const { return this->m_##name; } +@@ -1212,7 +1212,7 @@ compilers. + virtual type * Get##name() const { return this->m_##name; } \ + ITK_MACROEND_NOOP_STATEMENT -/**\def itkGPUKernelClassMacro +/**\def class itkGPUKernelClassMacro * Construct a non-templatized helper class that * provides the GPU kernel source code as a const char* */ -@@ -1150,7 +1150,7 @@ compilers. - * Workaround KWstyle bug \ \ - * \ingroup ITKCommon \ \ - */ \ -- class kernel \ -+ kernel \ - { \ - public: \ - static const char * \ diff --git a/Modules/Core/GPUCommon/include/itkGPUImageOps.h b/Modules/Core/GPUCommon/include/itkGPUImageOps.h -index f4eb8f33b..fbdf3d757 100644 ---- a/Modules/Core/GPUCommon/include/itkGPUImageOps.h +index 28403144..c5813397 100644 +--- a/Modules/Core/GPUCommon/include/itkGPUImageOps.h +++ b/Modules/Core/GPUCommon/include/itkGPUImageOps.h @@ -23,7 +23,7 @@ namespace itk @@ -47,8 +25,8 @@ index f4eb8f33b..fbdf3d757 100644 /** \class GPUImageOps * diff --git a/Modules/Core/GPUCommon/include/itkGPUReduction.h b/Modules/Core/GPUCommon/include/itkGPUReduction.h -index 524a5cd01..1b3ce91e9 100644 ---- a/Modules/Core/GPUCommon/include/itkGPUReduction.h +index f01c7244..fec31b51 100644 +--- a/Modules/Core/GPUCommon/include/itkGPUReduction.h +++ b/Modules/Core/GPUCommon/include/itkGPUReduction.h @@ -26,7 +26,7 @@ namespace itk @@ -59,22 +37,9 @@ index 524a5cd01..1b3ce91e9 100644 /** * \class GPUReduction -diff --git a/Modules/Core/GPUFiniteDifference/include/itkGPUDenseFiniteDifferenceImageFilter.h b/Modules/Core/GPUFiniteDifference/include/itkGPUDenseFiniteDifferenceImageFilter.h -index 853801cec..2fccf0bc5 100644 ---- a/Modules/Core/GPUFiniteDifference/include/itkGPUDenseFiniteDifferenceImageFilter.h -+++ b/Modules/Core/GPUFiniteDifference/include/itkGPUDenseFiniteDifferenceImageFilter.h -@@ -24,7 +24,7 @@ - namespace itk - { - /** Create a helper GPU Kernel class for GPUDenseFiniteDifferenceImageFilter */ --itkGPUKernelClassMacro(GPUDenseFiniteDifferenceImageFilterKernel); -+class ITKGPUFiniteDifference_EXPORT itkGPUKernelClassMacro(GPUDenseFiniteDifferenceImageFilterKernel); - - /** - * \class GPUDenseFiniteDifferenceImageFilter diff --git a/Modules/Filtering/GPUAnisotropicSmoothing/include/itkGPUGradientNDAnisotropicDiffusionFunction.h b/Modules/Filtering/GPUAnisotropicSmoothing/include/itkGPUGradientNDAnisotropicDiffusionFunction.h -index 4245ff914..1b21b709e 100644 ---- a/Modules/Filtering/GPUAnisotropicSmoothing/include/itkGPUGradientNDAnisotropicDiffusionFunction.h +index c89eec7d..783c61ef 100644 +--- a/Modules/Filtering/GPUAnisotropicSmoothing/include/itkGPUGradientNDAnisotropicDiffusionFunction.h +++ b/Modules/Filtering/GPUAnisotropicSmoothing/include/itkGPUGradientNDAnisotropicDiffusionFunction.h @@ -54,7 +54,7 @@ namespace itk */ @@ -86,8 +51,8 @@ index 4245ff914..1b21b709e 100644 template class ITK_TEMPLATE_EXPORT GPUGradientNDAnisotropicDiffusionFunction diff --git a/Modules/Filtering/GPUAnisotropicSmoothing/include/itkGPUScalarAnisotropicDiffusionFunction.h b/Modules/Filtering/GPUAnisotropicSmoothing/include/itkGPUScalarAnisotropicDiffusionFunction.h -index 305f6490e..d0d433080 100644 ---- a/Modules/Filtering/GPUAnisotropicSmoothing/include/itkGPUScalarAnisotropicDiffusionFunction.h +index c44ac788..6e342b3c 100644 +--- a/Modules/Filtering/GPUAnisotropicSmoothing/include/itkGPUScalarAnisotropicDiffusionFunction.h +++ b/Modules/Filtering/GPUAnisotropicSmoothing/include/itkGPUScalarAnisotropicDiffusionFunction.h @@ -32,7 +32,7 @@ namespace itk * */ @@ -99,8 +64,8 @@ index 305f6490e..d0d433080 100644 template class ITK_TEMPLATE_EXPORT GPUScalarAnisotropicDiffusionFunction : public GPUAnisotropicDiffusionFunction diff --git a/Modules/Filtering/GPUImageFilterBase/include/itkGPUCastImageFilter.h b/Modules/Filtering/GPUImageFilterBase/include/itkGPUCastImageFilter.h -index 23530ac5c..e1b83f696 100644 ---- a/Modules/Filtering/GPUImageFilterBase/include/itkGPUCastImageFilter.h +index 63e1a6d3..ab4bf3e7 100644 +--- a/Modules/Filtering/GPUImageFilterBase/include/itkGPUCastImageFilter.h +++ b/Modules/Filtering/GPUImageFilterBase/include/itkGPUCastImageFilter.h @@ -29,7 +29,7 @@ namespace itk { @@ -112,8 +77,8 @@ index 23530ac5c..e1b83f696 100644 /** \class GPUCastImageFilter * \brief GPU version of CastImageFilter. diff --git a/Modules/Filtering/GPUImageFilterBase/include/itkGPUNeighborhoodOperatorImageFilter.h b/Modules/Filtering/GPUImageFilterBase/include/itkGPUNeighborhoodOperatorImageFilter.h -index c4adc2967..69aeac6db 100644 ---- a/Modules/Filtering/GPUImageFilterBase/include/itkGPUNeighborhoodOperatorImageFilter.h +index f43025ac..8bdced34 100644 +--- a/Modules/Filtering/GPUImageFilterBase/include/itkGPUNeighborhoodOperatorImageFilter.h +++ b/Modules/Filtering/GPUImageFilterBase/include/itkGPUNeighborhoodOperatorImageFilter.h @@ -41,7 +41,7 @@ namespace itk */ @@ -125,8 +90,8 @@ index c4adc2967..69aeac6db 100644 template class ITK_TEMPLATE_EXPORT GPUMeanImageFilter diff --git a/Modules/Filtering/GPUThresholding/include/itkGPUBinaryThresholdImageFilter.h b/Modules/Filtering/GPUThresholding/include/itkGPUBinaryThresholdImageFilter.h -index 8d26dcfc5..613bc623f 100644 ---- a/Modules/Filtering/GPUThresholding/include/itkGPUBinaryThresholdImageFilter.h +index ce6526db..48ad3b04 100644 +--- a/Modules/Filtering/GPUThresholding/include/itkGPUBinaryThresholdImageFilter.h +++ b/Modules/Filtering/GPUThresholding/include/itkGPUBinaryThresholdImageFilter.h @@ -85,7 +85,7 @@ private: } // end of namespace Functor @@ -151,8 +116,8 @@ index 8d26dcfc5..613bc623f 100644 /** * \class GPUBinaryThresholdImageFilter diff --git a/Modules/Registration/GPUPDEDeformable/include/itkGPUDemonsRegistrationFunction.h b/Modules/Registration/GPUPDEDeformable/include/itkGPUDemonsRegistrationFunction.h -index 28b21d592..0b46e27b8 100644 ---- a/Modules/Registration/GPUPDEDeformable/include/itkGPUDemonsRegistrationFunction.h +index 008ed396..ae3b0cb0 100644 +--- a/Modules/Registration/GPUPDEDeformable/include/itkGPUDemonsRegistrationFunction.h +++ b/Modules/Registration/GPUPDEDeformable/include/itkGPUDemonsRegistrationFunction.h @@ -51,7 +51,7 @@ namespace itk * \ingroup ITKGPUPDEDeformableRegistration @@ -164,8 +129,8 @@ index 28b21d592..0b46e27b8 100644 template class ITK_TEMPLATE_EXPORT GPUDemonsRegistrationFunction diff --git a/Modules/Registration/GPUPDEDeformable/include/itkGPUPDEDeformableRegistrationFilter.h b/Modules/Registration/GPUPDEDeformable/include/itkGPUPDEDeformableRegistrationFilter.h -index 93ab975ec..0afd84871 100644 ---- a/Modules/Registration/GPUPDEDeformable/include/itkGPUPDEDeformableRegistrationFilter.h +index 13a00667..9f2a66ec 100644 +--- a/Modules/Registration/GPUPDEDeformable/include/itkGPUPDEDeformableRegistrationFilter.h +++ b/Modules/Registration/GPUPDEDeformable/include/itkGPUPDEDeformableRegistrationFilter.h @@ -73,7 +73,7 @@ namespace itk */ diff --git a/ports/itk/vcpkg.json b/ports/itk/vcpkg.json index ad8b4db4d78058..197b41105f3d5d 100644 --- a/ports/itk/vcpkg.json +++ b/ports/itk/vcpkg.json @@ -1,7 +1,6 @@ { "name": "itk", - "version-semver": "5.1.0", - "port-version": 7, + "version": "5.2.1", "description": "Insight Segmentation and Registration Toolkit (ITK) is used for image processing and analysis.", "homepage": "https://github.com/InsightSoftwareConsortium/ITK", "dependencies": [ diff --git a/versions/baseline.json b/versions/baseline.json index 837e1c2d6a7d6b..dc9f76dc41af19 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -2933,8 +2933,8 @@ "port-version": 2 }, "itk": { - "baseline": "5.1.0", - "port-version": 7 + "baseline": "5.2.1", + "port-version": 0 }, "itpp": { "baseline": "4.3.1", diff --git a/versions/i-/itk.json b/versions/i-/itk.json index a21838f20527db..0b0c06033f696e 100644 --- a/versions/i-/itk.json +++ b/versions/i-/itk.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "dfa55f85255a7eef8d8f94fc93c1e15763cbd397", + "version": "5.2.1", + "port-version": 0 + }, { "git-tree": "ce0e8cb19f661a4bb4aabde6b87b7bca5025be9e", "version-semver": "5.1.0", From 63460b7d138c3bd345afbeaaede9b3efebaa55a6 Mon Sep 17 00:00:00 2001 From: Mengna-Li <543250287@qq.com> Date: Mon, 21 Feb 2022 07:15:16 +0000 Subject: [PATCH 2/3] Add license --- ports/itk/vcpkg.json | 1 + 1 file changed, 1 insertion(+) diff --git a/ports/itk/vcpkg.json b/ports/itk/vcpkg.json index 197b41105f3d5d..bf11016eef59cb 100644 --- a/ports/itk/vcpkg.json +++ b/ports/itk/vcpkg.json @@ -3,6 +3,7 @@ "version": "5.2.1", "description": "Insight Segmentation and Registration Toolkit (ITK) is used for image processing and analysis.", "homepage": "https://github.com/InsightSoftwareConsortium/ITK", + "license": "Apache 2.0", "dependencies": [ "double-conversion", "eigen3", From 768a6ddc360dd0582bf48149ffadc3b4d292c8ef Mon Sep 17 00:00:00 2001 From: Mengna-Li <543250287@qq.com> Date: Mon, 21 Feb 2022 07:29:51 +0000 Subject: [PATCH 3/3] update --- ports/itk/vcpkg.json | 2 +- versions/i-/itk.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/itk/vcpkg.json b/ports/itk/vcpkg.json index bf11016eef59cb..cdc522bc767d27 100644 --- a/ports/itk/vcpkg.json +++ b/ports/itk/vcpkg.json @@ -3,7 +3,7 @@ "version": "5.2.1", "description": "Insight Segmentation and Registration Toolkit (ITK) is used for image processing and analysis.", "homepage": "https://github.com/InsightSoftwareConsortium/ITK", - "license": "Apache 2.0", + "license": "Apache-2.0", "dependencies": [ "double-conversion", "eigen3", diff --git a/versions/i-/itk.json b/versions/i-/itk.json index 0b0c06033f696e..3e0de4b46b0ade 100644 --- a/versions/i-/itk.json +++ b/versions/i-/itk.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "dfa55f85255a7eef8d8f94fc93c1e15763cbd397", + "git-tree": "8d67caa9e2fb41246a3baebbfaccc8f0aff51223", "version": "5.2.1", "port-version": 0 },