You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ENH: Master tracking — Eigen3 third-party design for ITK 6.x
Why this issue
Thanks to @blowekamp and @dzenanz for suggesting that the Eigen design conversation needs a single venue rather than continued incremental patches.
Eigen-related work has accumulated multiple half-finished refactors (PR #5952, PR #6225), recurring user-confusion threads, and explicit "let's have a design discussion before more incremental patches" requests from @blowekamp (#6225) and @dzenanz (#5952). Several maintainer positions have been stated in scattered places (Discourse 2018-2023, individual PR threads) but never consolidated.
This issue is a single venue to converge on what we want Eigen to look like in ITK 6 and 7, what is grandfathered from earlier decisions, and what concrete sub-PRs the consolidated direction implies. ITKv6 is permitted to break or revise historical promises where the cost-benefit warrants it; the goal here is to make those revisions intentional, not accidental.
The historical baseline (load-bearing context)
These decisions were made deliberately and have shaped the current code:
Internal Eigen3 was added as a ThirdParty module in 2018 (Discourse #1429, authored by @phcerdan). Stated rationale: allow remote modules that already use Eigen (e.g. ITKTotalVariation bridging to proxTV) to share ITK's Eigen via find_package(Eigen3) pointed at ITK's tree. The long-term plan articulated by @matt.mccormick and @dzenanz: gradually migrate ITK internals from VNL to Eigen.
Symbols are NOT mangled — by design.@phcerdan, Discourse #5562 (2022): "It doesn't [mangle]. Eigen is a header-only library and it wasn't mangled to facilitate bridging with external libraries using native Eigen." Re-raising mangling in 2026 is fine, but must engage with this prior decision.
A. Use ITK's internal Eigen via <itkeigen/Eigen/Core>
B.-DITK_USE_SYSTEM_EIGEN:BOOL=ON + -DEigen3_DIR:PATH=... then <Eigen/Core>
C. Reuse ITK's internal Eigen as your project's Eigen (because no mangling)
VNL → Eigen migration never materialized beyond the 2018 plan. The aspiration is documented; the work is not staged. ITKv6 is the moment to either revive or formally retire that goal.
#4407, #4840, #4006, #1888 — ITKInternalEigen3 install brittleness across CMake versions; mostly fixed in 5.4. Worth checking that ITK 6 doesn't regress these.
The questions that need answers before more patches land
Each is binary or short-list; the goal is to get a maintainer-quorum answer to each, then translate them into work.
Q1. Header-path policy (the active flashpoint)
Three coexisting styles in-tree today:
ITK_EIGEN(Eigenvalues) // legacy macro → <itkeigen/Eigen/Eigenvalues>
#include<Eigen/Eigenvalues>// canonical, what PR #6225 wants
#include"itk_Eigenvalues.h"// per-module wrapper, what PR #5952 wanted
Decision needed: Pick one canonical style for ITK 6 internals. The other two can remain as transitional aliases or be deprecated. Which?
Q2. Symbol mangling — revisit or honor the 2022 decision?
@phcerdan's 2022 reason for not mangling (bridge use case C above) is real but narrow. @phcerdan also endorsed mangling on PR #5831 in 2026. Two options:
Honor 2022: keep unmangled, document that downstream modules can share ITK's Eigen, accept the ABI/ODR risk when an external library also vendors Eigen.
Mangle in ITK 6: explicitly drop usage mode C, gain ODR safety à la VTK. Costs: bridging modules need updates; vendored-Eigen update mechanics get more involved.
Q3. Eigen3::Eigen CMake target — exposed to consumers?
Already partially the case (#6223). Decision needed: is Eigen3::Eigen (or ITK::Eigen3 aliased) a stable, supported CMake target that downstream find_package(ITK) consumers can link against, or an internal detail that may be removed?
Q4. Warning suppression scope
When ITK_USE_SYSTEM_EIGEN=ON, current code does not pass the same -Wno-* flags that the internal Eigen build uses. Greptile's P1 on #6225 surfaces this. Two options:
Treat system Eigen as "user's responsibility, we don't suppress."
Apply the same suppressions for both — uniform but means leaking flags into consumer builds.
Q5. VNL → Eigen migration — revive or formally retire?
The 2018 aspiration is unimplemented. Either:
Revive: stage it for ITK 7+, accept it requires a multi-release deprecation cycle (GetVnlVector → GetInternalVector etc., per @phcerdan 2018).
Retire: explicitly document VNL as the canonical numerics layer; relegate Eigen to its current niches (registration metrics, certain filters, third-party bridges) and remove "VNL replacement" from the roadmap.
Q6. Where does the design discussion happen?
GitHub issue (this one), Discourse thread, or a community-call agenda item? @blowekamp asked for "a discussion" on #6225 — naming the venue avoids the discussion happening in 5 places at once.
Q7. ITKv6 license to break
ITKv6 may revise historical promises where they no longer pay rent. Each Q above should be answered for ITK 6, not "what would have been compatible with the 2018 design." If the 2018 bridge-use case has zero real users in 2026, the design moves; if it has real users, accommodation matters.
Filed this issue; current proposer of #6225 canonical-headers approach
Concrete asks of the maintainer group
Each maintainer (especially the seven listed above) leaves a comment with their position on Q1–Q5. Even one-line "I prefer option B because X" is enough.
ENH: Master tracking — Eigen3 third-party design for ITK 6.x
Why this issue
Thanks to @blowekamp and @dzenanz for suggesting that the Eigen design conversation needs a single venue rather than continued incremental patches.
Eigen-related work has accumulated multiple half-finished refactors (PR #5952, PR #6225), recurring user-confusion threads, and explicit "let's have a design discussion before more incremental patches" requests from @blowekamp (#6225) and @dzenanz (#5952). Several maintainer positions have been stated in scattered places (Discourse 2018-2023, individual PR threads) but never consolidated.
This issue is a single venue to converge on what we want Eigen to look like in ITK 6 and 7, what is grandfathered from earlier decisions, and what concrete sub-PRs the consolidated direction implies. ITKv6 is permitted to break or revise historical promises where the cost-benefit warrants it; the goal here is to make those revisions intentional, not accidental.
The historical baseline (load-bearing context)
These decisions were made deliberately and have shaped the current code:
Internal Eigen3 was added as a ThirdParty module in 2018 (Discourse #1429, authored by @phcerdan). Stated rationale: allow remote modules that already use Eigen (e.g.
ITKTotalVariationbridging toproxTV) to share ITK's Eigen viafind_package(Eigen3)pointed at ITK's tree. The long-term plan articulated by @matt.mccormick and @dzenanz: gradually migrate ITK internals from VNL to Eigen.Symbols are NOT mangled — by design. @phcerdan, Discourse #5562 (2022): "It doesn't [mangle]. Eigen is a header-only library and it wasn't mangled to facilitate bridging with external libraries using native Eigen." Re-raising mangling in 2026 is fine, but must engage with this prior decision.
Three documented user-facing usage modes (@phcerdan, Discourse #5627 (2023)):
<itkeigen/Eigen/Core>-DITK_USE_SYSTEM_EIGEN:BOOL=ON+-DEigen3_DIR:PATH=...then<Eigen/Core>VNL → Eigen migration never materialized beyond the 2018 plan. The aspiration is documented; the work is not staged. ITKv6 is the moment to either revive or formally retire that goal.
Where the current friction lives
Active / open PRs
<Eigen/X>viaEigen3::Eigen(supersedes #5952)ITK_USE_SYSTEM_EIGEN=ONitk_Eigenvalues.hper-module wrappers (alternative direction)ITK_EIGEN(Header)macro can't carry in-sourceSYSTEMinclude paths-Wshadowwarnings!1936; awaits next vendored-Eigen updateRecently merged (last 12 months)
itkeigensubdir for external consumers (this is what @seanm's ENH: Migrate Eigen3 includes to canonical <Eigen/x> via Eigen3::Eigen (supersedes #5952) #6225 regression report hangs off of).Recurring user-pain issues
#4407, #4840, #4006, #1888 —
ITKInternalEigen3install brittleness across CMake versions; mostly fixed in 5.4. Worth checking that ITK 6 doesn't regress these.The questions that need answers before more patches land
Each is binary or short-list; the goal is to get a maintainer-quorum answer to each, then translate them into work.
Q1. Header-path policy (the active flashpoint)
Three coexisting styles in-tree today:
Decision needed: Pick one canonical style for ITK 6 internals. The other two can remain as transitional aliases or be deprecated. Which?
Q2. Symbol mangling — revisit or honor the 2022 decision?
@phcerdan's 2022 reason for not mangling (bridge use case C above) is real but narrow. @phcerdan also endorsed mangling on PR #5831 in 2026. Two options:
Q3.
Eigen3::EigenCMake target — exposed to consumers?Already partially the case (#6223). Decision needed: is
Eigen3::Eigen(orITK::Eigen3aliased) a stable, supported CMake target that downstreamfind_package(ITK)consumers can link against, or an internal detail that may be removed?Q4. Warning suppression scope
When
ITK_USE_SYSTEM_EIGEN=ON, current code does not pass the same-Wno-*flags that the internal Eigen build uses. Greptile's P1 on #6225 surfaces this. Two options:Q5. VNL → Eigen migration — revive or formally retire?
The 2018 aspiration is unimplemented. Either:
GetVnlVector→GetInternalVectoretc., per @phcerdan 2018).Q6. Where does the design discussion happen?
GitHub issue (this one), Discourse thread, or a community-call agenda item? @blowekamp asked for "a discussion" on #6225 — naming the venue avoids the discussion happening in 5 places at once.
Q7. ITKv6 license to break
ITKv6 may revise historical promises where they no longer pay rent. Each Q above should be answered for ITK 6, not "what would have been compatible with the 2018 design." If the 2018 bridge-use case has zero real users in 2026, the design moves; if it has real users, accommodation matters.
Maintainer positions summarized (best understanding)
Concrete asks of the maintainer group