[Neuroimaging] Nibabel API change - always read as float

Brendan Moloney moloney at ohsu.edu
Tue Jul 7 03:23:06 CEST 2015


> No: dtype=float by default will create other serious silent failures,
> like the fact that round-trip save/load will change the data. This is
> pretty bad behavior. Certainly not one that I would expect.

I don't think this is true, provided you use the same Nifti header or 
create an appropriate new header. The situation is the same now if the 
scale factors are set.

> This has implication on data processing: density estimation should be
> done differently on a set of continuous values than on a set of integers
> (histogram vs kernel smoothing).

This goes both ways. If you wrote some code like this that assumes you 
have integer values it will fail mysteriously when the file has the scale 
factors set.  


More information about the Neuroimaging mailing list