[Neuroimaging] Nibabel API change - always read as float
Nate Vack
njvack at wisc.edu
Tue Jul 7 01:24:51 CEST 2015
On Mon, Jul 6, 2015 at 4:30 PM Matthew Brett <matthew.brett at gmail.com>
wrote:
> I don't think we think things like sum or plus are advanced numpy
> operations. There's a reason this was in the first or second class in
> our course.
This is the argument that brings me around. Loading images and doing sums
and averages (or running a linear model) should not be "advanced"
operations -- they're actually very simple and should be introductory
operations. One of the things nibabel can really help with is demystifying
imaging processing and analysis.
Anyhow, *I've* been bitten by integer overflow and clamping problems in
nifti processing. It's super easy to forget about for a second.
In a lot of ways, casting nifti images to float by default is analogous to
python changing / to floating-point division in py3.
+1 on adding dtype to get_data(), defaulting it to np.float64, and raising
an exception if you do something that will hork up the data conversion.
-n
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/neuroimaging/attachments/20150706/bc62c56d/attachment.html>
More information about the Neuroimaging
mailing list