[MINC-users] mincbbox on volume with a scale of 0

Dany Chagnon dany at biospective.com
Thu Nov 26 08:40:24 EST 2020


Dear MINC users,

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

Best regards,
Dany


More information about the MINC-users mailing list