<meta http-equiv="content-type" content="text/html; charset=utf-8"><div class="gmail_quote"><div class="gmail_quote"><div>Hi Luis,</div><div class="im"><div><br></div><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
I'm trying to do a study with the streamlines produced by mrtrix.<br><br>My idea is to create an image similar to the one produced by<br>tracks2prob, but I have bumped into some problems.<br><br>I have created a function similar to tracks2prob into matlab. The idea<br>
is really simple take the coordinates provided by streamtrack, and<br>load them into matlab (no problem here). Afterwards transform these<br>coordinates into voxel space, by using the transform matrix in the dwi<br>image, I round up the values and have the correct voxel coordinates.<br>
But here I get a similar, but not identical, image as the one provided<br>by tracks2prob, I have checked the source code and it seems that this<br>process is not so straightforward, because some interpolation is made<br>
along the way.<br>
<br>Could you explain the differences between my process and your process?<br>Is my idea correct or interpolation is a must fot the image to be<br>correct?<br></blockquote><div><br></div></div><div>It sounds like you've got the right idea. I expect the differences you see are minimal? If not, then it could be due to the interpolation aspects. Basically, the interpolation that takes places is a resampling of the tracks, and by default it only happens if the step size is larger than half the voxel size. This is to avoid voxels being missed due to the sampling of the tracks being too coarse. You can check if this happening in your case by running the command with the "-info" option. It should then display a line stating what interpolation factor is actually being used (1 is no interpolation).</div>
<div><br></div><div>If you weren't using interpolation, then there shouldn't be any difference between your output and tracks2prob's, apart potentially from slight differences caused by rounding errors. MRtrix operates on 32-bit floats, whereas I'd expect Matlab to operate on 64-bit doubles. This may cause slight differences which would be enough for some of the points to be assigned to different voxels. So basically, if the differences are limited to the odd voxel here and there, that's probably what the problem is. Otherwise, I'm not too sure...</div>
<div class="im"><div> </div><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
Is there a way of knowing which tracks are going through which voxel?<br></blockquote></div><div><div><br></div><div>If you're asking, is there a command in MRtrix to do this, the answer is no, there is no such application. </div>
</div><div class="im"><div> </div><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
Or wich voxels do a track pass trough?<br></blockquote><div><br></div></div><div>To find out which voxels a track pass through can be done using tracks2prob, if you can generate a track file with just the track you're interested in. You might be able to do this with a combination of "track_info -ascii" and "import_tracks".</div>
<div class="im"><div> </div><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
One of the parts of my study is related not only to the density of<br>tracks in a voxel, but with some scalars that will weight this density<br>or the contrary these scalar will be weighted by the track density.<br>i.e. Something similar to "The average pathlength map: a diffusion MRI<br>
tractography-derived index for studying brain pathology. Pannek et<br>al." But for this purpose if I'm not wrong I need to know which tracks<br>pass through which voxel in order to calculate the average length of<br>
the tracks that goes through a given voxel.</blockquote><div><br></div></div><div>We've recently submitted a manuscript on a similar topic. You're right, to do this you'll need to know which tracks go through each voxel. </div>
<div class="im"><div> </div><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
So that's why I ask if there's some way of getting this information<br>with mrtrix. I can do it with matlab, but as far as my method is not<br>similar to the one you use I want to make sure my approach is correct.<br>
</blockquote><div><br></div></div><div>Glad to hear it - this would be much better done in Matlab than using a combination of existing MRtrix commands...</div><div class="im"><div> </div><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
And a last question about sample and resample, if I have another image<br>for example Linear Anisotropy, I can use sample_tracks to obtain the<br>interpolated value of LA on each of the points of the track. And then<br>calculate for example the average LA in a given track. But as I've<br>
read on the doc sample_tracks should be used with tracks produced by<br>resample_tracks to ensure even sampling. Why is that? Does not the<br>step size of 0.2 mm in streamtrack provide an even sampling? If I set<br>the -num (number of samples) parameter in resample_tracks to 100, All<br>
tracks will have 100 points? Does that not do uneven sampling on<br>different size tracks? I mean do a 20 mm track have 100 samples, and a<br>200 mm track also 100 samples?<br></blockquote><div><br></div></div><div>There is no problem with using "sample_tracks" if you're simply interested in the average value over the tracks. The "resample_tracks" application just tries to ensure that for a set of tracks, all the sampling points are roughly equivalent in terms of their position along the track. This is of interest if you're interested in averaging values across tracks at corresponding positions. Not a problem in your case. I might amend the documentation for sample_tracks to avoid any further confusion...</div>
<div><br></div><div>Cheers,</div><div><br></div><div>Donald.</div><div><br></div></div><font color="#888888"><br>-- <br>Jacques-Donald Tournier (PhD)<br>Brain Research Institute, Melbourne, Australia<br>Tel: +61 (0)3 9035 7033<br>
</font></div><br>