# Co-ordinates of each voxel in the streamline using tcksample

**URL:** https://community.mrtrix.org/t/co-ordinates-of-each-voxel-in-the-streamline-using-tcksample/1202
**Category:** Uncategorized
**Created:** [September 28, 2017, 7:49pm UTC](https://community.mrtrix.org/t/co-ordinates-of-each-voxel-in-the-streamline-using-tcksample/1202 "2017-09-28T19:49:40Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![sourajit78](https://community.mrtrix.org/letter_avatar_proxy/v4/letter/s/b487fb/32.png) [@sourajit78](https://community.mrtrix.org/u/sourajit78)
#### Post date: [September 28, 2017, 7:49pm UTC](https://community.mrtrix.org/t/co-ordinates-of-each-voxel-in-the-streamline-using-tcksample/1202/1 "2017-09-28T19:49:40Z")

</div>

Dear all,  
I am using tcksample where each point along a track under the underlying FA image is represented as ASCII file , with all values for each track is on the same line of the ASCII file. I would also like to know that apart from getting value for FA for each point along the track how could I also get (x,y,z) co-ordinates of each point along the tracks.

So for each streamline I get rows for x,y,z co-ordinate and one for FA measure for each point.

tcksample in the MRtrix manual page doesn’t have those options.

Please help me out in this.

Kind regards  
Sourajit

---

<div class="post-metadata">

### Author: ![jdtournier](https://community.mrtrix.org/user_avatar/community.mrtrix.org/jdtournier/32/2594_2.png) [@jdtournier](https://community.mrtrix.org/u/jdtournier)
#### Post date: [September 29, 2017, 11:20am UTC](https://community.mrtrix.org/t/co-ordinates-of-each-voxel-in-the-streamline-using-tcksample/1202/2 "2017-09-29T11:20:34Z")

</div>

Your simplest option here is to use `tckconvert` to output the streamlines in ASCII (text) format. As long as you use the same tck file as you did for `tcksample`, that would give you a text file per streamline, with X Y Z coordinates per point on each line. The files should be numbered according to the corresponding lines in the file with the sampled values. Check [the docs](http://mrtrix.readthedocs.io/en/latest/reference/commands/tckconvert.html) for details on how to do this.
