Repository navigation
BUG: Rename the two StructureTensorImageFilter classes to distinct names - #7061
Merged
hjmjohnson merged 2 commits intoNov 1, 2026
Conversation
Member
|
Commit messages should not have AI-assistance trailers. |
AnisotropicDiffusionLBR and IsotropicWavelets both defined itk::StructureTensorImageFilter with the same include guard, so a build enabling both modules used whichever header came first in the include path, and Python wrapping of IsotropicWavelets resolved to the other class and failed to compile. The two classes are different algorithms. The AnisotropicDiffusionLBR class takes one scalar or vector image, computes the gradient itself, and outputs the tensor. Rename it to GradientStructureTensorImageFilter, with its header, GTest, and users. The class is not wrapped and is used only by AnisotropicDiffusionLBRImageFilter. The old name is not kept as an alias, because an alias would reintroduce the clash. Update the ITK 6 migration guide section for the renamed class. Issue: InsightSoftwareConsortium#7057
hjmjohnson
force-pushed
the
bug-7057-rename-structuretensor
branch
from
October 31, 2026 23:12
8d0f627 to
8745c03
Compare
Member
Author
|
Removed the |
The class takes two or more component images (for example Riesz components) and outputs per-pixel eigenvectors and eigenvalues, so it differs from the AnisotropicDiffusionLBR class that shared its name. The header, test, wrapping file, and wrapping list entry move with the class. Template parameters, setters, and output are unchanged. The class is wrapped, so Python users switch from itk.StructureTensorImageFilter to itk.RieszStructureTensorImageFilter. No alias is kept, because it would reintroduce the clash. Add the rename to the ITK 6 migration guide. Issue: InsightSoftwareConsortium#7057
hjmjohnson
force-pushed
the
bug-7057-rename-structuretensor
branch
from
October 31, 2026 23:26
8745c03 to
3e46477
Compare
hjmjohnson
marked this pull request as ready for review
October 31, 2026 23:26
Contributor
[Medium impact] The rename appears safe to merge, with no new defects found.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rename the two unrelated
StructureTensorImageFilterclasses toGradientStructureTensorImageFilter(AnisotropicDiffusionLBR) andRieszStructureTensorImageFilter(IsotropicWavelets). Fixes #7057; the Python build also needs #7060.Why a rename and not a merge
The classes are different algorithms. LBR's takes one image, computes the gradient itself, smooths with recursive Gaussians, and outputs a
SymmetricSecondRankTensorimage. IsotropicWavelets' takes two or more component images, uses a Gaussian window, and outputs eigenvectors plus eigenvalues in aVariableSizeMatriximage. Two names state that divergence. No alias is provided, since one would reintroduce the clash.Blast radius
AnisotropicDiffusionLBRImageFilter. IsotropicWavelets' class is wrapped, so Python users of that module see the new name. The migration guide documents it.Verification
pre-commit run --all-filespasses. The tests ran before a plain rebase onto currentmain.AI assistance