[labelconvert] bilateral thalamus gone

Hi Rob,

In my group analysis (N=~200), I found that labelconvert “skipped” specifically the bilateral thalamus. No error messages until I ran tck2connectome:

tck2connectome: [WARNING] existing output files will be overwritten
tck2connectome: [WARNING] The following nodes are missing from the parcellation image:
tck2connectome: [WARNING] 76, 83
tck2connectome: [WARNING] (This may indicate poor parcellation image preparation, use of incorrect or incomplete LUT file(s) in labelconvert, or very poor registration)

Please find this figure showing the original freesurfer aparc+aseg (greyscale) overlaid with the “converted” aparc+aseg (yellow-red), which does not include the thalamus.

I used FreeSurferColotLUT.txt containing:

49 Right-Thalamus-Proper

and mrtrix’s fs_default.txt containing:

43 R.TH Right-Thalamus-Proper

Why would this error occur only to the thalamus across all subjects??


Why would this error occur only to the thalamus across all subjects?


Never seen this before…

Only thing I can suggest is checking the raw image intensity within the thalami of the input image to labelconvert i.e. the raw FreeSurfer output: maybe they have been labelled by FreeSurfer as e.g. “Right-Thalamus” (48) instead of “Right-Thalamus-Proper” (49)?

This issue can crop up with custom lookup tables due to minor spelling errors: The name of the node must be precisely identical between the two lookup tables in order for labelconvert to construct the input-output index mapping. But given you’re using software-provided lookup table files as both input and output, I wouldn’t expect this to have occurred in your case.


Hi @Jiook_Cha,

According to this line, I guess you actually used fs_a2009s.txt for the lut_out argument when running labelconvert? In this case, the input parcellation image needs to be aparc.a2009s+aseg.mgz as provided by FreeSurfer, not the aparc+aseg as you described.

But having said that you also mentioned:

So, I would suggest that you check your labelconvert step to ensure the consistency of your inputs.


No, that has not been changed with the latest FreeSurfer (v6.0).


Thanks for the suggestions, but I actually matched the input files and LUT files.

Strangely, when I ran labelconvert on my local computer, I was able to see the bilateral thalamus again (without changing any). The issue only occurs on the supercomputer.

While I’m curious to know why that might be the case, without the ability to reproduce the problem I can’t really help over and above suggestions for what to test:

  • Is the FreeSurferColorLUT.txt file identical between the two systems?

  • Is fs_default.txt identical between the two systems?

  • Is the input image identical between the two systems?

  • Is the compiled version of MRtrix3 identical between the two systems?

  • Another I’ll throw in for the sake of it: Is the locale identical between the two systems?

Rather than just checking that they’re the same, actually copy each potential source of variation from one system to the other, run the same command, and repeat until you achieve the same outcome on both systems.

While it’s possible for the outcomes of floating-point computations to vary slightly between processors, the labelconvert command is entirely integer-based; so unfortunately the cause is more likely to be a discrepancy between your usages on the two systems than a difference between the two systems themselves :worried: