Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

itkThresholdImageFilter result differs when employing streaming #586

Closed
romangrothausmann opened this Issue Mar 14, 2019 · 2 comments

Comments

Projects
None yet
3 participants
@romangrothausmann
Copy link
Contributor

romangrothausmann commented Mar 14, 2019

Description

Results of itkThresholdImageFilter differ significantly with and without streaming for same input.

Steps to Reproduce

Tested with https://github.com/romangrothausmann/ITK-CLIs/blob/556423bf4c04c4bcd60a3bd420bb3df0c7d2fe65/thresh-erase.cxx
and
https://github.com/romangrothausmann/ITK-CLIs/blob/556423bf4c04c4bcd60a3bd420bb3df0c7d2fe65/.gitlab-ci.yml#L81-L89

Expected behavior

Independent of streaming, both version thresh-erase and thresh-erase_SDI should lead to the same result if the same input file is used.

Actual behavior

Result of thresh-erase is correct (Min: -0.499998 Max: 0.499997): https://gitlab.com/romangrothausmann/ITK-CLIs/-/jobs/177668140
Result of thresh-erase_SDI is wrong (Min: 0 Max: 255): https://gitlab.com/romangrothausmann/ITK-CLIs/-/jobs/177668142

Reproducibility

100%

Versions

ITK master (b288412) (https://github.com/romangrothausmann/ITK-CLIs/blob/556423bf4c04c4bcd60a3bd420bb3df0c7d2fe65/Dockerfile#L23)

Environment

ubuntu:16.04: https://github.com/romangrothausmann/ITK-CLIs/blob/556423bf4c04c4bcd60a3bd420bb3df0c7d2fe65/Dockerfile

@thewtex thewtex added this to the ITK v5.0rc02 milestone Mar 14, 2019

@maekclena

This comment has been minimized.

Copy link
Contributor

maekclena commented Mar 19, 2019

In your CMakeLists.txt, you use thresh-glob.cxx as the source for the thresh-erase_SDI executable, which I imagine is a copy-paste mistake. Since it uses a BinaryThresholdImageFilter it explains why the output is binary.

romangrothausmann added a commit to romangrothausmann/ITK-CLIs that referenced this issue Mar 19, 2019

@romangrothausmann

This comment has been minimized.

Copy link
Contributor Author

romangrothausmann commented Mar 19, 2019

Many thanks @maekclena for taking this close look, it was a copy-paste mistake, output as expected now:
https://gitlab.com/romangrothausmann/ITK-CLIs/-/jobs/180281298

romangrothausmann added a commit to romangrothausmann/ITK-CLIs that referenced this issue Mar 21, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.