Skip to content

Commit

Permalink
Merge pull request #402 from thewtex/itk-5.3.0
Browse files Browse the repository at this point in the history
Itk 5.3.0
  • Loading branch information
thewtex authored Dec 7, 2022
2 parents 788c0da + d68014a commit 438d11e
Show file tree
Hide file tree
Showing 14 changed files with 1,556 additions and 1,121 deletions.
76 changes: 38 additions & 38 deletions .github/workflows/build-test-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,25 @@ name: Build, test, publish
on: [push,pull_request]

env:
itk-git-tag: "v5.3rc04"
itk-git-tag: "37c107436f163436d9f9caf015b6f642eacdf651"

jobs:
build-test-cxx:
runs-on: ${{ matrix.os }}
strategy:
max-parallel: 3
matrix:
os: [ubuntu-20.04, windows-2019, macos-11]
os: [ubuntu-22.04, windows-2022, macos-12]
include:
- os: ubuntu-20.04
- os: ubuntu-22.04
c-compiler: "gcc"
cxx-compiler: "g++"
cmake-build-type: "MinSizeRel"
- os: windows-2019
- os: windows-2022
c-compiler: "cl.exe"
cxx-compiler: "cl.exe"
cmake-build-type: "Release"
- os: macos-11
- os: macos-12
c-compiler: "clang"
cxx-compiler: "clang++"
cmake-build-type: "MinSizeRel"
Expand All @@ -31,18 +31,18 @@ jobs:
with:
path: Ex

- name: Set up Python 3.7
- name: Set up Python 3.9
uses: actions/setup-python@v1
with:
python-version: 3.7
python-version: 3.9

- name: Install build dependencies
run: |
python -m pip install --upgrade pip
python -m pip install ninja
- name: Get specific version of CMake, Ninja
uses: lukka/get-cmake@v3.18.3
uses: lukka/get-cmake@v3.19.2

- name: Download ITK
run: |
Expand All @@ -52,20 +52,20 @@ jobs:
git checkout ${{ env.itk-git-tag }}
- name: Build ITK
if: matrix.os != 'windows-2019'
if: matrix.os != 'windows-2022'
run: |
cd ..
mkdir ITK-build
cd ITK-build
cmake -DCMAKE_C_COMPILER:FILEPATH="${{ matrix.c-compiler }}" -DBUILD_SHARED_LIBS:BOOL=ON -DCMAKE_CXX_COMPILER="${{ matrix.cxx-compiler }}" -DCMAKE_BUILD_TYPE:STRING=${{ matrix.cmake-build-type }} -DBUILD_TESTING:BOOL=OFF -GNinja ../ITK
ninja
- name: Build ITK
if: matrix.os == 'windows-2019'
if: matrix.os == 'windows-2022'
run: |
cd ..
mkdir ITK-build
cd ITK-build
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
cmake -DCMAKE_C_COMPILER:FILEPATH="${{ matrix.c-compiler }}" -DBUILD_SHARED_LIBS:BOOL=OFF -DCMAKE_CXX_COMPILER="${{ matrix.cxx-compiler }}" -DCMAKE_BUILD_TYPE:STRING=${{ matrix.cmake-build-type }} -DBUILD_TESTING:BOOL=OFF -GNinja ../ITK
ninja
shell: cmd
Expand Down Expand Up @@ -115,13 +115,13 @@ jobs:
EOF
cat dashboard.cmake
- name: Build and test
if: matrix.os != 'windows-2019'
if: matrix.os != 'windows-2022'
run: |
ctest -j 2 -VV -S dashboard.cmake
- name: Build and test
if: matrix.os == 'windows-2019'
if: matrix.os == 'windows-2022'
run: |
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
ctest -j 2 -VV -S dashboard.cmake
shell: cmd

