5ttgen fsl and freesurfer

Hi Mrtrix experts

Why the fsl algorithm has mrthreshold 0.001 while freesurfer algorithm has mrthreshold 0.5?

Regards,
Salah

1 Like

Hi Salah,

The mrthreshold calls serve completely different purposes within the contexts of the two algorithms.

In 5ttgen fsl, a mrthreshold -abs 0.0001 call is used in the process of identifying the largest connected WM component. The goal is to identify e.g. skull regions erroneously segmented as WM that are completely structurally disconnected from the actual WM. However if a threshold of 0.5 were to be used, voxels with partial volume with the cortical grey matter, with more grey than white matter, would be excluded from that mask; yet such voxels should ideally remain unmodified by such processing.

In 5ttgen freesurfer, the input image to that mrthreshold call contains integer values 1-5 for the five tissue types, and 0 outside the brain. So a threshold of 0.5 is used to simply generate a binary mask with 1 for brain and 0 for non-brain voxels. This mask is then used for the sake of detecting the extent to which the image FoV can be cropped without loss of brain voxels.

So the only thing that’s consistent between them is the name of the command; the contexts and usages are quite drastically different.

Cheers
Rob

Thank you sir for your reply.
That’s very interesting and make me ask a question. I have run 5ttgen FSL T1. Mgz and run 5ttgen freesurfer aparc+aseg (generated from Recon-all). I have got very high voxel WM mask from 5ttgen freesurfer compared to the WM mask from 5ttgen FSL. This also leads to higher streamline counts in specific tract (e.g. Ifof). However, whole brain tractography with freesurfer algorithm shows less whole brain streamlines compared to FSL algorithm.
I had a look to both algorithms and I found nothing different but the mrthreshold. How possibly this has happened?

Thank you once again for your support.
Salah

Hi Salah,

I have got very high voxel WM mask from 5ttgen freesurfer compared to the WM mask from 5ttgen FSL.

How exactly are you calculating the “number of voxels” in the latter case, given that it contains partial volume fractions? While the correct answer would be to sum partial volumes, it’s not clear from your description whether you are performing such an objective assessment or whether it’s more of a general observation about the appearance of the data.

This also leads to higher streamline counts in specific tract (e.g. Ifof).

This is difficult to draw any conclusions from because of the ambiguity about how this measure was derived (over and above the issues associated with streamline count as a quantitative measure more generally). Are you selecting this bundle from a whole-brain tractogram, or generating using targeted tracking? Are you generating a fixed number of streamlines, or a fixed number of streamline seeds?

(To demonstrate why these details are important, imaging that you were to reconstruct that tract using targeted tracking whilst requesting a fixed number of streamlines; you would then, excluding extreme circumstances, get the same number of streamlines in each case by design)

However, whole brain tractography with freesurfer algorithm shows less whole brain streamlines compared to FSL algorithm.

Same as above. Personally when I perform whole-brain tractography, I generate a fixed number of streamlines, in which case I would by design get the same number of streamlines regardless of how the 5TT image was derived.

If you are requesting a fixed number of seeds, and the total number of streamlines generated from such is different between the two algorithms, then it may be useful to more explicitly think about this discrepancy as the fraction of streamline seeds from which acceptable streamlines are generated. That in turn raises the question of why a streamline seed may either not generate a streamline at all, or may generate a streamline that does not satisfy all criteria for inclusion in the output track file; running tckgen with the -info flag should provide further insight here.

I had a look to both algorithms and I found nothing different but the mrthreshold.

This comment confuses me, given the stark differences between the two algorithms, which arrive at the generated 5TT images through substantially different means.

Regards
Rob

Hi Rob,

Sorry for not being so clear in my questions.

The main point is that I am trying to build a pipeline that could be used to extract specific tracts. At the beginning, I used the fsl and freesurfer algorithms in 5ttgen to than be used in the whole-brain tractography and from there extract the tracts I am interested in.
Thus, the judgment was based on observation the appearance of the WM masks.

I selected this bundle from the whole-brain tractogram:
tckedit DIR/10M_SIFT_fsl.tck DIR/output_fsl.tck -include -22.17,-7.88,22.24,4 -include -36.87,-55.19,3.468,4 -exclude -9.44,0.124,37.73,10 -minlength 25 -force
tckedit DIR/10M_SIFT_free.tck DIR/output_free.tck -include -22.17,-7.88,22.24,4 -include -36.87,-55.19,3.468,4 -exclude -9.44,0.124,37.73,10 -minlength 25 -force

