Skip to content

Volumes with a single value incorrectly read #111

@d-chagnon

Description

@d-chagnon

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions