MRtrix versions

Dear experts,

I have a questions regarding tractography analysis with MRTrix and it’d appreciate any kind of input/comment on my issue.

We have a data set collected some years ago and at that time, a tractography analysis was performed on the data with MRTrix version 0.2.13.

Now, we’d like to use the same data set but answer a slightly different question (and also use different seeds). The problem we’re facing now is that the current version of MRTrix is 3.0.0 with quite some changes regarding default parameters and tractography algorithms. To keep the current project comparable to the one performed some years ago (on the same data), we’d like to stick with MRTrix 0.2.13 - however we also don’t want to use that older version in case it’s really outdated.

I’ve run a comparison for the different MRTrix versions adapting the default parameters (see image). The results are quite different.

How would you rate the magnitude of algorithm improvement compared to comparability with the older project? And how “far off standard” is version 0.2.13 in your opinion?

Thanks a bunch!

Interesting question! I see that your image is missing from the post… Could you try including it again?

Dear Ben Jeurissen, true! I must’ve forgotten it. Here it

is:

Regarding the algorithms used in these, MRtrix 0.2 used SD_PROB as default (=iFOD1 in MRtrix 3); MRtrix 3 uses the updated iFOD2 as default.

It is probably a good idea to also report the output of tckinfo filename.tck for the three approaches, that way we can see exactly which algorithms and parameters were used.

Hi, sorry for the late reply! Here you’ll find the tckinfo:

MRTrix 0.2
Tracks file: “/data/p_npsy152_tomsyn/IMPLTOM/DTI/data/FG1K130423/08_Probtrack/FG1K130423_Tracks_rh.SMG_ImplFB.tck”

    count:                100000
    init_threshold:       0.2
    lmax:                 8
    max_dist:             200
    max_num_attempts:     10000000
    max_num_tracks:       100000
    max_trials:           50
    method:               SD_PROB
    min_curv:             1
    min_dist:             10
    no_mask_interp:       0
    sh_precomputed:       1
    source:               FG1K130423/07_CSD/FG1K130423_CSD_CSD.nii.gz
    step_size:            0.2
    stop_when_included:   0
    threshold:            0.1
    total_count:          160709
    unidirectional:       0
    ROI:                  mask FG1K130423/08_WMmask/FG1K130423_WM_mask_ero.nii.gz
    ROI:                  seed FG1K130423/04_ROIs/FG1K130423_rh.SMG_ImplFB_UNI_MNI_bin.nii.gz

##########################

MRtrix 3.0 default parameters
Tracks file: “/data/p_npsy152_tomsyn/IMPLTOM/DTI/data/FG1K130423/08_Probtrack_v3/FG1K130423_Tracks_rh.SMG_ImplFB.tck”

    command_history:      tckgen -mask FG1K130423/08_WMmask/FG1K130423_WM_mask_ero.nii.gz -seeds 100000 -seed_image FG1K130423/04_ROIs/FG1K130423_rh.SMG_ImplFB_UNI_MNI_bin.nii.gz FG1K130423/07_CSD/FG1K130423_CSD_CSD.nii.gz FG1K130423/08_Probtrack_v3/FG1K130423_Tracks_rh.SMG_ImplFB.tck  (version=3.0.0)
    count:                13489
    downsample_factor:    3
    fod_power:            0.25
    init_threshold:       0.100000001
    lmax:                 8
    max_angle:            45
    max_dist:             100
    max_num_seeds:        100000
    max_num_tracks:       0
    max_seed_attempts:    1000
    max_trials:           1000
    method:               iFOD2
    min_dist:             5
    mrtrix_version:       3.0.0
    rk4:                  0
    samples_per_step:     4
    sh_precomputed:       1
    source:               FG1K130423/07_CSD/FG1K130423_CSD_CSD.nii.gz
    step_size:            0.5
    stop_on_all_include:  0
    threshold:            0.100000001
    timestamp:            1614595048.4055027962
    total_count:          27321
    unidirectional:       0
    ROI:                  mask FG1K130423/08_WMmask/FG1K130423_WM_mask_ero.nii.gz
    ROI:                  seed FG1K130423_rh.SMG_ImplFB_UNI_MNI_bin.nii.gz

###########################

