Skip to content

BUG: Replace hard-coded itkeigen/ path in itkSpecialFunctions.h#6527

Merged
dzenanz merged 1 commit into
InsightSoftwareConsortium:mainfrom
blowekamp:fixSpecialFunctionsEigenInclude
Jun 27, 2026
Merged

BUG: Replace hard-coded itkeigen/ path in itkSpecialFunctions.h#6527
dzenanz merged 1 commit into
InsightSoftwareConsortium:mainfrom
blowekamp:fixSpecialFunctionsEigenInclude

Conversation

@blowekamp

Copy link
Copy Markdown
Member

Fix the remaining hard-coded itkeigen/unsupported/Eigen/SpecialFunctions include in itkSpecialFunctions.h that breaks compilation when ITK_USE_SYSTEM_EIGEN=ON.

Replaces the path with ITK_EIGEN_UNSUPPORTED(SpecialFunctions) and adds the required #include "itk_eigen.h", consistent with the fix in commit 8543e2f that addressed the same pattern in itkMatrixExponential.h, itkEigenLevenbergMarquardtEngine.cxx, and vnl_levenberg_marquardt.cxx.

AI assistance
  • GitHub Copilot (Claude Sonnet 4.6) identified this remaining instance by searching for #include "itkeigen/ patterns after reviewing the referenced commit.

itkSpecialFunctions.h used a hard-coded 'itkeigen/unsupported/Eigen/SpecialFunctions'
include that fails when ITK_USE_SYSTEM_EIGEN=ON. Switch to the
ITK_EIGEN_UNSUPPORTED(SpecialFunctions) macro, consistent with the
fix applied to itkMatrixExponential.h and itkEigenLevenbergMarquardtEngine.cxx
in the prior commit.
@github-actions github-actions Bot added type:Bug Inconsistencies or issues which will cause an incorrect result under some or all circumstances area:Core Issues affecting the Core module labels Jun 27, 2026
@blowekamp blowekamp requested a review from hjmjohnson June 27, 2026 11:43
@blowekamp blowekamp marked this pull request as ready for review June 27, 2026 11:43
@greptile-apps

greptile-apps Bot commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR updates the Eigen include path used by itkSpecialFunctions.h. The main changes are:

  • Adds itk_eigen.h before the Eigen unsupported include.
  • Replaces the hard-coded vendored Eigen path with ITK_EIGEN_UNSUPPORTED(SpecialFunctions).
  • Keeps the existing special function calls routed through Eigen's unsupported header.

Confidence Score: 5/5

This looks safe to merge.

  • No blocking issues found in the changed code.
  • The new macro include is defined before use.
  • The Common module already depends on ITKEigen3.

Important Files Changed

Filename Overview
Modules/Core/Common/include/itkSpecialFunctions.h Switches the SpecialFunctions include to the configured Eigen include macro used for system and vendored Eigen builds.

Reviews (1): Last reviewed commit: "BUG: Replace hard-coded itkeigen/ path w..." | Re-trigger Greptile

@blowekamp

Copy link
Copy Markdown
Member Author

@greptile-apps Please remember include of Eigen headers need an ITK_EIGEN macro and direct include of eigen headers in ITK should not occur.

@greptile-apps

greptile-apps Bot commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

Got it — I've created a rule to enforce this going forward.

Rule: All Eigen header includes in ITK must use the ITK_EIGEN macro family (e.g., ITK_EIGEN(...), ITK_EIGEN_UNSUPPORTED(...)). Direct hard-coded includes like #include "itkeigen/..." or #include <Eigen/...> are not permitted.

View rule

@dzenanz dzenanz merged commit f6e917f into InsightSoftwareConsortium:main Jun 27, 2026
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:Core Issues affecting the Core module type:Bug Inconsistencies or issues which will cause an incorrect result under some or all circumstances

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants