Skip to content

Commit

Permalink
[itk] update to 5.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Vincent le Garrec authored and Vincent le Garrec committed Jul 2, 2024
1 parent 43b155f commit 7603805
Show file tree
Hide file tree
Showing 6 changed files with 43 additions and 43 deletions.
2 changes: 1 addition & 1 deletion ports/itk/double-conversion.patch
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ index 16c611fd3..13978724c 100644
+++ b/Modules/ThirdParty/DoubleConversion/CMakeLists.txt
@@ -9,7 +9,16 @@ mark_as_advanced(ITK_USE_SYSTEM_DOUBLECONVERSION)
if(ITK_USE_SYSTEM_DOUBLECONVERSION)
find_package(double-conversion REQUIRED)
find_package(double-conversion 3.1.6 REQUIRED)
get_target_property(ITKDoubleConversion_INCLUDE_DIRS double-conversion::double-conversion INTERFACE_INCLUDE_DIRECTORIES)
- get_target_property(ITKDoubleConversion_LIBRARIES double-conversion::double-conversion LOCATION)
+ get_target_property(ITKDoubleConversion_LIBRARY_RELEASE double-conversion::double-conversion IMPORTED_IMPLIB_RELEASE)
Expand Down
24 changes: 12 additions & 12 deletions ports/itk/opencl.patch
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ diff --git a/Modules/Core/GPUCommon/src/CMakeLists.txt b/Modules/Core/GPUCommon/
index 0b39f2a9a..160f7a752 100644
--- a/Modules/Core/GPUCommon/src/CMakeLists.txt
+++ b/Modules/Core/GPUCommon/src/CMakeLists.txt
@@ -14,5 +14,5 @@ if (ITK_USE_GPU)
@@ -14,5 +14,5 @@ if(ITK_USE_GPU)
write_gpu_kernels("${ITKGPUCommon_Kernels}" ITKGPUCommon_SRCS)

itk_module_add_library(ITKGPUCommon ${ITKGPUCommon_SRCS})
Expand All @@ -16,7 +16,7 @@ index c1bfde450..a642d9230 100644
@@ -9,8 +9,8 @@ if(NOT ITK_SOURCE_DIR)
endif()

if (ITK_USE_GPU)
if(ITK_USE_GPU)
- set(ITKGPUFiniteDifference_SYSTEM_INCLUDE_DIRS ${OPENCL_INCLUDE_DIRS})
- set(ITKGPUFiniteDifference_SYSTEM_LIBRARY_DIRS ${OPENCL_LIBRARIES})
+ set(ITKGPUFiniteDifference_SYSTEM_INCLUDE_DIRS ${OpenCL_INCLUDE_DIRS})
Expand All @@ -28,7 +28,7 @@ diff --git a/Modules/Core/GPUFiniteDifference/src/CMakeLists.txt b/Modules/Core/
index 8425cc025..8335c69a0 100644
--- a/Modules/Core/GPUFiniteDifference/src/CMakeLists.txt
+++ b/Modules/Core/GPUFiniteDifference/src/CMakeLists.txt
@@ -9,5 +9,5 @@ if (ITK_USE_GPU)
@@ -9,5 +9,5 @@ if(ITK_USE_GPU)
write_gpu_kernels("${ITKGPUFiniteDifference_Kernels}" ITKGPUFiniteDifference_SRCS)

itk_module_add_library(ITKGPUFiniteDifference ${ITKGPUFiniteDifference_SRCS})
Expand All @@ -41,7 +41,7 @@ index f36fd887d..310d983fa 100644
+++ b/Modules/Filtering/GPUAnisotropicSmoothing/CMakeLists.txt
@@ -10,8 +10,8 @@ endif()

if (ITK_USE_GPU)
if(ITK_USE_GPU)
set(ITKGPUAnisotropicSmoothing_LIBRARIES ITKGPUAnisotropicSmoothing)
- set(ITKGPUAnisotropicSmoothing_SYSTEM_INCLUDE_DIRS ${OPENCL_INCLUDE_DIRS})
- set(ITKGPUAnisotropicSmoothing_SYSTEM_LIBRARY_DIRS ${OPENCL_LIBRARIES})
Expand All @@ -56,7 +56,7 @@ index 078905521..67fd7b832 100644
+++ b/Modules/Filtering/GPUImageFilterBase/CMakeLists.txt
@@ -10,8 +10,8 @@ endif()

