johncolby / along-tract-stats

A MATLAB toolbox for performing along-tract analysis of diffusion tensor imaging (DTI) MRI tractography data.
http://github.com/johncolby/along-tract-stats/wiki
GNU General Public License v3.0
41 stars 15 forks source link

trk_read support for unknown number of tracks #4

Closed jadrian closed 12 years ago

jadrian commented 12 years ago

Hi John-

The trackvis documentation at http://trackvis.org/docs/?subsect=fileformat indicates that the n_count value in the .trk header can be zero when (for some reason) the number of tracks in the file is not stored in the header. In this case, you just have to parse the body of the file in an online fashion, looking for an eof. I've edited trk_read.m to support this case. Would you consider merging this change into the master?

Thanks, Jadrian Miles jadrian@cs.brown.edu jadrian.org

johncolby commented 12 years ago

Hi Jadrian, This looks great. I will merge it in right now. Thanks! -John