Expand All @@ -130,38 +130,38 @@ jobs:
strategy:
max-parallel: 3
matrix:
os: [ubuntu-20.04, windows-2019, macos-11]
os: [ubuntu-22.04, windows-2022, macos-12]
include:
- os: ubuntu-20.04
c-compiler: "gcc"
cxx-compiler: "g++"
cmake-build-type: "MinSizeRel"
- os: windows-2019
- os: windows-2022
c-compiler: "cl.exe"
cxx-compiler: "cl.exe"
cmake-build-type: "Release"
- os: macos-11
- os: macos-12
c-compiler: "clang"
cxx-compiler: "clang++"
cmake-build-type: "MinSizeRel"

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
path: Ex

- name: Set up Python 3.7
uses: actions/setup-python@v1
- name: Set up Python 3.9
uses: actions/setup-python@v3
with:
python-version: 3.7
python-version: 3.9

- name: Install build dependencies
run: |
python -m pip install --upgrade pip
python -m pip install ninja
- name: Get specific version of CMake, Ninja
uses: lukka/get-cmake@v3.18.3
uses: lukka/get-cmake@v3.19.2

- name: Fetch CTest driver script
run: |
Expand Down Expand Up @@ -213,14 +213,14 @@ jobs:
cat dashboard.cmake
- name: Build and test
if: matrix.os != 'windows-2019'
if: matrix.os != 'windows-2022'
run: |
ctest -j 2 -VV -S dashboard.cmake
- name: Build and test
if: matrix.os == 'windows-2019'
if: matrix.os == 'windows-2022'
run: |
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
ctest -j 2 -VV -S dashboard.cmake
shell: cmd

Expand All @@ -229,20 +229,20 @@ jobs:
strategy:
max-parallel: 3
matrix:
os: [ubuntu-20.04, windows-2019, macos-11]
os: [ubuntu-22.04, windows-2022, macos-12]

steps:
- uses: actions/checkout@v1
- name: Set up Python 3.7
uses: actions/setup-python@v1
- uses: actions/checkout@v3
- name: Set up Python 3.9
uses: actions/setup-python@v3
with:
python-version: 3.7
python-version: 3.9

- name: Install build dependencies
run: |
python -m pip install --upgrade pip
python -m pip install ninja
python -m pip install itk>=5.2.0.post2
python -m pip install itk>=5.3.0
python -m pip install matplotlib
python -m pip install itkwidgets
Expand All @@ -254,26 +254,26 @@ jobs:
strategy:
max-parallel: 3
matrix:
os: [ubuntu-20.04]
os: [ubuntu-22.04]
include:
- os: ubuntu-20.04
- os: ubuntu-22.04
c-compiler: "gcc"
cxx-compiler: "g++"
cmake-build-type: "Release"

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
path: Ex
submodules: recursive

- name: Set up Python 3.8
uses: actions/setup-python@v1
- name: Set up Python 3.9
uses: actions/setup-python@v3
with:
python-version: 3.8
python-version: 3.9

- name: Get specific version of CMake, Ninja
uses: lukka/get-cmake@v3.18.3
uses: lukka/get-cmake@v3.19.2

- name: Install build dependencies
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/label-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: srvaroa/labeler@v0.8
- uses: srvaroa/labeler@v0.9
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
10 changes: 9 additions & 1 deletion CMake/ITKSphinxExamplesExternalData.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ list(APPEND ExternalData_OBJECT_STORES
"${CMAKE_SOURCE_DIR}/.ExternalData"
)

set(ITK_SPHINX_EXAMPLES_DATA_RELEASED_ROOT_CID bafybeicjaaz3xi2qso3kdirmy5ixoxegvfp3bm7o44ytoh6egj5m6wgeuu)
set(ITK_SPHINX_EXAMPLES_DATA_RELEASED_ROOT_CID bafybeib6yijwyl52gkalx6griio2wsibowlrt3v5wmkkuqlnuvku64c3ra)

