Changeset 2379 in Sophya
- Timestamp:
- May 15, 2003, 3:47:07 PM (22 years ago)
- Location:
- trunk/SophyaPI/PI
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaPI/PI/picmap.cc
r2378 r2379 24 24 25 25 #define MXMAPIDS 30 26 static int MapNCols[MXMAPIDS] = {256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 27 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 28 256, 256, 256, 256, 256}; 26 static int MapNCols[MXMAPIDS] = { 27 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 28 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 29 256, 256, 256, 256, 256, 256, 256, 256, 256, 256 }; 29 30 30 31 // Tables de couleurs : … … 33 34 // 7 Standard PI , 32 couleurs uniformes 34 35 // 12 MIDAS , 256 couleurs 35 // 1 Standard PI 256 couleurs arcenciel avec intensites36 // 1 Standard PI 64 couleurs differentes 36 37 // 1 Standard PI 16 couleurs 37 38 … … 45 46 "MIDAS_Stairs9","MIDAS_StairCase","MIDAS_Color", 46 47 "MIDAS_ManyCol","MIDAS_Idl14","MIDAS_Idl15", 47 " Rainbow256","Rainbow16"};48 "MultiCol16","MultiCol64"}; 48 49 49 50 static CMapId MapIds[MXMAPIDS] = { … … 56 57 CMAP_MIDAS_Stairs9, CMAP_MIDAS_StairCase, CMAP_MIDAS_Color, 57 58 CMAP_MIDAS_ManyCol, CMAP_MIDAS_Idl14, CMAP_MIDAS_Idl15, 58 CMAP_ Rainbow256, CMAP_COL16} ;59 CMAP_COL16, CMAP_COL64 } ; 59 60 60 61 static int mColTNums[8192]; // Max 8192 tables differentes pour le moment … … 117 118 //| CMAP_CYAN32 : 32 couleurs, nuances de cyan 118 119 //| CMAP_VIOLET32 : 32 couleurs, nuances de violet 119 //| CMAP_Rainbow256 : 256 Couleurs arcenciel avec intensites120 120 //| CMAP_COL16 : 16 Couleurs arcenciel 121 //| CMAP_OTHER : Table non standard (Midas,Idl, ...) 121 //| CMAP_COL64 : 64 Couleurs arcenciel 122 //| CMAP_OTHER : Table non standard 122 123 // Toutes les tables de couleurs standard possèdent 256 cellules de couleurs, 123 124 // contenant 16 ou 32 ou 128 couleurs distinctes. … … 275 276 { 276 277 PIColor mycol; 277 int i, j,k;278 int i,k; 278 279 279 280 switch (mType) { … … 483 484 break; 484 485 485 case CMAP_ Rainbow256:486 case CMAP_COL64 : 486 487 { 487 double fci[8] = {0.1, 0.6, 0.8, 1.0, 0.7, 0.8, 0.9, 1.0}; 488 for(i=0; i<256; i++) { 489 int ki = i/64; 490 int kc = i%64; 491 int kr = kc%4; 492 kc = kc/4; 493 int kg = kc%4; 494 int kb = kc/4; 495 mycol.red = (fci[kr]*fci[ki]*65000.); 496 mycol.green = (fci[kg]*fci[ki]*65000.); 497 mycol.blue = (fci[kb]*fci[ki]*65000.); 498 AllocColor(mycol, i); 488 float fci_1[5] = { 0.60, 0.70, 0.80, 0.90, 1.0}; 489 float fci_21[8] = { 1.0, 1.0, 1.0, 1.0, 0.8, 0.6, 0.4 }; 490 float fci_22[8] = { 0.4, 0.6, 0.8, 1.0, 1.0, 1.0, 1.0 }; 491 float fci_3[3] = { 0.4, 0.80, 1.0 }; 492 i = 0; 493 int i1,i2,i3,ici; 494 // D'abord le noir (+1 comb) 495 mycol.red = mycol.green = mycol.blue = 0; 496 for(ici=0; ici<4; ici++) { 497 AllocColor(mycol, i); i++; 499 498 } 499 // les rouges (+5 comb) 500 mycol.green = mycol.blue = 0; 501 for(i1=0; i1<5; i1++) { 502 mycol.red = fci_1[i1]*65530.; 503 for(ici=0; ici<4; ici++) { 504 AllocColor(mycol, i); i++; 505 } 506 } 507 // Ensuite, rouge+vert (+7 comb) 508 mycol.blue = 0; 509 for(i1=0; i1<7; i1++) { 510 mycol.red = fci_21[i1]*65530.; 511 mycol.green = fci_22[i1]*65530.; 512 for(ici=0; ici<4; ici++) { 513 AllocColor(mycol, i); i++; 514 } 515 } 516 // Ensuite les verts (+5 comb) 517 mycol.red = mycol.blue = 0; 518 for(i1=0; i1<5; i1++) { 519 mycol.green = fci_1[i1]*65530.; 520 for(ici=0; ici<4; ici++) { 521 AllocColor(mycol, i); i++; 522 } 523 } 524 // Ensuite les verts+bleu (+7 comb) 525 mycol.red = 0; 526 for(i1=0; i1<7; i1++) { 527 mycol.green = fci_21[i1]*65530.; 528 mycol.blue = fci_22[i1]*65530.; 529 for(ici=0; ici<4; ici++) { 530 AllocColor(mycol, i); i++; 531 } 532 } 533 // Ensuite les bleus (+5 comb) 534 mycol.red = mycol.green = 0; 535 for(i1=0; i1<5; i1++) { 536 mycol.blue = fci_1[i1]*65530.; 537 for(ici=0; ici<4; ici++) { 538 AllocColor(mycol, i); i++; 539 } 540 } 541 // Ensuite les bleu+rouge (+7 comb) 542 mycol.green = 0; 543 for(i1=0; i1<7; i1++) { 544 mycol.blue = fci_21[i1]*65530.; 545 mycol.red = fci_22[i1]*65530.; 546 for(ici=0; ici<4; ici++) { 547 AllocColor(mycol, i); i++; 548 } 549 } 550 // Ensuite les bleu+rouge+vert (+27 comb) 551 for(i1=0; i1<3; i1++) 552 for(i2=0; i2<3; i2++) 553 for(i3=0; i3<3; i3++) { 554 mycol.red = fci_3[i1]*65530.; 555 mycol.green = fci_3[i2]*65530.; 556 mycol.blue = fci_3[i3]*65530.; 557 for(ici=0; ici<4; ici++) { 558 AllocColor(mycol, i); i++; 559 } 560 } 561 // cout << "PICMAP-Rainbow256 - NbColors allocated= " << i << endl; 500 562 } 501 563 break; -
trunk/SophyaPI/PI/picmap.h
r2378 r2379 46 46 CMAP_MIDAS_Idl15 = 112, // (idl15.lutlis) 47 47 48 // Table simple a 16 couleurs49 CMAP_ Rainbow256 = 777, // 256 Couleurs Arcenciel/intensite50 CMAP_COL 16 = 999 // 16 Couleurs Arcenciel48 // Table simple a 16/64 couleurs 49 CMAP_COL16 = 998, // 16 Couleurs arcenciel 50 CMAP_COL64 = 999 // 64 Couleurs differentes 51 51 }; 52 52
Note:
See TracChangeset
for help on using the changeset viewer.