Add BasicFilters_BinaryMinMaxCurvatureFlowImageFilter alternate baselines - #54
Merged
blowekamp merged 1 commit intoAug 28, 2026
Conversation
4 tasks
blowekamp
marked this pull request as ready for review
August 28, 2026 20:41
blowekamp
added a commit
to SimpleITK/SimpleITK
that referenced
this pull request
Aug 29, 2026
ITK commit 4f0b3147be2 ("BUG: Decouple CurvatureFlowFunction
derivative scale from radius", ITK issue #6575 item B8) fixed
CurvatureFlowFunction::ComputeUpdate(): it always samples immediate
(1-pixel-stride) neighbors, but scaled derivatives by dividing by
GetRadius(). Any subclass repurposing the radius for something else --
such as MinMaxCurvatureFlowFunction's stencil radius -- understated
the update by 1/radius^2 (4x at the default stencil radius of 2).
BinaryMinMaxCurvatureFlowFunction::ComputeUpdate() inherits this code
path unmodified (calls straight through to
CurvatureFlowFunctionType::ComputeUpdate), and SimpleITK's
BinaryMinMaxCurvatureFlowImageFilter defaults StencilRadius to 2, so
it hits the same bug every step. This is a sibling bug to the one
already fixed in #2627 for the non-binary MinMaxCurvatureFlowImageFilter,
but via a different ITK commit -- #2627 correctly noted Binary was
unaffected by *its* fix (the ComputeThreshold polar-angle bug), since
this is a separate commit.
Adds .1.nrrd alternate baselines (ImageCompare picks best-RMS across
the name.N.nrrd series) so the defaults/longer tests pass against both
pre- and post-fix ITK, without touching the primary baselines. Data
staged in SimpleITK/SimpleITKExternalData#54.
Verified the harness output is:
- byte-identical (sha512) across two separate runs
- pixel-identical between gzip-compressed and uncompressed NRRD
encodings
- pixel-identical across C++, Python, and Java bindings
All BasicFilters/Python/Java tests pass locally against ITK main.
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.
Alternate baselines for SimpleITK's
BinaryMinMaxCurvatureFlowImageFilterdefaults/longertests, needed for InsightSoftwareConsortium/ITK#6575 item B8 (4f0b3147be2, "Decouple CurvatureFlowFunction derivative scale from radius" -- a sibling fix to the one behind SimpleITK#2627, different commit).Test output written by
ImageCompare(center z-slice, 64x64x1 float NRRD), verified:bb3f7119...fab7b=defaults,b25aab92...d4082=longer.