set(ExternalData_URL_ALGO_CID_lower cid)
set(ExternalData_URL_TEMPLATES "" CACHE STRING
"Additional URL templates for the ExternalData CMake script to look for testing data. E.g.
Expand All @@ -32,6 +33,10 @@ if(NOT ITK_FORBID_DOWNLOADS)
# Local IPFS gateway
"http://127.0.0.1:8080/ipfs/%(hash)"

# Data published on GitHub Pages (note: not complete due to file size
# limit)
"https://insightsoftwareconsortium.github.io/ITKTestingData/%(algo)/%(hash)"

# Released data rsync'd to Kitware's Apache web server
"https://itk.org/files/ExternalData/%(algo)/%(hash)"

Expand All @@ -45,6 +50,9 @@ if(NOT ITK_FORBID_DOWNLOADS)
"https://${ITK_SPHINX_EXAMPLES_DATA_RELEASED_ROOT_CID}.ipfs.w3s.link/Objects/CID/%(hash)"

# Released data on estuary.tech
"https://api.estuary.tech/gw/ipfs/${ITK_SPHINX_EXAMPLES_DATA_RELEASED_ROOT_CID}/Objects/CID/%(hash)"

# Protocol Labs gateway
"https://${ITK_SPHINX_EXAMPLES_DATA_RELEASED_ROOT_CID}.ipfs.dweb.link/Objects/CID/%(hash)"

# Gateway for arbitrary new files, uploaded to web3.storage
Expand Down
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
# CMake versions greater than the ITKEX_NEWEST_VALIDATED_POLICIES_VERSION policies will
# continue to generate policy warnings "CMake Warning (dev)...Policy CMP0XXX is not set:"
#
set(ITKEX_OLDEST_VALIDATED_POLICIES_VERSION "3.10.2")
set(ITKEX_NEWEST_VALIDATED_POLICIES_VERSION "3.14.0")
set(ITKEX_OLDEST_VALIDATED_POLICIES_VERSION "3.16.3")
set(ITKEX_NEWEST_VALIDATED_POLICIES_VERSION "3.19.7")
cmake_minimum_required(VERSION ${ITKEX_OLDEST_VALIDATED_POLICIES_VERSION} FATAL_ERROR)
if("${CMAKE_VERSION}" VERSION_LESS_EQUAL "${ITKEX_NEWEST_VALIDATED_POLICIES_VERSION}")
#Set and use the newest available cmake policies that are validated to work
Expand Down Expand Up @@ -80,7 +80,7 @@ endif()
if(NOT ITK_VERSION)
# To get the ITK version information from external package when building
# stand alone, ITK is required.
find_package(ITK 5.2.0 REQUIRED)
find_package(ITK 5.3.0 REQUIRED)
endif()
set(ITKSphinxExamples_VERSION_MAJOR ${ITK_VERSION_MAJOR})
set(ITKSphinxExamples_VERSION_MINOR ${ITK_VERSION_MINOR})
Expand Down
4 changes: 3 additions & 1 deletion Formatting/conf.py.in
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@ primary_domain = 'cpp'
# Add any Sphinx extension module names here, as strings. They can be extensions
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = ['sphinx.ext.todo', 'sphinx.ext.imgmath', 'sphinx.ext.ifconfig',
'sphinx.ext.viewcode', 'sphinx.ext.imgconverter', 'breathe', 'doxylink', 'breathelink', 'nbsphinx', 'sphinx_contributors']
'sphinx.ext.viewcode', 'sphinx.ext.imgconverter', 'breathe', 'doxylink',
'breathelink', 'nbsphinx', 'sphinx_contributors',
'IPython.sphinxext.ipython_console_highlighting',]

# Add any paths that contain templates here, relative to this directory.
templates_path = ['templates']
Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ Required
^^^^^^^^

- CMake_ ( >= 3.10.2 )
- ITK_ ( >= 5.2.0 )
- ITK_ ( >= 5.3.0 )

