Index: trunk/SophyaPI/PI/Makefile
===================================================================
--- trunk/SophyaPI/PI/Makefile	(revision 72)
+++ trunk/SophyaPI/PI/Makefile	(revision 73)
@@ -3,5 +3,5 @@
  
 all: $(LIB)libPI.a
-$(LIB)libPI.a : $(OBJ)piapplgen.o $(OBJ)piapplx.o $(OBJ)pibwdggen.o $(OBJ)pibwdgx.o $(OBJ)picmap.o $(OBJ)picmapgen.o $(OBJ)picmapx.o $(OBJ)picontainergen.o $(OBJ)picontainerx.o $(OBJ)pidrawer.o $(OBJ)pidrawwin.o $(OBJ)pifilechogen.o $(OBJ)pifilechox.o $(OBJ)pigraphgen.o $(OBJ)pigraphps.o $(OBJ)pigraphuc.o $(OBJ)pigraphx.o $(OBJ)pihisto.o $(OBJ)piimage.o $(OBJ)pilistgen.o $(OBJ)pilistx.o $(OBJ)pimenubargen.o $(OBJ)pimenubarx.o $(OBJ)pimenugen.o $(OBJ)pimenux.o $(OBJ)pimsghandler.o $(OBJ)pintuple.o $(OBJ)pioptmenugen.o $(OBJ)pioptmenux.o $(OBJ)piperiodx.o $(OBJ)pipixmapgen.o $(OBJ)pipixmapx.o $(OBJ)piscdrawwdg.o $(OBJ)pistdwdggen.o $(OBJ)pistdwdgx.o $(OBJ)pistlist.o $(OBJ)piup.o $(OBJ)piwdggen.o $(OBJ)piwdgx.o $(OBJ)piwindowgen.o $(OBJ)piwindowx.o $(OBJ)pixtbase.o $(OBJ)psfile.o
+$(LIB)libPI.a : $(OBJ)piapplgen.o $(OBJ)piapplx.o $(OBJ)pibwdggen.o $(OBJ)pibwdgx.o $(OBJ)picmap.o $(OBJ)picmapgen.o $(OBJ)picmapx.o $(OBJ)picons.o $(OBJ)picontainergen.o $(OBJ)picontainerx.o $(OBJ)pidrawer.o $(OBJ)pidrawwin.o $(OBJ)pifilechogen.o $(OBJ)pifilechox.o $(OBJ)pigraphgen.o $(OBJ)pigraphps.o $(OBJ)pigraphuc.o $(OBJ)pigraphx.o $(OBJ)pihisto.o $(OBJ)piimage.o $(OBJ)pilistgen.o $(OBJ)pilistx.o $(OBJ)pimenubargen.o $(OBJ)pimenubarx.o $(OBJ)pimenugen.o $(OBJ)pimenux.o $(OBJ)pimsghandler.o $(OBJ)pintuple.o $(OBJ)pioptmenugen.o $(OBJ)pioptmenux.o $(OBJ)piperiodx.o $(OBJ)pipixmapgen.o $(OBJ)pipixmapx.o $(OBJ)piscdrawwdg.o $(OBJ)pistdwdggen.o $(OBJ)pistdwdgx.o $(OBJ)pistlist.o $(OBJ)piup.o $(OBJ)piwdggen.o $(OBJ)piwdgx.o $(OBJ)piwindowgen.o $(OBJ)piwindowx.o $(OBJ)pixtbase.o $(OBJ)psfile.o
 	$(AR) $(ARFLAGS)  $@ $? 
 ifeq ($(CXX),cxx)
@@ -28,4 +28,9 @@
 $(OBJ)picmapx.o: picmapx.cc piwdgx.h piwdggen.h pimsghandler.h picmapx.h \
  picmapgen.h pisysdep.h
+$(OBJ)picons.o: picons.cc picons.h pisysdep.h pistdwdgx.h pistdwdggen.h \
+ piwdgx.h piwdggen.h pimsghandler.h picontainerx.h picontainergen.h \
+ pibwdgx.h pibwdggen.h picmap.h picmapx.h picmapgen.h pigraphx.h \
+ pigraphgen.h psfile.h $(INC)defs.h \
+ pigraphps.h
 $(OBJ)picontainergen.o: picontainergen.cc picontainergen.h pisysdep.h \
  piwdgx.h piwdggen.h pimsghandler.h
@@ -85,6 +90,5 @@
  $(INC)ppersist.h \
  $(INC)pclassids.h \
