[Neuroimaging] Nibabel API change - always read as float

Matthew Brett matthew.brett at gmail.com
Mon Jul 20 13:07:46 CEST 2015


Oops.

On Mon, Jul 20, 2015 at 11:59 AM, Matthew Brett <matthew.brett at gmail.com> wrote:
> On Mon, Jul 20, 2015 at 11:46 AM, Alexis Roche <alexis.roche at gmail.com> wrote:
>> Hi Matthew,
>>
>> I think that, if the data is int on disk with scale factors are (0,1), then
>> the intended dtype is more likely to be int than float - in the sense that
>> there is no obvious reason for casting the data to float, but it's more
>> efficient to keep it as int.
>
> It's possible that is more likely, but I doubt that people or software
> have that intention when setting default scalefactors.  For example,
> SPM always loads the data as float.
>
> But - even if it is more likely, that would not be enough to make this
> a common source of error.

should be 'would not be enough to prevent this being a common source of error'.

> It would have to be overwhelmingly the
> case, such that it should be considered a bug if software writes an
> image with default scalefactors, when they intend the image to be
> loaded as float.  Given that is not in the standard, or standard
> practice, I don't think we can (any longer) rely on that.

Cheers,

Matthew


More information about the Neuroimaging mailing list