Skip to content

Add BasicFilters_BinaryMinMaxCurvatureFlowImageFilter alternate baselines - #54

Merged
blowekamp merged 1 commit into
SimpleITK:mainfrom
blowekamp:add-binaryminmaxcurvatureflow-baselines
Aug 28, 2026
Merged

Add BasicFilters_BinaryMinMaxCurvatureFlowImageFilter alternate baselines#54
blowekamp merged 1 commit into
SimpleITK:mainfrom
blowekamp:add-binaryminmaxcurvatureflow-baselines

Conversation

@blowekamp

Copy link
Copy Markdown
Member

Alternate baselines for SimpleITK's BinaryMinMaxCurvatureFlowImageFilter defaults/longer tests, 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:

  • byte-identical (sha512) across two separate runs
  • pixel-identical between gzip-compressed and uncompressed NRRD encodings
  • pixel-identical across C++, Python, and Java bindings

bb3f7119...fab7b = defaults, b25aab92...d4082 = longer.

@blowekamp
blowekamp marked this pull request as ready for review August 28, 2026 20:41
@blowekamp
blowekamp merged commit 364c326 into SimpleITK:main Aug 28, 2026
1 check passed
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.
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.

1 participant