I've found an 
example<https://mail.python.org/pipermail/neuroimaging/2015-September/000488.html>
 how to read trk file with nibabel:

> import nibabel as nib
>
> track_gen, hdr = nib.trackvis.read(trk_file, as_generator=True)
>
> tracks = []
> while True:
>     try:
>         track = next(track_gen)
>     except (StopIteration, TypeError):
>         break
>     tracks.append(track)

________________________________
From: freesurfer-boun...@nmr.mgh.harvard.edu 
[freesurfer-boun...@nmr.mgh.harvard.edu] on behalf of Peled, Noam 
[npe...@mgh.harvard.edu]
Sent: Tuesday, February 16, 2016 2:16 PM
To: freesurfer@nmr.mgh.harvard.edu
Subject: [Freesurfer] path.pd.trk format

Hello,
I've noticed that in tracula 5.2 there's also a path.pd.trk file in the output 
directory.
How can I read this file? I would like to read the actual splines and not the 
probabilistic distribution in path.pd.nii.gz.

Thanks,
Noam Peled
_______________________________________________
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer


The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.

Reply via email to