Révision 32 src/lsm_cells.cpp
lsm_cells.cpp (revision 32) | ||
---|---|---|
4 | 4 |
|
5 | 5 |
To compile : |
6 | 6 |
g++ -o lsm_cells lsm_cells.cpp -O2 -L/usr/X11R6/lib -lm -lpthread -lX11 -fopenmp |
7 |
Need CImg.h and lsm_lib.h |
|
7 |
Needs CImg.h and lsm_lib.h
|
|
8 | 8 |
|
9 | 9 |
To execute : |
10 |
./lsm_cells img img_wat img_contour erosion |
|
10 |
./lsm_cells img img_wat img_contour erosion a b gamma smooth type
|
|
11 | 11 |
|
12 | 12 |
image in .inr or .inr.gz, save in .inr.gz |
13 | 13 |
img : grayscale image of cells (unsigned char) |
14 | 14 |
img_wat : watershed 16bits image (unsigned short) with background label 1 and cells labels >1 |
15 | 15 |
img_contour : binary image with background=1, all cells=0 (unsigned char) |
16 | 16 |
erosion : amount of erosion for each cell in watershed image (int) |
17 |
a : area term (float) --> 0 or 0.5 or 1 (the default is 0.5) |
|
18 |
if negative, the object retracts |
|
19 |
if positive, the object inflates |
|
20 |
b : curvature term (float) --> 0 or 1 (the default is 0) |
|
21 |
gamma : scale parameter (float>0) --> 0.5 or 1 (the default is 1) |
|
22 |
smooth : gaussian blur to apply to the image (int) --> 0 or 1 (the default is 0) |
|
23 |
lsm_type : image, gradient or hessien based evolution --> 'i', 'g' or 'h' (the default is g) |
|
17 | 24 |
*/ |
18 | 25 |
|
19 | 26 |
#include <iostream> |
... | ... | |
357 | 364 |
|
358 | 365 |
int c0=-4; |
359 | 366 |
int erosion=atoi(argv[4]); |
360 |
int marge=10; //10
|
|
367 |
int marge=10; |
|
361 | 368 |
|
362 | 369 |
int lam=10; |
363 |
float alf=0.5;//1
|
|
370 |
float alf=0.5; |
|
364 | 371 |
float beta=0; |
365 | 372 |
float gamma=1; |
366 | 373 |
float smooth=0; |
Formats disponibles : Unified diff