From e404022a22d0fc84729dceced731e0a3eefe0561 Mon Sep 17 00:00:00 2001 From: Matt McCormick Date: Fri, 20 Oct 2023 13:50:52 -0400 Subject: [PATCH 1/3] ENH: Bump ITK to 5.4 Release Candidate 2 The superbuild, python package and CI tests now use ITK 5.3 RC 2. --- .binder/requirements.txt | 2 +- .github/workflows/build-test-publish.yml | 4 ++-- Superbuild/External-ITK.cmake | 4 ++-- Superbuild/External-Python.cmake | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.binder/requirements.txt b/.binder/requirements.txt index b931f9f10..5c0a1a3eb 100644 --- a/.binder/requirements.txt +++ b/.binder/requirements.txt @@ -1,3 +1,3 @@ -itk>=5.4rc1 +itk>=5.4rc2 itkwidgets[lab,notebook]>=1.0a7 matplotlib diff --git a/.github/workflows/build-test-publish.yml b/.github/workflows/build-test-publish.yml index f8739402a..7a50d6137 100644 --- a/.github/workflows/build-test-publish.yml +++ b/.github/workflows/build-test-publish.yml @@ -3,7 +3,7 @@ name: Build, test, publish on: [push,pull_request] env: - itk-git-tag: "v5.4rc01" + itk-git-tag: "v5.4rc02" jobs: build-test-cxx: @@ -242,7 +242,7 @@ jobs: run: | python -m pip install --upgrade pip python -m pip install ninja - python -m pip install itk>=5.4rc1 + python -m pip install itk>=5.4rc2 python -m pip install matplotlib python -m pip install itkwidgets # Issues with 5.7.0 diff --git a/Superbuild/External-ITK.cmake b/Superbuild/External-ITK.cmake index 14a8f9869..fba9f4b0a 100644 --- a/Superbuild/External-ITK.cmake +++ b/Superbuild/External-ITK.cmake @@ -2,8 +2,8 @@ # Get and build itk if(NOT ITK_TAG) - # ITK release 2023-06-20 - set(ITK_TAG "v5.4rc01") + # ITK release 2023-10-10 + set(ITK_TAG "v5.4rc02") endif() set(_vtk_args) diff --git a/Superbuild/External-Python.cmake b/Superbuild/External-Python.cmake index e065c07d7..fde06c004 100644 --- a/Superbuild/External-Python.cmake +++ b/Superbuild/External-Python.cmake @@ -17,6 +17,6 @@ ExternalProject_Add(ITKPython DOWNLOAD_COMMAND "" CONFIGURE_COMMAND ${PYTHON_EXECUTABLE} -m venv "${_itk_venv}" BUILD_COMMAND ${ITKPYTHON_EXECUTABLE} -m pip install --upgrade pip - INSTALL_COMMAND ${ITKPYTHON_EXECUTABLE} -m pip install --ignore-installed itk>=5.4rc1 sphinx==4.4.0 docutils<0.18 traitlets==5.6.0 six black nbsphinx ipywidgets sphinx-contributors ipykernel matplotlib itkwidgets[lab,notebook]>=1.0a21 pydata-sphinx-theme + INSTALL_COMMAND ${ITKPYTHON_EXECUTABLE} -m pip install --ignore-installed itk>=5.4rc2 sphinx==4.4.0 docutils<0.18 traitlets==5.6.0 six black nbsphinx ipywidgets sphinx-contributors ipykernel matplotlib itkwidgets[lab,notebook]>=1.0a21 pydata-sphinx-theme COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/ITKBlackConfig.cmake ) From 84fb315d1d82cc85afbd1d53ed24f41826be21cf Mon Sep 17 00:00:00 2001 From: Matt McCormick Date: Mon, 30 Oct 2023 16:10:45 -0400 Subject: [PATCH 2/3] ENH: Add PASS_REGULAR_EXPRESION to ConvertImageWithLabelsToShapeLabelMap Ensure we are not getting an incorrect object count. --- .../ConvertImageWithLabelsToShapeLabelMap/CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Filtering/LabelMap/ConvertImageWithLabelsToShapeLabelMap/CMakeLists.txt b/src/Filtering/LabelMap/ConvertImageWithLabelsToShapeLabelMap/CMakeLists.txt index 7104c739e..907bbcfa6 100644 --- a/src/Filtering/LabelMap/ConvertImageWithLabelsToShapeLabelMap/CMakeLists.txt +++ b/src/Filtering/LabelMap/ConvertImageWithLabelsToShapeLabelMap/CMakeLists.txt @@ -23,3 +23,5 @@ install(FILES Code.cxx CMakeLists.txt enable_testing() add_test(NAME ConvertImageWithLabelsToShapeLabelMapTest COMMAND ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${PROJECT_NAME}) +set_tests_properties(ConvertImageWithLabelsToShapeLabelMapTest + PROPERTIES PASS_REGULAR_EXPRESSION "There are 2 objects.") From db481ba1da52b3b2309f4b2fce8c46851684c9a6 Mon Sep 17 00:00:00 2001 From: Matt McCormick Date: Mon, 30 Oct 2023 16:14:59 -0400 Subject: [PATCH 3/3] BUG: Disable ConvertImageWithLabelsToShapeLabelMapTest on Windows Tracked in: https://github.com/InsightSoftwareConsortium/ITKSphinxExamples/issues/420 Checking various versions from ITK 4.13 to ITK 5.3, this was producing the wrong output (a much larger object count) on Windows. In ITK 5.4 RC 2, the test will occasionally crash. --- .../CMakeLists.txt | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/Filtering/LabelMap/ConvertImageWithLabelsToShapeLabelMap/CMakeLists.txt b/src/Filtering/LabelMap/ConvertImageWithLabelsToShapeLabelMap/CMakeLists.txt index 907bbcfa6..500a4fefc 100644 --- a/src/Filtering/LabelMap/ConvertImageWithLabelsToShapeLabelMap/CMakeLists.txt +++ b/src/Filtering/LabelMap/ConvertImageWithLabelsToShapeLabelMap/CMakeLists.txt @@ -21,7 +21,10 @@ install(FILES Code.cxx CMakeLists.txt enable_testing() -add_test(NAME ConvertImageWithLabelsToShapeLabelMapTest - COMMAND ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${PROJECT_NAME}) -set_tests_properties(ConvertImageWithLabelsToShapeLabelMapTest - PROPERTIES PASS_REGULAR_EXPRESSION "There are 2 objects.") +# Windows failures tracked: https://github.com/InsightSoftwareConsortium/ITKSphinxExamples/issues/420 +if (NOT WIN32) + add_test(NAME ConvertImageWithLabelsToShapeLabelMapTest + COMMAND ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${PROJECT_NAME}) + set_tests_properties(ConvertImageWithLabelsToShapeLabelMapTest + PROPERTIES PASS_REGULAR_EXPRESSION "There are 2 objects.") +endif()