Issue with labelconvert

Hi All,

I’ve started to create a structural connectome for an assignment and have encountered this error when running the labelconvert command

labelconvert: [ERROR] LUT file “FreeSurferColorLUT.txt” in unrecognized format:
labelconvert: [ERROR] [ integer unary_float unary_float unary_float text ]

Here is a snippet of how my freesurfercolorlut.txt file looks like

1 0.27450 0.50980 0.70588 Left-Cerebral-Exterior
2 0.96078 0.96078 0.96078 Left-Cerebral-White-Matter
3 0.80392 0.24313 0.30588 Left-Cerebral-Cortex

I’m not sure what the problem is with its format, if anyone could help that would be fantastic

Welcome @YJTrc!

I have no idea from where you have sourced your "freesurfercolorlut.txt` file, but it is clearly in a different format to that provided with FreeSurfer:

1   Left-Cerebral-Exterior                  70  130 180 0
2   Left-Cerebral-White-Matter              245 245 245 0
3   Left-Cerebral-Cortex                    205 62  78  0

It seems to me that somebody has converted the FreeSurfer lookup table into a different column formatting, and changed the colours from 0-255 to 0.0-1.0 scaling. MRtrix3 doesn’t support this format because it’s not a format I’ve ever seen before (see “list” of supported formats here).

While it would be quite easy to modify the MRtrix3 code in order to support this file, it would still be worthwhile tracing the source of this file to know where it has come from, and the justification for formatting in this particular way (perhaps for compatibility with some other software?). Even if nothing else, knowing the basis of the format would give me an appropriate name for such within the MRtrix3 source code :upside_down_face:


1 Like

Thank you for your help Rob! It’s been very useful!