Skip to content

ENH: Ingest ITKPhaseSymmetry into Modules/Filtering/PhaseSymmetry#6270

Merged
hjmjohnson merged 123 commits into
InsightSoftwareConsortium:mainfrom
hjmjohnson:ingest-PhaseSymmetry
May 19, 2026
Merged

ENH: Ingest ITKPhaseSymmetry into Modules/Filtering/PhaseSymmetry#6270
hjmjohnson merged 123 commits into
InsightSoftwareConsortium:mainfrom
hjmjohnson:ingest-PhaseSymmetry

Conversation

@hjmjohnson
Copy link
Copy Markdown
Member

Ingest the ITKPhaseSymmetry remote module into Modules/Filtering/PhaseSymmetry (group: Filtering). Source upstream: InsightSoftwareConsortium/ITKPhaseSymmetry. Tracking issue: #6160.

Ingest stats
  • Commits: 114 (including 22 merge commits -- Mode A topology preserved per Utilities/Maintenance/RemoteModuleIngest/INGESTION_STRATEGY.md)
  • Files installed under Modules/Filtering/PhaseSymmetry/: 33
  • Approx. content size: 85 KiB
  • Tip SHA: b378aad9a9d58092db8d1573b81d8c926df6f3e6
External-data fixtures

CID / .sha512 content-links present in this ingest:

  • Modules/Filtering/PhaseSymmetry/test/Baseline/itkButterworthFilterFreqImageSourceTestFilter.mha.cid
  • Modules/Filtering/PhaseSymmetry/test/Baseline/itkLogGaborFreqImageSourceTestFilter.mha.cid
  • Modules/Filtering/PhaseSymmetry/test/Baseline/itkPhaseSymmetryImageFilterTest.mha.cid
  • Modules/Filtering/PhaseSymmetry/test/Baseline/itkSinusoidImageSourceTest.mha.cid
  • Modules/Filtering/PhaseSymmetry/test/Input/HeartUltrasound.mha.cid
  • Modules/Filtering/PhaseSymmetry/test/Input/SinusoidImage.mha.cid

If any fixtures resolve via ITKTestingData, that repo must contain the matching content-link before this PR can merge cleanly.

Follow-on commits (on top of the unrelated-histories merge)
  • b378aad COMP: Remove PhaseSymmetry remote module and enable in configure-ci
  • 50fa8a9 ENH: Convert from md5 to .cid tags.
  • acbde26 STYLE: Replace itkStaticConstMacro with static constexpr
  • 21f69e0 STYLE: Add itkVirtualGetNameOfClassMacro + itkOverrideGetNameOfClassMacro
  • 5f85302 ENH: Bump ITK and change http to https

root and others added 30 commits January 13, 2012 20:59
Class name changed when moving out of Review.
Use same terminology as the GaborImageSource.
@github-actions github-actions Bot added area:Filtering Issues affecting the Filtering module area:Remotes Issues affecting the Remote module labels May 14, 2026
@hjmjohnson
Copy link
Copy Markdown
Member Author

@greptileai review this draft before I make it official

1 similar comment
@hjmjohnson
Copy link
Copy Markdown
Member Author

@greptileai review this draft before I make it official

@greptile-apps

This comment was marked as resolved.

Comment thread Modules/Filtering/PhaseSymmetry/include/itkPhaseSymmetryImageFilter.h Outdated
Comment thread Modules/Filtering/PhaseSymmetry/include/itkPhaseSymmetryImageFilter.hxx Outdated
Comment thread Modules/Filtering/PhaseSymmetry/include/itkButterworthFilterFreqImageSource.hxx Outdated
@greptile-apps

This comment was marked as resolved.

Comment thread Modules/Filtering/PhaseSymmetry/itk-module.cmake Outdated
Comment thread Modules/Filtering/PhaseSymmetry/include/itkPhaseSymmetryImageFilter.h Outdated
Comment thread Modules/Filtering/PhaseSymmetry/include/itkPhaseSymmetryImageFilter.hxx Outdated
@hjmjohnson
Copy link
Copy Markdown
Member Author

/azp run

Comment thread Modules/Filtering/PhaseSymmetry/itk-module.cmake Outdated
Comment thread Modules/Filtering/PhaseSymmetry/include/itkPhaseSymmetryImageFilter.hxx Outdated
@hjmjohnson
Copy link
Copy Markdown
Member Author

@greptileai review

