00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00031 #ifndef _colormap_CPP_
00032 #define _colormap_CPP_
00033
00042 #include <colormap/colormap.h>
00043
00044
00045 class_colormap::~class_colormap(void){};
00046
00047 std_msgs::ColorRGBA class_colormap::color(int i)
00048 {
00049
00050 if (i<0)
00051 {
00052 std_msgs::ColorRGBA c;
00053 c.r = 0;
00054 c.g=0;
00055 c.b=0.6;
00056 c.a=1;
00057 return c;
00058 }
00059 else
00060 return cm[i%max_index];
00061 }
00062
00063 cv::Scalar class_colormap::cv_color(int i)
00064 {
00065 std_msgs::ColorRGBA c;
00066
00067 if (i<0)
00068 {
00069 c.r = 0;
00070 c.g=0;
00071 c.b=0.6;
00072 c.a=1;
00073 }
00074 else
00075 {
00076 c = color(i);
00077 }
00078
00079 cv::Scalar s;
00080 s.val[0] = c.b*255;
00081 s.val[1] = c.g*255;
00082 s.val[2] = c.r*255;
00083 return s;
00084 }
00085
00086
00087 class_colormap::class_colormap(std::string name, int total, float alfa, bool reverse)
00088 {
00089 if(name=="jet")
00090 init_colormap_jet(total, alfa, reverse);
00091 else if(name=="hsv")
00092 init_colormap_hsv(total, alfa, reverse);
00093 else if(name=="hot")
00094 init_colormap_hot(total, alfa, reverse);
00095 else if(name=="cool")
00096 init_colormap_cool(total, alfa, reverse);
00097 else if(name=="spring")
00098 init_colormap_spring(total, alfa, reverse);
00099 else if(name=="summer")
00100 init_colormap_summer(total, alfa, reverse);
00101 else if(name=="autumn")
00102 init_colormap_autumn(total, alfa, reverse);
00103 else if(name=="winter")
00104 init_colormap_winter(total, alfa, reverse);
00105 else if(name=="gray")
00106 init_colormap_gray(total, alfa, reverse);
00107 else if(name=="bone")
00108 init_colormap_bone(total, alfa, reverse);
00109 else if(name=="copper")
00110 init_colormap_copper(total, alfa, reverse);
00111 else if(name=="pink")
00112 init_colormap_pink(total, alfa, reverse);
00113 else if(name=="lines")
00114 init_colormap_lines(total, alfa, reverse);
00115 else
00116 {
00117 ROS_ERROR("Unknown colormap %s. Using default hot.", name.c_str());
00118 init_colormap_hot(total, alfa, reverse);
00119 }
00120 }
00121
00122 int class_colormap::setup_colormap(int total, float alfa, bool reverse, float* r, float* g, float* b)
00123 {
00124 if (total>64){total=64; ROS_WARN("Color map: maximum total colors in color map is 64.");}
00125 max_index = total;
00126
00127 std_msgs::ColorRGBA color;
00128 color.a = alfa;
00129
00130 double factor = 64./(double)total;
00131 for (int i=0; 1; i++)
00132 {
00133 int index = (int)((double)i*factor);
00134
00135 color.r = r[index];
00136 color.g = g[index];
00137 color.b = b[index];
00138 cm.push_back(color);
00139
00140 if((int)cm.size()>=total)
00141 break;
00142 }
00143
00144 if (reverse) std::reverse(cm.begin(),cm.end());
00145
00146 return 1;
00147 }
00148
00149
00150 int class_colormap::init_colormap_jet(int total, float alfa, bool reverse)
00151 {
00152 float r[64]={0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.0625, 0.125, 0.1875, 0.25, 0.3125, 0.375, 0.4375, 0.5, 0.5625, 0.625, 0.6875, 0.75, 0.8125, 0.875, 0.9375, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.9375, 0.875, 0.8125, 0.75, 0.6875, 0.625, 0.5625, 0.5};
00153 float g[64]={0, 0, 0, 0, 0, 0, 0, 0, 0.0625, 0.125, 0.1875, 0.25, 0.3125, 0.375, 0.4375, 0.5, 0.5625, 0.625, 0.6875, 0.75, 0.8125, 0.875, 0.9375, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.9375, 0.875, 0.8125, 0.75, 0.6875, 0.625, 0.5625, 0.5, 0.4375, 0.375, 0.3125, 0.25, 0.1875, 0.125, 0.0625, 0, 0, 0, 0, 0, 0, 0, 0, 0};
00154 float b[64]={0.5625, 0.625, 0.6875, 0.75, 0.8125, 0.875, 0.9375, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.9375, 0.875, 0.8125, 0.75, 0.6875, 0.625, 0.5625, 0.5, 0.4375, 0.375, 0.3125, 0.25, 0.1875, 0.125, 0.0625, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
00155 return setup_colormap(total, alfa, reverse, r, g, b);
00156 }
00157
00158 int class_colormap::init_colormap_hsv(int total, float alfa, bool reverse)
00159 {
00160 float r[64]={1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.96875, 0.875, 0.78125, 0.6875, 0.59375, 0.5, 0.40625, 0.3125, 0.21875, 0.125, 0.03125, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.03125, 0.125, 0.21875, 0.3125, 0.40625, 0.5, 0.59375, 0.6875, 0.78125, 0.875, 0.96875, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1};
00161 float g[64]={0, 0.09375, 0.1875, 0.28125, 0.375, 0.46875, 0.5625, 0.65625, 0.75, 0.84375, 0.9375, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.90625, 0.8125, 0.71875, 0.625, 0.53125, 0.4375, 0.34375, 0.25, 0.15625, 0.0625, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1};
00162 float b[64]={0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.0625, 0.15625, 0.25, 0.34375, 0.4375, 0.53125, 0.625, 0.71875, 0.8125, 0.90625, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.9375, 0.84375, 0.75, 0.65625, 0.5625, 0.46875, 0.375, 0.28125, 0.1875, 1};
00163 return setup_colormap(total, alfa, reverse, r, g, b);
00164 }
00165
00166 int class_colormap::init_colormap_hot(int total, float alfa, bool reverse)
00167 {
00168 float r[64]={0.041667, 0.083333, 0.125, 0.16667, 0.20833, 0.25, 0.29167, 0.33333, 0.375, 0.41667, 0.45833, 0.5, 0.54167, 0.58333, 0.625, 0.66667, 0.70833, 0.75, 0.79167, 0.83333, 0.875, 0.91667, 0.95833, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1};
00169
00170 float g[64]={0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.041667, 0.083333, 0.125, 0.16667, 0.20833, 0.25, 0.29167, 0.33333, 0.375, 0.41667, 0.45833, 0.5, 0.54167, 0.58333, 0.625, 0.66667, 0.70833, 0.75, 0.79167, 0.83333, 0.875, 0.91667, 0.95833, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.125};
00171
00172 float b[64]={0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.0625, 0.125, 0.1875, 0.25, 0.3125, 0.375, 0.4375, 0.5, 0.5625, 0.625, 0.6875, 0.75, 0.8125, 0.875, 0.9375, 0.041667};
00173
00174 return setup_colormap(total, alfa, reverse, r, g, b);
00175 }
00176
00177 int class_colormap::init_colormap_cool(int total, float alfa, bool reverse)
00178 {
00179 float r[64]={0, 0.015873, 0.031746, 0.047619, 0.063492, 0.079365, 0.095238, 0.11111, 0.12698, 0.14286, 0.15873, 0.1746, 0.19048, 0.20635, 0.22222, 0.2381, 0.25397, 0.26984, 0.28571, 0.30159, 0.31746, 0.33333, 0.34921, 0.36508, 0.38095, 0.39683, 0.4127, 0.42857, 0.44444, 0.46032, 0.47619, 0.49206, 0.50794, 0.52381, 0.53968, 0.55556, 0.57143, 0.5873, 0.60317, 0.61905, 0.63492, 0.65079, 0.66667, 0.68254, 0.69841, 0.71429, 0.73016, 0.74603, 0.7619, 0.77778, 0.79365, 0.80952, 0.8254, 0.84127, 0.85714, 0.87302, 0.88889, 0.90476, 0.92063, 0.93651, 0.95238, 0.96825, 0.98413, 1};
00180 float g[64]={1, 0.98413, 0.96825, 0.95238, 0.93651, 0.92063, 0.90476, 0.88889, 0.87302, 0.85714, 0.84127, 0.8254, 0.80952, 0.79365, 0.77778, 0.7619, 0.74603, 0.73016, 0.71429, 0.69841, 0.68254, 0.66667, 0.65079, 0.63492, 0.61905, 0.60317, 0.5873, 0.57143, 0.55556, 0.53968, 0.52381, 0.50794, 0.49206, 0.47619, 0.46032, 0.44444, 0.42857, 0.4127, 0.39683, 0.38095, 0.36508, 0.34921, 0.33333, 0.31746, 0.30159, 0.28571, 0.26984, 0.25397, 0.2381, 0.22222, 0.20635, 0.19048, 0.1746, 0.15873, 0.14286, 0.12698, 0.11111, 0.095238, 0.079365, 0.063492, 0.047619, 0.031746, 0.015873, 0.031746};
00181 float b[64]={1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0};
00182 return setup_colormap(total, alfa, reverse, r, g, b);
00183 }
00184
00185 int class_colormap::init_colormap_spring(int total, float alfa, bool reverse)
00186 {
00187 float r[64]={1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1};
00188 float g[64]={0, 0.015873, 0.031746, 0.047619, 0.063492, 0.079365, 0.095238, 0.11111, 0.12698, 0.14286, 0.15873, 0.1746, 0.19048, 0.20635, 0.22222, 0.2381, 0.25397, 0.26984, 0.28571, 0.30159, 0.31746, 0.33333, 0.34921, 0.36508, 0.38095, 0.39683, 0.4127, 0.42857, 0.44444, 0.46032, 0.47619, 0.49206, 0.50794, 0.52381, 0.53968, 0.55556, 0.57143, 0.5873, 0.60317, 0.61905, 0.63492, 0.65079, 0.66667, 0.68254, 0.69841, 0.71429, 0.73016, 0.74603, 0.7619, 0.77778, 0.79365, 0.80952, 0.8254, 0.84127, 0.85714, 0.87302, 0.88889, 0.90476, 0.92063, 0.93651, 0.95238, 0.96825, 0.98413, 1};
00189 float b[64]={1, 0.98413, 0.96825, 0.95238, 0.93651, 0.92063, 0.90476, 0.88889, 0.87302, 0.85714, 0.84127, 0.8254, 0.80952, 0.79365, 0.77778, 0.7619, 0.74603, 0.73016, 0.71429, 0.69841, 0.68254, 0.66667, 0.65079, 0.63492, 0.61905, 0.60317, 0.5873, 0.57143, 0.55556, 0.53968, 0.52381, 0.50794, 0.49206, 0.47619, 0.46032, 0.44444, 0.42857, 0.4127, 0.39683, 0.38095, 0.36508, 0.34921, 0.33333, 0.31746, 0.30159, 0.28571, 0.26984, 0.25397, 0.2381, 0.22222, 0.20635, 0.19048, 0.1746, 0.15873, 0.14286, 0.12698, 0.11111, 0.095238, 0.079365, 0.063492, 0.047619, 0.031746, 0.015873, 1};
00190
00191 return setup_colormap(total, alfa, reverse, r, g, b);
00192 }
00193
00194 int class_colormap::init_colormap_summer(int total, float alfa, bool reverse)
00195 {
00196 float r[64]={0, 0.015873, 0.031746, 0.047619, 0.063492, 0.079365, 0.095238, 0.11111, 0.12698, 0.14286, 0.15873, 0.1746, 0.19048, 0.20635, 0.22222, 0.2381, 0.25397, 0.26984, 0.28571, 0.30159, 0.31746, 0.33333, 0.34921, 0.36508, 0.38095, 0.39683, 0.4127, 0.42857, 0.44444, 0.46032, 0.47619, 0.49206, 0.50794, 0.52381, 0.53968, 0.55556, 0.57143, 0.5873, 0.60317, 0.61905, 0.63492, 0.65079, 0.66667, 0.68254, 0.69841, 0.71429, 0.73016, 0.74603, 0.7619, 0.77778, 0.79365, 0.80952, 0.8254, 0.84127, 0.85714, 0.87302, 0.88889, 0.90476, 0.92063, 0.93651, 0.95238, 0.96825, 0.98413, 1};
00197 float g[64]={0.5, 0.50794, 0.51587, 0.52381, 0.53175, 0.53968, 0.54762, 0.55556, 0.56349, 0.57143, 0.57937, 0.5873, 0.59524, 0.60317, 0.61111, 0.61905, 0.62698, 0.63492, 0.64286, 0.65079, 0.65873, 0.66667, 0.6746, 0.68254, 0.69048, 0.69841, 0.70635, 0.71429, 0.72222, 0.73016, 0.7381, 0.74603, 0.75397, 0.7619, 0.76984, 0.77778, 0.78571, 0.79365, 0.80159, 0.80952, 0.81746, 0.8254, 0.83333, 0.84127, 0.84921, 0.85714, 0.86508, 0.87302, 0.88095, 0.88889, 0.89683, 0.90476, 0.9127, 0.92063, 0.92857, 0.93651, 0.94444, 0.95238, 0.96032, 0.96825, 0.97619, 0.98413, 0.99206, 0.031746};
00198 float b[64]={0.4, 0.4, 0.4, 0.4, 0.4, 0.4, 0.4, 0.4, 0.4, 0.4, 0.4, 0.4, 0.4, 0.4, 0.4, 0.4, 0.4, 0.4, 0.4, 0.4, 0.4, 0.4, 0.4, 0.4, 0.4, 0.4, 0.4, 0.4, 0.4, 0.4, 0.4, 0.4, 0.4, 0.4, 0.4, 0.4, 0.4, 0.4, 0.4, 0.4, 0.4, 0.4, 0.4, 0.4, 0.4, 0.4, 0.4, 0.4, 0.4, 0.4, 0.4, 0.4, 0.4, 0.4, 0.4, 0.4, 0.4, 0.4, 0.4, 0.4, 0.4, 0.4, 0.4, 0};
00199
00200 return setup_colormap(total, alfa, reverse, r, g, b);
00201 }
00202
00203 int class_colormap::init_colormap_autumn(int total, float alfa, bool reverse)
00204 {
00205 float r[64]={1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1};
00206 float g[64]={0, 0.015873, 0.031746, 0.047619, 0.063492, 0.079365, 0.095238, 0.11111, 0.12698, 0.14286, 0.15873, 0.1746, 0.19048, 0.20635, 0.22222, 0.2381, 0.25397, 0.26984, 0.28571, 0.30159, 0.31746, 0.33333, 0.34921, 0.36508, 0.38095, 0.39683, 0.4127, 0.42857, 0.44444, 0.46032, 0.47619, 0.49206, 0.50794, 0.52381, 0.53968, 0.55556, 0.57143, 0.5873, 0.60317, 0.61905, 0.63492, 0.65079, 0.66667, 0.68254, 0.69841, 0.71429, 0.73016, 0.74603, 0.7619, 0.77778, 0.79365, 0.80952, 0.8254, 0.84127, 0.85714, 0.87302, 0.88889, 0.90476, 0.92063, 0.93651, 0.95238, 0.96825, 0.98413, 1};
00207 float b[64]={0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1};
00208
00209 return setup_colormap(total, alfa, reverse, r, g, b);
00210 }
00211
00212 int class_colormap::init_colormap_winter(int total, float alfa, bool reverse)
00213 {
00214 float r[64]={0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
00215 float g[64]={0, 0.015873, 0.031746, 0.047619, 0.063492, 0.079365, 0.095238, 0.11111, 0.12698, 0.14286, 0.15873, 0.1746, 0.19048, 0.20635, 0.22222, 0.2381, 0.25397, 0.26984, 0.28571, 0.30159, 0.31746, 0.33333, 0.34921, 0.36508, 0.38095, 0.39683, 0.4127, 0.42857, 0.44444, 0.46032, 0.47619, 0.49206, 0.50794, 0.52381, 0.53968, 0.55556, 0.57143, 0.5873, 0.60317, 0.61905, 0.63492, 0.65079, 0.66667, 0.68254, 0.69841, 0.71429, 0.73016, 0.74603, 0.7619, 0.77778, 0.79365, 0.80952, 0.8254, 0.84127, 0.85714, 0.87302, 0.88889, 0.90476, 0.92063, 0.93651, 0.95238, 0.96825, 0.98413, 0};
00216 float b[64]={1, 0.99206, 0.98413, 0.97619, 0.96825, 0.96032, 0.95238, 0.94444, 0.93651, 0.92857, 0.92063, 0.9127, 0.90476, 0.89683, 0.88889, 0.88095, 0.87302, 0.86508, 0.85714, 0.84921, 0.84127, 0.83333, 0.8254, 0.81746, 0.80952, 0.80159, 0.79365, 0.78571, 0.77778, 0.76984, 0.7619, 0.75397, 0.74603, 0.7381, 0.73016, 0.72222, 0.71429, 0.70635, 0.69841, 0.69048, 0.68254, 0.6746, 0.66667, 0.65873, 0.65079, 0.64286, 0.63492, 0.62698, 0.61905, 0.61111, 0.60317, 0.59524, 0.5873, 0.57937, 0.57143, 0.56349, 0.55556, 0.54762, 0.53968, 0.53175, 0.52381, 0.51587, 0.50794, 0};
00217
00218 return setup_colormap(total, alfa, reverse, r, g, b);
00219 }
00220
00221 int class_colormap::init_colormap_gray(int total, float alfa, bool reverse)
00222 {
00223 float r[64]={0, 0.015873, 0.031746, 0.047619, 0.063492, 0.079365, 0.095238, 0.11111, 0.12698, 0.14286, 0.15873, 0.1746, 0.19048, 0.20635, 0.22222, 0.2381, 0.25397, 0.26984, 0.28571, 0.30159, 0.31746, 0.33333, 0.34921, 0.36508, 0.38095, 0.39683, 0.4127, 0.42857, 0.44444, 0.46032, 0.47619, 0.49206, 0.50794, 0.52381, 0.53968, 0.55556, 0.57143, 0.5873, 0.60317, 0.61905, 0.63492, 0.65079, 0.66667, 0.68254, 0.69841, 0.71429, 0.73016, 0.74603, 0.7619, 0.77778, 0.79365, 0.80952, 0.8254, 0.84127, 0.85714, 0.87302, 0.88889, 0.90476, 0.92063, 0.93651, 0.95238, 0.96825, 0.98413, 1};
00224 float g[64]={0, 0.015873, 0.031746, 0.047619, 0.063492, 0.079365, 0.095238, 0.11111, 0.12698, 0.14286, 0.15873, 0.1746, 0.19048, 0.20635, 0.22222, 0.2381, 0.25397, 0.26984, 0.28571, 0.30159, 0.31746, 0.33333, 0.34921, 0.36508, 0.38095, 0.39683, 0.4127, 0.42857, 0.44444, 0.46032, 0.47619, 0.49206, 0.50794, 0.52381, 0.53968, 0.55556, 0.57143, 0.5873, 0.60317, 0.61905, 0.63492, 0.65079, 0.66667, 0.68254, 0.69841, 0.71429, 0.73016, 0.74603, 0.7619, 0.77778, 0.79365, 0.80952, 0.8254, 0.84127, 0.85714, 0.87302, 0.88889, 0.90476, 0.92063, 0.93651, 0.95238, 0.96825, 0.98413, 0.031746};
00225 float b[64]={0, 0.015873, 0.031746, 0.047619, 0.063492, 0.079365, 0.095238, 0.11111, 0.12698, 0.14286, 0.15873, 0.1746, 0.19048, 0.20635, 0.22222, 0.2381, 0.25397, 0.26984, 0.28571, 0.30159, 0.31746, 0.33333, 0.34921, 0.36508, 0.38095, 0.39683, 0.4127, 0.42857, 0.44444, 0.46032, 0.47619, 0.49206, 0.50794, 0.52381, 0.53968, 0.55556, 0.57143, 0.5873, 0.60317, 0.61905, 0.63492, 0.65079, 0.66667, 0.68254, 0.69841, 0.71429, 0.73016, 0.74603, 0.7619, 0.77778, 0.79365, 0.80952, 0.8254, 0.84127, 0.85714, 0.87302, 0.88889, 0.90476, 0.92063, 0.93651, 0.95238, 0.96825, 0.98413, 0};
00226
00227 return setup_colormap(total, alfa, reverse, r, g, b);
00228 }
00229
00230 int class_colormap::init_colormap_bone(int total, float alfa, bool reverse)
00231 {
00232 float r[64]={0, 0.013889, 0.027778, 0.041667, 0.055556, 0.069444, 0.083333, 0.097222, 0.11111, 0.125, 0.13889, 0.15278, 0.16667, 0.18056, 0.19444, 0.20833, 0.22222, 0.23611, 0.25, 0.26389, 0.27778, 0.29167, 0.30556, 0.31944, 0.33333, 0.34722, 0.36111, 0.375, 0.38889, 0.40278, 0.41667, 0.43056, 0.44444, 0.45833, 0.47222, 0.48611, 0.5, 0.51389, 0.52778, 0.54167, 0.55556, 0.56944, 0.58333, 0.59722, 0.61111, 0.625, 0.63889, 0.65278, 0.67448, 0.69618, 0.71788, 0.73958, 0.76128, 0.78299, 0.80469, 0.82639, 0.84809, 0.86979, 0.89149, 0.91319, 0.9349, 0.9566, 0.9783, 1};
00233 float g[64]={0, 0.013889, 0.027778, 0.041667, 0.055556, 0.069444, 0.083333, 0.097222, 0.11111, 0.125, 0.13889, 0.15278, 0.16667, 0.18056, 0.19444, 0.20833, 0.22222, 0.23611, 0.25, 0.26389, 0.27778, 0.29167, 0.30556, 0.31944, 0.33854, 0.35764, 0.37674, 0.39583, 0.41493, 0.43403, 0.45312, 0.47222, 0.49132, 0.51042, 0.52951, 0.54861, 0.56771, 0.58681, 0.6059, 0.625, 0.6441, 0.66319, 0.68229, 0.70139, 0.72049, 0.73958, 0.75868, 0.77778, 0.79167, 0.80556, 0.81944, 0.83333, 0.84722, 0.86111, 0.875, 0.88889, 0.90278, 0.91667, 0.93056, 0.94444, 0.95833, 0.97222, 0.98611, 0.027778};
00234 float b[64]={0.0052083, 0.024306, 0.043403, 0.0625, 0.081597, 0.10069, 0.11979, 0.13889, 0.15799, 0.17708, 0.19618, 0.21528, 0.23438, 0.25347, 0.27257, 0.29167, 0.31076, 0.32986, 0.34896, 0.36806, 0.38715, 0.40625, 0.42535, 0.44444, 0.45833, 0.47222, 0.48611, 0.5, 0.51389, 0.52778, 0.54167, 0.55556, 0.56944, 0.58333, 0.59722, 0.61111, 0.625, 0.63889, 0.65278, 0.66667, 0.68056, 0.69444, 0.70833, 0.72222, 0.73611, 0.75, 0.76389, 0.77778, 0.79167, 0.80556, 0.81944, 0.83333, 0.84722, 0.86111, 0.875, 0.88889, 0.90278, 0.91667, 0.93056, 0.94444, 0.95833, 0.97222, 0.98611, 0};
00235
00236 return setup_colormap(total, alfa, reverse, r, g, b);
00237 }
00238
00239 int class_colormap::init_colormap_copper(int total, float alfa, bool reverse)
00240 {
00241 float r[64]={0, 0.019841, 0.039683, 0.059524, 0.079365, 0.099206, 0.11905, 0.13889, 0.15873, 0.17857, 0.19841, 0.21825, 0.2381, 0.25794, 0.27778, 0.29762, 0.31746, 0.3373, 0.35714, 0.37698, 0.39683, 0.41667, 0.43651, 0.45635, 0.47619, 0.49603, 0.51587, 0.53571, 0.55556, 0.5754, 0.59524, 0.61508, 0.63492, 0.65476, 0.6746, 0.69444, 0.71429, 0.73413, 0.75397, 0.77381, 0.79365, 0.81349, 0.83333, 0.85317, 0.87302, 0.89286, 0.9127, 0.93254, 0.95238, 0.97222, 0.99206, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1};
00242 float g[64]={0, 0.0124, 0.0248, 0.0372, 0.0496, 0.062, 0.0744, 0.0868, 0.0992, 0.1116, 0.124, 0.1364, 0.1488, 0.1612, 0.1736, 0.186, 0.1984, 0.2108, 0.2232, 0.2356, 0.248, 0.2604, 0.2728, 0.2852, 0.2976, 0.31, 0.3224, 0.3348, 0.3472, 0.3596, 0.372, 0.3844, 0.3968, 0.4092, 0.4216, 0.434, 0.4464, 0.4588, 0.4712, 0.4836, 0.496, 0.5084, 0.5208, 0.5332, 0.5456, 0.558, 0.5704, 0.5828, 0.5952, 0.6076, 0.62, 0.6324, 0.6448, 0.6572, 0.6696, 0.682, 0.6944, 0.7068, 0.7192, 0.7316, 0.744, 0.7564, 0.7688, 0.039683};
00243 float b[64]={0, 0.0078968, 0.015794, 0.02369, 0.031587, 0.039484, 0.047381, 0.055278, 0.063175, 0.071071, 0.078968, 0.086865, 0.094762, 0.10266, 0.11056, 0.11845, 0.12635, 0.13425, 0.14214, 0.15004, 0.15794, 0.16583, 0.17373, 0.18163, 0.18952, 0.19742, 0.20532, 0.21321, 0.22111, 0.22901, 0.2369, 0.2448, 0.2527, 0.2606, 0.26849, 0.27639, 0.28429, 0.29218, 0.30008, 0.30798, 0.31587, 0.32377, 0.33167, 0.33956, 0.34746, 0.35536, 0.36325, 0.37115, 0.37905, 0.38694, 0.39484, 0.40274, 0.41063, 0.41853, 0.42643, 0.43433, 0.44222, 0.45012, 0.45802, 0.46591, 0.47381, 0.48171, 0.4896, 0};
00244
00245 return setup_colormap(total, alfa, reverse, r, g, b);
00246 }
00247
00248 int class_colormap::init_colormap_pink(int total, float alfa, bool reverse)
00249 {
00250 float r[64]={0.11785, 0.19586, 0.25066, 0.29547, 0.33432, 0.36911, 0.40089, 0.43033, 0.45788, 0.48387, 0.50853, 0.53204, 0.55456, 0.5762, 0.59706, 0.61721, 0.63673, 0.65566, 0.67407, 0.69198, 0.70944, 0.72648, 0.74313, 0.75942, 0.76636, 0.77323, 0.78004, 0.7868, 0.79349, 0.80013, 0.80672, 0.81325, 0.81973, 0.82616, 0.83254, 0.83887, 0.84515, 0.85139, 0.85758, 0.86373, 0.86984, 0.8759, 0.88192, 0.8879, 0.89384, 0.89974, 0.9056, 0.91142, 0.91721, 0.92296, 0.92867, 0.93435, 0.94, 0.94561, 0.95119, 0.95674, 0.96225, 0.96773, 0.97319, 0.97861, 0.984, 0.98936, 0.99469, 1};
00251 float g[64]={0, 0.10287, 0.14548, 0.17817, 0.20574, 0.23002, 0.25198, 0.27217, 0.29096, 0.30861, 0.3253, 0.34118, 0.35635, 0.3709, 0.3849, 0.39841, 0.41148, 0.42414, 0.43644, 0.4484, 0.46004, 0.4714, 0.4825, 0.49334, 0.51755, 0.54067, 0.56285, 0.58418, 0.60477, 0.62467, 0.64396, 0.66269, 0.6809, 0.69864, 0.71594, 0.73283, 0.74934, 0.76549, 0.78131, 0.79682, 0.81203, 0.82696, 0.84163, 0.85604, 0.87022, 0.88416, 0.8979, 0.91142, 0.91721, 0.92296, 0.92867, 0.93435, 0.94, 0.94561, 0.95119, 0.95674, 0.96225, 0.96773, 0.97319, 0.97861, 0.984, 0.98936, 0.99469, 0.25066};
00252 float b[64]={0, 0.10287, 0.14548, 0.17817, 0.20574, 0.23002, 0.25198, 0.27217, 0.29096, 0.30861, 0.3253, 0.34118, 0.35635, 0.3709, 0.3849, 0.39841, 0.41148, 0.42414, 0.43644, 0.4484, 0.46004, 0.4714, 0.4825, 0.49334, 0.50395, 0.51434, 0.52453, 0.53452, 0.54433, 0.55397, 0.56344, 0.57275, 0.58191, 0.59094, 0.59982, 0.60858, 0.61721, 0.62573, 0.63413, 0.64242, 0.6506, 0.65868, 0.66667, 0.67456, 0.68236, 0.69007, 0.69769, 0.70523, 0.72717, 0.74846, 0.76916, 0.78931, 0.80897, 0.82816, 0.84691, 0.86526, 0.88323, 0.90084, 0.91811, 0.93506, 0.95171, 0.96808, 0.98417, 0.11785};
00253
00254 return setup_colormap(total, alfa, reverse, r, g, b);
00255 }
00256
00257 int class_colormap::init_colormap_lines(int total, float alfa, bool reverse)
00258 {
00259 float r[64]={0, 0, 1, 0, 0.75, 0.75, 0.25, 0, 0, 1, 0, 0.75, 0.75, 0.25, 0, 0, 1, 0, 0.75, 0.75, 0.25, 0, 0, 1, 0, 0.75, 0.75, 0.25, 0, 0, 1, 0, 0.75, 0.75, 0.25, 0, 0, 1, 0, 0.75, 0.75, 0.25, 0, 0, 1, 0, 0.75, 0.75, 0.25, 0, 0, 1, 0, 0.75, 0.75, 0.25, 0, 0, 1, 0, 0.75, 0.75, 0.25, 0};
00260 float g[64]={0, 0.5, 0, 0.75, 0, 0.75, 0.25, 0, 0.5, 0, 0.75, 0, 0.75, 0.25, 0, 0.5, 0, 0.75, 0, 0.75, 0.25, 0, 0.5, 0, 0.75, 0, 0.75, 0.25, 0, 0.5, 0, 0.75, 0, 0.75, 0.25, 0, 0.5, 0, 0.75, 0, 0.75, 0.25, 0, 0.5, 0, 0.75, 0, 0.75, 0.25, 0, 0.5, 0, 0.75, 0, 0.75, 0.25, 0, 0.5, 0, 0.75, 0, 0.75, 0.25, 1};
00261 float b[64]={1, 0, 0, 0.75, 0.75, 0, 0.25, 1, 0, 0, 0.75, 0.75, 0, 0.25, 1, 0, 0, 0.75, 0.75, 0, 0.25, 1, 0, 0, 0.75, 0.75, 0, 0.25, 1, 0, 0, 0.75, 0.75, 0, 0.25, 1, 0, 0, 0.75, 0.75, 0, 0.25, 1, 0, 0, 0.75, 0.75, 0, 0.25, 1, 0, 0, 0.75, 0.75, 0, 0.25, 1, 0, 0, 0.75, 0.75, 0, 0.25, 0};
00262
00263 return setup_colormap(total, alfa, reverse, r, g, b);
00264 }
00265
00266 #endif
00267