Here is the result from tckinfo. There something I could not understand why it happened when I use the 5tt_freesurfer. I will flag it using bond font.

Tracks file: “/Volumes/RAID/Salah/Subjects/Post_HARDI/PAH_Clinical_110/07/DTI/IFOF/L_IFOF/L_IFOF_C07.tck”
SIFT_mu: 0.00017901710797694413
act: DTI/5TT_C07.mif
backtrack: 1
command_history: tckedit DTI/10M_SIFT_C07.tck DTI/IFOF/L_IFOF_C07.tck -include DTI/IFOF/ROI_1_L_IFOF.mif -include DTI/IFOF/ROI_2_L_IFOF.mif -exclude DTI/IFOF/ROI_3_L_IFOF_exclude.mif -minlength 25 -force (version=3.0.0)
count: 161
crop_at_gmwmi: 1
downsample_factor: 3
fod_power: 0.25
init_threshold: 0.0599999987
lmax: 8
max_angle: 45
max_num_seeds: 100000000000
max_num_tracks: 100000000
max_seed_attempts: 1000
max_trials: 1000
method: iFOD2
min_dist: 25
mrtrix_version: 3.0.0
output_step_size: 1.03471065
prior_roi: seed WMfod_C07.mif
rk4: 0
samples_per_step: 4
seed_dynamic: DTI/WMfod_C07.mif
sh_precomputed: 1
source: DTI/WMfod_C07.mif
step_size: 1.03471065
stop_on_all_include: 0
threshold: 0.06
timestamp: 1591788426.4779920578
total_count: 10000000
unidirectional: 0
ROI: exclude DTI/IFOF/ROI_3_L_IFOF_exclude.mif
ROI: include DTI/IFOF/ROI_1_L_IFOF.mif
ROI: include DTI/IFOF/ROI_2_L_IFOF.mif
Snowths:PAH_Clinical_110 salah$ tckinfo -info /Volumes/RAID/Salah/Subjects/Post_HARDI/PAH_Clinical_110/07/DTI/IFOF/L_IFOF/L_IFOF_C07_free.tck


Tracks file: “/Volumes/RAID/Salah/Subjects/Post_HARDI/PAH_Clinical_110/07/DTI/IFOF/L_IFOF/L_IFOF_C07_free.tck”
SIFT_mu: 6.7449839319695109e-05
act: DTI/5TT_C07_free.mif
backtrack: 1
command_history: tcksift DTI/100M_C07_free_MSMT.tck DTI/WMfod_C07.mif DTI/10M_SIFT_C07_free_MSMT.tck -act DTI/5TT_C07_free.mif -term_number 10M -force (version=3.0.0)
count: 2120
crop_at_gmwmi: 1
downsample_factor: 3
fod_power: 0.25
init_threshold: 0.0599999987
lmax: 8
max_angle: 45
max_num_seeds: 10000000000
max_num_tracks: 10000000
max_seed_attempts: 1000
max_trials: 1000
method: iFOD2
min_dist: 25
mrtrix_version: cac05b6f
prior_roi: seed WMfod_C07.mif
rk4: 0
samples_per_step: 4
seed_dynamic: DTI/WMfod_C07.mif
sh_precomputed: 1
source: DTI/WMfod_C07.mif
step_size: 1.03471065
stop_on_all_include: 0
threshold: 0.06
timestamp: 1592440467.0138759613
total_count: 10000000
unidirectional: 0
ROI: exclude DTI/IFOF/ROI_1_L_IFOF_exclude_free.mif
ROI: include -18.8099995,-3.77800012,24.3099995,5
ROI: include DTI/IFOF/ROI_2_L_IFOF.mif

I am using fixed seeds.

I did use same number of streamlines. Here is the command:

tckgen DIR/WMfod.mif DIR/output_100M.tck -act DIR/5TT_fsl.mif -backtrack -crop_at_gmwmi -seed_dynamic DIR/WMfod.mif -select 100M -cutoff 0.06 -force
tckgen DIR/WMfod.mif DIR/output_100M.tck -act DIR/5TT_free.mif -backtrack -crop_at_gmwmi -seed_dynamic DIR/WMfod.mif -select 100M -cutoff 0.06 -force

Sorry for that, and just ignore it.

Regards,
Salah