Q:Hi all, Two brief brief questions. I have a volume of labeled structures (AAL labels) that I want to render onto a cortical surface. Now, ray_trace does the job, but the default continuous color maps don’t do a very good job of delineating adjacent structures. For example, as the label numbers for the superior temp gyrus and MTG are quite close, both get rendered in a subtly different shade of yellow (using the spectral color map). Questions:

(1) does anyone have a ray_trace formatted colormap, suitable for rendering labels, that I can plug into the ray_trace “-usercc” argument?

(2) does anyone know the required file format needed to use the ray_trace “-usercc” argument, so that I can cobble my own together?

Thanks,

A:I have played with those colours in the past. I forget the details, but here are some clues:

bicpl/Volumes/colour_coding.c, function recreate_piecewise_function()

You may be able to create labels from this:

   static  colour_point  spectral_points[] =
                   { { 0.00, 0.0000,0.0000,0.0000, 1.0, RGB_SPACE},
                     { 0.05, 0.4667,0.0000,0.5333, 1.0, RGB_SPACE},
                     { 0.10, 0.5333,0.0000,0.6000, 1.0, RGB_SPACE},
                     { 0.15, 0.0000,0.0000,0.6667, 1.0, RGB_SPACE},
                     { 0.20, 0.0000,0.0000,0.8667, 1.0, RGB_SPACE},
                     { 0.25, 0.0000,0.4667,0.8667, 1.0, RGB_SPACE},
                      …
                     { 0.85, 1.0000,0.0000,0.0000, 1.0, RGB_SPACE},
                     { 0.90, 0.8667,0.0000,0.0000, 1.0, RGB_SPACE},
                     { 0.95, 0.8000,0.0000,0.0000, 1.0, RGB_SPACE},
                     { 1.00, 0.8000,0.8000,0.8000, 1.0, RGB_SPACE}
                   };

First column runs from 0 to 1 and maps to (MIN,MAX) in your intensity range. Suppose you want 10 labels being 1,2,3,4,5,6,7,8,9,10.

   { { 0.00,     0.0000,0.0000,0.0000, 1.0, RGB_SPACE},  // label 1 centered at 0.05
     { 0.099999, 0.0000,0.0000,0.0000, 1.0, RGB_SPACE},
     { 0.100001, 0.4667,0.0000,0.5333, 1.0, RGB_SPACE},  // label 2 centered at 0.15
     { 0.199999, 0.4667,0.0000,0.5333, 1.0, RGB_SPACE},
     { 0.200001, 0.5333,0.0000,0.6000, 1.0, RGB_SPACE},  // label 3 centered at 0.25
     { 0.299999, 0.5333,0.0000,0.6000, 1.0, RGB_SPACE},

Also have a look at brain-view-0.7.0/src/brainApp.cc for a list of labels for painting:

  1. define NUM_PAINTING_LABELS 32

static unsigned char rgbt[] = { 255, 255, 255, // white

                               255,   0,   0,   // red
                                 0, 255,   0,   // green
                                 0,   0, 255,   // blue
                               // from http://cloford.com/resources/colours/500col.htm
                               255, 181, 197,   // pink 1
                               205, 105, 201,   // orchid 3
                               132, 112, 255,   // lightslateblue
                                78, 238, 148,   // seagreen 2
                               255, 255,   0,   // yellow 1
                               255, 185,  15,   // darkgoldenrod 1
                               255, 231, 186,   // wheat 1
                                56, 142, 142,   // sgi teal
                               197, 193, 170,   // sgi brightgray
                               139,  26,  26,   // firebrick 4
                               139, 137, 137,   // snow 4
                               244, 164,  96,   // sandybrown
                               255, 215,   0,   // gold 1
                               205, 205,   0,   // yellow 3
                               118, 238,   0,   // chartreuse 2
                               189, 252, 201,   // mint
                                72, 209, 204,   // mediumturquoise
                               255,   0, 255,   // magenta
                               205, 181, 205,   // thistle 1
                               145,  44, 238,   // purple 2
                                72, 118, 255,   // royalblue 1
                                 0, 255, 127,   // springgreen
                               107, 142,  35,   // olivedrab
                               237, 145,  33,   // carrot
                               158, 158, 158,   // gray 62
                                26,  26,  26,   // gray 10
                               238,  59,  59,   // brown 2
                               124, 205, 124    // palegreen 3
                             };

Have fun. If you get something nice in bicpl, feed it back my way so that I can include in the next version.

A:I can’t help on the first bit but I would guess that they would follow the same format as minclookup (man minclookup for more). As an example here is the spectral colourmap that can be passed to minclookup

harold:Downloads$ cat ~rotor/lib/luts/spectral 0.00 0.0000 0.0000 0.0000
0.05 0.4667 0.0000 0.5333
0.10 0.5333 0.0000 0.6000
0.15 0.0000 0.0000 0.6667
0.20 0.0000 0.0000 0.8667
0.25 0.0000 0.4667 0.8667
0.30 0.0000 0.6000 0.8667
0.35 0.0000 0.6667 0.6667
0.40 0.0000 0.6667 0.5333
0.45 0.0000 0.6000 0.0000
0.50 0.0000 0.7333 0.0000
0.55 0.0000 0.8667 0.0000
0.60 0.0000 1.0000 0.0000
0.65 0.7333 1.0000 0.0000
0.70 0.9333 0.9333 0.0000
0.75 1.0000 0.8000 0.0000
0.80 1.0000 0.6000 0.0000
0.85 1.0000 0.0000 0.0000
0.90 0.8667 0.0000 0.0000
0.95 0.8000 0.0000 0.0000
1.00 0.8000 0.8000 0.8000
For a discrete colourmap the first column would be an integer set from 0–255