Index: trunk/SophyaPI/PI/piimgtools.cc
===================================================================
--- trunk/SophyaPI/PI/piimgtools.cc	(revision 3458)
+++ trunk/SophyaPI/PI/piimgtools.cc	(revision 3460)
@@ -128,13 +128,18 @@
 
 cpy += 2*spy+bsy; 
-cpx = 3*spx+0.2*bsx;
-mBut[0] = new PIButton(this, "Apply", 2500, bsx*1.6, bsy, cpx, cpy);
-// mBut[0] = new PIButton(this, "Apply", 2500, bsx, bsy, cpx, cpy);
+//cpx = 3*spx+0.2*bsx;
+cpx = 2*spx;
+//mBut[0] = new PIButton(this, "Apply", 2500, bsx*1.6, bsy, cpx, cpy);
+mBut[0] = new PIButton(this, "Apply", 2500, bsx*1.15, bsy, cpx, cpy);
 mBut[0]->SetBinding(PIBK_elastic,PIBK_elastic, PIBK_elastic,PIBK_elastic);
-cpx += bsx*1.6+2*spx;
-// cpx += bsx+2*spx;
-mBut[1] = new PIButton(this, "Dismiss", 2600,  bsx*1.6, bsy, cpx, cpy);
-// mBut[1] = new PIButton(this, "Dismiss", 2600, bsx, bsy, cpx, cpy);
+//cpx += bsx*1.6+2*spx;
+cpx += bsx*1.15+2*spx;
+//mBut[1] = new PIButton(this, "GetParm", 2550,  bsx*1.6, bsy, cpx, cpy);
+mBut[1] = new PIButton(this, "GetParm", 2550, bsx*1.15, bsy, cpx, cpy);
 mBut[1]->SetBinding(PIBK_elastic,PIBK_elastic, PIBK_elastic,PIBK_elastic);
+cpx += bsx*1.15+2*spx;
+//mBut[2] = new PIButton(this, "Dismiss", 2600,  bsx*1.6, bsy, cpx, cpy);
+mBut[2] = new PIButton(this, "Dismiss", 2600, bsx*1.15, bsy, cpx, cpy);
+mBut[2]->SetBinding(PIBK_elastic,PIBK_elastic, PIBK_elastic,PIBK_elastic);
 
 int offy = cpy+bsy+spy*3;
@@ -142,9 +147,15 @@
 
 // cpx = 4*spx+2.75*bsx;
+
 cpx = wszx-bsx-3*spx;
-cpy = 2*spy;
-mSc[0] = new PIScale(this, "sc-offset-lut", 2700, kSDirDownUp, 0.5*bsx, 4.5*bsy, cpx, cpy); 
+/* Bouton pour mettre les champs min/max a +1,-1 */
+cpy = spy;
+mButR = new PIButton(this, "@MinMax", 2560, bsx, bsy*0.75, cpx, cpy);
+mButR->SetBinding(PIBK_elastic,PIBK_elastic, PIBK_elastic,PIBK_elastic);
+
+cpy += bsy*0.75+spy;
+mSc[0] = new PIScale(this, "sc-offset-lut", 2700, kSDirDownUp, 0.5*bsx, 4.2*bsy, cpx, cpy); 
 cpx += 0.50*bsx+spx;
-mSc[1] = new PIScale(this, "sc-dyn-lut", 2800, kSDirDownUp, 0.55*bsx, 4.5*bsy, cpx, cpy); 
+mSc[1] = new PIScale(this, "sc-dyn-lut", 2800, kSDirDownUp, 0.5*bsx, 4.2*bsy, cpx, cpy); 
 mSc[0]->SetBinding(PIBK_elastic,PIBK_elastic, PIBK_elastic,PIBK_elastic);
 mSc[0]->SetMinMax(-50, 50);
@@ -291,5 +302,4 @@
   {
   delete mLab[i];
-  delete mBut[i];
   delete mText[i];
   delete mOpt[i];
@@ -298,4 +308,6 @@
   delete mOptzc[i];
   }