if (ITK_USE_GPU)
if(ITK_USE_GPU)
set(ITKGPUImageFilterBase_LIBRARIES ITKGPUImageFilterBase)
- set(ITKGPUImageFilterBase_SYSTEM_INCLUDE_DIRS ${OPENCL_INCLUDE_DIRS})
- set(ITKGPUImageFilterBase_SYSTEM_LIBRARY_DIRS ${OPENCL_LIBRARIES})
Expand All @@ -69,7 +69,7 @@ diff --git a/Modules/Filtering/GPUImageFilterBase/src/CMakeLists.txt b/Modules/F
index 251493f5e..6d33fa964 100644
--- a/Modules/Filtering/GPUImageFilterBase/src/CMakeLists.txt
+++ b/Modules/Filtering/GPUImageFilterBase/src/CMakeLists.txt
@@ -10,5 +10,5 @@ if (ITK_USE_GPU)
@@ -10,5 +10,5 @@ if(ITK_USE_GPU)
write_gpu_kernels("${ITKGPUImageFilterBase_Kernels}" ITKGPUImageFilterBase_SRCS)

itk_module_add_library(ITKGPUImageFilterBase ${ITKGPUImageFilterBase_SRCS})
Expand All @@ -82,7 +82,7 @@ index 9bac40921..2ed493d40 100644
+++ b/Modules/Filtering/GPUSmoothing/CMakeLists.txt
@@ -10,8 +10,8 @@ endif()

if (ITK_USE_GPU)
if(ITK_USE_GPU)
set(ITKGPUSmoothing_LIBRARIES ITKGPUSmoothing)
- set(ITKGPUSmoothing_SYSTEM_INCLUDE_DIRS ${OPENCL_INCLUDE_DIRS})
- set(ITKGPUSmoothing_SYSTEM_LIBRARY_DIRS ${OPENCL_LIBRARIES})
Expand All @@ -95,7 +95,7 @@ diff --git a/Modules/Filtering/GPUSmoothing/src/CMakeLists.txt b/Modules/Filteri
index d2120e842..2c6ca4a4a 100644
--- a/Modules/Filtering/GPUSmoothing/src/CMakeLists.txt
+++ b/Modules/Filtering/GPUSmoothing/src/CMakeLists.txt
@@ -9,5 +9,5 @@ if (ITK_USE_GPU)
@@ -9,5 +9,5 @@ if(ITK_USE_GPU)
write_gpu_kernels("${ITKGPUSmoothing_Kernels}" ITKGPUSmoothing_SRCS)

itk_module_add_library(ITKGPUSmoothing ${ITKGPUSmoothing_SRCS})
Expand All @@ -108,7 +108,7 @@ index 4390785f5..61786b7a8 100644
+++ b/Modules/Filtering/GPUThresholding/CMakeLists.txt
@@ -2,8 +2,8 @@ project(ITKGPUThresholding)

if (ITK_USE_GPU)
if(ITK_USE_GPU)
set(ITKGPUThresholding_LIBRARIES ITKGPUThresholding)
- set(ITKGPUThresholding_SYSTEM_INCLUDE_DIRS ${OPENCL_INCLUDE_DIRS})
- set(ITKGPUThresholding_SYSTEM_LIBRARY_DIRS ${OPENCL_LIBRARIES})
Expand All @@ -121,7 +121,7 @@ diff --git a/Modules/Filtering/GPUThresholding/src/CMakeLists.txt b/Modules/Filt
index 326c86859..c07c80414 100644
--- a/Modules/Filtering/GPUThresholding/src/CMakeLists.txt
+++ b/Modules/Filtering/GPUThresholding/src/CMakeLists.txt
@@ -9,5 +9,5 @@ if (ITK_USE_GPU)
@@ -9,5 +9,5 @@ if(ITK_USE_GPU)
write_gpu_kernels("${ITKGPUThresholding_Kernels}" ITKGPUThresholding_SRCS)

itk_module_add_library(ITKGPUThresholding ${ITKGPUThresholding_SRCS})
Expand All @@ -134,7 +134,7 @@ index c8d70a423..097c974c5 100644
+++ b/Modules/Registration/GPUPDEDeformable/CMakeLists.txt
@@ -2,8 +2,8 @@ project(ITKGPUPDEDeformableRegistration)

