[Neuroimaging] Example code for NiBabel

Simon Rushton RushtonSK at cardiff.ac.uk
Tue Apr 26 10:33:21 EDT 2016

Thanks all for the help!

I found the solution.  The problem wasn’t with Nibabel but my (lack of) familiarity with Python.  I’ve learnt that the meaning of “=“ depends on what is being assigned..  


> On 21 Apr 2016, at 19:12, Matthew Brett <matthew.brett at gmail.com> wrote:
> Hi,
> On Thu, Apr 21, 2016 at 9:36 AM, Simon Rushton <RushtonSK at cardiff.ac.uk> wrote:
>> Hi All
>> I’m new to doing analysis of fmri data using Python and NiBabel.  Could
>> someone point me to some very simple code to get me started.  I’m thinking
>> of a program just a few lines long that loads a 4D NIfTI file, thresholds
>> each of the individual 3D volumes, and then saves the result out as a new 4D
>> NIfTI file.  Some simple code like that would get me past all things like
>> accessing data via memory pointers etc so I can start learning rather than
>> just scratching my head!  And yes, I know that most of this is in the
>> NiBabel documentation but I’m obviously not putting the snippets together
>> correctly as my code doesn’t work…
> Does this doc help?  http://nipy.org/nibabel/gettingstarted.html
> Can you post what you have, and the error you are getting?
> Thanks a lot,
> Matthew
> _______________________________________________
> Neuroimaging mailing list
> Neuroimaging at python.org
> https://mail.python.org/mailman/listinfo/neuroimaging

More information about the Neuroimaging mailing list