<div dir="ltr"><div><div><div><div><div><div><div><div><div><div>Luis (and all),<br><br><br></div>We&#39;ve been chipping away at extracting useful fixel measures using a number of methods for some years now. However it&#39;s important to realise that just because a parameter has been extracted using a crossing-fibre model, does not mean that it has a useful biological interpretation; see for instance <a href="http://www.nitrc.org/pipermail/mrtrix-discussion/2014-May/000994.html">this thread</a>.<br>
<br></div>For the sake of this argument, I&#39;ll make use of <a href="https://github.com/jdtournier/mrtrix3/wiki/Dixels-and-Fixels">this terminology</a>; it&#39;s important to discriminate between the <i>fixel-wise</i> AFD (which is the integral of the corresponding FOD lobe, and corresponds to an MR-visible fibre volume) and <i>dixel-wise</i> (which is just the amplitude of the FOD along a particular direction; although this ideally corresponds to a fibre volume per unit solid angle, this isn&#39;t the case in practise due to severe SH truncation).<br>
<br></div>I should also qualify (again) that the <span style="font-family:courier new,monospace">afdconnectivity</span> command was actually written as a &#39;hack&#39; for colleagues who did not have the necessary image data to perform EPI distortion correction and therefore could not make use of ACT and SIFT. Just want to make sure people do not mistakenly interpret that <span style="font-family:courier new,monospace">afdconnectivity</span> is our &#39;recommended&#39; method for performing DWI studies... the &#39;real&#39; AFD tools are still under development.<br>
<br><br></div>a&amp;b) I&#39;ll try to explain this a bit differently... The best way to think about the operation of <span style="font-family:courier new,monospace">afdconnectivity</span> is that it uses streamlines data to generate a <i>fixel mask</i>. That is, each streamline traverses some subset of voxels; within each voxel, the streamline tangent is mapped to the most appropriate <i>fixel</i> within that voxel, and these fixels are added to the mask. The total fibre &#39;volume&#39; for the pathway of interest is taken as the sum of fixel-wise densities within this mask; this is then divided by the mean streamline length to get something more akin to a cross-sectional area.<br>
</div>I suspect you may be mistaking the context in which the &quot;AFD sum&quot; is reported. By what I have described above, each fixel in the image may contribute <i>only once</i> to the fixel mask, and hence to the reported connectivity value. Where the &#39;sum&#39; is used is with the -afd option in the <span style="font-family:courier new,monospace">afdconnectivity</span> command; note however that this is just an option for outputting an image for visualisation, and bears no influence on the actual computation. There is a possibility that depending on the streamlines you have passed, more than one fixel within a single voxel may be added to the fixel mask; in this case, the most meaningful thing to do for the sake of that output image is to take the <i>sum</i> of the <i>fixel-wise</i> volumes within a voxel as the image intensity.<br>
</div>Importantly, the fibre density of a particular fixel is added to the fixel mask <i>only once</i>, i.e. a fixel with one traversing streamline contributes its density to the final result just as much as a fixel with many streamlines traversing it. This therefore removes the confound of streamlines reconstruction density as you mentioned, but introduces new problems: bad behaviour in voxels with partial volume and with streamline outliers.<br>
<br></div>c) This one relies on a bit of an understanding of TWI. I suspect here that the <span style="font-family:courier new,monospace">-stat_vox</span> option is not doing what you think it is doing.<br></div>When the <span style="font-family:courier new,monospace">-contrast fod_amp</span> option is used in <span style="font-family:courier new,monospace">tckmap</span>, what happens is the following. At each point along the streamline, the FOD amplitude along the streamline tangent is computed (i.e. <i>dixel-wise</i>; as you correctly identified, no FOD segmentation to obtain fixel-wise estimates is performed). The <span style="font-family:courier new,monospace">-stat_tck</span> option then determines how these values along the length of the streamline are combined to produce a <i>single scalar measure</i> for that particular streamline. The <span style="font-family:courier new,monospace">-stat_vox</span> option then controls how the image intensity for a particular voxel is determined based on the scalar measures associated with the particular subset of streamlines that traverse that voxel.<br>
</div>Therefore this is noticeably different to what I think is your misinterpretation, which is getting an independent FOD amplitude in each voxel traversed by each streamline, and then somehow combining the values from within each voxel (i.e. sum / mean). If this were this case, the tractography step would be more or less redundant; you could just compute a voxel intensity value based on the properties of the fixels within that voxel, no streamlines required.<br>
</div>Coming back to my first point, just because this mechanism is making use of crossing-fibre information, doesn&#39;t mean that it is immediately &#39;superior&#39; to methods that do not. For instance, let&#39;s say that you take the mean FOD amplitude along each streamline (<span style="font-family:courier new,monospace">-stat_tck mean</span>), and the mean value per voxel (<span style="font-family:courier new,monospace">-stat_vox mean</span>). The image intensity in each voxel can then be interpreted as the voxel-mean-of-mean-fibre-volume-per-unit-solid-angle-along-connecting-pathway-weighted-by-streamlines-density. Try saying that five times fast...<br>
<div><br></div><div>d) As Dave has mentioned, <span style="font-family:courier new,monospace">afdconnectivity</span> expects an FOD image as input. At some stage I hope to have many fixel-related commands accept either an FOD image or a fixel image; that way people can use non-SH-based crossing-fibre diffusion models in any of these commands.<br>
(As an aside, one of the benefits of using the raw FODs rather than pre-computed fixels is that the FOD segmentation algorithm captures the angular &#39;spread&#39; of each FOD lobe, which assists in assigning streamlines to the most appropriate fixel)<br>
<br><br></div><div>Hopefully that helps you to wrap your head around some of these concepts.<br><br>Rob<br></div></div><div class="gmail_extra"><br clear="all"><div><div dir="ltr"><br>--<br><br><span style="color:rgb(255,102,0)"><b>Robert Smith, Ph.D</b><br>
Research Officer, Imaging Division</span><br><br>The Florey Institute of Neuroscience and Mental Health<br>Melbourne Brain Centre - Austin Campus<br>245 Burgundy Street<br>Heidelberg Vic 3084<br>Ph: +61 3 9035 7128<br>Fax: +61 3 9035 7301<br>
<a href="http://www.florey.edu.au/" target="_blank">www.florey.edu.au</a><br></div></div>
<br><br><div class="gmail_quote">On Fri, Jun 27, 2014 at 10:09 AM, David Raffelt <span dir="ltr">&lt;<a href="mailto:d.raffelt@brain.org.au" target="_blank">d.raffelt@brain.org.au</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">




<div>
<div dir="ltr">Hi Luis,
<div><br>
</div>
<div>One thing I probably should include in the documentation is that the AFD in this command is actually computed as the FOD fixel
<i>integral</i> (as explained in Rob&#39;s SIFT paper). The afdconnectivity command parses each streamline, and identifies which fixels are tangent to the streamline. After all fixels have been identified it
<i>sums</i> the AFD (integral) over all fixels, then normalises by mean streamline length. <br>
</div>
<div><br>
</div>
<div>To answer your questions:<br>
</div>
<div><br>
</div>
<div>a) Yes afdconnectivity will only include fixels that are tangent to your streamlines and will ignore fixels from unrelated crossing fibres. There is no angular threshold for assigning fixels to the streamline tangent. If a streamline passes through a voxel,
 then the fixel with the closest orientation to the streamline tangent will be flagged as belonging to the tract.  Assuming you have used the same FOD image for tractography and AFD calculations then this should not be an issue. </div>

<div><br>
</div>
<div>b) If the streamlines are neatly aligned then only a single fixel will be included. However sometimes with probabilistic tracking they branch off in different directions in crossing fibre regions. In this case multiple fixels within a single voxel may
 be flagged as belonging to the tract-of-interest. Note we don&#39;t just sum the AFD within a voxel, the afdconnectivity measure is the sum of AFD from
