[MINC-users] ray_trace colour maps and rendering labels
Claude LEPAGE
claude at bic.mni.mcgill.ca
Thu Mar 25 18:13:38 EDT 2010
Hi Jim,
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:
#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.
Claude
More information about the MINC-users
mailing list