Skip to content

ENH: Add StructuralSimilarityImageFilter at Modules/Filtering#6094

Draft
hjmjohnson wants to merge 1 commit intoInsightSoftwareConsortium:mainfrom
hjmjohnson:ssim-standalone
Draft

ENH: Add StructuralSimilarityImageFilter at Modules/Filtering#6094
hjmjohnson wants to merge 1 commit intoInsightSoftwareConsortium:mainfrom
hjmjohnson:ssim-standalone

Conversation

@hjmjohnson
Copy link
Copy Markdown
Member

Adds Modules/Filtering/StructuralSimilarity/ containing StructuralSimilarityImageFilter (SSIM, Wang et al. 2004). Standalone module under Filtering — does not touch ImageCompare or any other existing module. Enabled in CI via configure-ci. Supersedes #6034 (which was stacked on the now-rejected Modules/Beta/ approach in #6085).

What changed from PR #6034
Module layout
Modules/Filtering/StructuralSimilarity/
├── CMakeLists.txt
├── itk-module.cmake          # DEPENDS ITKImageIntensity
│                              # COMPILE_DEPENDS ITKImageFilterBase, ITKSmoothing
│                              # TEST_DEPENDS ITKTestKernel, ITKGoogleTest
├── include/
│   ├── itkStructuralSimilarityImageFilter.h
│   └── itkStructuralSimilarityImageFilter.hxx
├── test/
│   ├── CMakeLists.txt
│   └── itkStructuralSimilarityImageFilterGTest.cxx   # 30 GTest cases
└── wrapping/
    ├── CMakeLists.txt
    └── itkStructuralSimilarityImageFilter.wrap
Local verification
  • Configure: clean
  • Build: no errors, no warnings
  • Tests: 31/32 pass (1 skip: KWStyleTest — not installed locally, passes in CI)
  • Pre-commit: all hooks pass
Reviewer feedback addressed (from #6034)
  • @blowekamp: VerifyPreconditions override (moved all param/input checks there)
  • @blowekamp: Mini-pipeline reconnection using CompositeFilterExample pattern
  • @blowekamp: Standalone module — does not perturb ImageCompare's dependency surface
  • @thewtex: No Beta staging — direct integration into Filtering/
AI disclosure

Filter implementation and test suite developed with Claude Code assistance across multiple iterations. Relocated from Modules/Beta/ to Modules/Filtering/ per reviewer consensus.

@github-actions github-actions bot added type:Infrastructure Infrastructure/ecosystem related changes, such as CMake or buildbots type:Enhancement Improvement of existing methods or implementation area:Python wrapping Python bindings for a class type:Testing Ensure that the purpose of a class is met/the results on a wide set of test cases are correct area:Filtering Issues affecting the Filtering module labels Apr 20, 2026
@hjmjohnson hjmjohnson requested a review from thewtex April 20, 2026 23:46
New standalone module at Modules/Filtering/StructuralSimilarity/
containing StructuralSimilarityImageFilter (SSIM, Wang et al. 2004).
Computes per-pixel SSIM map and scalar mean SSIM between two images
using a sliding Gaussian window over local luminance, contrast, and
structure terms.

Placed as a standalone module under Filtering/ rather than extending
the existing ImageCompare module, to avoid perturbing a core module's
dependency surface for a new filter. Enabled in CI via configure-ci.

Reference: Wang Z., Bovik A.C., Sheikh H.R., Simoncelli E.P.,
"Image quality assessment: From error visibility to structural
similarity," IEEE Trans. Image Processing 13(4), 2004.

Co-Authored-By: Hans Johnson <hans-johnson@uiowa.edu>
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 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.

2 participants