Changeset 557 in Sophya


Ignore:
Timestamp:
Nov 9, 1999, 7:24:11 PM (26 years ago)
Author:
ercodmgr
Message:

Correction calcul lut - Reza 9/9/99

Location:
trunk/SophyaPI/PI
Files:
5 edited

Legend:

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

    r537 r557  
    156156int n0 = 0;
    157157
    158 if (min >= max) { min = -9.e19; max = 9.e19; }
     158if (min >= max) { min = -9.e69; max = 9.e69; }
    159159double minpix = max;
    160160double maxpix = min;
     
    220220int_4 *q;
    221221
    222 double MINDYNAMIC = 1.e-8;          /* Gamme dynamique minimale (MaxAff-MinAff)*/
     222double MINDYNAMIC = 1.e-48;          /* Gamme dynamique minimale (MaxAff-MinAff)*/
    223223double FRACPIC = 0.6065;            /*  Valeur de exp(-0.5)   */
    224224
  • trunk/SophyaPI/PI/picmapview.cc

    r537 r557  
    5656// long  kind()
    5757//      Retourne PICMapView::ClassId .
    58 // void   SetColMap(PIColorMap* cmp=NULL, float min=1., float max=-1., bool refr=true)
     58// void   SetColMap(PIColorMap* cmp=NULL, double min=1., double max=-1., bool refr=true)
    5959//      Choix de la table de couleur et valeurs min et max. Si "refr==true",
    6060//      la méthode "Refresh()" est appelée.
    61 // void  SetColMapId(CMapId cmapid, float min=1., float max=-1., bool refr=true)
     61// void  SetColMapId(CMapId cmapid, double min=1., double max=-1., bool refr=true)
    6262//      Choix de la table de couleur en utilisant le "CMapId" et
    6363//      définition des valeurs min et max. Si "refr==true",
     
    6666 
    6767/* --Methode-- */
    68 void PICMapView::SetColMap(PIColorMap* cmp, float min, float max, bool refr)
     68void PICMapView::SetColMap(PIColorMap* cmp, double min, double max, bool refr)
    6969{
    7070  if (cmp == NULL)   {
     
    7676    }
    7777  if ( cmap && (cmp->Type() == cmap->Type()) && (cmp->Type() != CMAP_OTHER)
    78        && ((vmin-min) < 1.e-19) &&  ((vmin-min) > -1.e-19) &&
    79        ((vmax-max) < 1.e-19) &&  ((vmax-max) > -1.e-19) )  return;
     78       && ((vmin-min) < 1.e-69) &&  ((vmin-min) > -1.e-69) &&
     79       ((vmax-max) < 1.e-69) &&  ((vmax-max) > -1.e-69) )  return;
    8080  if (cmap) delete cmap;
    8181  cmap = new PIColorMap(*cmp);
     
    8686
    8787/* --Methode-- */
    88 void PICMapView::SetColMapId(CMapId cmapid, float min, float max, bool refr)
     88void PICMapView::SetColMapId(CMapId cmapid, double min, double max, bool refr)
    8989{
    9090  if ( cmap && (cmapid == cmap->Type()) && (cmapid != CMAP_OTHER)
    91        && ((vmin-min) < 1.e-19) &&  ((vmin-min) > -1.e-19) &&
    92        ((vmax-max) < 1.e-19) &&  ((vmax-max) > -1.e-19) )  return;
     91       && ((vmin-min) < 1.e-69) &&  ((vmin-min) > -1.e-69) &&
     92       ((vmax-max) < 1.e-69) &&  ((vmax-max) > -1.e-69) )  return;
    9393  if (cmap) delete cmap;
    9494  cmap = new PIColorMap(cmapid);
  • trunk/SophyaPI/PI/picmapview.h

    r130 r557  
    2323  virtual long    kind() {return ClassId; }
    2424
    25   void            SetColMap(PIColorMap* cmp=NULL, float min=1., float max=-1., bool refr=true);
    26   void            SetColMapId(CMapId cmapid, float min=1., float max=-1., bool refr=true);
     25  void            SetColMap(PIColorMap* cmp=NULL, double min=1., double max=-1., bool refr=true);
     26  void            SetColMapId(CMapId cmapid, double min=1., double max=-1., bool refr=true);
    2727
    2828// Traitement des evenements   
     
    3333protected:
    3434  PIColorMap* cmap;
    35   float vmin, vmax;
     35  double vmin, vmax;
    3636};
    3737
  • trunk/SophyaPI/PI/piimage.cc

    r537 r557  
    136136AddDrawer(mdrw, true, false, false);
    137137
    138 SetLut(0., 32000., kLutType_Lin, 0, false);
     138SetLut(-9.e19, 9.e19, kLutType_Lin, 0, false);
    139139SetColMapId(CMAP_COLRJ32);
    140140// pour le copier-coller
     
    432432  int nbsig = lauto; 
    433433  double fracmax = 1. - 0.05*nbsig;
     434  int nbnul, nbsat;
     435  double moy, sig;
     436  img->CheckDyn(min, max, moy, sig, nbnul, nbsat);
    434437  img->ComputeLut_PicHisto(min, max, nbsig, fracmax);
    435438  }
  • trunk/SophyaPI/PI/piimgtools.h

    r537 r557  
    3535  PILabel* mOlb[2];
    3636  PIScale* mSc[2];
    37   float min_lut,max_lut;
     37  double min_lut,max_lut;
    3838// Pour la couleur et le zoom
    3939  PIOptMenu* mOptzc[2];
Note: See TracChangeset for help on using the changeset viewer.