# Computing & comparing SIFT2-connectomes

**URL:** <https://community.mrtrix.org/t/computing-comparing-sift2-connectomes/973>\
**Category:** Uncategorized\
**Created:** [June 14, 2017, 1:49pm UTC](https://community.mrtrix.org/t/computing-comparing-sift2-connectomes/973 "2017-06-14T13:49:12Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![mrburnst](https://community.mrtrix.org/letter_avatar_proxy/v4/letter/m/ed8c4c/32.png) [@mrburnst](https://community.mrtrix.org/u/mrburnst)\
**Post date:** [June 14, 2017, 1:49pm UTC](https://community.mrtrix.org/t/computing-comparing-sift2-connectomes/973/1 "2017-06-14T13:49:12Z")

</div>

Hi!

I’m doing whole-brain tractography from cortical labels obtained from freesurfer (actually [https://www.nature.com/nature/journal/v536/n7615/abs/nature18933.html](https://www.nature.com/nature/journal/v536/n7615/abs/nature18933.html)), and I want to use SIFT2 weights as quantitative measure of ‘connectivity’. I have a couple of questions I couldn’t find conclusive answers to in the papers, help or forum.

I understand that the SIFT2 weights are calculated so that their sum locally (at a voxel level) approximates the FOD. I’m a bit at a loss however when looking at an edge in the connectome - should the SIFT2 weights be summed or averaged per parcel (eg `-stat_edge mean`)? And should the parcel size be considered (eg. `-scale_invnodevol`)?

Finally, `tcksift2` also outputs the SIFT proportionality coefficient `mu` - should the weights be multiplied by this factor when doing inter-patient comparisons?

thanks a lot!

---

<div class="post-metadata">

**Author:** ![rsmith](https://community.mrtrix.org/user_avatar/community.mrtrix.org/rsmith/32/2672_2.png) [@rsmith](https://community.mrtrix.org/u/rsmith)\
**Post date:** [June 19, 2017, 2:02am UTC](https://community.mrtrix.org/t/computing-comparing-sift2-connectomes/973/2 "2017-06-19T02:02:40Z")

</div>

Hi @mrburnst,

> I’m a bit at a loss however when looking at an edge in the connectome - should the SIFT2 weights be summed or averaged per parcel (eg `-stat_edge mean`)?

The `-stat_edge` option won’t actually do what I suspect you’re expecting it to do in this context. Defining `-stat_edge mean` will _not_ give you the mean streamline weight per edge. In the absence of streamline weights, that option would give you the mean “_whatever quantitative metric each streamline contributes_” per edge; when you incorporate streamline weights, this becomes a _weighted mean_. So `-stat_edge mean` wouldn’t actually give you the mean streamline weight (assuming you’re using the `-tck_weights_in` option); mind you, this isn’t the metric you actually want anyway…

Just as the sum of streamline weights (well, technically the sum of (streamline weight `x` length of streamline intersection with voxel)) within a fixel gives you the total fibre volume in that fixel, the sum of streamline weights of a pathway gives you the total fibre cross-sectional area of that pathway.

> And should the parcel size be considered (eg. `-scale_invnodevol`)?

That’s up to you. Personally I don’t recommend it, I’m sure I’ve made that rant somewhere on here before. But as a basic demonstration: Taking the sum of streamline weights, your connectome edges have units L2: a cross-sectional area. If you divide each edge by the node volumes, each edge now has units L-1. Which is … weird.

> Finally, `tcksift2` also outputs the SIFT proportionality coefficient mu - should the weights be multiplied by this factor when doing inter-patient comparisons?

Yes; as long as you’ve also done the requisite image pre-processing for AFD intensity normalisation.

Cheers  
Rob

---

<div class="post-metadata">

**Author:** ![mrburnst](https://community.mrtrix.org/letter_avatar_proxy/v4/letter/m/ed8c4c/32.png) [@mrburnst](https://community.mrtrix.org/u/mrburnst)\
**Post date:** [June 22, 2017, 8:12pm UTC](https://community.mrtrix.org/t/computing-comparing-sift2-connectomes/973/3 "2017-06-22T20:12:48Z")

</div>

> [@rsmith](#):
>
> In the absence of streamline weights, that option would give you the mean “whatever quantitative metric each streamline contributes” per edge; when you incorporate streamline weights, this becomes a weighted mean. So -stat\_edge mean wouldn’t actually give you the mean streamline weight (assuming you’re using the -tck\_weights\_in option); mind you, this isn’t the metric you actually want anyway…

hmm, I don’t really understand that. I thought that the `-stat_edge` allows to change to statistic that is computed per _edge_ - I assume that an edge is the set of all fibers connecting two nodes? So if let’s say I want to have average FA of the tracts between 2 cortical regions, I should chose `-stat_edge mean`, no? For sift2 weights, as you said, `-stat_edge sum`, right?

> [@rsmith](#):
>
> this isn’t the metric you actually want anyway…

well, the goal I guess is to measure of bandwidth between regions. I’m working towards AFD, but in the meanwhile, I was thinking I could start with a patient-specific measure that doesn’t require groupwise normalisation of my study cohort (it’s pediatric data, which makes this somewhat challenging). My initial thought was to use sift2 weights like you said as a measure of fiber volume - but judging from

> [@rsmith](#):
>
> as long as you’ve also done the requisite image pre-processing for AFD intensity normalisation

quantiative comparison of this measure between cases actually also requires groupwise registration for intensity normalization), right?

---

<div class="post-metadata">

**Author:** ![rsmith](https://community.mrtrix.org/user_avatar/community.mrtrix.org/rsmith/32/2672_2.png) [@rsmith](https://community.mrtrix.org/u/rsmith)\
**Post date:** [June 22, 2017, 11:59pm UTC](https://community.mrtrix.org/t/computing-comparing-sift2-connectomes/973/4 "2017-06-22T23:59:01Z")

</div>

> hmm, I don’t really understand that. I thought that the `-stat_edge` allows to change to statistic that is computed per edge - I assume that an edge is the set of all fibers connecting two nodes? So if let’s say I want to have average FA of the tracts between 2 cortical regions, I should chose `-stat_edge mean`, no? For sift2 weights, as you said, `-stat_edge sum`, right?

That’s all correct. Looks like you’re understanding the operation there properly, which is contrary to how I interpreted your initial question. Though `-stat_edge sum` is the default, so you’re not forced to provide it explicitly.

> but judging from … quantiative comparison of this measure between cases actually also requires groupwise registration for intensity normalization), right?

Yes it does. But the `dwiintensitynorm` script does an FA-based template generation & registration rather than FOD-based; and the process does not rely as heavily on highly accurate registration as an FBA analysis does. As long as the template generation & registration is “good enough” so that the template-based FA mask can be propagated back to each subject’s image and more-or-less select the same tissue constituency, the performance should be OK.

---

<div class="post-metadata">

**Author:** ![mrburnst](https://community.mrtrix.org/letter_avatar_proxy/v4/letter/m/ed8c4c/32.png) [@mrburnst](https://community.mrtrix.org/u/mrburnst)\
**Post date:** [June 24, 2017, 1:06pm UTC](https://community.mrtrix.org/t/computing-comparing-sift2-connectomes/973/5 "2017-06-24T13:06:17Z")

</div>

I found an article that maybe makes what I’m aiming at a bit clearer: in [Fiber up-sampling and quality assessment of tractograms – towards quantitative brain connectivity](http://onlinelibrary.wiley.com/doi/10.1002/brb3.588/abstract), the authors compute

> The maximum peak-amplitude along a fiber tract is defined by the maximum FOD amplitude in a cone around the fiber orientation with an opening angle of π/6. The maximum peak-amplitude perpendicular to the fiber is the maximum of all sampling points outside this cone

here’s the figure from the article  
 ![](https://community.mrtrix.org/uploads/default/original/1X/3a8e589eb40ac07cc64aa9c4dcbb6008d540eb40.png)

My thought was to compute a ratio between these two values (or something similar, in line with the ratio of the energy in the green lobe in the figure and all others in the FOD) along each streamline, and average that as a measure of connectivity. Does this make sense at all? And can it be accomplished within mrtrix?

---

<div class="post-metadata">

**Author:** ![rsmith](https://community.mrtrix.org/user_avatar/community.mrtrix.org/rsmith/32/2672_2.png) [@rsmith](https://community.mrtrix.org/u/rsmith)\
**Post date:** [June 26, 2017, 6:47am UTC](https://community.mrtrix.org/t/computing-comparing-sift2-connectomes/973/6 "2017-06-26T06:47:17Z")

</div>

### Short answer:

> Can it be accomplished within mrtrix?

Yes. Probably.

> Does this make sense at all?

No.

* * *

### Long answer:

- _I really need to finish writing that paper…_ 😩 😆 😟

- The peak amplitude of the FOD ideally mathematically represents the _fibre density per unit solid angle_. However with the severity of spherical harmonic truncation we deal with, this is not achievable. But even if that weren’t the case, this wouldn’t be a terribly useful metric: Sure it goes up and down as the density of fibres increases & decreases, but it also goes up and down with _orientation dispersion_. The more spread, the fatter the lobe, and the lower its peak amplitude.  
The _integral_ of the FOD lobe, on the other hand, is invariant to fibre dispersion, and represents the total fibre density within the voxel (N.B. _not_ an “energy”) that is oriented within a solid angle cone corresponding to the segmentation of that lobe. Hence this is the quantitative metric we use.

- By taking e.g. a ratio of `density_of_green_lobe` to `density_of_all_other_lobes`, your quantitative metric in that particular voxel would be:  
“_The fraction of the fibre density in the voxel belonging to this bundle_”.  
If you then e.g. average this quantity over the length of a tract, your “measure of connectivity” for each pathway of interest would be:  
“_Across voxels traversed by the streamlines in this bundle, the average fraction of the fibre density in each voxel belonging to the bundle_”.  
Which is really a measure of “single-fibre-ness” rather than “connectivity”: It would be high for bundles that don’t have any crossings (even if the local microscopic density is very low), and low for bundles that cross other pathways.  
Measures like what you propose always seem tempting because they elicit an idea of “anisotropy”; but it’s dependent on a whole lot of things that you don’t want a quantitative measure of interest to be dependent on.

Going to a measure such as this would likely be more deleterious to a study than the poor-quality data you’re trying to work around…
