[MINC-users] minccalc bug

Alex Zijdenbos zijdenbos at gmail.com
Fri Jul 4 14:00:06 EDT 2014


This one is probably for AJ; I stumbled across some really bizarre
behaviour of minccalc:

minccalc -expression 'x=0; y=A[1]; if (y < 2) x=y; y' \
/usr/local/bic/share/mni-models/average305_t1_tal_lin_mask.mnc \
/usr/local/bic/share/mni-models/average305_t1_tal_lin.mnc \
y.mnc

I would have imagined that the output file y.mnc would be the same as the
second input file (A[1]), as y is never assigned to after y=A[1]; but that
is not the case. The 'if' condition combined with the x=y assignment,
somehow modifies y (rather significantly). If you play with the
conditional, the assignment, or for instance use y=A[0], things may work as
expected; but in the invocation above, it goes horribly wrong.

-- A


More information about the MINC-users mailing list