Révision 21
lsm3D_compile.sh (revision 21) | ||
---|---|---|
2 | 2 |
|
3 | 3 |
bin_directory='../bin' |
4 | 4 |
compiling_options=' -O2 -L/usr/X11R6/lib -lm -lpthread -lX11 ' |
5 |
#compiling_options=' -O2 -lm -lpthread ' |
|
6 | 5 |
|
7 | 6 |
cd src |
8 | 7 |
echo '------------------------------------' |
9 |
echo 'compiling lsm_detect_contour...' |
|
10 |
g++ -o $bin_directory/lsm_detect_contour.exe lsm_detect_contour.cpp $compiling_options
|
|
8 |
echo 'compiling lsm_detect_contour_full...'
|
|
9 |
g++ -o $bin_directory/lsm_detect_contour_full.exe lsm_detect_contour_full.cpp $compiling_options
|
|
11 | 10 |
|
12 |
echo 'compiling lsm_detect_contour_mgx...'
|
|
13 |
g++ -o $bin_directory/lsm_detect_contour_mgx.exe lsm_detect_contour_mgx.cpp $compiling_options -l:libtiff.so.5
|
|
11 |
echo 'compiling lsm_detect_contour_tiffonly...'
|
|
12 |
g++ -o $bin_directory/lsm_detect_contour_tiffonly.exe lsm_detect_contour_tiffonly.cpp $compiling_options -l:libtiff.so.5
|
|
14 | 13 |
|
15 | 14 |
echo 'compiling lsm_cells...' |
16 | 15 |
g++ -o $bin_directory/lsm_cells.exe lsm_cells.cpp $compiling_options -lX11 -fopenmp |
src/lsm_lib.h (revision 21) | ||
---|---|---|
13 | 13 |
|
14 | 14 |
//**************************************** GLOBAL IMAGE ************************************************************************* |
15 | 15 |
|
16 |
//Invert the image |
|
17 |
//---------------------------------------------------------------------------- |
|
18 |
CImg<unsigned char> invert_image(CImg<unsigned char> const & img) |
|
19 |
{ |
|
20 |
CImg<unsigned char> unity(img._width,img._height,img._depth,1,1); |
|
21 |
CImg<unsigned char> inverted = unity - img; |
|
22 |
return inverted; |
|
23 |
} |
|
24 |
|
|
16 | 25 |
//Add black slices on each side of the image |
17 | 26 |
//---------------------------------------------------------------------------- |
18 | 27 |
CImg<float> add_side_slices(CImg<float> const & img, int side) |
src/lsm_detect_contour_full.cpp (revision 21) | ||
---|---|---|
93 | 93 |
float perDown=atof(argv[8]); |
94 | 94 |
|
95 | 95 |
float tailleVoxel[3] = {0.195177,0.195177,0.195177}; |
96 |
|
|
97 |
//other paremeters |
|
98 |
int systout; |
|
96 | 99 |
|
97 | 100 |
//-------------------------------------------Names and directories |
98 | 101 |
//new name with arguments |
... | ... | |
111 | 114 |
string outputdir=filename; |
112 | 115 |
outputdir.erase(filename.size()-4); |
113 | 116 |
string mkdir="mkdir -p "+outputdir; |
114 |
system(mkdir.c_str()); |
|
117 |
systout=system(mkdir.c_str());
|
|
115 | 118 |
mkdir="mkdir -p "+outputdir+"/evolution"; |
116 |
system(mkdir.c_str()); |
|
119 |
systout=system(mkdir.c_str());
|
|
117 | 120 |
|
118 | 121 |
string filename_cut=outputdir+"/evolution/"+filename; |
119 | 122 |
filename_cut.erase(filename_cut.size()-4); |
... | ... | |
250 | 253 |
segSave.save_inr(result_name.c_str(),tailleVoxel); |
251 | 254 |
segSave.assign(); |
252 | 255 |
string zip="gzip -f "+result_name; |
253 |
system(zip.c_str()); |
|
256 |
systout=system(zip.c_str());
|
|
254 | 257 |
} |
255 | 258 |
it+=1; |
256 | 259 |
} |
Formats disponibles : Unified diff