[MINC-users] multi-input output type/range

Alex Zijdenbos zijdenbos at gmail.com
Mon Nov 19 10:31:48 EST 2012


Hello all,

I regularly run into issues with some of the minc tools, specifically
mincmath and minccalc, due to the fact that by default, they inherit
the data type of the first volume (only). For example, something like
this:

minccalc -expression "A[0] * A[1]" <mask.mnc> <vol.mnc> <masked.mnc>

will produce very expected results if <mask.mnc> is "unsigned byte 0
1"; or even when it is "unsigned byte 0 255". Of course you can choose
the output type and range that you like to see; but that implies being
explicitly aware of the data type of the input volumes to begin with
which is not always a given, especially not when this is buried deep
into a script.

I think it would make sense to have multi-input minc tools compute the
"largest" data type/range among the input volumes, rather than just
inheriting from the first volume. That wouldn't be perfect, but it
would reduce quantization errors in quite a few cases.

Thoughts?

-- A


More information about the MINC-users mailing list