Changeset 2378 in Sophya for trunk/SophyaPI


Ignore:
Timestamp:
May 7, 2003, 9:38:41 AM (22 years ago)
Author:
ansari
Message:

Ajout colormap Rainbow256 - pas encore fonctionnelle - Reza 7/5/03

Location:
trunk/SophyaPI/PI
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaPI/PI/picmap.cc

    r2376 r2378  
    2323//--
    2424
    25 #define  MXMAPIDS   29
     25#define  MXMAPIDS   30
    2626static   int    MapNCols[MXMAPIDS] = {256, 256, 256, 256, 256, 256, 256, 256, 256, 256,
    2727                            256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256,
    28 256, 256, 256, 256};
     28256, 256, 256, 256, 256};
    2929
    3030// Tables de couleurs :
    3131// 5 Standard PI , 32  couleurs
    3232// 4 Standard PI , 128 couleurs
    33 // 4 Standard PI , 32 couleurs uniformes
     33// 7 Standard PI , 32 couleurs uniformes
    3434// 12 MIDAS , 256 couleurs
     35// 1 Standard PI 256 couleurs arcenciel avec intensites
    3536// 1 Standard PI 16 couleurs
    3637
     
    4445                      "MIDAS_Stairs9","MIDAS_StairCase","MIDAS_Color",
    4546                      "MIDAS_ManyCol","MIDAS_Idl14","MIDAS_Idl15",
    46                       "Rainbow16"};
     47                      "Rainbow256","Rainbow16"};
    4748
    4849static   CMapId MapIds[MXMAPIDS] = {
     
    5556                      CMAP_MIDAS_Stairs9, CMAP_MIDAS_StairCase, CMAP_MIDAS_Color,
    5657                      CMAP_MIDAS_ManyCol, CMAP_MIDAS_Idl14, CMAP_MIDAS_Idl15,
    57                       CMAP_COL16 } ;
     58                      CMAP_Rainbow256, CMAP_COL16 } ;
    5859
    5960static   int mColTNums[8192];   // Max 8192 tables differentes pour le moment 
     
    6768                                  NULL, NULL, NULL, NULL, NULL,
    6869                                  NULL, NULL, NULL, NULL, NULL,
    69                                   NULL, NULL, NULL, NULL };
     70                                  NULL, NULL, NULL, NULL, NULL };
    7071
    7172int  PIColorMap::NumberStandardColorMaps()
     
    116117//|     CMAP_CYAN32     :  32 couleurs, nuances de cyan
    117118//|     CMAP_VIOLET32   :  32 couleurs, nuances de violet
     119//|     CMAP_Rainbow256 :  256 Couleurs arcenciel avec intensites
    118120//|     CMAP_COL16      :  16 Couleurs arcenciel
    119121//|     CMAP_OTHER      :  Table non standard (Midas,Idl, ...)
     
    481483      break;
    482484
     485    case CMAP_Rainbow256 :
     486      {
     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);   
     499        }
     500      }
     501      break;
    483502//----------------------------------------------------------
    484503//----------------------------------------------------------
  • trunk/SophyaPI/PI/picmap.h

    r2376 r2378  
    4747
    4848 //  Table simple a 16 couleurs
     49 CMAP_Rainbow256  = 777,       // 256 Couleurs Arcenciel/intensite
    4950 CMAP_COL16       = 999        // 16 Couleurs Arcenciel
    5051 };
  • trunk/SophyaPI/PI/pidrwtools.cc

    r2376 r2378  
    182182mOpt[1]->AppendPDMenu(mCasc[1]);
    183183//  Apres les tables importees de MIDAS
    184 nsct4 = PIColorMap::NumberStandardColorMaps()-1; // Les reste jusqu'a l'avant derniere
     184nsct4 = PIColorMap::NumberStandardColorMaps()-2; // Les reste jusqu'a l'avant derniere
    185185for(kcc=nsct3; kcc<nsct4; kcc++)
    186186  mCasc[2]->AppendItem(PIColorMap::GetStandardColorMapName(kcc).c_str(), 201+kcc);
  • trunk/SophyaPI/PI/piimgtools.cc

    r2376 r2378  
    172172mOptzc[0]->AppendPDMenu(mCasc[1]);
    173173//  Apres les tables importees de MIDAS
    174 nsct4 = PIColorMap::NumberStandardColorMaps()-1; // Les reste jusqu'a l'avant derniere
     174nsct4 = PIColorMap::NumberStandardColorMaps()-2; // Les reste jusqu'a l'avant derniere
    175175for(kcc=nsct3; kcc<nsct4; kcc++)
    176176  mCasc[2]->AppendItem(PIColorMap::GetStandardColorMapName(kcc).c_str(), 201+kcc);
Note: See TracChangeset for help on using the changeset viewer.