Index: trunk/SophyaPI/PIGcont/pigncont.cc
===================================================================
--- trunk/SophyaPI/PIGcont/pigncont.cc	(revision 2615)
+++ trunk/SophyaPI/PIGcont/pigncont.cc	(revision 3342)
@@ -430,5 +430,5 @@
 //--
 GNUPlotContour::~GNUPlotContour(){
- cout << " destructeur de GNUPlotContour "<<endl;
+  //cout << " destructeur de GNUPlotContour "<<endl;
   
  struct iso_curve *iso_cur;
@@ -516,10 +516,10 @@
 
  if(_contours) {
-   cout << " GNUPlotContour::CalcContour(): destruction des contours "<<_contours<<endl;
+   //cout << " GNUPlotContour::CalcContour(): destruction des contours "<<_contours<<endl;
    struct gnuplot_contours *cntcur = _contours;
    /******
    struct gnuplot_contours *cntold; 
    while(cntcur) { 
-   cout << " GNUPlotContour::CalcContour(): destruction des contours "<< cntcur<<endl; 
+   //cout << " GNUPlotContour::CalcContour(): destruction des contours "<< cntcur<<endl; 
      cntold = cntcur; 
      cntcur = cntold->next; 
@@ -804,17 +804,21 @@
 
 /* --Methode-- */
-bool PIContourDrawer::IsLabelOn(){
+bool PIContourDrawer::IsLabelOn() const
+{
   return (mLabelOn);
 }
 
-bool PIContourDrawer::IsLineOn(){
+bool PIContourDrawer::IsLineOn() const
+{
   return (mLineOn);
 }
 
-bool PIContourDrawer::IsMarkOn(){
+bool PIContourDrawer::IsMarkOn() const
+{
   return (mMarkOn);
 }
 
-void PIContourDrawer::SetLabelOn(bool state){
+void PIContourDrawer::SetLabelOn(bool state)
+{
   mLabelOn = state;
 }
@@ -843,11 +847,11 @@
 
 
-  cout << " PIDrawer::DecodeOptionString  : ndec = "<< ndec <<endl;
+  //  cout << " PIDrawer::DecodeOptionString  : ndec = "<< ndec <<endl;
   // On appelle d'abord le decodage de la classe PIDrawer de laquelle
   // on herite. (Pas obligatoire) on decode donc ici les attributs de
   // couleur, fontes ...
   int ndec1 = PIDrawer::DecodeOptionString(opt, rmdecopt);
-  cout << " PIDrawer::DecodeOptionString apres PIDrawer::DecodeOptionString : ndec = "
-       << ndec1 <<"<>" << ndec <<endl;
+  //cout << " PIDrawer::DecodeOptionString apres PIDrawer::DecodeOptionString : ndec = "
+  //     << ndec1 <<"<>" << ndec <<endl;
   if( ndec - ndec1 < 1 ) return(ndec1);  // si tout a ete decode
 
@@ -862,8 +866,8 @@
       // options avec = 
       string deb = sopt.substr(0,sopt.find_first_of("="));
-      cout << " option avec =  : "<<deb<<" "<<sopt<<endl;
+      // cout << " option avec =  : "<<deb<<" "<<sopt<<endl;
       if( (deb =="ncont") || (deb =="nc") ){ // # de contours 
 	string fin =  sopt.substr(sopt.find_first_of("=")+1 , string::npos);
-	cout <<" fin "<<fin<<endl;
+	// cout <<" fin "<<fin<<endl;
 	int nlev = atoi(fin.c_str());
 	this->SetNLevel(nlev);
@@ -887,5 +891,5 @@
 	  }
 	  int nlev = ztmp.size();
-	  cout << "  PICOntourDrawer::DecodeOptionString "<<nlev<<" niveaux decodes "<<endl; 
+	  // cout << "  PICOntourDrawer::DecodeOptionString "<<nlev<<" niveaux decodes "<<endl; 
 	  this->SetCntLevelKind(LEVELS_DISCRETE);
 	  this->SetNLevel(nlev); 
@@ -929,8 +933,16 @@
       if( sopt == "labon" )
 	this->SetLabelOn();
+      else if ( sopt == "laboff" )
+	this->SetLabelOn(false);
+      else if ( sopt == "autolevels" )
+	this->SetCntLevelKind(LEVELS_AUTO);
+      else if (sopt == "linear" ){
+	this->SetCntKind(CONTOUR_KIND_BSPLINE);
+	recalc = 1;
+      }
       else if (sopt == "bspline" ){
 	this->SetCntKind(CONTOUR_KIND_BSPLINE);
 	recalc = 1;
-      }else if (sopt == "3spl" ){
+      }else if ((sopt == "3spl" )||(sopt == "cubicspl")) {
 	this->SetCntKind(CONTOUR_KIND_CUBIC_SPL);
 	recalc = 1;
@@ -963,4 +975,34 @@
 }
 
-
- 
+// Methode ajoute en Oct 2007 - Reza
+int PIContourDrawer::OptionToString(vector<string> & opt) const
+{
+ PIDrawer::OptionToString(opt);
+
+ if (GetCntKind()==CONTOUR_KIND_LINEAR)  opt.push_back("linear");
+ else if (GetCntKind()==CONTOUR_KIND_BSPLINE)  opt.push_back("bspline");
+ else if (GetCntKind()==CONTOUR_KIND_CUBIC_SPL)  opt.push_back("cubicspl");
+
+ if (IsLabelOn()) opt.push_back("labon");
+ else opt.push_back("laboff");
+
+ return 1;
+}
+
+void PIContourDrawer::GetOptionsHelpInfo(string& info)
+{
+  info += " ---- PIContourDrawer options help info : \n" ;
+  info += " autolevels : automatic selection of levels and number of contours \n"; 
+  info += " ncont=nLevel (or nc=NLevel) : sets the number of contour\n"; 
+  info += " lev=v1,v2,v3... (or niv=v1,v2,v3...) set the number and levels of contours\n"; 
+  info += " lstep=nLev,start,step : define incremental levels \n"; 
+  info += " labon/laboff : display of contour level values on/off \n"; 
+  info += " linear/bspline/cubicspl=3spl : select contour kind \n"; 
+// On recupere ensuite la chaine info de la classe de base
+  PIDrawer::GetOptionsHelpInfo(info);
+  return;
+}
+
+
+
+ 
