Tckstats on global tractography



Dear all,

I am getting an error when trying to run tckstats on global tractography.

tckstats: [ERROR] error converting string ""

Is this a “real” error or a bug? I was digging into the headers of the global vs iFOD2 .tck files and they look very different:


  Tracks file: "../whole_brain/100M.tck"
    act:                  /path/to/folder/5TT.mif
    backtrack:            1
    count:                100000000
    crop_at_gmwmi:        1
    downsample_factor:    3
    fod_power:            0.25
    init_threshold:       0.0599999987
    lmax:                 8
    max_angle:            45
    max_dist:             250
    max_num_attempts:     10000000000
    max_num_tracks:       100000000
    max_seed_attempts:    50
    max_trials:           1000
    method:               iFOD2
    min_dist:             2.5
    mrtrix_version:       0.3.15-32-g01c8f960
    output_step_size:     0.625
    rk4:                  0
    samples_per_step:     4
    seed_dynamic:         /path/to/folder/WM_FODs.mif
    sh_precomputed:       1
    source:               /path/to/folder/WM_FODs.mif
    step_size:            0.625
    stop_on_all_include:  0
    threshold:            0.06
    timestamp:            1500552604.6361789703
    total_count:          112897005
    unidirectional:       0
    ROI:                  seed WM_FODs.mif


  Tracks file: "tracks.tck"
    count:                266400
    mrtrix_version:       3.0_RC1-189-gbe66a20a
    timestamp:            1500639794.3952083588
    total_count:          266400
    Comments:             global tractography
                       segment length = 1.000000
                       segment weight = 0.100000
                       connection potential = 0.500000
                       particle potential = 0.050000
                       no. iterations = 1000000000
                       T0 = 0.100000
                       T1 = 0.001000

Does tckstats need some of the header info found in iFOD2 header in order to compute the stats that is not available in the global header?



Hi Claude,

Yes, looks like the tckstats code is making an assumption about the presence of a header entry that encodes the streamline step size (which doesn’t exist in the output of tckglobal). Although tckstats is in fact designed to be able to operate on track data that do not have a constant step size, it’s producing an error because it’s nevertheless trying to interpret that field even though it’s not present.

I’ll push a fix out for this when I get the chance.


Hi Rob,
Do you know whether this issue has been fixed ?
Thanks, C.


Hi Carlos,

The fix was implemented here, and went out as part of the 3.0_RC2 tag. Apologies that it was left off the reported changelog; hopefully as the prevalence of outright “bugs” decreases over time, we can be more exhaustive in the reporting of such without boring people due to the length of the list.



Thanks, it works perfectly. Regards, C.