#!ascii , CsurfColorLUT.txt (put into $CSURF_DIR/lib/lut)
##########################################################################
# Annotation regions defined by visual, auditory, and somatomotor maps
##########################################################################
# Parcellation drawn on fsaverage using mapping data from:
#-------------------------------------------------------------------------
# Sood, M. and M.I. Sereno (2016)
# Areas activated during naturalistic reading comprehension overlap
# topological visual, auditory, and somatotomotor maps.
# Human Brain Mapping 37:2784-2810.
# https://pages.ucsd.edu/~msereno/papers/LangMaps16.pdf
#-------------------------------------------------------------------------
# Huang, R.-S. and M.I. Sereno (2013)
# Bottom-up retinotopic organization supports top-down mental imagery.
# The Open Neuroimaging Journal 7:58-67.
# https://pages.ucsd.edu/~msereno/papers/ImaginedNav13.pdf
#-------------------------------------------------------------------------
# Parcellation publication:
#-------------------------------------------------------------------------
# Sereno, M.I., M.R. Sood, and R.-S. Huang (2022)
# Topological Maps and Brain Computations From Low to High.
# Frontiers in System Neuroscience 16:787737
# https://pages.ucsd.edu/~msereno/papers/MapsLowToHigh22.pdf
##########################################################################
# Use this file to direct assembly of .annot w/csurf tksurfer write_mgh_annot
##########################################################################
### filename format (for csurf tksurfer write_mgh_annot)
# for each $region name in this file, need matching individual label file
# label filename must follow this format (dash '-', not dot '.' after hemi):
#   -------------------
#   $hemi-$region.label
#   -------------------
# hemi-specific, so opposite hemi labels w/same region name are ignored
### rules
# missing label files for this hemi are omitted from final annotation  
# dup region names or colors cause interactive error, write_mgh_annot bail
# works for labels from both hemi's (lh-*, rh-*)
# if multiple hits at vtx from more than one label, last in this file wins color
# alpha here ignored: {U,u}known=>forced to transparent (live-adjust alpha)
### two directives recognized to comment-in/comment-out blocks of regions:
#  ### exclude_following
#  ### include_following
#  N.B.: the first of the 3 hashes must be first char on line to take effect
#    (so directives can be commented out as above)
#  the default state without any directives, of course, is show all regions
### HOWTO USE: from tksurfer interface:
#  ctrl-mid-click "W" on "label:" line to make pop-up
#  enter MGH-style Color LUT (def: $CSURF_DIR/lib/lut/CsurfColorLUT.txt)
#  enter output .annot file (def: $subject/label/$hemi.MY_ANNOT.annot)
#  click READY (OK to skip overlap check)
### HOWTO USE: from tksurfer tcl script:
#  set lulabel <this-file>
#  set anlabel <annot-outfile>
#  write_mgh_annot
### HOWTO AVOID: mris_convert crash & freeview errs on write_mgh_annot output:
#  FreeSurfer utils/colortable.c:CTABreadFromBinaryV1() vers1 req'd seq idnums
#  FreeSurfer utils/colortable.c:CTABreadFromBinaryV2() vers2 holes OK, buggy
#  csurf write_mgh_annot() workaround for FreeSurfer bugs:
#   (1) sequentially re-number region ids to remove holes in list
#   (2) increment max renum'd region idnum by 1 in header so equals idnum count
#  This means region ID nums below will *not* be preserved in annot output file
#  Instead, find new region/idnum mapping in text file always written when an
#   annotation is read: e.g., $SUBJECTS_DIR/fsaverage/scripts/CsurfMaps1.ctab
##########################################################################
#idnum regionname(=labelinfix)          R   G   B   A
#-------------------------------------------------------------------------
### Any vertex not covered by a label given this region
0      Unknown                          0   0   0   0

# ### exclude_following
# ### include_following
#-------------------------------------------------------------------------
### Visual (100-199)
#-------------------------------------------------------------------------
## primary, secondary, tertiary Areas: V1,V2,V3,VP
100    V1_lower                       100   0 190   0
101    V1_upper                       100   0 200   0
102    V2_lower                        60  20 240   0
103    V2_upper                        60  20 250   0
104    V3                              30  60 200   0
105    VP                              30  60 220   0