<i>all</i> fixels in the tract of interest. This is then normalised by mean streamline length to get a measure related to fibre
<i>bundle</i> cross-sectional area.  If we were to average the AFD then morphological differences in fibre bundle width will not contribute to the connectivity of a bundle.  We normalise by mean streamline length since subject differences in fibre bundle
<i>length</i> are unlikely to influence &quot;connectivity&quot;. </div>
<div><br>
</div>
<div>c) I&#39;m not entirely sure how the tckmap AFD stuff is implemented. Rob can you comment on this one?<br>
</div>
<div><br>
</div>
<div>d) afdconnectivity inputs the FOD image, segments the fixels and computes the AFD integral for you (you need to input the FOD image, not a AFD fixel image). Although I admit inputting a fixel image makes more sense, however afdconnectivity was coded before
 we had the mtrix sparse image format. We should probably change this in the future. </div>
<div><br>
</div>
<div>Just a final comment. I coded afdconnectivity as a fairly adhoc method of computing tract-of-interest AFD for situations where ACT and SIFT could not be used. If you have EPI correction, then a more robust AFD-based connectivity measure would be to do
 whole brain tracking, SIFT, then count the streamlines between your regions of interest.</div>
<div><br>
</div>
<div>Cheers,</div>
<div>Dave</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
<div class="gmail_extra"><br>
<br>
<div class="gmail_quote"><div><div class="h5">On 27 June 2014 09:04, Luis Concha <span dir="ltr">&lt;<a href="mailto:lconcha@unam.mx" target="_blank">lconcha@unam.mx</a>&gt;</span> wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div><div class="h5">
<div dir="ltr">
<div>I would like to<a href="http://www.nitrc.org/pipermail/mrtrix-discussion/2014-March/000923.html" target="_blank"> revisit the topic</a> of tract-specific AFD measurements in light of the new and useful tools available in mrtrix3.</div>

