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

real voxel range in mincbbox #130

Open
vfonov opened this issue Nov 26, 2020 · 0 comments
Open

real voxel range in mincbbox #130

vfonov opened this issue Nov 26, 2020 · 0 comments

Comments

@vfonov
Copy link
Member

vfonov commented Nov 26, 2020

From Dany:
There seems to be an issue with mincbbox on volumes with a single value,
but with a range of possible voxel values. To reproduce that issue, you can
create a volume with:
1- make_phantom -signed -short -voxel_range -10 100 <template_volume>
2- minccalc -expression '1' <template_volume> <test_volume>
That yields a volume filled with 1s, but with voxel that could range from
-10 to 100. Calling mincbbox on that volume returns "X X X -inf -inf -inf"
where X is 1.8E308. Repeating those same steps, but filling the volume with
values >10 would not have this issue.

As far as I can tell this is because the scale is forced to take a non-zero
value here:
https://github.com/BIC-MNI/libminc/blob/master/volume_io/Volumes/volumes.c#L2537-L2543

I can see two main ways to see that issue:

  1. allow the scale to be 0 in libminc
  2. rescale the voxel range in minccalc
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

1 participant