Révision 26 README_LSM.txt
README_LSM.txt (revision 26) | ||
---|---|---|
1 | 1 |
---------------------------------------------------------------------- |
2 |
Level Set Methods (LSM) |
|
2 |
- lsm3d - |
|
3 |
Tools for segmenting 3D images of plant tissues |
|
4 |
at multiple scales using the level set method¶ |
|
3 | 5 |
---------------------------------------------------------------------- |
4 |
Methods to improve image segmentation |
|
5 |
Images are save in .inr.gz |
|
6 | 6 |
|
7 |
**** 1 : lsm to detect the exterior contour image -> contour |
|
8 |
------------------------------------------------------ |
|
7 |
Download |
|
8 |
-------- |
|
9 |
svn --username $USER checkout http://forge.cbp.ens-lyon.fr/svn/levelsetmethod/lsm3D |
|
9 | 10 |
|
10 |
Standard version = ./lsm_contour.exe image t_up t_down beta smooth |
|
11 |
image : grayscale, 8bit, .inr or .inr.gz |
|
12 |
t_up, t_down : linear threshold (int) |
|
13 |
beta : curvature term (0:none) |
|
14 |
smooth : amount of gaussian blur (float) |
|
15 |
source code : lsm_detect_contour.cpp |
|
11 |
Compile |
|
12 |
-------- |
|
13 |
cd lsm3D |
|
14 |
./lsm3D_compile.sh |
|
16 | 15 |
|
17 |
Change stop criteria = ./lsm_contour_SC.exe image t_up t_down beta smooth perUp perDown |
|
18 |
every iteration, the percentage of background growth is measure |
|
19 |
the algorithm stop after 10 succesive iterations between perDown and perUp |
|
20 |
in the standart version perUp=0.002 and perDown=-0.002 |
|
21 |
source code : lsm_detect_contour_stopCriteria.cpp |
|
22 | 16 |
|
23 |
Start with a contour = ./lsm_start.exe image contour beta smooth
|
|
24 |
contour : binary image with background=1
|
|
25 |
.inr or .inr.gz
|
|
26 |
source code : lsm_detect_startContour.cpp
|
|
17 |
The following binaries will be generated in the bin directory :
|
|
18 |
--------------------------------------------------------------
|
|
19 |
- lsm_contour --> detects the outer surface of the tissue
|
|
20 |
- lsm_cells --> used to cellular segmentation or nuclei detection
|
|
27 | 21 |
|
28 | 22 |
|
29 |
|
|
30 |
**** 2 : improved watershed on image + contour -> watershed |
|
23 |
**** lsm_contour --> detects the outer surface of the tissue |
|
31 | 24 |
------------------------------------------------------- |
32 | 25 |
|
33 |
./segmentation_amelioration.py image contour |
|
26 |
Usage : lsm_detect_contour img t_up t_down a b smooth perUp perDown |
|
27 |
Examples for parameter values: |
|
28 |
------------------------------ |
|
29 |
img : grayscale image of cells, (.inr or .inr.gz) |
|
30 |
Upper threshold : t_up = 20 |
|
31 |
Down threshold : t_down = 5 |
|
32 |
Area term : a = 0 (0.5, 1) |
|
33 |
Curvature term : b = 0 (1) |
|
34 |
Gaussian filter : smooth = 1 (0, if image already filtered) |
|
35 |
Stop criteria : the contour evolution is in [perDown,perUp] for 10 consecutive iterations |
|
36 |
perUp = 0.002, perDown = -0.002 |
|
34 | 37 |
|
38 |
Test : |
|
39 |
------ |
|
40 |
lsm_detect_contour t3_cut.inr.gz 20 10 0 0 1 0.002 -0.002 |
|
35 | 41 |
|
36 |
**** 3 : lsm to detect cells image + contour + watershed -> segmentation |
|
37 |
------------------------------------------------------- |
|
38 | 42 |
|
39 |
Standard version = ./lsm_cells.exe image wat contour erosion |
|
40 |
image : grayscale, 8bit, .inr or .inr.gz |
|
41 |
wat : 16bit, .inr or .inr.gz |
|
42 |
contour : binary with background=1 |
|
43 |
erosion : amount of erosion for each cell (int) |
|
44 |
source code : lsm_cells_para.cpp |
|
43 |
**** lsm_cells --> for cellular segmentation or nuclei detection |
|
44 |
------------------------------------------------------------- |
|
45 | 45 |
|
46 |
Only do a list of cells = ./lsm_cells_list.exe image wat contour erosion list |
|
47 |
list : .txt file with one number per row |
|
48 |
number = cell label on watershed |
|
49 |
source code : lsm_cells_para_list.cpp |
|
50 |
keep watershed for other cells |
|
46 |
Usage : lsm_cells img img_wat img_contour erosion [a b smooth lsm_type] |
|
47 |
----------------- |
|
48 |
img : grayscale image of cells, (.inr or .inr.gz) |
|
49 |
img_wat : image of seeds, (.inr or .inr.gz) |
|
50 |
img_contour : mask, where cells do not evolve, (.inr or .inr.gz) |
|
51 |
if 'None', then cells can evolve on the whole image |
|
52 |
erosion : amount of erosion of seeds for initialisation (uint8) --> -2, 0, 2 |
|
53 |
if 0, then no erosion or dilation |
|
54 |
if negative, then a dilation is performed |
|
55 |
a : area term (float) --> 0 or 0.5 or 1 (the default is 0.5) |
|
56 |
if negative, the object retracts |
|
57 |
if positive, the object inflates |
|
58 |
b : curvature term (float) --> 0 or 1 (the default is 0) |
|
59 |
gamma : scale parameter (float>0) --> 0.5 or 1 (the default is 1) |
|
60 |
smooth : gaussian blur to apply to the image (int) --> 0 or 1 (the default is 0) |
|
61 |
lsm_type : image, gradient or hessien based evolution --> 'i', 'g' or 'h' (the default is g) |
|
51 | 62 |
|
52 |
Restart at the final step = ./lsm_cells_step.exe image evoEdge contour
|
|
53 |
evoEdge : 2nd step from standart lsm_cells
|
|
54 |
source code : lsm_cells_para_finalstep.cpp
|
|
63 |
Test :
|
|
64 |
------
|
|
65 |
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'
|
|
55 | 66 |
|
56 |
Change curvature terms = ./lsm_cells_beta.exe image wat contour erosion beta betabis |
|
57 |
beta : curvature term for the 2nd step (evoEdge) |
|
58 |
betabis : curvature term for the final step |
|
59 | 67 |
|
60 | 68 |
|
61 |
|
|
62 | 69 |
------------------------------------------------------------ |
63 |
Known issues |
|
64 |
----------------------------------------------------------- |
|
65 |
Fiji is not able to read correctly the 16 bits watershed images : the labels are wrong |
|
66 |
You can use "./display.exe image" to visualize the result correctly |
|
67 |
|
|
68 |
------------------------------------------------------------ |
|
69 |
C++ version implement by Typhaine Moreau based on the work of Annamaria Kiss |
|
70 |
C++ version implemented by Typhaine Moreau based on the work of Annamaria Kiss |
Formats disponibles : Unified diff