Optional
^^^^^^^^
Expand Down
19 changes: 4 additions & 15 deletions Superbuild/External-ITK.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
# Get and build itk

if(NOT ITK_TAG)
set(ITK_TAG "e801e637634d1cdf050b358299fd7b3771418f2e")
# ITK release 2022-12-05
set(ITK_TAG "37c107436f163436d9f9caf015b6f642eacdf651")
endif()

set(_vtk_args)
Expand Down Expand Up @@ -44,14 +45,6 @@ if(APPLE)
"-DBUILD_SHARED_LIBS:BOOL=ON"
)
endif()
set(_windows_args)
set(_zlib_deps zlib)
if(WIN32)
set(_windows_args
"-DITK_USE_SYSTEM_ZLIB:BOOL=OFF"
)
set(_zlib_deps )
endif()

ExternalProject_Add(ITK
GIT_REPOSITORY "${git_protocol}://github.com/InsightSoftwareConsortium/ITK.git"
Expand All @@ -66,19 +59,15 @@ ExternalProject_Add(ITK
-DBUILD_TESTING:BOOL=OFF
-DITK_BUILD_DEFAULT_MODULES:BOOL=ON
-DModule_ITKReview:BOOL=ON
-DITK_LEGACY_REMOVE:BOOL=ON
-DITK_LEGACY_SILENT:BOOL=ON
-DExternalData_OBJECT_STORES:STRING=${ExternalData_OBJECT_STORES}
"-DITK_USE_SYSTEM_ZLIB:BOOL=ON"
"-DZLIB_ROOT:PATH=${ZLIB_ROOT}"
"-DZLIB_INCLUDE_DIR:PATH=${ZLIB_INCLUDE_DIR}"
"-DZLIB_LIBRARY:FILEPATH=${ZLIB_LIBRARY}"
${_vtk_args}
${_opencv_args}
${_wrap_python_args}
${_apple_args}
${_windows_args}
INSTALL_COMMAND ${CMAKE_COMMAND} -E echo "ITK install skipped"
DEPENDS ${ITK_DEPENDENCIES} ${_python_depends} ${_zlib_deps}
DEPENDS ${ITK_DEPENDENCIES} ${_python_depends}
LOG_BUILD 0
)

Expand Down
2 changes: 1 addition & 1 deletion Superbuild/External-Python.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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.3rc4.post2 sphinx==4.4.0 docutils<0.18 six black nbsphinx ipython sphinx-contributors ipykernel matplotlib itkwidgets[lab,notebook]>=1.0a7 pydata-sphinx-theme
INSTALL_COMMAND ${ITKPYTHON_EXECUTABLE} -m pip install --ignore-installed itk>=5.3.0 sphinx==4.4.0 docutils<0.18 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
)
5 changes: 0 additions & 5 deletions Superbuild/External-VTK.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,9 @@ ExternalProject_Add(VTK
-DVTK_WRAP_PYTHON:BOOL=ON
-DExternalData_OBJECT_STORES:STRING=${ExternalData_OBJECT_STORES}
"-DPython3_EXECUTABLE:FILEPATH=${PYTHON_EXECUTABLE}"
-DVTK_USE_SYSTEM_ZLIB:BOOL=ON
"-DZLIB_ROOT:PATH=${ZLIB_ROOT}"
"-DZLIB_INCLUDE_DIR:PATH=${ZLIB_INCLUDE_DIR}"
"-DZLIB_LIBRARY:FILEPATH=${ZLIB_LIBRARY}"
INSTALL_COMMAND ""
LOG_DOWNLOAD 0
LOG_UPDATE 0
DEPENDS zlib
)

set(VTK_DIR ${CMAKE_BINARY_DIR}/VTK-build)
23 changes: 0 additions & 23 deletions Superbuild/External-zlib.cmake

This file was deleted.

Loading

2 comments on commit 438d11e

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.