[MINC-users] Building minccmp

Andrew Janke a.janke at gmail.com
Tue Feb 25 16:23:47 EST 2014


Hi Andrew,

> I've been having trouble with minccmp reporting 'inf' and 'nan' on some
> float volumes that I've been working with.
>
> It turns out minccmp doesn't deal correctly with NaN inputs values. I'm
> wondering what would be sensible behaviour to expect from minccmp.
> When corresponding voxels are both NaN, the obvious choices would
> be either exclusion, or being treated as a constant (zero, or
> user-specified). When one corresponding voxel is NaN, and the other
> real, probably only exclusion makes sense.

minccmp was something I wrote one afternoon in order to scratch an
itch I had, I really never got the chance to finish it off with the
types of special case data handling you are talking about. I also had
plans for a whole heap of other comparison functions but by then the
itch was scratched...

So, by all means yes, NaN handling is something it should do. My
personal preference for this would be to mirror the way this is done
in mincmath:

   https://github.com/BIC-MNI/minc-tools/blob/master/progs/mincmath/mincmath.c#L783

This would include mirroring the C/L arguments that mincmath uses to
avoid user confusion (302-314):

   https://github.com/BIC-MNI/minc-tools/blob/master/progs/mincmath/mincmath.c#L302

Thanks


a


More information about the MINC-users mailing list