if (ITK_USE_GPU)
if(ITK_USE_GPU)
set(ITKGPUPDEDeformableRegistration_LIBRARIES ITKGPUPDEDeformableRegistration)
- set(ITKGPUPDEDeformableRegistration_SYSTEM_INCLUDE_DIRS ${OPENCL_INCLUDE_DIRS})
- set(ITKGPUPDEDeformableRegistration_SYSTEM_LIBRARY_DIRS ${OPENCL_LIBRARIES})
Expand All @@ -147,7 +147,7 @@ diff --git a/Modules/Registration/GPUPDEDeformable/src/CMakeLists.txt b/Modules/
index 28b1d194c..1a049bdde 100644
--- a/Modules/Registration/GPUPDEDeformable/src/CMakeLists.txt
+++ b/Modules/Registration/GPUPDEDeformable/src/CMakeLists.txt
@@ -10,5 +10,5 @@ if (ITK_USE_GPU)
@@ -10,5 +10,5 @@ if(ITK_USE_GPU)
write_gpu_kernels("${ITKGPUPDEDeformableRegistration_Kernels}" ITKGPUPDEDeformableRegistration_SRCS)

itk_module_add_library(ITKGPUPDEDeformableRegistration ${ITKGPUPDEDeformableRegistration_SRCS})
Expand Down
34 changes: 17 additions & 17 deletions ports/itk/openjpeg.patch
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ index 1b1fe9526..0da4aa0c4 100644

