Index: README_LSM.txt
===================================================================
--- README_LSM.txt	(revision 25)
+++ README_LSM.txt	(revision 26)
@@ -1,69 +1,70 @@
 ----------------------------------------------------------------------
-			   Level Set Methods (LSM)
+			        - lsm3d -
+    Tools for segmenting 3D images of plant tissues 
+     at multiple scales using the level set method¶
 ----------------------------------------------------------------------
-Methods to improve image segmentation
-Images are save in .inr.gz
 
-**** 1 : lsm to detect the exterior contour           image -> contour
-------------------------------------------------------
+Download
+--------
+svn --username $USER checkout http://forge.cbp.ens-lyon.fr/svn/levelsetmethod/lsm3D
 
-Standard version = ./lsm_contour.exe image t_up t_down beta smooth 
-		 image : grayscale, 8bit, .inr or .inr.gz
-		 t_up, t_down : linear threshold (int)
-		 beta : curvature term (0:none)
-		 smooth  : amount of gaussian blur (float) 
-		 source code : lsm_detect_contour.cpp
+Compile
+--------
+cd lsm3D
+./lsm3D_compile.sh
 
-Change stop criteria = ./lsm_contour_SC.exe image t_up t_down beta smooth perUp perDown
-		     every iteration, the percentage of background growth is measure
-		     the algorithm stop after 10 succesive iterations between perDown and perUp
-		     in the standart version perUp=0.002 and perDown=-0.002
-		     source code : lsm_detect_contour_stopCriteria.cpp
 
-Start with a contour = ./lsm_start.exe image contour beta smooth
-		     contour : binary image with background=1
-		     .inr or .inr.gz
-		     source code : lsm_detect_startContour.cpp
+The following binaries will be generated in the bin directory :
+--------------------------------------------------------------
+- lsm_contour --> detects the outer surface of the tissue
+- lsm_cells --> used to cellular segmentation or nuclei detection
 
 
-
-**** 2 : improved watershed on                         image + contour -> watershed
+**** lsm_contour --> detects the outer surface of the tissue
 -------------------------------------------------------
 
-./segmentation_amelioration.py image contour
+Usage : lsm_detect_contour img t_up t_down a b smooth perUp perDown
+Examples for parameter values:
+------------------------------
+img : grayscale image of cells, (.inr or .inr.gz)
+Upper threshold : t_up = 20
+Down threshold : t_down = 5
+Area term : a = 0 (0.5, 1)
+Curvature term : b = 0 (1)
+Gaussian filter : smooth = 1 (0, if image already filtered)
+Stop criteria : the contour evolution is in [perDown,perUp] for 10 consecutive iterations
+     perUp = 0.002, perDown = -0.002
 
+Test :
+------
+lsm_detect_contour t3_cut.inr.gz 20 10 0 0 1 0.002 -0.002
 
-**** 3 : lsm to detect cells                           image + contour + watershed -> segmentation
--------------------------------------------------------
 
-Standard version = ./lsm_cells.exe image wat contour erosion
-	 	 image : grayscale, 8bit, .inr or .inr.gz
-		 wat : 16bit, .inr or .inr.gz
-		 contour : binary with background=1
-		 erosion : amount of erosion for each cell (int)
-		 source code : lsm_cells_para.cpp
+**** lsm_cells --> for cellular segmentation or nuclei detection
+-------------------------------------------------------------
 
-Only do a list of cells = ./lsm_cells_list.exe image wat contour erosion list
-     	       	  	list : .txt file with one number per row
-			number = cell label on watershed
-			source code : lsm_cells_para_list.cpp
-			keep watershed for other cells
+Usage : lsm_cells img img_wat img_contour erosion [a b smooth lsm_type]
+----------------- 
+img : grayscale image of cells, (.inr or .inr.gz)
+img_wat : image of seeds, (.inr or .inr.gz)
+img_contour : mask, where cells do not evolve, (.inr or .inr.gz)
+              if 'None', then cells can evolve on the whole image
+erosion : amount of erosion of seeds for initialisation (uint8) --> -2, 0, 2
+              if 0, then no erosion or dilation
+              if negative, then a dilation is performed
+a : area term (float) --> 0 or 0.5 or 1 (the default is 0.5)
+              if negative, the object retracts
+              if positive, the object inflates
+b : curvature term (float) --> 0 or 1 (the default is 0)
+gamma : scale parameter (float>0) --> 0.5 or 1 (the default is 1)
+smooth : gaussian blur to apply to the image (int) --> 0 or 1 (the default is 0)
+lsm_type : image, gradient or hessien based evolution --> 'i', 'g' or 'h' (the default is g)
 
-Restart at the final step = ./lsm_cells_step.exe image evoEdge contour
-	       	     	  evoEdge : 2nd step from standart lsm_cells
-			  source code : lsm_cells_para_finalstep.cpp
+Test :
+------
+lsm_cells t3_cut.inr.gz t3_cut_wat.inr.gz t3_cut_LSMcont20-10a0b0s1/t3_cut_LSMcont20-10a0b0s1.inr.gz 2 0.3 0 0.2 1 'h'
 
-Change curvature terms = ./lsm_cells_beta.exe image wat contour erosion beta betabis
-       		       beta : curvature term for the 2nd step (evoEdge)
-		       betabis : curvature term for the final step
 
 
-
 ------------------------------------------------------------
-         Known issues
------------------------------------------------------------
- Fiji is not able to read correctly the 16 bits watershed images : the labels are wrong 
-  You can use "./display.exe image" to visualize the result correctly 
-
-------------------------------------------------------------
-C++ version implement by Typhaine Moreau based on the work of Annamaria Kiss
+C++ version implemented by Typhaine Moreau based on the work of Annamaria Kiss
