I posted this back in January, and got a direct email reply from
someone on the mailing list, who gave me a helpful tip, but it
doesn't seem to be working out quite right.
The problem: I have 3 .annot files per hemisphere, each based on the
?h.aparc.annot files (36 regions), but in each file, a different
subset of these 36 regions has been further subdivided using the
connectomemapper toolkit. I would like to merge all the subdivided
regions, the definitions of which are spread across 3 files, into a
single .annot file for each hemisphere.
The one response I received said:
After running cmtk on a subject you'll notice that in
/FREESURFER/labels there are folders for each parcellation called
"regenerated_?h_500" for example that contain all of the subdivided
labels from that resolution Lausanne parcellation. I used
mris_label2annot (http://surfer.nmr.mgh.harvard.edu/fswiki/mris_label2annot)
to combine all of the desired labels into a single annot. The trick
is that you need to type each label name one at a time with an --l
flag (easy to make a script to do this quickly) and you need to
supply a clut file, which has to be in the format freesurfer is
expecting (which is also easy to generate, and the colors can be
arbitrary).
I've been trying this for a few days now without success. I also
tried deconstructing the original .annot files using
mri_annotation2label and then reassembling the label files using
mris_label2annot (in the event that the label files I had been
previously using were somehow mangled). Either approach seems to
land me in the same place.
The regions are generally in the right general anatomical area, but
most are out of place within those regions. For example I've got
renderings comparing the original definition of precentral_1
(highlighted region in purple in ORIGINAL.tiff), which has become
precentral_20 (in REDONE.tiff). Similarly, parsoparcularis_10 has
become parsoparcularis_1. But parahippocampal_1 was found in the
paracentral region. All of these shifts look as though the label
came from an adjacent region (alphabetically, as my ctab and scripts
list the regions alphabetically).
Also notable is that the left has 500 entries in the ctab file, but
running my script gives the following output:
...<snip>
499 8697855 transversetemporal_3
500 8763647 transversetemporal_4
501 -1 NOT_FOUND
Mapping unhit to unknown
Found 1526 unhit vertices
Similarly, the script for the right side also tries to map 503/502
entries. These errors and the fact that the reassignments look like
they are off-by-one errors leads me to suspect that it might have
something to do with my ctab files, as the region boundaries seem to
be maintained. If anyone has any suggestions, I'm going to include
links to the renderings, my scripts that execute mris_label2annot
for each hemisphere, and my ctab files. I'm hoping I've left enough
clues for someone to see where I'm going wrong.