From 1043f103ae72ab644c09554e8bfd88581b529e30 Mon Sep 17 00:00:00 2001 From: Niels Dekker Date: Tue, 2 May 2023 17:33:00 +0200 Subject: [PATCH 1/2] ENH: Bump elastix version to 2023-05-15, use C++17 Including: pull request https://github.com/SuperElastix/elastix/pull/891 commit https://github.com/SuperElastix/elastix/commit/ed15547044800c835319ac87ebc8b1e6edc0b97e "PERF: Fill `jsj` (JacobianOfSpatialJacobian) in-place and remove `jsj1`" pull request https://github.com/SuperElastix/elastix/pull/890 commit https://github.com/SuperElastix/elastix/commit/b9ea3a8e65a3e015a5a0f06acfb5bd22fad8dacc "PERF: Fill `jsh` (JacobianOfSpatialJacobian) in-place and remove `jsh1`" pull request https://github.com/SuperElastix/elastix/pull/887 commit https://github.com/SuperElastix/elastix/commit/82984859f1e6e1f9a3d53940c3b540e83c263856 PERF: Make EvaluateParzenValues calls faster, using raw buffer of values pull request https://github.com/SuperElastix/elastix/pull/882 commit https://github.com/SuperElastix/elastix/commit/58e0a7bdd76f69a8615cb4a8856038c0892ea530 "ENH: Convert the input images to the user-specified internal pixel type" pull request https://github.com/SuperElastix/elastix/pull/864 commit https://github.com/SuperElastix/elastix/commit/c3d478e8e3b6b1806862abbd0d777beff9b66346 "ENH: Upgrade elastix from C++14 to C++17" pull request https://github.com/SuperElastix/elastix/pull/856 commit https://github.com/SuperElastix/elastix/commit/48c64583c8514eac7fa9ad46848be9d100ac80c9 "ENH: Add SetInitialTransformParameterObject to ElastixRegistrationMethod" pull request https://github.com/SuperElastix/elastix/pull/832 commit https://github.com/SuperElastix/elastix/commit/05d2b40f23d5b1c1438521e505e349bb54fdf7e4 ENH: Support "ShowProgressPercentage" parameter (`false` by default) pull request https://github.com/SuperElastix/elastix/pull/815 commit https://github.com/SuperElastix/elastix/commit/c4ef707bb9433e687d45a06408393413f2abe64a "ENH: Add `ElastixLogLevel` to the ITK interface" Explicitly specified C++17 as standard for the compilation of ITKElastix. --- CMakeLists.txt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index be89d368..068a4b27 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,11 @@ cmake_minimum_required(VERSION 3.16.3) project(Elastix) +if(NOT CMAKE_CXX_STANDARD) + # SuperElastix/elastix uses C++17 specific features in some of its header files. + set(CMAKE_CXX_STANDARD 17) +endif() + # To ease enablement with Python packaging if(DEFINED ENV{ELASTIX_USE_OPENCL}) set(ELASTIX_USE_OPENCL ON CACHE BOOL "Enable OpenCL support in Elastix") @@ -51,7 +56,7 @@ if(SKBUILD) endif() set(elastix_GIT_REPOSITORY "https://github.com/SuperElastix/elastix.git") -set(elastix_GIT_TAG "d652938573e5f193955908eba225a854b31ce36a") +set(elastix_GIT_TAG "b9b8e20aef83f94ed38a81cc38625a1bfddf1053") FetchContent_Declare( elx GIT_REPOSITORY ${elastix_GIT_REPOSITORY} From 5a6f9fecd8ac5cc9ae173e47a02abf6687f1700f Mon Sep 17 00:00:00 2001 From: Niels Dekker Date: Thu, 11 May 2023 09:45:10 +0200 Subject: [PATCH 2/2] ENH: Support any scalar type (not just real) as input pixel type Allows the user to pass input images to ElastixRegistrationMethod and TransformixFilter whose pixel types differs from the internal pixel type. The elastix/transfomix library will now convert those images automatically, using `itk::CastImageFilter`: pull request https://github.com/SuperElastix/elastix/pull/882 commit https://github.com/SuperElastix/elastix/commit/58e0a7bdd76f69a8615cb4a8856038c0892ea530 "ENH: Convert the input images to the user-specified internal pixel type" --- wrapping/itkElastixRegistrationMethod.wrap | 2 +- wrapping/itkTransformixFilter.wrap | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wrapping/itkElastixRegistrationMethod.wrap b/wrapping/itkElastixRegistrationMethod.wrap index 16ade0ce..322fbf7d 100644 --- a/wrapping/itkElastixRegistrationMethod.wrap +++ b/wrapping/itkElastixRegistrationMethod.wrap @@ -1,4 +1,4 @@ itk_wrap_class("itk::ElastixRegistrationMethod" POINTER) - itk_wrap_image_filter("${WRAP_ITK_REAL}" 2) + itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) itk_end_wrap_class() diff --git a/wrapping/itkTransformixFilter.wrap b/wrapping/itkTransformixFilter.wrap index cb63e809..9c8bc12e 100644 --- a/wrapping/itkTransformixFilter.wrap +++ b/wrapping/itkTransformixFilter.wrap @@ -1,4 +1,4 @@ itk_wrap_class("itk::TransformixFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_REAL}" 1) + itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 1) itk_end_wrap_class()