@@ -139,22 +137,16 @@ JPEG2000ImageIO::ReadImageInformation()
{
itkDebugMacro(<< "ReadImageInformation()");
itkDebugMacro("ReadImageInformation()");

- FILE * l_file = fopen(this->m_FileName.c_str(), "rb");
-
Expand Down Expand Up @@ -136,7 +136,7 @@ index 1b1fe9526..0da4aa0c4 100644
- OPJ_UINT32 l_nb_tiles_x;
- OPJ_UINT32 l_nb_tiles_y;

itkDebugMacro(<< "Trying to read header now...");
itkDebugMacro("Trying to read header now...");

- bResult = opj_read_header(this->m_Internal->m_Dinfo,
- &l_image,
Expand Down Expand Up @@ -175,26 +175,26 @@ index 1b1fe9526..0da4aa0c4 100644
+ this->m_Internal->m_NumberOfTiles = l_nb_tiles;


itkDebugMacro(<< "Number of Components = " << l_image->numcomps);
itkDebugMacro("Number of Components = " << l_image->numcomps);
@@ -319,7 +302,7 @@ JPEG2000ImageIO::ReadImageInformation()
this->SetPixelType(IOPixelEnum::SCALAR);
break;
case 3:
- if (l_image->color_space != CLRSPC_SRGB)
+ if (l_image->color_space != OPJ_CLRSPC_SRGB)
{
itkWarningMacro(<< "file does not specify color space, assuming sRGB");
itkWarningMacro("file does not specify color space, assuming sRGB");
}
@@ -335,8 +318,7 @@ JPEG2000ImageIO::ReadImageInformation()
itkDebugMacro(<< "Tile Start Y = " << this->m_Internal->m_TileStartY);
itkDebugMacro(<< "Tile Width = " << this->m_Internal->m_TileWidth);
itkDebugMacro(<< "Tile Height = " << this->m_Internal->m_TileHeight);
- itkDebugMacro(<< "Number of Tiles X = " << this->m_Internal->m_NumberOfTilesInX);
- itkDebugMacro(<< "Number of Tiles Y = " << this->m_Internal->m_NumberOfTilesInY);
+ itkDebugMacro(<< "Number of Tiles = " << this->m_Internal->m_NumberOfTiles);

itkDebugMacro(<< "image->x1 = " << l_image->x1);
itkDebugMacro(<< "image->y1 = " << l_image->y1);
itkDebugMacro("Tile Start Y = " << this->m_Internal->m_TileStartY);
itkDebugMacro("Tile Width = " << this->m_Internal->m_TileWidth);
itkDebugMacro("Tile Height = " << this->m_Internal->m_TileHeight);
- itkDebugMacro("Number of Tiles X = " << this->m_Internal->m_NumberOfTilesInX);
- itkDebugMacro("Number of Tiles Y = " << this->m_Internal->m_NumberOfTilesInY);
+ itkDebugMacro("Number of Tiles = " << this->m_Internal->m_NumberOfTiles);

itkDebugMacro("image->x1 = " << l_image->x1);
itkDebugMacro("image->y1 = " << l_image->y1);
@@ -349,7 +331,6 @@ JPEG2000ImageIO::ReadImageInformation()

/* close the byte stream */
Expand All @@ -205,7 +205,7 @@ index 1b1fe9526..0da4aa0c4 100644
{
@@ -368,16 +349,7 @@ JPEG2000ImageIO::Read(void * buffer)
{
itkDebugMacro(<< "JPEG2000ImageIO::Read() Begin");
itkDebugMacro("JPEG2000ImageIO::Read() Begin");

- FILE * l_file = fopen(this->m_FileName.c_str(), "rb");
-
Expand Down Expand Up @@ -307,13 +307,13 @@ index 1b1fe9526..0da4aa0c4 100644
<< "Reason: opj_read_header returns false");
}
@@ -499,7 +458,7 @@ JPEG2000ImageIO::Read(void * buffer)
itkDebugMacro(<< "p_end_x = " << p_end_x);
itkDebugMacro(<< "p_end_y = " << p_end_y);
itkDebugMacro("p_end_x = " << p_end_x);
itkDebugMacro("p_end_y = " << p_end_y);

- bResult = opj_set_decode_area(this->m_Internal->m_Dinfo, p_start_x, p_start_y, p_end_x, p_end_y);
+ bResult = opj_set_decode_area(this->m_Internal->m_Dinfo, l_image, p_start_x, p_start_y, p_end_x, p_end_y);

itkDebugMacro(<< "opj_set_decode_area() after");
itkDebugMacro("opj_set_decode_area() after");

@@ -508,7 +467,6 @@ JPEG2000ImageIO::Read(void * buffer)
opj_destroy_codec(this->m_Internal->m_Dinfo);
Expand Down
2 changes: 1 addition & 1 deletion ports/itk/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO InsightSoftwareConsortium/ITK
REF "v${VERSION}"
SHA512 48e38864d7cd20b4ff23cfca1a29b4cbf453ce842e037ca473ce5c7e9a5b1c0bf6b12e4c544c812bff2b4bb9feca409587175b6570929c9ac172cb4402d679da
SHA512 3a98ececf258aac545f094dd3e97918c93cc82bc623ddf793c4bf0162ab06c83fbfd4d08130bdec6e617bda85dd17225488bc1394bc91b17f1232126a5d990db
HEAD_REF master
PATCHES
double-conversion.patch
Expand Down
17 changes: 11 additions & 6 deletions ports/itk/var_libraries.patch
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,17 @@ diff --git a/CMake/ITKModuleAPI.cmake b/CMake/ITKModuleAPI.cmake
index af64d96dc..809335e6d 100644
--- a/CMake/ITKModuleAPI.cmake
+++ b/CMake/ITKModuleAPI.cmake
@@ -133,7 +133,7 @@ macro(itk_module_config ns)
@@ -133,11 +133,10 @@ macro(itk_module_config ns)
endforeach()
unset(_${ns}_USED_MODULES)

- foreach(v ${ns}_LIBRARIES ${ns}_INCLUDE_DIRS ${ns}_LIBRARY_DIRS
+ foreach(v ${ns}_INCLUDE_DIRS ${ns}_LIBRARY_DIRS
${ns}_RUNTIME_LIBRARY_DIRS ${ns}_FACTORY_NAMES ${ns}_FACTORY_LIST)
if(${v})
list(REMOVE_DUPLICATES ${v})
foreach(
v
- ${ns}_LIBRARIES
- ${ns}_INCLUDE_DIRS
- ${ns}_LIBRARY_DIRS
+ ${ns}_INCLUDE_DIRS
+ ${ns}_LIBRARY_DIRS
${ns}_RUNTIME_LIBRARY_DIRS
${ns}_FACTORY_NAMES
${ns}_FACTORY_LIST)
7 changes: 1 addition & 6 deletions ports/itk/wrapping.patch
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,7 @@ diff --git a/Wrapping/TypedefMacros.cmake b/Wrapping/TypedefMacros.cmake
index e6f8d0bf3..6c000dba8 100644
--- a/Wrapping/TypedefMacros.cmake
+++ b/Wrapping/TypedefMacros.cmake
@@ -57,13 +57,12 @@ macro(itk_wrap_module library_name)

# WRAPPER_LIBRARY_DEPENDS. List of names of other wrapper libraries that
# define symbols used by this wrapper library.
INTERSECTION(WRAPPER_LIBRARY_DEPENDS "${ITK_MODULE_${library_name}_DEPENDS}" "${WRAP_ITK_MODULES}")
# set(WRAPPER_LIBRARY_DEPENDS ${ITK_MODULE_${library_name}_DEPENDS})
@@ -62,8 +62,7 @@ macro(itk_wrap_module library_name)

# WRAPPER_LIBRARY_LINK_LIBRARIES. List of other libraries that should
# be linked to the wrapper library.
Expand Down

0 comments on commit 7603805

Please sign in to comment.