ENH: Streaming-equivalence GTest for GaussianInterpolateImageFunction#1012
Conversation
|
Since all tests succeed, it seem that just using ITK/Modules/Filtering/ImageGrid/test/itkResampleImageTest7.cxx Lines 135 to 137 in 0b58825 |
|
@romangrothausmann examining what the actual values are? The |
|
Errors:
|
Run the program under debugger and examine the values.
|
|
@romangrothausmann can you rebase this PR on current master? |
|
That should be possible, I'll give it a try. |
3f5fd25 to
26c91e7
Compare
|
3D version without |
|
Oddly, on my local PC ITK/Modules/Filtering/ImageGrid/test/itkResampleImageTest8.cxx Lines 133 to 138 in 452bba1 @dzenanz How to "Run the program under debugger" with ctest?
|
|
|
|
This issue has been automatically marked as stale because it has not had recent activity. Thank you for your contributions. |
26c91e7 to
68d3c56
Compare
|
Hi @romangrothausmann — I hope you don't mind, but I took the liberty of force-pushing a single commit to this branch to revive your dormant draft as a regression test for #1011. The original three commits have been replaced (your authorship is preserved via cc @dzenanz — keeping this PR draft pending CI; happy to flip to ready-for-review once CI is green if you'd like. If you'd prefer a different attribution arrangement or a separate PR from my fork, just say the word and I'll redo it. |
This comment was marked as resolved.
This comment was marked as resolved.
|
Let's give @romangrothausmann a few days to review this. |
Regression guard for issue InsightSoftwareConsortium#1011 (fixed by InsightSoftwareConsortium#1202): a Gaussian-interpolated ResampleImageFilter must produce the same output whether or not its downstream is streamed. Reverts of the bounding-box fix (BufferedRegion vs LargestPossibleRegion) reproduce a 28672 / 32768-pixel divergence with NaN output values. A CastImageFilter is inserted upstream of the resampler so the bug surfaces; an in-memory image's BufferedRegion never shrinks under streaming, which is why the abandoned WIP draft InsightSoftwareConsortium#1012 no longer reproduced. Supersedes InsightSoftwareConsortium#1012 by @romangrothausmann; uses the modern GTest harness and fits as a TEST block in itkResampleImageFilterGTest. Co-Authored-By: Roman Grothausmann <roman.grothausmann@mh-hannover.de>
68d3c56 to
4002ed5
Compare
|
Folded the two P2 style nits from greptile's review into the existing commit (autosquash, force-push to refresh CI). Both are pure stylistic improvements — no logic change, test still passes locally.
@romangrothausmann — the patchset is still a single commit so the diff you'll see vs. cc @dzenanz — taking the courtesy window into account; this just preempts the polish so Roman gets the final form on first read. |
Regression guard for issue InsightSoftwareConsortium#1011 (fixed by InsightSoftwareConsortium#1202): a Gaussian-interpolated ResampleImageFilter must produce the same output whether or not its downstream is streamed. Reverts of the bounding-box fix (BufferedRegion vs LargestPossibleRegion) reproduce a 28672 / 32768-pixel divergence with NaN output values. A CastImageFilter is inserted upstream of the resampler so the bug surfaces; an in-memory image's BufferedRegion never shrinks under streaming, which is why the abandoned WIP draft InsightSoftwareConsortium#1012 no longer reproduced. Supersedes InsightSoftwareConsortium#1012 by @romangrothausmann; uses the modern GTest harness and fits as a TEST block in itkResampleImageFilterGTest. Co-Authored-By: Roman Grothausmann <roman.grothausmann@mh-hannover.de>
Adds a GTest regression guard for issue #1011, which was fixed by #1202:
ResampleImageFilter+GaussianInterpolateImageFunctionmust produce identical output whether or not its downstream is streamed.Force-pushed to revive this dormant draft from 2019. Original three commits superseded by a single modern GTest TEST block; authorship preserved via
Co-Authored-By:trailer.Why the original draft no longer reproduced
The pipeline in the original draft fed the resampler an in-memory
Imageobject directly. An in-memory image'sBufferedRegionalways equals itsLargestPossibleRegionregardless of downstreamRequestedRegionpropagation, so the bug surface inGaussianInterpolateImageFunction::ComputeBoundingBox(which read fromBufferedRegionpre-#1202) never triggered.The new TEST inserts a
CastImageFilterupstream of the resampler — a streaming-aware no-op that produces a chunkedBufferedRegionper stream division. With the fix in place: 0 / 32 768 pixel diffs. With #1202 reverted locally: 28 672 / 32 768 pixels diverge, output contains NaN. Strong regression guard.Test summary
TESTblock appended toModules/Filtering/ImageGrid/test/itkResampleImageFilterGTest.cxx(no new files)Scale(0.9), GaussianInterp σ=1, α=1Image → CastImageFilter → ResampleImageFilter → StreamingImageFilterEXPECT_FLOAT_EQ