Changeset 2372 in Sophya for trunk/SophyaPI
- Timestamp:
- Apr 25, 2003, 3:35:30 PM (22 years ago)
- Location:
- trunk/SophyaPI/PI
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaPI/PI/picmap.cc
r2322 r2372 23 23 //-- 24 24 25 #define MXMAPIDS 2 225 #define MXMAPIDS 26 26 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 }; 27 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 28 256, 256, 256, 256}; 28 29 29 30 // Tables de couleurs : 30 31 // 5 Standard PI , 32 couleurs 31 32 // 4 Standard PI , 128 couleurs 33 // 4 Standard PI , 32 couleurs uniformes 32 34 // 12 MIDAS , 256 couleurs 33 35 // 1 Standard PI 16 couleurs … … 36 38 "Grey32","InvGrey32","ColRJ32","ColBR32","ColRV32", 37 39 "Grey128","InvGrey128","ColRJ128","ColBR128", 40 "Red32","Green32","Blue32","Yellow32", 38 41 "MIDAS_Pastel","MIDAS_Heat","MIDAS_Rainbow3", 39 42 "MIDAS_BlueRed","MIDAS_BlueWhite","MIDAS_Stairs8", … … 45 48 CMAP_GREY32, CMAP_GREYINV32, CMAP_COLRJ32, CMAP_COLBR32, CMAP_COLRV32, 46 49 CMAP_GREY128, CMAP_GREYINV128, CMAP_COLRJ128, CMAP_COLBR128, 50 CMAP_RED32, CMAP_GREEN32, CMAP_BLUE32, CMAP_YELLOW32, 47 51 CMAP_MIDAS_Pastel, CMAP_MIDAS_Heat, CMAP_MIDAS_Rainbow3, 48 52 CMAP_MIDAS_BlueRed, CMAP_MIDAS_BlueWhite, CMAP_MIDAS_Stairs8, … … 59 63 NULL, NULL, NULL, NULL, NULL, 60 64 NULL, NULL, NULL, NULL, NULL, 61 NULL }; 65 NULL, NULL, NULL, NULL, NULL, 66 NULL, NULL, NULL, NULL, NULL, 67 NULL }; 62 68 63 69 int PIColorMap::NumberStandardColorMaps() … … 101 107 //| CMAP_COLRJ128 : 128 couleurs, du Rouge au Jaune/blanc 102 108 //| CMAP_COLBR128 : 128 couleurs du bleu au rouge (arcenciel) 109 //| CMAP_RED32 : 32 couleurs, nuances de rouge 110 //| CMAP_GREEN32 : 32 couleurs, nuances de vert 111 //| CMAP_BLUE32 : 32 couleurs, nuances de bleu 112 //| CMAP_YELLOW32 : 32 couleurs, nuances de jaune 103 113 //| CMAP_COL16 : 16 Couleurs arcenciel 104 114 //| CMAP_OTHER : Table non standard (Midas,Idl, ...) … … 416 426 } 417 427 break; 428 429 // Nuances de couleurs uniformes 430 case CMAP_RED32 : 431 case CMAP_GREEN32 : 432 case CMAP_BLUE32 : 433 case CMAP_YELLOW32 : 434 for(i=0; i<6; i++) { 435 int vcol = i*4000; 436 mycol.red = mycol.green = mycol.blue = 0; 437 if (mType == CMAP_RED32) mycol.red = vcol; 438 else if (mType == CMAP_GREEN32) mycol.green = vcol; 439 else if (mType == CMAP_BLUE32) mycol.blue = vcol; 440 else if (mType == CMAP_YELLOW32) mycol.green = mycol.red = vcol; 441 for(k=0; k<8; k++) AllocColor(mycol, i*8+k); 442 } 443 for(i=6; i<16; i++) { 444 int vcol = 20000+(i-5)*2500; 445 mycol.red = mycol.green = mycol.blue = 0; 446 if (mType == CMAP_RED32) mycol.red = vcol; 447 else if (mType == CMAP_GREEN32) mycol.green = vcol; 448 else if (mType == CMAP_BLUE32) mycol.blue = vcol; 449 else if (mType == CMAP_YELLOW32) mycol.green = mycol.red = vcol; 450 for(k=0; k<8; k++) AllocColor(mycol, i*8+k); 451 } 452 for(i=16; i<32; i++) { 453 int vcol = 45000+(i-15)*1283.4; 454 mycol.red = mycol.green = mycol.blue = 0; 455 if (mType == CMAP_RED32) mycol.red = vcol; 456 else if (mType == CMAP_GREEN32) mycol.green = vcol; 457 else if (mType == CMAP_BLUE32) mycol.blue = vcol; 458 else if (mType == CMAP_YELLOW32) mycol.green = mycol.red = vcol; 459 for(k=0; k<8; k++) AllocColor(mycol, i*8+k); 460 } 461 for(i=6; i<20; i++) { 462 mycol.green = mycol.blue = 0; 463 mycol.red = 20000+(i-5)*2000; 464 for(k=0; k<8; k++) AllocColor(mycol, i*8+k); 465 } 466 break; 467 468 //---------------------------------------------------------- 469 //---------------------------------------------------------- 418 470 419 471 case CMAP_MIDAS_Pastel : // pastel.lutlis -
trunk/SophyaPI/PI/picmap.h
r1503 r2372 22 22 CMAP_COLRJ128 = 8, // 128 couleurs du rouge au jaune/blanc 23 23 CMAP_COLBR128 = 9, // 128 couleurs du bleu au rouge 24 25 // Nuances de couleurs uniformes 26 CMAP_RED32 = 11, // 32 couleurs - nuances de rouge 27 CMAP_GREEN32 = 12, // 32 couleurs - nuances de vert 28 CMAP_BLUE32 = 13, // 32 couleurs - nuances de bleu 29 CMAP_YELLOW32 = 14, // 32 couleurs - nuances de jaune 24 30 25 31 // Tables de couleur importees de MIDAS 256 couleurs -
trunk/SophyaPI/PI/pidrwtools.cc
r2322 r2372 164 164 // Groupement des tables de couleurs 165 165 mCasc[0] = new PIMenu(mOpt[1]->Menu(), "PIStd-128Col"); 166 mCasc[1] = new PIMenu(mOpt[1]->Menu(), "MIDAS-CMap"); 167 168 int nsct1,nsct2,nsct3; 166 mCasc[1] = new PIMenu(mOpt[1]->Menu(), "PIUniCol32"); 167 mCasc[2] = new PIMenu(mOpt[1]->Menu(), "MIDAS-CMap"); 168 169 int nsct1,nsct2,nsct3,nsct4; 169 170 // D'abord les tables standard de PI 32 couleurs 170 171 nsct1 = 5; // Les 5 premieres tables … … 176 177 mCasc[0]->AppendItem(PIColorMap::GetStandardColorMapName(kcc).c_str(), 201+kcc); 177 178 mOpt[1]->AppendPDMenu(mCasc[0]); 178 // Apres les tables importees de MIDAS 179 nsct3 = PIColorMap::NumberStandardColorMaps()-1; // Les reste jusqu'a l'avant derniere 179 nsct3 = 13; // Les 4 tables de couleurs uniforme 180 180 for(kcc=nsct2; kcc<nsct3; kcc++) 181 181 mCasc[1]->AppendItem(PIColorMap::GetStandardColorMapName(kcc).c_str(), 201+kcc); 182 182 mOpt[1]->AppendPDMenu(mCasc[1]); 183 // Apres les tables importees de MIDAS 184 nsct4 = PIColorMap::NumberStandardColorMaps()-1; // Les reste jusqu'a l'avant derniere 185 for(kcc=nsct3; kcc<nsct4; kcc++) 186 mCasc[2]->AppendItem(PIColorMap::GetStandardColorMapName(kcc).c_str(), 201+kcc); 187 mOpt[1]->AppendPDMenu(mCasc[2]); 183 188 // Les tables qui restent ( Col16 , ... ) 184 for(kcc=nsct 3; kcc<PIColorMap::NumberStandardColorMaps(); kcc++)189 for(kcc=nsct4; kcc<PIColorMap::NumberStandardColorMaps(); kcc++) 185 190 mOpt[1]->AppendItem(PIColorMap::GetStandardColorMapName(kcc).c_str(), 201+kcc); 186 191 … … 362 367 for(i=0; i<2; i++) delete mButdr[i]; 363 368 for(i=0; i<10 ; i++) delete mOpt[i]; 364 for(i=0; i< 2; i++) delete mCasc[i];369 for(i=0; i<3; i++) delete mCasc[i]; 365 370 delete mNlb; 366 371 delete mDrName; -
trunk/SophyaPI/PI/piimgtools.cc
r1592 r2372 154 154 // Groupement des tables de couleurs 155 155 mCasc[0] = new PIMenu(mOptzc[0]->Menu(), "PIStd-128Col"); 156 mCasc[1] = new PIMenu(mOptzc[0]->Menu(), "MIDAS-CMap"); 157 158 int nsct1,nsct2,nsct3; 156 mCasc[1] = new PIMenu(mOptzc[0]->Menu(), "PIUniCol32"); 157 mCasc[2] = new PIMenu(mOptzc[0]->Menu(), "MIDAS-CMap"); 158 159 int nsct1,nsct2,nsct3,nsct4; 159 160 // D'abord les tables standard de PI 32 couleurs 160 161 nsct1 = 5; // Les 5 premieres tables … … 166 167 mCasc[0]->AppendItem(PIColorMap::GetStandardColorMapName(kcc).c_str(), 201+kcc); 167 168 mOptzc[0]->AppendPDMenu(mCasc[0]); 168 // Apres les tables importees de MIDAS 169 nsct3 = PIColorMap::NumberStandardColorMaps()-1; // Les reste jusqu'a l'avant derniere 169 nsct3 = 13; // Les 4 tables de couleurs uniforme 170 170 for(kcc=nsct2; kcc<nsct3; kcc++) 171 171 mCasc[1]->AppendItem(PIColorMap::GetStandardColorMapName(kcc).c_str(), 201+kcc); 172 172 mOptzc[0]->AppendPDMenu(mCasc[1]); 173 // Apres les tables importees de MIDAS 174 nsct4 = PIColorMap::NumberStandardColorMaps()-1; // Les reste jusqu'a l'avant derniere 175 for(kcc=nsct3; kcc<nsct4; kcc++) 176 mCasc[2]->AppendItem(PIColorMap::GetStandardColorMapName(kcc).c_str(), 201+kcc); 177 mOptzc[0]->AppendPDMenu(mCasc[2]); 173 178 // Les tables qui restent ( Col16 , ... ) 174 for(kcc=nsct 3; kcc<PIColorMap::NumberStandardColorMaps(); kcc++)179 for(kcc=nsct4; kcc<PIColorMap::NumberStandardColorMaps(); kcc++) 175 180 mOptzc[0]->AppendItem(PIColorMap::GetStandardColorMapName(kcc).c_str(), 201+kcc); 176 181 // On ajoute un CheckItem pour inverser les index de table de couleur
Note:
See TracChangeset
for help on using the changeset viewer.