BIC-MNI / libminc

libminc is the core library and API of the MINC toolkit
Other
19 stars 29 forks source link

MINC does not properly interpret NaN, Inf #82

Open vfonov opened 7 years ago

vfonov commented 7 years ago

test_nan.mnc is a 10x10x10 voxel volume with regular values except for the following: 4,4,3 : Inf 4,4,4 : -Inf 4,4,5: NaN

Running following snippets:

minccalc -express 'isnan(A[0])' test_nan.mnc test_nan_nan.mnc
mincstats -sum test_nan_nan.mnc

Produces 2

Running following snippets:

mincreshape -short test_nan.mnc test_nan_short.mnc
minccalc -express 'isnan(A[0])' test_nan_short.mnc test_nan_short_nan.mnc
mincstats -sum test_nan_short_nan.mnc

Produces 0

minccalc relies on voxel_loop to work with the volume.

test_nan.mnc.zip