<div><br>
</div>
<div>Looking at the documentation of afdconnectivity, the option -afd otuputs a volume containing the AFD estimated for each voxel, given a track file. However, it clearly states that &quot;if the input tracks are tangent to multiple fibres in a voxel(fixels), then
 the output AFD is the sum of the AFD for each fixel&quot;. I am a bit confused by this statement and have a few questions:</div>
<div><br>
</div>
<div>a) Imagine a streamline belonging to the corpus callosum passing through the centrum semiovale; I would like to obtain the AFD from the fixels most parallel to the streamline segment, and ignore the other  (presumably perpendicular) fixel. Does afdconnectivity
 do this? And, if so, how &quot;perpendicular&quot; does the fixel orientation need to be relative to the track segment in order to be included?</div>
<div><br>
</div>
<div>b) Now imagine several tracks passing through the same voxel, all of them neatly parallel with the fixel orientation. Why would we want to obtain the sum of AFDs, as opposed to the average AFD in that voxel? The choice to sum seems susceptible by the number
 of tracks generated and thus passing through the voxel in questionq. </div>
<div><br>
</div>
<div>c) From the documentation for tckmap it seems like I can have the mean instead of the sum by way of the -stat_vox mean switch. However, in this command I am not clear if fixels are selected in terms of perpendicularity to the track segment or not (it seems
 unlikely, as the FODs are not segmented, but rather the average -or sum- of all the AFDs in a given voxel). </div>
