Index: lsm_detect_contour.cpp
===================================================================
--- lsm_detect_contour.cpp	(revision 23)
+++ lsm_detect_contour.cpp	(revision 24)
@@ -4,7 +4,7 @@
 Stop criteria parameters in command lines
 
 To compile
- g++ -o lsm_detect_contour_full.exe lsm_detect_contour_full.cpp -O2 -L/usr/X11R6/lib -lm -lpthread -lX11 -l:libtiff.so.5
+ g++ -o lsm_detect_contour lsm_detect_contour_full.cpp -O2 -L/usr/X11R6/lib -lm -lpthread -lX11 -l:libtiff.so.5
  Need CImg.h and lsm_lib.h
  
 To execute
@@ -39,9 +39,10 @@
   if(argc!=9)
     {
       cout<<"!! wrong number of arguments"<<endl;
-      cout<<"Usage : ./xxxx.exe img t_up t_down a b smooth perUp perDown"<<endl;
+      cout<<"Usage : lsm_detect_contour img t_up t_down a b smooth perUp perDown"<<endl;
       cout<<"Examples for parameter values:"<<endl;
       cout<<"------------------------------"<<endl;
+      cout<<"img : grayscale image of cells, (.inr or .inr.gz)"<<endl;
       cout<<"Upper threshold : t_up = 20"<<endl;
       cout<<"Down threshold : t_down = 5"<<endl;
       cout<<"Area term : a = 0 (0.5, 1)"<<endl;
Index: lsm_cells.cpp
===================================================================
--- lsm_cells.cpp	(revision 23)
+++ lsm_cells.cpp	(revision 24)
@@ -3,11 +3,11 @@
 Parallel standard version
 
 To compile :
- g++ -o lsm_cells_20160610.exe lsm_cells_20160610.cpp -O2 -L/usr/X11R6/lib -lm -lpthread -lX11 -fopenmp
+ g++ -o lsm_cells lsm_cells.cpp -O2 -L/usr/X11R6/lib -lm -lpthread -lX11 -fopenmp
  Need CImg.h and lsm_lib.h
 
 To execute :
- ./lsm_cells.exe img img_wat img_contour erosion
+ ./lsm_cells img img_wat img_contour erosion
 
  image in .inr or .inr.gz, save in .inr.gz
  img : grayscale image of cells (unsigned char)
@@ -152,10 +152,6 @@
 		
       //Stop criteria
       int bg_evolution=abs(new_backsegm-backsegm);
-      /*
-      if((it>20)and(bg_evolution<evolution_min))
-	{contour_evolve=false;}
-	*/
 	
       //New stop criteria 
       if((it>10) and (bg_evolution<=evolution_min) and (bg_evolution>=evolution_max))
@@ -256,7 +252,7 @@
   if(argc<5)
     {
     cout<<"!! wrong number of arguments ("<<argc<<")"<<endl;
-    cout<<"how to execute : ./lsm_cells.exe img img_wat img_contour erosion [a b smooth lsm_type]"<<endl;
+    cout<<"Usage : lsm_cells img img_wat img_contour erosion [a b smooth lsm_type]"<<endl;
     cout<<"----------------- "<<endl;  
 	cout<<"img : grayscale image of cells, (.inr or .inr.gz)"<<endl;
 	cout<<"img_wat : image of seeds, (.inr or .inr.gz)"<<endl;
@@ -269,7 +265,7 @@
 	cout<<"              if negative, the object retracts"<<endl;
 	cout<<"              if positive, the object inflates"<<endl;
 	cout<<"b : curvature term (float) --> 0 or 1 (the default is 0)"<<endl;
-	cout<<"gamma : scale parameter (float>0) --> 0.5 or 1 (the default is 0)"<<endl;
+	cout<<"gamma : scale parameter (float>0) --> 0.5 or 1 (the default is 1)"<<endl;
 	cout<<"smooth : gaussian blur to apply to the image (int) --> 0 or 1 (the default is 0)"<<endl;
     cout<<"lsm_type : image, gradient or hessien based evolution --> 'i', 'g' or 'h' (the default is g)"<<endl;  
       return 0;
@@ -361,8 +357,6 @@
 
   //---------------------------------------------------------------Parameters
   //model parameters
-  //int alfabis=100;
-  //float betabis=0;
   
   int c0=-4;
   int erosion=atoi(argv[4]);
@@ -419,8 +413,6 @@
 
   //------------------------------------Names and directories
   //new name with arguments
-  //string ar=argv[4];
-  //string insert="_cellLSM-d"+ar;
   filename.insert(filename.size()-4,insert);
 
   //create directories and update names
@@ -510,17 +502,8 @@
   CImgList<float> gg=gradient(g);
   CImg<float> h=g;
   img.assign();
+
   
-  // save edge indicator
-  string edge_indicator_name = "edge_indicator.inr";
-  g.save_inr(edge_indicator_name.c_str(),tailleVoxel);
-  string zip="gzip -f "+edge_indicator_name;
-  syst=system(zip.c_str());
-  
-  //g.crop(0,0,cut,0,g._width,g._height,cut,0);
-  //g.normalize(0,255).save((filename_cut+"_edge_indicator.png").c_str());
-  // warning !!! once normalised, one cannot do computations with it
-  
   CImg<float> gout=g;
   gout.crop(0,0,cut,0,g._width,g._height,cut,0);
   gout.normalize(0,255).save((filename_cut+"_edge_indicator.png").c_str());
@@ -557,7 +540,7 @@
   //reconstruct image of eroded cell
   CImg<unsigned short> wat_eroded=reconstruct(background,psi_list,min_list,nbcells,list);
   wat_eroded.save_inr(wat_eroded_name.c_str(),tailleVoxel);
-  zip="gzip -f "+wat_eroded_name;
+  string zip="gzip -f "+wat_eroded_name;
   syst=system(zip.c_str());
   wat_eroded.crop(0,0,cut,0,wat_eroded._width,wat_eroded._height,cut,0);
   wat_eroded.normalize(0,255).save((filename_cut+"_eroded.png").c_str());
@@ -600,60 +583,6 @@
   file<<"edge detection : "<<time2<<endl;
 
 
-/*
-  //--------------------------------------------------------Edge evolution
-  //evolve every cell to fill the gaps
-  lam=0;
-  alf=alfabis;
-  beta=betabis;
-  bool contour_evolve=true;
-  float backsegm=free.sum();
-  int it=0;
-  int it_stop=0;
-
-  while((it<timestep_max)and(contour_evolve==true))
-    {
-      //each cell evolve one time step
-#pragma omp parallel shared(psi_list,min_list,g,gg,h,lam,mu,alf,beta,epsilon,dt,free)
-      {
-#pragma omp for schedule(dynamic)
-	for(int i=0;i<nbcells;i++) 
-	  {
-	  psi_list[i]=evolution_AK2_contour_interact(psi_list[i],g,gg,h,lam,mu,alf,beta,epsilon,dt,free,min_list[i]);
-	  }
-      }
-
-      //reconstruct image of edge detection, overlap=not segmented
-      edge=reconstruct_overlap(background,psi_list,min_list,nbcells,free,list);
-
-      //bg evolution
-      float newsegm=free.sum();
-      float bg_evolution=newsegm-backsegm;
-      backsegm=newsegm;
-
-      //stop criteria
-      //double stop_criteria=size-newsegm;
-      if((it>40)and(abs(bg_evolution)<1))
-	{
-	    contour_evolve=false;
-	}
-
-      //save
-      if(((it%100==0)and(it!=0))or(contour_evolve==false)or(it==timestep_max-1))
-	{
-	  edge.save_inr(edge_evolve_name.c_str(),tailleVoxel);
-	  zip="gzip -f "+edge_evolve_name;
-	  syst=system(zip.c_str());
-	  CImg<unsigned short> edgeCrop=edge.get_crop(0,0,cut,0,edge._width,edge._height,cut,0);
-	  edgeCrop.normalize(0,255).save((filename_cut+"_final.png").c_str());
-	}
-
-      cout<<"it "<<it<<" evo "<<bg_evolution<<endl;
-      it+=1;
-
-    }
-*/
-
   double end=omp_get_wtime();
   double time=double(end-begin);
   cout<<"total time : "<<time<<" (~"<<time/60<<" mn  ~"<<time/60/60<<" h)"<<endl;
