[Neuroimaging] nibabel.trackvis.read error

Matthew Brett matthew.brett at gmail.com
Thu Sep 3 19:31:36 CEST 2015


Hi,

On Thu, Sep 3, 2015 at 10:22 AM, C.D. Langen <c.langen at erasmusmc.nl> wrote:
> Greetings,
>
> When I try to run the following line of code:
>
> streams, hdr = nib.trackvis.read(os.path.join(subjDir, 'dti.trk'),
> points_space='voxel')
>
> I get the following error, but only for a small subset of subjects:
>
>    File
> "/cm/shared/apps/python/2.7.6/lib/python2.7/site-packages/nibabel/trackvis.py",
> line 223, in read
>      streamlines = list(streamlines)
>    File
> "/cm/shared/apps/python/2.7.6/lib/python2.7/site-packages/nibabel/trackvis.py",
> line 202, in track_gen
>      buffer = pts_str)
> TypeError: buffer is too small for requested array
>
>
> Someone else had a similar error
> (http://mail.scipy.org/pipermail/nipy-devel/2012-March/007272.html)
> which they resolved by using nibabel from github. I tried this, but got
> the same error.
>
> All subjects' trackvis files were produced in exactly the same way using
> Trackvis, so I am not sure why only a few subjects fail while others
> succeed. Any ideas?
>
> Thank you in advance for your help in resolving this issue.

Thanks for the report - would you mind put the file online somewhere
so we can have a look?

Best,

Matthew


More information about the Neuroimaging mailing list