<div><br>
</div>
<div>d) Finally, I am getting an error when using afdconnectivity:</div>
<div>
<div>$ afdconnectivity -afd callosum_afd.nii fixel_afd.msf callosum.tck -info</div>
<div>afdconnectivity </div>
<div>[INFO]: opening image &quot;fixel_afd.msf&quot;...</div>
<div>afdconnectivity: summing apparent fibre density within track...   0%afdconnectivity [INFO]: opening image &quot;fixel_afd.msf&quot;...</div>
<div>afdconnectivity [INFO]: opening image &quot;fixel_afd.msf&quot;...</div>
<div>afdconnectivity: summing apparent fibre density within track...   2%Segmentation fault (core dumped)</div>
</div>
<div><br clear="all">
<div>
<div>(the same error occurs even if -afd is not used).</div>
<div><br>
</div>
<div><br>
</div>
<div>I apologize for so many questions in a single post, but they are all related.Thanks in advance. </div>
<div dir="ltr"><br>
</div>
<div dir="ltr"><br>
</div>
<div>FYI:</div>
<div>
<div>$ afdconnectivity -version</div>
<div>== afdconnectivity 6d02b643 ==</div>
<div>64 bit release version, built May 29 2014, using GSL 1.16</div>
</div>
<div><br>
</div>
<div dir="ltr">
<div dir="ltr">************************************************</div>
<div dir="ltr">Image:               &quot;fixel_afd.msf&quot;</div>
<div dir="ltr">************************************************</div>
<div dir="ltr">  Format:            MRtrix WIP sparse image data format</div>
<div dir="ltr">  Dimensions:        256 x 256 x 54</div>
<div dir="ltr">  Voxel size:        1 x 1 x 2</div>
<div dir="ltr">  Data type:         unsigned 64 bit integer (little endian)</div>
<div dir="ltr">  Data strides:      [ 2 3 1 ]</div>
<div dir="ltr">  Intensity scaling: offset = 0, multiplier = 1</div>
<div dir="ltr">  Comments:          FSL4.1</div>
<div dir="ltr">  Properties:</div>
<div dir="ltr">    sparse_data_name: N2MR5Image6Sparse11FixelMetricE</div>
<div dir="ltr">    sparse_data_size: 20</div>
<div dir="ltr">  Transform:                    1           0           0      -127.7</div>
<div dir="ltr">                               -0           1           0      -111.5</div>
<div dir="ltr">                               -0           0           1      -49.73</div>
<div dir="ltr">                                0           0           0           1</div>
<div>
<div>***********************************</div>
<div>  Tracks file: &quot;callosum.tck&quot;</div>
<div>    count:                50</div>
<div>    downsample_factor:    3</div>
<div>    fod_power:            0.25</div>
<div>    init_threshold:       0.1</div>
<div>    lmax:                 8</div>
</div>
<div><br>
</div>
</div>
<div dir="ltr"><br>
</div>
<div dir="ltr">
<div dir="ltr">$ uname -a</div>
<div dir="ltr">Linux mansfield 3.13.0-24-generic #47-Ubuntu SMP Fri May 2 23:30:00 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux</div>
<div><br>
</div>
</div>
<div dir="ltr"><br>
</div>
<div dir="ltr"><br>
</div>
<div dir="ltr">Dr. Luis Concha<br>
Instituto de Neurobiología<br>
Laboratorio C-13<br>
UNAM, Campus Juriquilla<br>
Boulervard Juriquilla 3001<br>
Juriquilla, Querétaro.<br>
C.P. 76230<br>
México<br>
Tel <a href="tel:%28442%29%202%2038%2010%2054" value="+14422381054" target="_blank">
(442) 2 38 10 54</a><br>
Fax <a href="tel:%28442%29%202%2038%2010%2046" value="+14422381046" target="_blank">
(442) 2 38 10 46</a><br>
<a href="http://personal.inb.unam.mx/lconcha/" target="_blank">http://personal.inb.unam.mx/lconcha/</a><br>
</div>
</div>
</div>
</div>
<br></div></div>
_______________________________________________<br>
Mrtrix-discussion mailing list<br>
<a href="mailto:Mrtrix-discussion@www.nitrc.org" target="_blank">Mrtrix-discussion@www.nitrc.org</a><br>
<a href="http://www.nitrc.org/mailman/listinfo/mrtrix-discussion" target="_blank">http://www.nitrc.org/mailman/listinfo/mrtrix-discussion</a><br>
<br><span class="HOEnZb"><font color="#888888">
</font></span></blockquote><span class="HOEnZb"><font color="#888888">
</font></span></div><span class="HOEnZb"><font color="#888888">
<br>
<br clear="all">
<div><br>
</div>
-- <br>
<div dir="ltr">
<div><b><font color="#ff6600">David Raffelt (PhD)</font></b></div>
<div><font color="#ff6600">Post Doctoral Fellow</font></div>
<div><br>
</div>
<div>The Florey Institute of Neuroscience and Mental Health</div>
<div>Melbourne Brain Centre - Austin Campus</div>
<div>245 Burgundy Street</div>
<div>Heidelberg Vic 3084
<div>Ph: <a value="+61390357024">+61 3 9035 7024</a></div>
</div>
<div><a value="+61390357024">www.florey.edu.au</a></div>
</div>
</font></span></div>
</div>
</div>
</div>

</blockquote></div><br></div>