## lateral intermediate areas: V3A+, V6, POm, LO's
110    DI                              70 100 230   0
111    V3A                             10  95 220   0
112    V3B                             30 100 250   0
# V3C-> OPA
113    OPA                             80 100 180   0
114    LO1                             90 110 190   0
115    LO2                             90 130 150   0
116    LO3                             90 120 150   0
117    PGp                             90 130 170   0

## posterior medial areas: V6, V6A, Prostriata
120    V6                              35 150 185   0
121    V6A                             35 130 195   0
122    aPOS                           105 105 185   0
123    POm                            110 110 230   0
124    ProS1                           80  70 150   0
125    ProS2                           90  80 120   0

# lateral temporal areas: MT, MSTd etc, 7b
130    MT_lower                        35 175 175   0
131    MT_upper                        40 180 180   0
132    MTc                             50 140 180   0
133    MSTd                            65 130 170   0
134    MSTv                            70 150 195   0
135    FSTd                            45 120 175   0
136    STV1                            40 100 120   0
137    STV2                            45 135 140   0
138    7b_PICv                         50 165 165   0
139    7b_PICv,s                       50 195 165   0

# inferior intermediate areas: V4v, V8, fusiform, ventral vis
140    V4v                             45  65 245   0
141    hV4                             75  75 180   0
142    V8                             100  95 205   0
143    PITd                            80  90 160   0
144    PH                              95 115 160   0
145    FFC                            115 125 160   0
146    VVC                            125 135 175   0
# VMV1,VMV2 -> VO2,VO1
147    VO2                            135  75 140   0
148    VO1                            145  95 150   0

# superior parietal areas: V7, LIP's, VIP's (SPL1,SPL2 -> IPS5,IPS4)
150    V7                              70 100 220   0
151    cIPS                            70  90 170   0
152    LIP0                            80 120 230   0
153    LIP1                            90 140 240   0
154    PEc                             90 160 185   0
155    IPS5                            90  85 205   0
156    IPS4                           100  95 240   0
157    aPCu1                          115  75 150   0
158    aPCu2                          145 100 160   0
# VIP's (divide VIP into vis and vis,somato, put AIPv,s in somato)
160    VIP1v                           70  170 170  0
161    VIP1v,s                         90  190 100  0
162    VIP2v                           50  150 150  0
163    VIP2v,s                        100  200 110  0

## frontal visual areas (FEF, dmFEF, DLPFC)
170    dmFEF                          120  80 210   0
171    FEF                             50 200 110   0
172    6a                              75 150 100   0
173    DLPFC                          125 130 220   0
174    DLPFCa                         105 110 190   0

# ### exclude_following
# ### include_following
#-------------------------------------------------------------------------
### Auditory (200-299)
#-------------------------------------------------------------------------
# primary-like
200    A1                             220  10  20   0
201    R                              240  35  60   0
202    RT                             250  65  90   0

# posterior belt
203    CM                             160  30  80   0
204    CL                             190  30  85   0

# medial belt (found 2 not 3, diff map grad from Rauscheker)
210    MM                             250  70  30   0
211    RM                             250  95  30   0

### start Rauscheker renaming, A4a up one level in hierarchy
#foreach hemi (lh rh)
#  mv -i $hemi-LBelt1.label $hemi-ML.label
#  mv -i $hemi-LBelt2.label $hemi-AL.label
#  mv -i $hemi-LBelt3.label $hemi-RTL.label
#  mv -i $hemi-PBelt1.label $hemi-CP.label
#  mv -i $hemi-PBelt2.label $hemi-MP.label
#  mv -i $hemi-A4b.label $hemi-AP.label
#  mv -i $hemi-A5c.label $hemi-RP.label
#  mv -i $hemi-A4a.label $hemi-C_A4.label
#  mv -i $hemi-A5a.label $hemi-M_A4.label
#  mv -i $hemi-A5b.label $hemi-R_A4.label
#end

