Add BasicFilters_InverseDisplacementFieldImageFilter_2d.1.nrrd - #53
Merged
blowekamp merged 1 commit intoAug 28, 2026
Merged
Conversation
Merged
3 tasks
blowekamp
marked this pull request as ready for review
August 28, 2026 12:40
blowekamp
added a commit
to SimpleITK/SimpleITK
that referenced
this pull request
Aug 29, 2026
…D fix
ITK commit d6558919459a ("BUG: Center subsampled lattice in
InverseDisplacementFieldImageFilter", InsightSoftwareConsortium/ITK#6582,
follow-up to #6577, item B32 of #6575) fixes PrepareKernelBaseSpline()
placing the thin-plate-spline landmark lattice at fine index 0 with no
low-side margin, leaving up to SubsamplingFactor-1 unsampled voxels on
the high side of every axis. The fix starts the lattice at fine index
(SubsamplingFactor-1)/2 instead, balancing the margins.
SimpleITK's 2d test uses the default SubsamplingFactor of 16 on a
100x100 image, so the landmark lattice has only 6 points per axis;
before the fix they sat at indices 0,16,...,80 (19-pixel margin on the
high edge, 0 on the low edge), after the fix at 7,23,...,87 (balanced
~7/12 margins). With that few landmarks a thin-plate spline is very
sensitive to the shift: RMS difference between old and new output is
0.53 (max pixel difference 1.70), against the test's 0.001 tolerance.
Ruled out the companion direction-propagation fix (3acbd4d95d2, same
issue #6575 item B32) as the cause: the test's input
(Testing/Data/Input/displacement.mha) has identity direction
(TransformMatrix = 1 0 0 1), so that fix is a no-op here.
Add the post-fix output as a .1.nrrd alternate baseline so
BasicFilters.InverseDisplacementFieldImageFilter and
Python.InverseDisplacementFieldImageFilter pass with both pre- and
post-fix ITK. Generated via the same mechanism as other alternates in
this series: the actual ImageCompare harness output, confirmed
byte-identical across two independent runs, and numerically identical
(max abs diff 0.0) between the C++ and Python bindings modulo NRRD
encoding.
Binary data uploaded via a companion draft PR:
SimpleITK/SimpleITKExternalData#53.
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 baseline for SimpleITK's
InverseDisplacementFieldImageFilter2D test, needed for InsightSoftwareConsortium/ITK#6582 (lattice-centering fix inPrepareKernelBaseSpline()). Test output written byImageCompare, verified byte-identical across two runs.