[Neuroimaging] nibabel.trackvis.read error

C.D. Langen c.langen at erasmusmc.nl
Fri Sep 4 13:27:02 CEST 2015


Hi Matthew,

Thank you for your quick reply. Below are links to two datasets, one 
that failed to be read by nib.trackvis, and one that succeeded. Both can 
be viewed in Trackvis:

https://dl.dropboxusercontent.com/u/57089115/fail.trk
https://dl.dropboxusercontent.com/u/57089115/succeed.trk

Best,
Carolyn

On 03-09-15 19:31, Matthew Brett wrote:
> 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
> _______________________________________________
> Neuroimaging mailing list
> Neuroimaging at python.org
> https://mail.python.org/mailman/listinfo/neuroimaging


More information about the Neuroimaging mailing list