[Neuroimaging] Nibabel API change - always read as float

Alexis Roche alexis.roche at gmail.com
Tue Jul 21 00:42:05 CEST 2015


> Can you think of a common use of an arbitrary dtype here?  I mean
> dtype not equal to the on-disk dtype or the scaled dtype?   It seems
> as if that use might be rather specialized - could it be done in the
> user code that starts with the code above?
>

Right. I can think of the following cases:
* a mask image encoded in int16 on disk, but you want an array of booleans
in memory (nifti does not support boolean format)
* an image of positive-valued MR parameters encoded in int, but you want
unsigned int in memory

Of course, that could be done via the 'dataobj' attribute, which requires
advanced knowledge of nibabel I think. I don't think this is very
specialized usage.

Alexis
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/neuroimaging/attachments/20150721/c53cb154/attachment.html>


More information about the Neuroimaging mailing list