# lateral belt
#213    LBelt1                         240  55  60   0
213    ML                             240  55  60   0
#214    LBelt2                         240  85  80   0
214    AL                             240  85  80   0
#215    LBelt3                         240 100  90   0
215    RTL                            240 100  90   0

# lateral parabelt, intermed
221    TA2                            180  85  90   0
220    TA3                            165  65  80   0
#222    PBelt1                         250  95 110   0
222    CP                             250  95 110   0
#223    PBelt2                         250 115 130   0
#223    MP                             250 115 130   0
223    MPc                            250 115 130   0

# higher-level: A4
#230    A4a                            220 125 150   0
230    C_A4                           165 115  70   0
#231    A4b                            220 135 170   0
#231    AP                             220 135 170   0
231    MPr                            220 135 170   0

# higher-level: A5
#232    A5a                            190 135  85   0
232    M_A4                            190 135  85   0
#233    A5b                            185 125  65   0
233    R_A4                           185 125  65   0
#234    A5c                            165 115  70   0
234    RP                             220 125 150   0

# STS aud - near VanEssen STPdp/TPOJ1
#240    A6a                            150  90  85   0
240    R_A5                            150  90  85   0
#242    A6b                            140  80  70   0
242    M_A5                            140  80  70   0
#next A6c overlaps STVa
#241    A6c                            110  80  70   0
241    C_A5                            110  80  70   0
### end Rauscheker rename

# small auditory area in unactivated genital rep (3a,3b) between hand/foot
250    3aud                           230 130  70   0
# subcentral (tympanum area? [here], primary gustatory?)
251    43aud                          215 150  70   0
# posterior sylvian (overlaps lg VanEssen PSL=perisylvian language area)
252    PSaud1                         240  85 130   0
253    PSaud2                         230 105 120   0

# frontal
260    dmFAF                          250 125 125   0
261    p32aud                         220  95  95   0
262    PZa,v,s                        190 105  85   0
263    PZa,s                          200 115  95   0
# next DLPFCaud overlaps DLPFCa
264    DLPFCaud                       210 120  20   0
265    IFSp                           180  95  10   0
266    45aud                          200 145  20   0
267    FOPaud                         220 145  35   0

# ### exclude_following
# ### include_following
#-------------------------------------------------------------------------
### Somato (300-399)
#-------------------------------------------------------------------------
# primary
# area 3b
301    3b_face                        20  200  10   0
302    3b_hand                        20  205  10   0
303    3b_foot                        20  210  10   0
# area 3a
305    3a_face                        40  220  25   0
306    3a_hand                        50  230  35   0
307    3a_foot                        60  240  45   0
# area 1
309    1_face                         40  210  30   0
310    1_hand                         40  215  30   0
311    1_foot                         40  225  30   0
# not yet divided foot/hand/face
312    2                              70  255  80   0
#313    2_face
#314    2_hand
#315    2_foot

# dorsal, parietal secondary (PFt mostly foot)
320    5m                             70  190  70   0
321    5L                             80  170  80   0
322    PFt                           100  190 100   0
# Pitzalis posterior cingulate sulcus (vis/leg)
323    pCI                            90  160  90   0

# lateral secondary
330    S_II                           100 160  45   0
331    PV                             120 180  55   0
332    Ig                             120 200  75   0
333    FOP2                           120 220  75   0

# multisensory
334    AIPv,s                          70 200 95   0
335    PHt                             55 215 80   0

#-------------------------------------------------------------------------
### Motor (400-499)
#-------------------------------------------------------------------------
# primary (diag bord moving anterior 3b->4, hand/face border more medial)
# area 4
401    4_face                         10  190  15   0
402    4_hand                         20  190  25   0
403    4_foot                         30  190  35   0
#404    4a
#405    4a_face
#406    4a_hand
#407    4a_foot

# supplementary motor
410    6d                              30 150  35   0
420    SMA1                            65 160  60   0
421    SMA2                            75 170  70   0