Comment thread Modules/Filtering/PhaseSymmetry/include/itkButterworthFilterFreqImageSource.hxx Outdated
@hjmjohnson hjmjohnson force-pushed the ingest-PhaseSymmetry branch from e2ab423 to e9e251e Compare May 19, 2026 14:17
hjmjohnson and others added 11 commits May 19, 2026 09:17
Brings PhaseSymmetry from a configure-time remote fetch into the ITK
source tree at Modules/Filtering/PhaseSymmetry/ using the v4 ingestion
pipeline (whitelist filter-repo + per-commit clang-format + black +
commit-prefix sanitization).

Upstream repo:  https://github.com/KitwareMedical/ITKPhaseSymmetry.git
Upstream tip:   6d3ba9ff7a4f9d334f979e548c346a8234250d78
Ingest date:    2026-05-14
Whitelist:      default.list

Per-commit transforms applied across all 112 commits:
  - filter-repo --paths-from-file (whitelist)
  - filter-repo --to-subdirectory-filter Modules/Filtering/PhaseSymmetry
  - clang-format -style=file (ITK main's .clang-format) for *.cxx/.h/.hxx/...
  - black for *.py
  - heuristic ITK prefix added to commit subjects without one

Merge topology preserved: 36 -> 21 merge(s).

Primary author: Matt McCormick <matt.mccormick@kitware.com>

Co-authored-by: Dženan Zukić <dzenan.zukic@kitware.com>
Co-authored-by: Gordon Stevenson <gordon.n.stevenson@gmail.com>
Co-authored-by: Hans J. Johnson <hans-johnson@uiowa.edu>
Co-authored-by: Hans J. Johnson <hans.j.johnson@gmail.com>
Co-authored-by: Hans Johnson <hans-johnson@uiowa.edu>
Co-authored-by: Jon Haitz Legarreta Gorroño <jon.haitz.legarreta@gmail.com>
Co-authored-by: Mathew Seng <mathewseng@gmail.com>
Co-authored-by: Matt McCormick <matt@mmmccormick.com>
Co-authored-by: root <root@insight-journal.org>
Co-authored-by: Tom Birdsong <tom.birdsong@kitware.com>
Co-authored-by: Zahil Shanis <zahil.shanis@kitware.com>
Now ingested into Modules/Filtering/PhaseSymmetry/.
Move the radius==0 short-circuit before the dotProduct/(radius*orientationRadius)
division so the center pixel does not produce 0/0 NaN, which raised invalid-op
on FP-trap platforms. Also Fill() m_Orientation and zero-initialize
m_AngularBandwidth in the constructor so direct users that skip
PhaseSymmetryImageFilter::Initialize() do not process uninitialized data.
…aluate

The duplicate 'return (TOutput)value;' produced -Wunreachable-code on most
compilers; drop it.
Replace the truncated 3.14159265 literal with the full-precision
itk::Math::pi from itkMath.h.
Clean up commented-out std::cout debug output and MATLAB-style %todo
annotations carried over from the upstream remote module.
itkPhaseSymmetryImageFilter.h includes itkComposeImageFilter.h and
itkMagnitudeAndPhaseToComplexImageFilter.h from ITKImageCompose, so the
module is a compile-time dependency. Downstream consumers without
ITKImageCompose in their dependency graph would otherwise see
unresolved-symbol link errors.
- GenerateData() self-initializes when m_FilterBank is empty, so
  Update() without an explicit Initialize() no longer reads an empty
  vector out of bounds.
- Initialize() clears m_FilterBank before rebuilding so repeated calls
  (after parameter changes) no longer accumulate stale entries.
- ButterworthFilterFreqImageSource guards radius / m_Cutoff against a
  zero cutoff (clamp lower bound is 0.0), avoiding NaN / SIGFPE.
@hjmjohnson hjmjohnson force-pushed the ingest-PhaseSymmetry branch from e9e251e to 1e0397b Compare May 19, 2026 14:21
@hjmjohnson hjmjohnson merged commit cf9bd89 into InsightSoftwareConsortium:main May 19, 2026
18 of 19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:Filtering Issues affecting the Filtering module area:Python wrapping Python bindings for a class area:Remotes Issues affecting the Remote module type:Enhancement Improvement of existing methods or implementation type:Infrastructure Infrastructure/ecosystem related changes, such as CMake or buildbots type:Testing Ensure that the purpose of a class is met/the results on a wide set of test cases are correct

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants