Hello,
I noticed the following errors when running @SUMA_Spec_FS to convert Freesurfer outputs into AFNI/SUMA format.
I ran @SUMA_Make_Spec_FS like this:
I got the following errors, which seem to suggest a problem reading the FreeSurfer color table (FreeSurferColorLUT.txt):
Setting -FScmaprange to [13100 13199]
-- Error SUMA_readFScolorLUT (SUMA_Surface_IO.c:1982):
Failed to read r
-- Error SUMA_readFSannot (SUMA_Surface_IO.c:2259):
Failed to read FS color table /Applications/freesurfer/8.1.0/FreeSurferColorLUT.txt
-- Error FSread_annot (SUMA_FSread_annot.c:421):
Failed reading annotation file (or output file exists)
++ Notice FSread_annot (SUMA_FSread_annot.c:298 @14:15:54):
Guessed FS annot version of 2009
++ Notice FSread_annot (SUMA_FSread_annot.c:312 @14:15:54):
Guessed right hemisphere
++ Notice FSread_annot (SUMA_FSread_annot.c:333 @14:15:54):
Using /Applications/freesurfer/8.1.0/FreeSurferColorLUT.txt
++ Notice FSread_annot (SUMA_FSread_annot.c:348 @14:15:54):
Setting -FScmaprange to [14100 14199]
-- Error SUMA_readFScolorLUT (SUMA_Surface_IO.c:1982):
Failed to read r
-- Error SUMA_readFSannot (SUMA_Surface_IO.c:2259):
Failed to read FS color table /Applications/freesurfer/8.1.0/FreeSurferColorLUT.txt
-- Error FSread_annot (SUMA_FSread_annot.c:421):
Failed reading annotation file (or output file exists)
Although these errors are shown, the @SUMA_Make_Spec_FS's process appears to complete without stopping.
Also, I checked the first few lines of FreeSurferColorLUT.txt, and it seems that its format is correct.
#No. Label Name: R G B A
0 Unknown 0 0 0 0
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
4 Left-Lateral-Ventricle 120 18 134 0
My FreeSurfer version is 8.1.0, and AFNI is:
Precompiled binary macos_13_ARM: Sep 17 2025 (Version AFNI_25.2.13).
Could these errors be related to my laptop environment, or could there be a problem with the FreeSurferColorLUT.txt file?
When I run your @SUMA_Make_Spec_FS command (having FreeSurfer ver=8.1.0 loaded), I do get the same error message, even when I don't use -use_mgz, which I don't normally do. While this error is most non-fatal, when I run a diff on the outputs from an earlier run I had, in this case I do not have the following files:
For whatever reason, the issue seems to be related to the FreeSurfer version that is being used. When I run the same command with FreeSurfer ver=7.4.1, I do not get any errors. (This had been the previous version of FS that I had used, and I had not seen these errors, and I did get the above *cmap, *roi, *dset, files.)
I am not sure exactly what has changed between FS 7.4.1 and 8.1.0, but apparently something has. The @SUMA_Make_Spec_FS command does use some FS commands, like mris_convert.
So, I don't have a fix, but I have a better idea of what is happening and where it is affected.
Thank you for looking into the issue and for the update.
It's helpful for me to know that the problem may be related to the FreeSurfer version.
I'd appreciate it if you could let me know when any updates or possible solutions are available.
I think I might have found the issue. The FreeSurfer file "FreeSurferColorLUT_8.1.0.txt" typically has the following structure, of a number, a label, and 4 color values (R G B A), like this at the start of the file:
That is the case for FreeSurferColorLUT_7.4.1.txt all the way through. However, FreeSurferColorLUT_8.1.0.txt has a chunk with an extra column of numbers here:
This breaks the readability of this file with AFNI's FSread_annot, at present. I will reach out to the FreeSurfer folks for more guidance, and possibly a more permanent fix.
I have heard back (quickly) from the FreeSurfer developers. It seems that indeed an extra column of numbers was included for this subset of regions in the version-specific FreeSurferColorLUT_8.1.0.txt text file.
There is a new version of FreeSurfer, ver=8.2.0, that should not have this issue, so updating your FreeSurfer version should fix this problem.
Or, if you are not wanting to update your version, you should be able to edit the current text file, to remove that last column (which is the extra info), and hence be:
Thank you for sharing the update!
I will first try editing the current FreeSurferColorLUT.txt.
If I need to revise a lot, I will update my Freesurfer.
I will let you know when I have any results.
Sounds like a plan. When I ran it, I just needed to edit the 11 lines shown above. Please let us know if it seems like any other editing would need to be done.
I edited the 11 lines of FreeSurferColorLUT.txt you shared, and @Make_SUMA_Spec_FS ran successfully without any errors.
Thank you very much for your help!
Nori
1 Like
The
National Institute of Mental Health (NIMH) is part of the National Institutes of
Health (NIH), a component of the U.S. Department of Health and Human
Services.