Skip to content

BUG: Fix GaussianInterpolateImageFunction with streaming#1202

Merged
thewtex merged 1 commit intoInsightSoftwareConsortium:masterfrom
maekclena:fix_gaussian_streaming
Aug 28, 2019
Merged

BUG: Fix GaussianInterpolateImageFunction with streaming#1202
thewtex merged 1 commit intoInsightSoftwareConsortium:masterfrom
maekclena:fix_gaussian_streaming

Conversation

@maekclena
Copy link
Copy Markdown
Contributor

Fixes #1011.
The bounding box needs to be computed on the whole image.

PR Checklist

Copy link
Copy Markdown
Member

@thewtex thewtex left a comment

Choose a reason for hiding this comment

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

@maekclena thanks!

@romangrothausmann could you please test?

Copy link
Copy Markdown
Member

@dzenanz dzenanz left a comment

Choose a reason for hiding this comment

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

I wonder whether this fixes it. I have a feeling that I tried things like this.

@romangrothausmann
Copy link
Copy Markdown
Member

Tests running: https://gitlab.com/romangrothausmann/ITK-CLIs/pipelines/78851399

@thewtex
Copy link
Copy Markdown
Member

thewtex commented Aug 28, 2019

Tests running: https://gitlab.com/romangrothausmann/ITK-CLIs/pipelines/78851399

Tests pass.

@thewtex thewtex merged commit 8c19158 into InsightSoftwareConsortium:master Aug 28, 2019
hjmjohnson added a commit to romangrothausmann/ITK that referenced this pull request May 4, 2026
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>
hjmjohnson pushed a commit to hjmjohnson/ITK that referenced this pull request May 6, 2026
…gaussian_streaming

BUG: Fix GaussianInterpolateImageFunction with streaming
hjmjohnson added a commit to blowekamp/ITK that referenced this pull request May 6, 2026
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>
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.

Wrong output when resampling with Gaussian interpolation when employing streaming

4 participants