This didn't used to crash, but after compiling minc-toolkit-v2 with gcc-4.9.1 produces a segfault. The problem seems to be here: if the dimname isn't standard, index doesn't seem to get updated, hence will be an incorrect (possibly uninitialized) value ...
In the Pyminc test suite (such as it is) we generate a random MINC file roughly as follows:
rawtominc /tmp/test_vector.mnc -input /dev/urandom 3 100 150 125 -dimorder vector_dimension,xspace,yspace,zspace
This didn't used to crash, but after compiling
minc-toolkit-v2
with gcc-4.9.1 produces a segfault. The problem seems to be here: if the dimname isn't standard,index
doesn't seem to get updated, hence will be an incorrect (possibly uninitialized) value ...