BIC-MNI / minc-tools

Basic minc-tools from former minc repository
Other
30 stars 25 forks source link

mincreshape doesn't handle minc files with double/float storage type correctly when image_range is not specified #59

Open vfonov opened 7 years ago

vfonov commented 7 years ago

With nl_subject04_grid_0.mnc being the output of minctracc in nonlinear mode:

file: nl_subject04_grid_0.mnc
image: signed__ double -1.7976931348623157081e+308 to 1.7976931348623157081e+308
image dimensions: vector_dimension zspace yspace xspace
    dimension name         length         step        start
    --------------         ------         ----        -----
    vector_dimension            3      unknown      unknown
    zspace                    166            2         -163
    yspace                    166            2         -183
    xspace                    144            2         -143

> mincstats -min -max nl_subject04_grid_0.mnc 
*** mincstats - reported min (-11.2532) doesn't equal header (-1.79769e+308)
*** mincstats - reported max (8.93648) doesn't equal header (1.79769e+308)
Min:               -11.25319685
Max:               8.936475648

Running mincreshape, 1st case (doesn't work):

> mincstats -min -max nl_subject04_grid_0_short_1.mnc
*** mincstats - reported min (1.79769e+308) doesn't equal header (-1.79769e+308)
*** mincstats - reported max (-1.79769e+308) doesn't equal header (1.79769e+308)
Min:               1.797693135e+308
Max:               -1.797693135e+308

Running mincrshape, 2nd case: setting arbitrary limited image range (works):

> mincstats -min -max nl_subject04_grid_0_short_2.mnc
*** mincstats - reported min (-11.2535) doesn't equal header (-100)
*** mincstats - reported max (8.93721) doesn't equal header (100)
Min:               -11.25352865
Max:               8.937209125

Running mincreshape with -normalize (doesn't work) :

> mincstats -min -max nl_subject04_grid_0_short_3.mnc 
*** mincstats - reported min (1.79769e+308) doesn't equal header (-1.79769e+308)
*** mincstats - reported max (-1.79769e+308) doesn't equal header (1.79769e+308)
Min:               1.797693135e+308
Max:               -1.797693135e+308