• R/O
  • HTTP
  • SSH
  • HTTPS

base: コミット

This repository is a base of Eos.


コミットメタ情報

リビジョン1b1a7fdb1318555d0d085afe7955171723dccb52 (tree)
日時2018-02-04 14:27:25
作者安永卓生 <tacyas@yasu...>
コミッター安永卓生

ログメッセージ

modified: include/genUtil.h

Add verbose

modified: src/Objects/DataManip/mrcImage/src/lmrcImageSmoothing.c

Add verbose

変更サマリ

差分

--- a/include/genUtil.h
+++ b/include/genUtil.h
@@ -30,7 +30,11 @@
3030
3131 /* constant begin */
3232 #define GEN_UTIL_MAX_STRING_LENGTH (1024)
33-
33+#ifdef GLOBAL_DECLARATION
34+int __verbose__;
35+#else
36+extern int __verbose__;
37+#endif
3438 /* constant end */
3539
3640 /* prototype begin */
@@ -51,6 +55,7 @@
5155 #define DEGREE (180.0/PI)
5256 #define RADIAN (PI/180.0)
5357 #define PERCENT (100.0)
58+
5459 /* constant end */
5560
5661 /* prototype begin */
--- a/src/Objects/DataManip/mrcImage/src/lmrcImageSmoothing.c
+++ b/src/Objects/DataManip/mrcImage/src/lmrcImageSmoothing.c
@@ -318,6 +318,9 @@ __lmrcImageSmoothingMedianFilter(mrcImage* dst, mrcImage* src, lmrcImageSmoothin
318318 dst->Header = src->Header;
319319 mrcInit(dst, NULL);
320320 for(z = 0; z < src->HeaderN.z; z++) {
321+ if(__verbose__) {
322+ fprintf(stderr, "%d/%d\n", z, src->HeaderN.z);
323+ }
321324 for(y = 0; y < src->HeaderN.y; y++) {
322325 for(x = 0; x < src->HeaderN.x; x++) {
323326
--- a/src/Objects/General/genUtil/inc/genUtil.h
+++ b/src/Objects/General/genUtil/inc/genUtil.h
@@ -30,7 +30,11 @@
3030
3131 /* constant begin */
3232 #define GEN_UTIL_MAX_STRING_LENGTH (1024)
33-
33+#ifdef GLOBAL_DECLARATION
34+int __verbose__;
35+#else
36+extern int __verbose__;
37+#endif
3438 /* constant end */
3539
3640 /* prototype begin */
@@ -51,6 +55,7 @@
5155 #define DEGREE (180.0/PI)
5256 #define RADIAN (PI/180.0)
5357 #define PERCENT (100.0)
58+
5459 /* constant end */
5560
5661 /* prototype begin */
--- a/src/Tools/Config/Define.inc
+++ b/src/Tools/Config/Define.inc
@@ -1658,3 +1658,5 @@ WORLDNAME=Tools
16581658 WORLDNAME=Tools
16591659 WORLDNAME=Tools
16601660 WORLDNAME=Tools
1661+WORLDNAME=Tools
1662+WORLDNAME=Tools
--- a/src/Tools/mrcImage/mrcImageSmoothing/Config/OptionControlFile
+++ b/src/Tools/mrcImage/mrcImageSmoothing/Config/OptionControlFile
@@ -10,4 +10,5 @@
1010 "-times","-times","Repeat time","Optional","1","1","times","Integer","1"
1111 "-m","-m[ode]","Mode","Optional","1","1","mode","Integer","0"
1212 "-M","-M[ode2]","Mode","Optional","1","1","mode2","Integer","0"
13+"-verbose","-verbose","Verbose","Optional","0"
1314 "-c","-c[onfig]","ConfigurationFile","Optional","1","1","configFile","inFile","NULL"
--- a/src/Tools/mrcImage/mrcImageSmoothing/inc/mrcImageSmoothing.h
+++ b/src/Tools/mrcImage/mrcImageSmoothing/inc/mrcImageSmoothing.h
@@ -45,6 +45,8 @@ typedef struct mrcImageSmoothingInfo {
4545 long flagmode2;
4646 long mode2;
4747
48+ long verbose;
49+
4850 long flagconfigFile;
4951 char* configFile;
5052 FILE* fptconfigFile;
--- a/src/Tools/mrcImage/mrcImageSmoothing/src/argCheck.c
+++ b/src/Tools/mrcImage/mrcImageSmoothing/src/argCheck.c
@@ -138,6 +138,15 @@ argCheck(mrcImageSmoothingInfo* info, int argc, char* argv[])
138138 }
139139 SBREAK;
140140 }
141+ SCASE("verbose") {
142+ if(i+0<argc) {
143+ info->verbose++;
144+ } else {
145+ usage(argv[0]);
146+ exit(EXIT_FAILURE);
147+ }
148+ SBREAK;
149+ }
141150 SCASE("c") {
142151 if(i+1<argc) {
143152 info->configFile = stringGetNthWord(argv[i+1], 1, " ,");
--- a/src/Tools/mrcImage/mrcImageSmoothing/src/init.c
+++ b/src/Tools/mrcImage/mrcImageSmoothing/src/init.c
@@ -22,6 +22,7 @@ init0(mrcImageSmoothingInfo* info)
2222 info->times = 1; info->flagtimes = 0;
2323 info->mode = 0; info->flagmode = 0;
2424 info->mode2 = 0; info->flagmode2 = 0;
25+ info->verbose=0;
2526 info->fptconfigFile = NULL; info->flagconfigFile = 0;
2627 }
2728
--- a/src/Tools/mrcImage/mrcImageSmoothing/src/mrcImageSmoothing.c
+++ b/src/Tools/mrcImage/mrcImageSmoothing/src/mrcImageSmoothing.c
@@ -21,7 +21,8 @@ main(int argc, char* argv[])
2121 init0(&info);
2222 argCheck(&info, argc, argv);
2323 init1(&info);
24-
24+
25+ __verbose__ = info.verbose;
2526 switch(info.mode2%2){
2627 case 0: {
2728 linfo.sx = info.sx;
--- a/src/Tools/mrcImage/mrcImageSmoothing/src/mrcImageSmoothing.html
+++ b/src/Tools/mrcImage/mrcImageSmoothing/src/mrcImageSmoothing.html
@@ -18,6 +18,7 @@ Options:
1818 [-times times (1 ).as(Integer ) ] :Optional :Repeat time
1919 [-m[ode] mode (0 ).as(Integer ) ] :Optional :Mode
2020 [-M[ode2] mode2 (0 ).as(Integer ) ] :Optional :Mode
21+ [-verbose ] :Optional :Verbose
2122 [-c[onfig] configFile (NULL ).as(inFile ) ] :Optional :ConfigurationFile
2223 >>> Mode <<<<
2324 1: Median filter
--- a/src/Tools/mrcImage/mrcImageSmoothing/src/mrcImageSmoothing.pane
+++ b/src/Tools/mrcImage/mrcImageSmoothing/src/mrcImageSmoothing.pane
@@ -17,7 +17,8 @@
1717 -i 1 0 1 0 0 -1x1+1+12.000000 0 0 1 0 0 'times' 'Repeat time' times
1818 -i 1 0 1 0 0 -1x1+1+13.500000 0 0 0 0 0 'mode' 'Mode' m
1919 -i 1 0 1 0 0 -1x1+1+15.000000 0 0 0 0 0 'mode2' 'Mode' M
20- -I 1 0 1 0 0 1 -1x1+1+16.500000 ' ' 'configFile' 'ConfigurationFile' c
20+ -t 1 0 1 0 0 6x1+1+16 'verbose' 'Verbose' verbose
21+ -I 1 0 1 0 0 1 -1x1+1+18.000000 ' ' 'configFile' 'ConfigurationFile' c
2122 -E
2223 -E
2324 -E
--- a/src/Tools/mrcImage/mrcImageSmoothing/src/usage.c
+++ b/src/Tools/mrcImage/mrcImageSmoothing/src/usage.c
@@ -17,6 +17,7 @@ usage(char* thisProgram)
1717 fprintf(stderr, " [-times times (1 ).as(Integer ) ] :Optional :Repeat time\n");
1818 fprintf(stderr, " [-m[ode] mode (0 ).as(Integer ) ] :Optional :Mode\n");
1919 fprintf(stderr, " [-M[ode2] mode2 (0 ).as(Integer ) ] :Optional :Mode\n");
20+ fprintf(stderr, " [-verbose ] :Optional :Verbose\n");
2021 fprintf(stderr, " [-c[onfig] configFile (NULL ).as(inFile ) ] :Optional :ConfigurationFile\n");
2122 additionalUsage();
2223 }
旧リポジトリブラウザで表示