Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ENH: Bump elastix version to 2023-07-19, inc. SetInitialTransform #234

Conversation

N-Dekker
Copy link
Collaborator

Follow-up to #211 commit 1043f10 "ENH: Bump elastix version to 2023-05-15, use C++17"

Including:

SuperElastix/elastix#936
SuperElastix/elastix@115d8e1
ENH: Add `ElastixRegistrationMethod::SetInitialTransform

SuperElastix/elastix#933
SuperElastix/elastix@d33a0d5
BUG: Fix reference count in ConvertItkTransformBaseToSingleItkTransform

SuperElastix/elastix#924
SuperElastix/elastix@71a4a9a
ENH: Add TransformParameterFileName property to TransformixFilter

SuperElastix/elastix#922
SuperElastix/elastix@9d76b86
ENH: Restore ELASTIX_BUILD_EXECUTABLE CMake option

SuperElastix/elastix#909
SuperElastix/elastix@9e64269
ENH: ElastixRegistrationMethod writes initial transform parameter files

SuperElastix/elastix#903
SuperElastix/elastix@2170592
ENH: Remove the letter 's' from "InitialTransformParametersFileName"

SuperElastix/elastix#898
SuperElastix/elastix@691c358
BUG: Add InitialTransformParameterObject maps to registration result

@N-Dekker
Copy link
Collaborator Author

@dzenanz @tbirdso @thewtex Do you have any clue about the CI build failures? Other pull requests (for example #230) seem to have the same build failures, specifically on cxx-build-workflow / build-test-cxx (windows-2022)

@dzenanz
Copy link
Member

dzenanz commented Jul 19, 2023

Maybe the same thing as fixed here and here?

Did SetInitialTransform work before this PR?

@dzenanz
Copy link
Member

dzenanz commented Jul 19, 2023

@tao558 If SetInitialTransform did not work before this PR, it might explain why some of the things I tried in registration notebook didn't work.

@N-Dekker
Copy link
Collaborator Author

Did SetInitialTransform work before this PR?

No, this PR adds ElastixRegistrationMethod.SetInitialTransform to ITKElastix for the first time. Although there were similar member functions already: SetInitialTransformParameterFileName, and SetInitialTransformParameterObject. The newly added member function allows passing an ITK transform object directly as argument.

@N-Dekker
Copy link
Collaborator Author

N-Dekker commented Jul 19, 2023

Maybe the same thing as fixed here and here?

Interesting... Do you mean ITKElastix should upgrade to a newer revision of ITKRemoteModuleBuildTestPackageAction?

Looking at

uses: InsightSoftwareConsortium/ITKRemoteModuleBuildTestPackageAction/.github/workflows/build-test-cxx.yml@85252b549b1e44aa7198fbea470f75732d092c8b

@dzenanz
Copy link
Member

dzenanz commented Jul 19, 2023 via email

@tbirdso
Copy link
Collaborator

tbirdso commented Jul 19, 2023

Do you mean ITKElastix should upgrade to a newer revision of ITKRemoteModuleBuildTestPackageAction

I agree with @dzenanz , please first update to the latest commit in ITKRemoteModuleBuildTestPackageAction.

@N-Dekker N-Dekker force-pushed the Bump-elastix-version-2023-07-19-SetInitialTransform branch from 07ca69c to f31041c Compare July 20, 2023 12:26
@N-Dekker
Copy link
Collaborator Author

"cxx-build-workflow / build-test-cxx (windows-2022)" builds fine now that pull request #235 commit 7bdc103 is merged 👍

However, python-build-workflow-dev / build-linux-py (7, 2014-x64) still fails, saying:

ERROR    InvalidDistribution: Cannot find file (or expand pattern):             
         'dist/itk_*cp37*manylinux2014*x86_64.whl' 

Any suggestion?

@N-Dekker
Copy link
Collaborator Author

N-Dekker commented Jul 20, 2023

Looks like python-build-workflow-dev / build-macos-py (11) is still using C++14, while elastix really needs C++17 now.


cd /Users/runner/work/ITKElastix/ITKElastix/_skbuild/macosx-10.9-universal2-3.11/cmake-build/Wrapping/Modules/Elastix && env SDKROOT=/Applications/Xcode_13.2.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.1.sdk MACOSX_DEPLOYMENT_TARGET=10.9 /Users/runner/work/ITKElastix/ITKElastix/_skbuild/macosx-10.9-universal2-3.11/cmake-build/Wrapping/Generators/CastXML/castxml/bin/castxml -o /Users/svc-dashboard/D/P/ITKPythonPackage/scripts/../ITK-3.11-macosx_x86_64/Wrapping/castxml_inputs/itkElastixRegistrationMethod.xml --castxml-gccxml --castxml-start _wrapping_ --castxml-cc-gnu "(" /Applications/Xcode_13.2.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -std=c++14 ")" -w -c @/Users/svc-dashboard/D/P/ITKPythonPackage/scripts/../ITK-3.11-macosx_x86_64/Wrapping/castxml_inputs/.castxml.inc /Users/svc-dashboard/D/P/ITKPythonPackage/scripts/../ITK-3.11-macosx_x86_64/Wrapping/castxml_inputs/itkElastixRegistrationMethod.cxx
In file included from /Users/svc-dashboard/D/P/ITKPythonPackage/scripts/../ITK-3.11-macosx_x86_64/Wrapping/castxml_inputs/itkElastixRegistrationMethod.cxx:16:
In file included from /Users/runner/work/ITKElastix/ITKElastix/_skbuild/macosx-10.9-universal2-3.11/cmake-build/_deps/elx-src/Core/Main/itkElastixRegistrationMethod.h:41:
In file included from /Users/runner/work/ITKElastix/ITKElastix/_skbuild/macosx-10.9-universal2-3.11/cmake-build/_deps/elx-src/Core/Kernel/elxElastixMain.h:21:
In file included from /Users/runner/work/ITKElastix/ITKElastix/_skbuild/macosx-10.9-universal2-3.11/cmake-build/_deps/elx-src/Core/Kernel/elxMainBase.h:23:
In file included from /Users/runner/work/ITKElastix/ITKElastix/_skbuild/macosx-10.9-universal2-3.11/cmake-build/_deps/elx-src/Core/Kernel/elxElastixBase.h:33:
In file included from /Users/runner/work/ITKElastix/ITKElastix/_skbuild/macosx-10.9-universal2-3.11/cmake-build/_deps/elx-src/Core/Configuration/elxConfiguration.h:25:
In file included from /Users/runner/work/ITKElastix/ITKElastix/_skbuild/macosx-10.9-universal2-3.11/cmake-build/_deps/elx-src/Common/ParameterFileParser/itkParameterMapInterface.h:22:
/Users/runner/work/ITKElastix/ITKElastix/_skbuild/macosx-10.9-universal2-3.11/cmake-build/_deps/elx-src/Core/Install/elxConversion.h:92:24: error: no template named 'is_integral_v' in namespace 'std'; did you mean 'is_integral'?

Specifically, 'is_integral_v' is introduced with C++17, while this particular compiler says:

error: no template named 'is_integral_v' in namespace 'std'; did you mean 'is_integral'?

The compiler appears to be run as usr/bin/c++ -std=c++14, according to the output above here, while that should be -std=c++14!

Any suggestion where this should be specified?


Update: I see now, it also says:

2023-07-21T12:43:33.9935110Z FAILED: /Users/svc-dashboard/D/P/ITKPythonPackage/ITK-3.11-macosx_x86_64/Wrapping/castxml_inputs/itkElastixRegistrationMethod.xml
...
2023-07-21T12:43:35.8310640Z FAILED: /Users/svc-dashboard/D/P/ITKPythonPackage/ITK-3.11-macosx_x86_64/Wrapping/castxml_inputs/itkTransformixFilter.xml

@tbirdso
Copy link
Collaborator

tbirdso commented Jul 24, 2023

Looks like python-build-workflow-dev / build-macos-py (11) is still using C++14, while elastix really needs C++17 now.

@N-Dekker Thanks for finding this. As ITK requires a minimum of C++17 it is reasonable to require external modules to do the same. This seems like a bug in build-macos-py. Logged here: InsightSoftwareConsortium/ITKRemoteModuleBuildTestPackageAction#66

@thewtex
Copy link
Member

thewtex commented Jul 24, 2023

@N-Dekker thanks for working on the initial transform support 👏

@N-Dekker This should be fixed by the itk-5.4rc01 builds, where C++17 is enabled by the default via ITK. It could be tested by setting versions as in this PR: InsightSoftwareConsortium/ITKSplitComponents#72.

@N-Dekker
Copy link
Collaborator Author

Thanks to you both @tbirdso and @thewtex So I guess ITKElastix should upgrade both ITKRemoteModuleBuildTestPackageAction (to include a fix for InsightSoftwareConsortium/ITKRemoteModuleBuildTestPackageAction#66 ) and ITK (to itk-5.4rc01 at least), before upgrading to the latest (C++17 based) SuperElastix/elastix, right?

@tbirdso
Copy link
Collaborator

tbirdso commented Jul 24, 2023

So I guess ITKElastix should upgrade both ITKRemoteModuleBuildTestPackageAction and ITK before upgrading to the latest (C++17 based) SuperElastix/elastix, right?

Yes, I agree. Here is a potential roadmap for upgrading ITKElastix to the latest Elastix build with C++17:

  1. Merge Itk 5.3rc01 ITKRemoteModuleBuildTestPackageAction#67 into [email protected] feature branch once tests pass (DONE)
  2. Update ITKElastix CI to point to [email protected] feature branch (or fixed commit hash at HEAD). This will include C++17 tooling and an updated ref to ITK v5.4rc01. (See ENH: Bump for ITK v5.4rc01 #236) (DONE)
  3. Update ITKElastix to the latest Elastix build (here)

EDIT: Updated roadmap with progress.

@tbirdso
Copy link
Collaborator

tbirdso commented Jul 24, 2023

@N-Dekker FYI, ITKElastix is now updated to target ITK v5.4rc1 with C++17 build tools. Please rebase this PR on main.

N-Dekker added 2 commits July 25, 2023 13:12
Follow-up to InsightSoftwareConsortium#211
commit 1043f10 "ENH: Bump elastix version to
2023-05-15, use C++17"

Including:

  SuperElastix/elastix#936
  SuperElastix/elastix@115d8e1
  ENH: Add `ElastixRegistrationMethod::SetInitialTransform

  SuperElastix/elastix#933
  SuperElastix/elastix@d33a0d5
  BUG: Fix reference count in ConvertItkTransformBaseToSingleItkTransform

  SuperElastix/elastix#924
  SuperElastix/elastix@71a4a9a
  ENH: Add TransformParameterFileName property to TransformixFilter

  SuperElastix/elastix#922
  SuperElastix/elastix@9d76b86
  ENH: Restore ELASTIX_BUILD_EXECUTABLE CMake option

  SuperElastix/elastix#909
  SuperElastix/elastix@9e64269
  ENH: ElastixRegistrationMethod writes initial transform parameter files

  SuperElastix/elastix#903
  SuperElastix/elastix@2170592
  ENH: Remove the letter 's' from "InitialTransformParametersFileName"

  SuperElastix/elastix#898
  SuperElastix/elastix@691c358
  BUG: Add InitialTransformParameterObject maps to registration result
Aims to avoid compile errors from macosx-10.9-universal2-3.11/Xcode_13.2.1
MacOSX12.1.sdk/AppleClang 13.0.0.13000029 saying:

> error: no template named 'is_integral_v' in namespace 'std'; did you mean 'is_integral'?
@N-Dekker N-Dekker force-pushed the Bump-elastix-version-2023-07-19-SetInitialTransform branch from 805f89f to 9327b3c Compare July 25, 2023 11:12
Copy link
Collaborator

@tbirdso tbirdso left a comment

Choose a reason for hiding this comment

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

LGTM. CI is now passing with the update to v5.4rc1 CI workflows. 🟢

@N-Dekker
Copy link
Collaborator Author

Thanks for your approval Tom! For the sake of time, I'll just merge now!

@N-Dekker N-Dekker merged commit 0df1ba6 into InsightSoftwareConsortium:main Jul 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants