Skip to content

ENH: Add NoMask test case for NormalizedCorrelationImageFilter - #2634

Merged
blowekamp merged 1 commit into
SimpleITK:mainfrom
blowekamp:add-normalizedcorrelation-nomask-test
Jul 20, 2026
Merged

blowekamp merged 1 commit into
SimpleITK:mainfrom
blowekamp:add-normalizedcorrelation-nomask-test

Conversation

@blowekamp

Copy link
Copy Markdown
Member

Follow-up from #2625, item S34.

itk::NormalizedCorrelationImageFilter has an explicit null-mask branch (.hxx:167-198), but the SimpleITK YAML did not declare MaskImage as optional: true, so no maskless overload was ever generated and that code path was untested through the wrapped API.

This PR:

  • Marks MaskImage as optional: true in NormalizedCorrelationImageFilter.yaml.
  • Adds a NoMask test case that calls the filter without a mask image, exercising the null-mask branch.
  • Adds the corresponding baseline content link (Testing/Data/Baseline/BasicFilters_NormalizedCorrelationImageFilter_NoMask.nrrd.sha512); the binary object has been uploaded to the SimpleITKExternalData repository.

Mark MaskImage as optional in the YAML and add a test that exercises
the null-mask code path in itk::NormalizedCorrelationImageFilter
(see SimpleITK#2625, S34).
@blowekamp
blowekamp requested a review from Copilot July 16, 2026 00:29
@blowekamp
blowekamp marked this pull request as ready for review July 16, 2026 00:29

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the SimpleITK wrapping definition for itk::NormalizedCorrelationImageFilter so that a mask image is truly optional in the generated wrapped API, and adds a corresponding test/baseline to exercise ITK’s explicit “null mask” code path.

Changes:

  • Marked MaskImage as optional: true in NormalizedCorrelationImageFilter.yaml to generate a maskless overload.
  • Added a NoMask YAML-driven test case that supplies only the required inputs (image + template).
  • Added the corresponding ExternalData SHA512 baseline entry for the new test output.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
Code/BasicFilters/yaml/NormalizedCorrelationImageFilter.yaml Makes MaskImage optional and adds a NoMask test that omits the mask input.
Testing/Data/Baseline/BasicFilters_NormalizedCorrelationImageFilter_NoMask.nrrd.sha512 Adds the baseline hash for the new NoMask test output.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@blowekamp
blowekamp requested review from dave3d and zivy July 16, 2026 12:45
@blowekamp
blowekamp merged commit 01fc49a into SimpleITK:main Jul 20, 2026
10 checks passed
@blowekamp
blowekamp deleted the add-normalizedcorrelation-nomask-test branch September 9, 2026 12:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants