[Neuroimaging] Nibabel. Loading HCP data.

Jesus-Omar Ocegueda-Gonzalez jomaroceguedag at gmail.com
Wed Jul 8 23:45:50 CEST 2015


I get the following:
In [17]: dwi_nib.shape
Out[17]: (140, 140, 96, 552)
In [18]: dwi_nib.get_data_dtype()
Out[18]: dtype('<f4')
In [19]: np.prod(dwi_nib.shape) * 4
Out[19]: -140394496
In [20]: np.int64(np.prod(dwi_nib.shape)) * 4
Out[20]: 4154572800

On Wed, Jul 8, 2015 at 4:41 PM, Matthew Brett <matthew.brett at gmail.com>
wrote:

> On Wed, Jul 8, 2015 at 9:38 PM, Jesus-Omar Ocegueda-Gonzalez
> <jomaroceguedag at gmail.com> wrote:
> > Hello,
> > I am trying to load one of the dwMRI volumes from HCP (mgh_1010:
> > http://www.humanconnectome.org/data/), which is large: (140, 140, 96,
> 552).
> > This causes an overflow when computing the size in bytes (this happens
> when
> > calling get_data()):
> >
> > volumeutils.py:507: RuntimeWarning: overflow encountered in long_scalars
> >
> > is this a known limitation of nibabel when loading large volumes?
>
> That is odd - what do you get for:
>
> img.shape
> img.get_data_dtype()
>
> Cheers,
>
> Matthew
> _______________________________________________
> Neuroimaging mailing list
> Neuroimaging at python.org
> https://mail.python.org/mailman/listinfo/neuroimaging
>



-- 
"Cada quien es dueño de lo que calla y esclavo de lo que dice"
-Proverbio chino.
"We all are owners of what we keep silent and slaves of what we say"
-Chinese proverb.

http://www.cimat.mx/~omar
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/neuroimaging/attachments/20150708/d77f1b1b/attachment.html>


More information about the Neuroimaging mailing list