From fa7fee1aaa303cfbe5ff0c901d42687c555ce5da Mon Sep 17 00:00:00 2001 From: Niels Dekker Date: Wed, 15 Jan 2025 17:06:23 +0100 Subject: [PATCH] ENH: Support elastix version 5.2, when using ITK >= 5.4 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit elastix 5.2 is the latest elastix release. It has various enhancements, performance improvements and bug fixes: https://github.com/SuperElastix/elastix/releases/tag/5.2.0 elastix version 5.2, requires ITK >= 5.4. The main branch of Slicer was upgraded to ITK 5.4.0 by Dženan Zukić, Jun 3, 2024, pull request https://github.com/Slicer/Slicer/pull/7771 commit https://github.com/Slicer/Slicer/commit/acf3dd47940665869765584564b38439f73ff1d5 --- SuperBuild/External_elastix.cmake | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/SuperBuild/External_elastix.cmake b/SuperBuild/External_elastix.cmake index 392a521..f2c59f7 100644 --- a/SuperBuild/External_elastix.cmake +++ b/SuperBuild/External_elastix.cmake @@ -30,8 +30,13 @@ if(NOT DEFINED ${proj}_DIR AND NOT ${CMAKE_PROJECT_NAME}_USE_SYSTEM_${proj}) set(ELASTIX_GIT_REPOSITORY "$https://github.com/SuperElastix/elastix.git") set(ELASTIX_GIT_TAG "419313e9cc12727d73c7e6e47fbdf960aa1218b9") # latest commit on "develop" branch as if 2019-10-13 else() - set(ELASTIX_GIT_REPOSITORY "https://github.com/SuperElastix/elastix.git") - set(ELASTIX_GIT_TAG "5.1.0") # 2023-01-12 + if(DEFINED ITK_VERSION_MAJOR AND ${ITK_VERSION_MAJOR}.${ITK_VERSION_MINOR} VERSION_LESS 5.4) + set(ELASTIX_GIT_REPOSITORY "https://github.com/SuperElastix/elastix.git") + set(ELASTIX_GIT_TAG "5.1.0") # 2023-01-12 + else() + set(ELASTIX_GIT_REPOSITORY "https://github.com/SuperElastix/elastix.git") + set(ELASTIX_GIT_TAG "5.2.0") # 2024-07-18 + endif() endif() ExternalProject_Add(${proj}