# Seed-based tractography 

**URL:** https://community.mrtrix.org/t/seed-based-tractography/3098
**Category:** Uncategorized
**Tags:** tractography
**Created:** [December 5, 2019, 6:02pm UTC](https://community.mrtrix.org/t/seed-based-tractography/3098 "2019-12-05T18:02:20Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![ThomasHMAC](https://community.mrtrix.org/letter_avatar_proxy/v4/letter/t/7ba0ec/32.png) [@ThomasHMAC](https://community.mrtrix.org/u/ThomasHMAC)
#### Post date: [December 5, 2019, 6:02pm UTC](https://community.mrtrix.org/t/seed-based-tractography/3098/1 "2019-12-05T18:02:20Z")

</div>

Hi,

First of all, I am sorry for the lengthy question and I am a newbie Tractography analysis. In addition, I have read previous posts about generating streamlines from ROI to ROI. The purpose of my analysis is to perform a seed-based tractography from source ROI to other regions of shen atlas, I have tried two different methods but I am not sure if they are corrected.

1.Method\_01

1\>Create a binarized source mask from co-registered atlas(atlas.nii.gz)  
2\> **tckgen FOD.mif tracked.tck -act 5TT.mif -seed\_image source\_roi.nii.gz -seeds 0 -select 5000000 -**  **seed\_unidirectional**  
3\> **tcksift2 tracked.tck FOD.mif prob\_weights.txt**  
4\> **tck2connectome tracked.tck atlas.nii.gz conmat.csv -vector -scale\_invlength -tck\_weights\_in prob\_weights.txt -assignment\_radial\_search 2 -scale\_invnodevol**. By completed all these steps, would it generate a 1-D connectivity matrix that contain structural connectivity from seed region to the rest of regions in the atlas.

2.Method\_02:

1\>whole-brain tractography **tckgen FOD.mif tracked.tck -act 5TT.mif -seed\_gmwmi gmwmi.mif -select 5000000**  
2\> **tcksift2 tracked.tck FOD.mif prob\_weights.txt**  
3\> **tck2connectome tracked.tck atlas.nii.gz connmat.csv -zero\_diagonal -symmetric -assignment\_out assignment\_atlas.csv -scale\_invlength -tck\_weights\_in prob\_weights.txt -assignment\_radial\_search 2 -scale\_invnodevol**  
4\> \*\*connectome2tck -nodes 146 tracked.tck assignment\_atlas.csv -files per\_node source\_146\_tracked.tck -tck\_weights\_in prob\_weight.txt -prefix\_tck\_weights\_out source\_tracked\_weights.txt. This would give me all streamlines emerge from source ROI to the rest of atlas region.  
5\>\*\*tck2connectome source\_146\_tracked.tck atlas.nii.gz connmat.csv -scale\_invlength -tck\_weights\_in source\_tracked\_weights.txt -assignment\_radial\_search 2 -scale\_invnodevol -vector. Is this last step plausible since I originally wanted to obtain a structural connectivity value from the source region to the all other regions of atlas.

Thanks,  
Thomas

---

<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: [December 15, 2019, 2:40am UTC](https://community.mrtrix.org/t/seed-based-tractography/3098/2 "2019-12-15T02:40:15Z")

</div>

Hi Thomas,

> 1.Method\_01  
> 2\> `tckgen FOD.mif tracked.tck -act 5TT.mif -seed_image source_roi.nii.gz -seeds 0 -select 5000000 -seed_unidirectional`  
> 3\> `tcksift2 tracked.tck FOD.mif prob_weights.txt`

🙅‍♂️

You _cannot_ apply the model underlying SIFT to the output of a targeted tracking experiment; it can _only_ be applied to a tractogram that includes the reconstruction of _all_ plausible pathways. In retrospect I failed to adequately assert this in the corresponding manuscripts…

E.g. Consider a voxel where just one streamline from your targeted tracking experiment traverses, but if you were to do whole-brain tractography, you could see that that voxel is predominantly traversed by other white matter pathways. If you were to apply the model underlying SIFT to just the targeted tracking reconstruction, it would attribute _all_ of the fibre density in that voxel to the pathway of interest, which is clearly not reflective of the underlying reality.

> 2.Method\_02:  
> `3> tck2connectome tracked.tck atlas.nii.gz connmat.csv -zero_diagonal -symmetric -assignment_out assignment_atlas.csv -scale_invlength -tck_weights_in prob_weights.txt -assignment_radial_search 2 -scale_invnodevol`  
> `4> connectome2tck -nodes 146 tracked.tck assignment_atlas.csv -files per_node source_146_tracked.tck -tck_weights_in prob_weight.txt -prefix_tck_weights_out source_tracked_weights.txt.`  
> This would give me all streamlines emerge from source ROI to the rest of atlas region.  
> ` 5> tck2connectome source_146_tracked.tck atlas.nii.gz connmat.csv -scale_invlength -tck_weights_in source_tracked_weights.txt -assignment_radial_search 2 -scale_invnodevol -vector.`  
> Is this last step plausible since I originally wanted to obtain a structural connectivity value from the source region to the all other regions of atlas.

If you are interested only in the connectivity between node 146 and every other node in the parcellation, why not just manually extract line 146 from the full (symmetric) connectivity matrix, and completely omit steps 4 and 5? It seems to me that step 3 already generates the data you want, and steps 4 and 5 are a very convoluted way of trying to access the specific subset of connection strengths in which you are interested.

Rob

---

<div class="post-metadata">

### Author: ![LiuYuchen](https://community.mrtrix.org/user_avatar/community.mrtrix.org/liuyuchen/32/2896_2.png) [@LiuYuchen](https://community.mrtrix.org/u/LiuYuchen)
#### Post date: [October 11, 2020, 3:43am UTC](https://community.mrtrix.org/t/seed-based-tractography/3098/3 "2020-10-11T03:43:40Z")

</div>

Hi, rsmith

It seems that the problem of method\_01 is using sift to seed-based tractography, am I right?  
I was doing a similar research to generate tracks seeded from VTA to whole GM, thus can get a connection map of GM for VTA.  
Is there any problem with this pipeline：

1. `tckgen FOD.mif VTA_seed_tracks.tck -seed_image VTA.nii -act 5TT.mif -backtrack -crop_at_gmwmi -seed_unidirectional`
2. `tckmap VTA_seed_tracks.tck -template dwi.nii -ends_only connection_map.nii`

---

<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: [October 12, 2020, 6:54am UTC](https://community.mrtrix.org/t/seed-based-tractography/3098/4 "2020-10-12T06:54:38Z")

</div>

Hi @LiuYuchen,

Correct: SIFT is fundamentally not applicable to seed-based tractography, only to whole-brain tractography. I’m hoping that my (updated) [preprint](https://osf.io/c67kn/) adequately explains why this is the case (this is one of _many_ threads on this forum that motivated writing it).

> I was doing a similar research to generate tracks seeded from VTA to whole GM, thus can get a connection map of GM for VTA. … Is there any problem with this pipeline?

What you’re doing there seems to be fundamentally different to the original question in this topic. The original question related to wanting to _quantify connection strength_ from one region to others, which is the context in which SIFT2 is applicable. In your case, you’re simply generating an image of the density of streamlines terminations, where the streamlines were seeded from a specific region. There’s nothing intrinsically wrong with this, as long as the result is interpreted in accordance with the way in which they were generated. However if you are aiming for these to have an alternative quantitative interpretation to that I just described, then you would need to go about the experiment in a different way:

- Just seeding from one (ideally very small) region of interest, and seeing where the streamlines propagate to, would typically be interpreted as representing the _probability that that region is structurally connected_ to any other region of the brain;

- Performing whole-brain tracking, applying a method such as SIFT2, isolating those streamlines connecting to your region of interest, and seeing the density of streamlines traversing from there to other regions, would typically be interpreted as representing the _density of structural connections_ from the region of interest to any other region of the brain.

Obviously both of these have caveats. Unfortunately I’ve on multiple occasions seen people start talking cross-purposes because each did not realise that the other party was implicitly applying the converse interpretation to “probabilistic streamlines”. But I thought I’d elucidate here given there’s a reasonable chance that it’s related to your uncertainty here, and my publication where I explain this is _still_ not out yet so I couldn’t just refer you to it…

Rob

---

<div class="post-metadata">

### Author: ![LiuYuchen](https://community.mrtrix.org/user_avatar/community.mrtrix.org/liuyuchen/32/2896_2.png) [@LiuYuchen](https://community.mrtrix.org/u/LiuYuchen)
#### Post date: [October 19, 2020, 8:24am UTC](https://community.mrtrix.org/t/seed-based-tractography/3098/5 "2020-10-19T08:24:28Z")

</div>

Thanks again for your reply!

I was using the HCP data to process this seed-based tractography, could you please recommend the parameters for -select and -seeds (or -seed\_random\_per\_voxel image num\_per\_voxel)?

For your consideration, my command did not provide the -select and -seeds option：  
`tckgen WM_FODs.mif VTA_seed_tracks.tck -seed_image AAL3_VTA_2DWI_bin.nii.gz -algorithm iFOD2 -fslgrad bvecs bvals -minlength 3 -maxlength 250 -angle 45 -step 0.2 -cutoff 0.06 -act 5TT.mif -backtrack -crop_at_gmwmi -force`  
Tracks seeding from VTA are shown as below:

 ![image](https://community.mrtrix.org/uploads/default/original/2X/3/3ab71b0b7e4934d50c66fb57afe93655c7eba39f.jpeg)

---

<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: [October 21, 2020, 6:51am UTC](https://community.mrtrix.org/t/seed-based-tractography/3098/6 "2020-10-21T06:51:27Z")

</div>

> could you please recommend the parameters for -select and -seeds (or -seed\_random\_per\_voxel image num\_per\_voxel)?

In the absence of using the `-select` or `-seeds` option, it will generate a maximum of 5,000 streamlines, from a maximum of 5,000,000 seed points (the latter of which is basically irrelevant in the absence of inclusion / exclusion regions, but it’s there to prevent `tckgen` from running forever in cases where it’s almost impossible to generate streamlines given the criteria imposed).

In terms of what is an “appropriate” number of streamlines, I’ve tried to express my point in as generalised a way as possible in a few different threads, but it warrants reiteration. The basic premise is that if you re-perform the tractography experiment, and the “outcome of the experiment” changes “to an unacceptable degree” due to the stochastic nature of probabilistic streamlines tractography, then too few streamlines were generated. The questions then are: what is the “outcome of your experiment”? What is an “acceptable degree” of variability? The former depends entirely on the context of what you are deriving from the streamlines data. The latter is somewhat subjective, but fundamentally there’s a certain minimum amount of variability across participants that could be achieved even with an infinite number of streamlines, and with a finite number of streamlines that variability will be larger, but you don’t want it to become so much larger that you become insensitive to the effects you’re trying to observe.

For the seeding _mechanism_, for sufficiently large numbers there won’t be any observable difference between the three mechanisms you listed. They’re there for feature completeness and to be able to reproduce the experiments of others, and they do operate in different ways, but your streamline trajectories won’t drastically change because of differences in the esoteric ways in which streamline seeds are determined within a pre-defined mask.
