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

Volumes with a single value incorrectly read #111

Open
d-chagnon opened this issue Nov 26, 2020 · 1 comment
Open

Volumes with a single value incorrectly read #111

d-chagnon opened this issue Nov 26, 2020 · 1 comment

Comments

@d-chagnon
Copy link

Hello,
Having a volume with a single real value, but a range of possible voxel values can't be read correctly because the real_value_scale is not allowed to have a value of 0 here. A way to reproduce that issue is to, for example, create a volume using:
make_phantom -signed -short -voxel_range -10 100 <template_volume>
minccalc -expression '1' <template_volume> <test_volume>
which yields a test_volume filled with 1s, but with a voxel values that can range from -10 to 100. Calling mincbbox on that volume returns "X X X -inf -inf -inf" where X is 1.8E308.
As far as I can tell solving this would only require removing the lines I linked from set_volume_real_range, but I don't know if those were added to fix something else.

@gdevenyi
Copy link
Contributor

Sadly, the commit that added this code was mixed in with some other code and the message doesn't give any hints as to why:
7c22f97

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

No branches or pull requests

2 participants