- $(INC)dvlist.h \
- $(INC)lut.h pisysdep.h pipixmapx.h \
+ $(INC)dvlist.h lut.h pisysdep.h pipixmapx.h \
  pipixmapgen.h pibwdgx.h pibwdggen.h piwdgx.h piwdggen.h \
  pimsghandler.h picmap.h picmapx.h picmapgen.h pigraphx.h pigraphgen.h \
Index: trunk/SophyaPI/PI/lut.cc
===================================================================
--- trunk/SophyaPI/PI/lut.cc	(revision 73)
+++ trunk/SophyaPI/PI/lut.cc	(revision 73)
@@ -0,0 +1,92 @@
+// Classe Look-Up-Table  pour convertir image en entree ds
+// une table de couleur.
+//       Classe LUT              R. Ansari  05/95
+// LAL (Orsay) / IN2P3-CNRS  DAPNIA/SPP (Saclay) / CEA
+
+#include "defs.h"
+#include <stdlib.h>
+#include <stdio.h>
+#include <math.h>
+
+#include "lut.h"
+
+
+/* --Methode-- */
+
+LUT::LUT(float min, float max, int ncol, int typ) 
+{
+int nlev;
+
+bornes=NULL;  
+nlev = ncol-2;
+if (nlev < 0)  nlev = 0;
+bornes = new float[nlev+1];
+
+if (bornes == NULL)  return;
+type = typ;  nLevel = nlev;
+SetLut(min, max, typ);
+return;
+}
+
+/* --Methode-- */
+LUT::~LUT()
+{
+if (type<0)  return;
+delete[] bornes;
+}
+
+/* --Methode-- */
+void LUT::SetLut(float min, float max, int typ)
+{
+
+if ( (typ != kLutType_Lin) && (typ != kLutType_Log) )  typ = kLutType_Lin;
+type = typ;
+if (max <= min)  max = min+1.;
+if (nLevel > 0)
+  {
+  int i;
+  float dx;
+  double dlx;
+  switch (typ)
+    {
+    case kLutType_Lin :
+      dx = (max-min)/(float)nLevel;
+      for(i=0; i<nLevel; i++)
+        bornes[i] = min+(float)i*dx;
+      break;
+    case kLutType_Log :
+      dlx = log(max-min) / (float)nLevel;
+      for(i=0; i<nLevel; i++)
+        bornes[i] = min+(float)exp((double)i*dlx);
+      break;
+    default:
+      for(i=0; i<nLevel; i++)
+        bornes[i] = min;
+      break;
+    }
+  bornes[nLevel] = max; 
+  }
+else  bornes[0] = 0.5*(min+max);
+return; 
+}
+
+/* --Methode-- */
+void LUT::Print()
+{
+int i;
+
+printf("LUT_Info: Type= %d NLevel= %d Min,Max= %g %g \n",
+       type, nLevel, bornes[0], bornes[nLevel]);
+for(i=0; i<=nLevel; i++)
+  printf("..Bornes[%d] = %g \n", i, bornes[i]);
+return;
+}
+
+/* --Methode-- */
+int LUT::Apply(float x)
+{
+int i;
+for(i=0;i<=nLevel;i++)  
+  if (x < bornes[i])  return(i);
+return(nLevel+1);
+}
Index: trunk/SophyaPI/PI/lut.h
===================================================================
--- trunk/SophyaPI/PI/lut.h	(revision 73)
+++ trunk/SophyaPI/PI/lut.h	(revision 73)
@@ -0,0 +1,41 @@
+// This may look like C code, but it is really -*- C++ -*-
+// Classe Look-Up-Table  pour convertir image en entree ds
+// une table de couleur.
+//       Classe LUT              R. Ansari  05/95
+// LAL (Orsay) / IN2P3-CNRS  DAPNIA/SPP (Saclay) / CEA
+
+#ifndef LUT_SEEN
+#define LUT_SEEN
+
+// LUT : Look-Up-Table avec nLevel bins entre min et max
+// Apply retourne * 0 < min   * nLevel+1 > max 
+// et de 1 a nLevel pour min<=x<max
+
+// Type de lut possibles (Seul Lineaire implemente 05/95
+enum {kLutType_Lin=1, kLutType_Log=2};
+
+class LUT 
+{
+public:
+
+  int type;
+  int nLevel;
+  float * bornes;
+  
+  LUT(float min, float max, int ncol=16, int typ=kLutType_Lin);
+  ~LUT();
+  void SetLut(float min, float max, int typ=0);
+  void Print();
+  int Apply(float x);
+
+  inline float Min() { return(bornes[0]); };
+  inline float Max() { return(bornes[nLevel]); };
+  inline int Type() { return(type); };
+  inline int NCol() { return(nLevel+2); };
+};
+
+#endif
+
+
+
+  
