Changeset 1124 in Sophya for trunk/SophyaPI/PI/picmap.cc
- Timestamp:
- Aug 1, 2000, 1:05:06 PM (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaPI/PI/picmap.cc
r1122 r1124 22 22 //-- 23 23 24 #define MXMAPIDS 1 524 #define MXMAPIDS 16 25 25 static int MapNCols[MXMAPIDS] = {256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 26 256, 256, 256, 256, 256 }; 27 static const char* MapNoms[MXMAPIDS] = {"Grey32","InvGrey32","ColRJ32","ColBR32", 28 "ColRV32", "Grey128", "InvGrey128", "ColRJ128", 29 "ColBR128", "Col16", 30 "MIDAS_Pastel", "MIDAS_Heat", "MIDAS_Rainbow3", 31 "MIDAS_BlueRed", "MIDAS_BlueWhite" }; 32 static CMapId MapIds[MXMAPIDS] = { CMAP_GREY32, CMAP_GREYINV32, CMAP_COLRJ32, 33 CMAP_COLBR32, CMAP_COLRV32, CMAP_GREY128, 34 CMAP_GREYINV128, CMAP_COLRJ128, CMAP_COLBR128, 35 CMAP_COL16, 36 CMAP_MIDAS_Pastel, CMAP_MIDAS_Heat, CMAP_MIDAS_Rainbow3, 37 CMAP_MIDAS_BlueRed, CMAP_MIDAS_BlueWhite } ; 26 256, 256, 256, 256, 256, 256 }; 27 28 // Tables de couleurs : 29 // 5 Standard PI , 32 couleurs 30 // 4 Standard PI , 128 couleurs 31 // 6 MIDAS , 256 couleurs 32 // 1 Standard PI 16 couleurs 33 34 static const char* MapNoms[MXMAPIDS] = { 35 "Grey32","InvGrey32","ColRJ32","ColBR32","ColRV32", 36 "Grey128","InvGrey128","ColRJ128","ColBR128", 37 "MIDAS_Pastel","MIDAS_Heat","MIDAS_Rainbow3", 38 "MIDAS_BlueRed","MIDAS_BlueWhite","MIDAS_RedWhite", 39 "Rainbow16"}; 40 41 static CMapId MapIds[MXMAPIDS] = { 42 CMAP_GREY32, CMAP_GREYINV32, CMAP_COLRJ32, CMAP_COLBR32, CMAP_COLRV32, 43 CMAP_GREY128, CMAP_GREYINV128, CMAP_COLRJ128, CMAP_COLBR128, 44 CMAP_MIDAS_Pastel, CMAP_MIDAS_Heat, CMAP_MIDAS_Rainbow3, 45 CMAP_MIDAS_BlueRed, CMAP_MIDAS_BlueWhite, CMAP_MIDAS_RedWhite, 46 CMAP_COL16 } ; 38 47 39 48 static int mColTNums[8192]; // Max 8192 tables differentes pour le moment … … 41 50 42 51 static int NMaxTableAuto = 0; 43 static PIColorMap* mMaps[ 15] = {NULL, NULL, NULL, NULL, NULL,52 static PIColorMap* mMaps[MXMAPIDS] = { 44 53 NULL, NULL, NULL, NULL, NULL, 45 NULL, NULL, NULL, NULL, NULL }; 54 NULL, NULL, NULL, NULL, NULL, 55 NULL, NULL, NULL, NULL, NULL, 56 NULL }; 46 57 47 58 int PIColorMap::NumberStandardColorMaps() … … 308 319 case CMAP_COLRV32 : 309 320 for( i=0; i<32; i++) { 310 if (i < 8) { 311 mycol.green = 15000+(i*5000); mycol.blue = 0; 312 mycol.red = 15000+(i*5000); } 321 if (i < 9) { 322 mycol.green = i*5000; mycol.blue = 0; 323 mycol.red = i*6000; } 324 else if (i < 15) { 325 mycol.green = 40000; 326 mycol.blue = 0; 327 mycol.red = 50000+(i-9)*1000; 328 } 313 329 else if (i < 21) { 314 mycol.green = 50000-(i-7)*5000; 315 if (mycol.green < 0) mycol.green = 0; 330 mycol.green = 40000-(i-15)*8000; 316 331 mycol.blue = 0; 317 mycol.red = 5 3535+(i-8)*1000; }332 mycol.red = 57535+(i-15)*1600; } 318 333 else { 319 334 mycol.green = 0; mycol.red = 65535; … … 388 403 break; 389 404 390 case CMAP_MIDAS_Pastel : // Les valeurs correspondent a je ne sais quel table MIDAS405 case CMAP_MIDAS_Pastel : // 391 406 case CMAP_MIDAS_Heat : // A faire pour CMAP_MIDAS_Pastel CMAP_MIDAS_Heat 392 407 case CMAP_MIDAS_Rainbow3 : // A faire pour Heat Rainbow3 BlueRed BlueWhite 393 408 case CMAP_MIDAS_BlueRed : // BlueRed -> idl11 394 409 case CMAP_MIDAS_BlueWhite : // BlueWhite -> blulut.lutlis 410 case CMAP_MIDAS_RedWhite : // rouge-rose-blanc je ne sais quelle table MIDAS ?? 395 411 { 396 staticfloat rgb_r[256] = {412 float rgb_r[256] = { 397 413 0, 0, 0.01961, 0.0549, 0.08627, 0.1098, 0.13725, 0.15686, 0.18039, 0.2, 398 414 0.21569, 0.23529, 0.25098, 0.26275, 0.28235, 0.29412, 0.30588, 0.31765, … … 427 443 0.98824, 0.99216, 0.99216, 0.99216, 0.99216, 0.99608, 0.99608, 0.99608, 428 444 0.99608, 1, 1 }; 429 staticfloat rgb_g[256] = {445 float rgb_g[256] = { 430 446 0, 0, 0, 0, 0.00392, 0.00392, 0.00392, 0.00392, 0.00392, 0.00784, 431 447 0.00784, 0.00784, 0.00784, 0.01176, 0.01176, 0.01176, 0.01176, 0.01176, … … 460 476 0.89804, 0.9098, 0.91765, 0.92941, 0.94118, 0.94902, 0.96078, 0.97255, 461 477 0.98039, 0.99216 }; 462 staticfloat rgb_b[256] = {478 float rgb_b[256] = { 463 479 0, 0, 0, 0, 0.00392, 0.00392, 0.00392, 0.00392, 0.00392, 0.00784, 464 480 0.00784, 0.00784, 0.00784, 0.01176, 0.01176, 0.01176, 0.01176, 0.01176,
Note:
See TracChangeset
for help on using the changeset viewer.