MRTrix 3.0 parameters adapted to 0.2 defaults
Tracks file: “/data/p_npsy152_tomsyn/IMPLTOM/DTI/data/FG1K130423/08_Probtrack_v3/FG1K130423_Tracks_rh.SMG_ImplFB_sameparameter.tck”

    command_history:      tckgen FG1K130423/07_CSD/FG1K130423_CSD_CSD.nii.gz FG1K130423/08_Probtrack_v3/FG1K130423_Tracks_rh.SMG_ImplFB_sameparameter.tck -mask FG1K130423/08_WMmask/FG1K130423_WM_mask_ero.nii.gz -seeds 100000 -seed_image FG1K130423/04_ROIs/FG1K130423_rh.SMG_ImplFB_UNI_MNI_bin.nii.gz -algorith iFOD1 -select 0 -step 0.2 -angle 11.46 -minlength 10 -maxlength 200 -cutoff 0.1 -trials 50  (version=3.0.0)
    count:                11339
    fod_power:            1
    init_threshold:       0.100000001
    lmax:                 8
    max_angle:            11.46
    max_dist:             200
    max_num_seeds:        100000
    max_num_tracks:       0
    max_seed_attempts:    1000
    max_trials:           50
    method:               iFOD1
    min_dist:             10
    mrtrix_version:       3.0.0
    rk4:                  0
    sh_precomputed:       1
    source:               FG1K130423/07_CSD/FG1K130423_CSD_CSD.nii.gz
    step_size:            0.2
    stop_on_all_include:  0
    threshold:            0.1
    timestamp:            1614774564.2118315697
    total_count:          27453
    unidirectional:       0
    ROI:                  mask FG1K130423/08_WMmask/FG1K130423_WM_mask_ero.nii.gz
    ROI:                  seed FG1K130423_rh.SMG_ImplFB_UNI_MNI_bin.nii.gz

I have removed all things equal from your MRtrix 0.2 and MRtrix 3.0 settings. This leaves:

MRtrix 0.2

count: 100000
init_threshold: 0.2
max_num_attempts: 10000000
max_num_tracks: 100000
method: SD_PROB
total_count: 160709

MRtrix 3.0 parameters adapted to 0.2 defaults

count: 11339
fod_power: 1
init_threshold: 0.1
max_num_seeds: 100000
max_num_tracks: 0
max_seed_attempts: 1000
method: iFOD1
total_count: 27453

One obvious difference is the init_threshold, which specifies the minimally required FOD amplitude to even start tracking.

Other differences might be related to the FOD power. I am not sure if the power was indeed 1 in 0.2. Also not sure how to translate the entries related to seeding and attempts between version 3 and 0.2. Maybe @jdtournier can help shed light here?

Dear Ben,

thanks for looking at this! I’ve actually adapted the init_treshold (assuming that it is set by the command -cutoff as described in the tckgen docs) to 0.1 for MRTrix 3.0 since I thought I’ve seen it somewhere that this was the default for 0.2. However I didn’t think of just looking into the tckinfo.

I’ll try to see what happens if I adapt that as well.

No power in iFOD1, so that’s not an issue.

That’s going to be trickier to reconcile, it’s where most of the differences are likely to be. I’d have to go back over all the discussions that went into the current seeding strategy, but I have a feeling the main difference is that in 0.2, attempts are made to initiate a streamline at a random position along a random direction (unless -initdirection / -seed_direction is set), and if unsuccessful (because FOD amplitude along that direction is below the -initcutoff / -seed_cutoff), the algorithm moves straight onto trying a different random location & direction.

In MRtrix3, the algorithm tries harder to initiate a streamline from each location, picking a fresh random direction and seeing if the FOD amplitude along that direction is above threshold, for a maximum number of attempts as set by -max_attempts_per_seed, which is 1000 by default. So you can probably replicate that by setting this value to 1.

The other big difference is the number of trials per point along the streamline: that’s the number of random directions along which the algorithm will evaluate the FOD amplitude to try to find a valid (above threshold) direction for the next step. In MRtrix 0.2, I think the default was set to 50 (so it after 50 attempts at finding a direction above threshold, the algorithm would terminate the streamline), and that’s controlled by the -trials option. In MRtrix3, the default is 1000, and is also controlled by the same option.

So to match that behaviour, I have a feeling it would be sufficient to add these to the comand line:

tckgen ... -max_attempts_per_seed 1 -trials 50

Though I must admit it’s been a very long time since I looked at the 0.2 series, development on that branch stopped in ~2011 or so…

Hi, Tournier!

I wonder why you suggested setting the parameters smaller? From the results posted above, it seems that in MRtrix3 some streamlines had disappeared, while they can be tracked in MRtrix0.2, which indicated that MRtrix3 performs a more strict strategy. Thus, I think set -trials 50 and -max_attempts_per_seed 1 is irrational, which may cause the tractography to stop prematurely. However, even if I set the parameters bigger than default, it still did not work.

Besides, is there any method else I can take to solve this problem? Or are there any reasons that may be account for this phenomenon? For example, streamlines that disappear in mrtrix3 are actually false-positive results?

Thank you!

I must admit it’s been a while since I looked at this issue… But looking through it again, these settings (-trials & max_attempts_per_seed) are unlikely to change the results enormously.

One other issue that might have had an impact on the tractography was a bug in the handling of the spherical harmonics, but this didn’t affect the original MRtrix 0.2 series and has been fixed in the MRtrix3 series since 3.0.0. So that’s probably not an issue of concern here.

Looking at the screenshots in the original post though, I think the main remaining difference is likely just to be the number of streamlines. There were 100,000 in the MRtrix 0.2.13 results, but only 11,339 in the adapted MRtrix 3.0.0 results – this could be adjusted using -seeds 0 -select 100k to match the 0.2.13 version. That can make quite a difference to the appearance of the smaller, lower probability paths, which from what I can tell is where the bulk of the remaining differences are.