From 38af7b6bfb07830742c174a829a501cb3eb20c12 Mon Sep 17 00:00:00 2001 From: Tom Birdsong Date: Mon, 9 May 2022 10:56:00 -0400 Subject: [PATCH 1/2] ENH: Bump ITK to v5.3rc04 --- .github/workflows/build-test-package.yml | 28 ++++++++++-------------- setup.py | 4 ++-- 2 files changed, 13 insertions(+), 19 deletions(-) diff --git a/.github/workflows/build-test-package.yml b/.github/workflows/build-test-package.yml index a5d608d..d6cca9b 100644 --- a/.github/workflows/build-test-package.yml +++ b/.github/workflows/build-test-package.yml @@ -2,6 +2,10 @@ name: Build, test, package on: [push,pull_request] +env: + itk-git-tag: "801370c025c7d296783481779a41c6d559c992c5" + itk-wheel-tag: "v5.3rc04" + jobs: build-test-cxx: runs-on: ${{ matrix.os }} @@ -13,17 +17,14 @@ jobs: - os: ubuntu-18.04 c-compiler: "gcc" cxx-compiler: "g++" - itk-git-tag: "a89145bccda6a36f42cfdd45d3a6b27234ff54fe" cmake-build-type: "MinSizeRel" - os: windows-2019 c-compiler: "cl.exe" cxx-compiler: "cl.exe" - itk-git-tag: "a89145bccda6a36f42cfdd45d3a6b27234ff54fe" cmake-build-type: "Release" - os: macos-10.15 c-compiler: "clang" cxx-compiler: "clang++" - itk-git-tag: "a89145bccda6a36f42cfdd45d3a6b27234ff54fe" cmake-build-type: "MinSizeRel" steps: @@ -47,7 +48,7 @@ jobs: cd .. git clone https://github.com/InsightSoftwareConsortium/ITK.git cd ITK - git checkout ${{ matrix.itk-git-tag }} + git checkout ${{ env.itk-git-tag }} - name: Build ITK if: matrix.os != 'windows-2019' @@ -134,9 +135,7 @@ jobs: strategy: max-parallel: 2 matrix: - python-version: [36, 37, 38, 39] - include: - - itk-python-git-tag: "v5.2.0.post2" + python-version: [37, 38, 39, 310] steps: - uses: actions/checkout@v2 @@ -157,7 +156,7 @@ jobs: - name: 'Build 🐍 Python 📦 package' run: | - export ITK_PACKAGE_VERSION=${{ matrix.itk-python-git-tag }} + export ITK_PACKAGE_VERSION=${{ env.itk-wheel-tag }} ./dockcross-manylinux-download-cache-and-build-module-wheels.sh cp${{ matrix.python-version }} - name: Publish Python package as GitHub Artifact @@ -170,9 +169,6 @@ jobs: runs-on: macos-10.15 strategy: max-parallel: 2 - matrix: - include: - - itk-python-git-tag: "v5.2.0.post2" steps: - uses: actions/checkout@v2 @@ -191,7 +187,7 @@ jobs: - name: 'Build 🐍 Python 📦 package' run: | - export ITK_PACKAGE_VERSION=${{ matrix.itk-python-git-tag }} + export ITK_PACKAGE_VERSION=${{ env.itk-wheel-tag }} export MACOSX_DEPLOYMENT_TARGET=10.9 ./macpython-download-cache-and-build-module-wheels.sh @@ -206,9 +202,7 @@ jobs: strategy: max-parallel: 2 matrix: - python-version-minor: [6, 7, 8, 9] - include: - - itk-python-git-tag: "v5.2.0.post2" + python-version-minor: [7, 8, 9, 10] steps: - name: Get specific version of CMake, Ninja @@ -229,7 +223,7 @@ jobs: run: | mv im ../../ cd ../../ - curl -L "https://github.com/InsightSoftwareConsortium/ITKPythonBuilds/releases/download/${{ matrix.itk-python-git-tag }}/ITKPythonBuilds-windows.zip" -o "ITKPythonBuilds-windows.zip" + curl -L "https://github.com/InsightSoftwareConsortium/ITKPythonBuilds/releases/download/${{ env.itk-wheel-tag }}/ITKPythonBuilds-windows.zip" -o "ITKPythonBuilds-windows.zip" 7z x ITKPythonBuilds-windows.zip -o/c/P -aoa -r curl -L "https://data.kitware.com/api/v1/file/5c0ad59d8d777f2179dd3e9c/download" -o "doxygen-1.8.11.windows.bin.zip" 7z x doxygen-1.8.11.windows.bin.zip -o/c/P/doxygen -aoa -r @@ -241,7 +235,7 @@ jobs: run: | cd ../../im call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat" - set PATH="C:\P\grep;%PATH%" + set PATH=C:\P\grep;%PATH% set CC=cl.exe set CXX=cl.exe C:\Python3${{ matrix.python-version-minor }}-x64\python.exe C:\P\IPP\scripts\windows_build_module_wheels.py --py-envs "3${{ matrix.python-version-minor }}-x64" --no-cleanup diff --git a/setup.py b/setup.py index a9a81bc..d49ba9a 100644 --- a/setup.py +++ b/setup.py @@ -13,7 +13,7 @@ setup( name='itk-bsplinegradient', - version='0.2.5', + version='0.2.6', author='Matthew McCormick', author_email='matt.mccormick@kitware.com', packages=['itk'], @@ -46,6 +46,6 @@ keywords='ITK InsightToolkit Image-Gradient B-spline', url=r'https://github.com/InsightSoftwareConsortium/ITKBSplineGradient', install_requires=[ - r'itk>=v5.2.0.post2' + r'itk>=v5.3rc04' ] ) From f98ff9d0101ae4fe5475605709f58789acc7989f Mon Sep 17 00:00:00 2001 From: Tom Birdsong Date: Mon, 9 May 2022 15:18:26 -0400 Subject: [PATCH 2/2] STYLE: Update template parameter names for KWStyle `N` is removed as a valid template name prefix such that `NComponents` is no longer a valid template name. Updated name to `VComponents` which conforms to ITK KWStyle guidelines. Relevant ITK KWStyle change is at commit 4b43536c8b22bb716a4f0b76a0582a99d6d8911d --- include/itkImageToImageOfVectorsFilter.h | 8 ++++---- include/itkImageToImageOfVectorsFilter.hxx | 20 ++++++++++---------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/include/itkImageToImageOfVectorsFilter.h b/include/itkImageToImageOfVectorsFilter.h index 5330fff..a52ff44 100644 --- a/include/itkImageToImageOfVectorsFilter.h +++ b/include/itkImageToImageOfVectorsFilter.h @@ -48,18 +48,18 @@ namespace itk * * \ingroup BSplineGradient */ -template +template class ITK_TEMPLATE_EXPORT ImageToImageOfVectorsFilter : public ImageToImageFilter< TInputImage, - Image, TInputImage::ImageDimension>> + Image, TInputImage::ImageDimension>> { public: ITK_DISALLOW_COPY_AND_MOVE(ImageToImageOfVectorsFilter); using Superclass = ImageToImageFilter< TInputImage, - Image, TInputImage::ImageDimension>>; + Image, TInputImage::ImageDimension>>; using Self = ImageToImageOfVectorsFilter; using Pointer = SmartPointer; using ConstPointer = SmartPointer; @@ -71,7 +71,7 @@ class ITK_TEMPLATE_EXPORT ImageToImageOfVectorsFilter using InputPixelType = typename InputImageType::InternalPixelType; - using OutputPixelType = Vector; + using OutputPixelType = Vector; using OutputImageType = Image; using RegionType = typename OutputImageType::RegionType; diff --git a/include/itkImageToImageOfVectorsFilter.hxx b/include/itkImageToImageOfVectorsFilter.hxx index 2586af5..482ea43 100644 --- a/include/itkImageToImageOfVectorsFilter.hxx +++ b/include/itkImageToImageOfVectorsFilter.hxx @@ -24,20 +24,20 @@ namespace itk { -template -ImageToImageOfVectorsFilter::ImageToImageOfVectorsFilter() +template +ImageToImageOfVectorsFilter::ImageToImageOfVectorsFilter() { // At least 1 input is required. this->SetNumberOfRequiredInputs(1); } -template +template void -ImageToImageOfVectorsFilter::BeforeThreadedGenerateData() +ImageToImageOfVectorsFilter::BeforeThreadedGenerateData() { RegionType region; - for (unsigned int i = 0; i < NComponents; i++) + for (unsigned int i = 0; i < VComponents; i++) { auto * input = static_cast(this->ProcessObject::GetInput(i)); if (!input) @@ -55,9 +55,9 @@ ImageToImageOfVectorsFilter::BeforeThreadedGenerateDat } } -template +template void -ImageToImageOfVectorsFilter::DynamicThreadedGenerateData( +ImageToImageOfVectorsFilter::DynamicThreadedGenerateData( const RegionType & outputRegionForThread) { typename OutputImageType::Pointer outputImage = static_cast(this->ProcessObject::GetOutput(0)); @@ -68,7 +68,7 @@ ImageToImageOfVectorsFilter::DynamicThreadedGenerateDa using InputIteratorType = ImageRegionConstIterator; std::vector inputItContainer; - for (unsigned int i = 0; i < NComponents; i++) + for (unsigned int i = 0; i < VComponents; i++) { typename InputImageType::Pointer inputImagePointer = static_cast(this->ProcessObject::GetInput(i)); @@ -81,7 +81,7 @@ ImageToImageOfVectorsFilter::DynamicThreadedGenerateDa typename OutputImageType::PixelType pix; while (!oit.IsAtEnd()) { - for (unsigned int i = 0; i < NComponents; i++) + for (unsigned int i = 0; i < VComponents; i++) { pix[i] = inputItContainer[i]->Get(); ++(*inputItContainer[i]); @@ -90,7 +90,7 @@ ImageToImageOfVectorsFilter::DynamicThreadedGenerateDa ++oit; } - for (unsigned int i = 0; i < NComponents; i++) + for (unsigned int i = 0; i < VComponents; i++) { delete inputItContainer[i]; }