+for(i=0; i<3; i++)  delete mBut[i];
+delete mButR;
 for(i=0; i<2; i++)  delete mCasc[i];
 for(i=0; i<5; i++)  delete mButsz[i];
@@ -308,7 +320,14 @@
 void PIImgTools::Show()
 {
-char buff[32];
+PIWindow::Show();
+UpdateAll();
+return;
+}
+
+/* --Methode-- */
+void PIImgTools::UpdateAll()
+{
+UpdateLUT();
 PIImage *mpii;
-PIWindow::Show();
 mpii = PIImage::CurrentPIImage();
 if (mpii == NULL) {
@@ -319,19 +338,4 @@
   return;
 }
-min_lut = mpii->Lut()->Min();
-max_lut = mpii->Lut()->Max();
-sprintf(buff,"%g", min_lut);
-mText[0]->SetText(buff);
-sprintf(buff,"%g", max_lut);
-mText[1]->SetText(buff);
-if     ( (mpii->Lut())->Type() == kLutType_Lin )    mOpt[0]->SetValue(1100);
-else if( (mpii->Lut())->Type() == kLutType_Log )    mOpt[0]->SetValue(1101);
-else if( (mpii->Lut())->Type() == kLutType_Sqrt )   mOpt[0]->SetValue(1102);
-else if( (mpii->Lut())->Type() == kLutType_Square ) mOpt[0]->SetValue(1103);
-else                                                mOpt[0]->SetValue(1100);
-string s("NoAuto");
-mOpt[1]->SetValueStr(s);
-mSc[0]->SetValue(0);
-mSc[1]->SetValue(0);
 
 // Pour mettre a jour le menu de la table de couleur
@@ -345,4 +349,34 @@
 
 mOptCut->SetValue(303);
+}
+
+/* --Methode-- */
+void PIImgTools::UpdateLUT()
+{
+char buff[32];
+PIImage *mpii;
+mpii = PIImage::CurrentPIImage();
+if (mpii == NULL) {
+  mText[0]->SetText("+1");
+  mText[1]->SetText("-1");
+  mOpt[0]->SetValue(1100);
+}
+else {
+  min_lut = mpii->Lut()->Min();
+  max_lut = mpii->Lut()->Max();
+  sprintf(buff,"%g", min_lut);
+  mText[0]->SetText(buff);
+  sprintf(buff,"%g", max_lut);
+  mText[1]->SetText(buff);
+  if     ( (mpii->Lut())->Type() == kLutType_Lin )    mOpt[0]->SetValue(1100);
+  else if( (mpii->Lut())->Type() == kLutType_Log )    mOpt[0]->SetValue(1101);
+  else if( (mpii->Lut())->Type() == kLutType_Sqrt )   mOpt[0]->SetValue(1102);
+  else if( (mpii->Lut())->Type() == kLutType_Square ) mOpt[0]->SetValue(1103);
+  else                                                mOpt[0]->SetValue(1100);
+}
+string s("NoAuto");
+mOpt[1]->SetValueStr(s);
+mSc[0]->SetValue(0);
+mSc[1]->SetValue(0);
 return;
 }
@@ -371,5 +405,14 @@
 switch (msg)
   {
-  case 2500:
+  case 2550 :
+    UpdateAll();
+    break;
+  case 2560 :
+    mText[0]->SetText("+1");
+    mText[1]->SetText("-1");
+    mSc[0]->SetValue(0);
+    mSc[1]->SetValue(0);
+    break;
+  case 2500 :
   case 2700 :
   case 2800 :
Index: trunk/SophyaPI/PI/piimgtools.h
===================================================================
--- trunk/SophyaPI/PI/piimgtools.h	(revision 3458)
+++ trunk/SophyaPI/PI/piimgtools.h	(revision 3460)
@@ -26,9 +26,12 @@
 protected:
   virtual void  Process(PIMessage msg, PIMsgHandler* sender, void* data=NULL);
+  void UpdateAll();
+  void UpdateLUT();
 
 private:
 // Pour changer la LUT
   PILabel* mLab[2];
-  PIButton* mBut[2];
+  PIButton* mBut[3];
+  PIButton* mButR;
   PIText* mText[2];
   PIOptMenu* mOpt[2];
